From 393604e5bf4ce15df7342fdc094900fd1be2b39f Mon Sep 17 00:00:00 2001 From: JSDurand Date: Mon, 8 Feb 2021 23:36:26 +0800 Subject: Constantly growing A lot of improvements. --- view-conf.el | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'view-conf.el') diff --git a/view-conf.el b/view-conf.el index 0f0ef29..47ee35d 100644 --- a/view-conf.el +++ b/view-conf.el @@ -98,6 +98,8 @@ If ARG is '(16), view the battery information." (define-key map (vector ?t) #'durand-view-timers-or-temps) (define-key map (vector ?e) #'eshell) (define-key map (vector ?p) #'durand-chercher-pdf) + (define-key map (vector ?o) #'olivetti-mode) + (define-key map (vector ?r) #'choose-recent-file) map) "The keymap that is related to my custom functions about viewing.") @@ -106,6 +108,7 @@ If ARG is '(16), view the battery information." (require 'view) (define-key view-mode-map (vector 108) #'recenter-top-bottom) +(define-key view-mode-map (vector 76) #'reposition-window) (define-key view-mode-map (vector ?j) #'View-scroll-line-forward) (define-key view-mode-map (vector ?k) #'View-scroll-line-backward) @@ -119,7 +122,11 @@ If ARG is '(16), view the battery information." "https://www.gmail.com" "https://www.facebook.com" "https://protesilaos.com")) - (list "Terminal" "open" "-a" "Terminal" -1)) + (list "Terminal" "open" "-a" "Terminal" (list + "/Users/durand/Desktop/Centre/Vidéos/" + "/Users/durand/Desktop/Centre/Musique/" + "/Users/durand/Downloads/")) + (list "Messenger" "open" "-a" "Messenger")) "Targets to open by `durand-open-object'. This is an association list whose elements have `car' equal to @@ -132,7 +139,6 @@ targets.") ;;;###autoload (defun durand-target-extra-arg (target) "Determine if TARGET has room for extra arguments. - This returns the list of extra argument slots, or nil if there is none." (let (temp result) @@ -140,7 +146,8 @@ none." (setq temp (car target)) (setq target (cdr target)) (cond - ((eq temp -1) + ;; We shall not test numbers by `eq'. + ((equal temp -1) (setq result (cons -1 result))) ((consp temp) (setq result (cons temp result))))) @@ -149,7 +156,6 @@ none." ;;;###autoload (defun durand-replace-extra-args (target extra-args) "Replace slots for extra-args in TARGET by EXTRA-ARGS. - This does not check if the lengths match, though in theory they should. @@ -170,11 +176,10 @@ And this will delete any `nil' values from the result." ;;;###autoload (defun durand-open-object (&optional arg) "Open something. - What can be opened is controlled by the variable `durand-open-targets'. -If ARG is non-nil, and if the chosen target contains `-1' in the +If ARG is non-nil, and if the chosen target contains -1 in the command line options, then read a string to replace that -1. If the chosen target has a sub-list, then use that sub-list as options to choose from." -- cgit v1.2.3-18-g5258