diff options
author | JSDurand <mmemmew@gmail.com> | 2021-01-27 18:34:52 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2021-01-27 18:39:30 +0800 |
commit | 43afe6c5db55704f787aaee4cedd7f4c69206b8b (patch) | |
tree | bbaa1c90455801023c9f99ccfa175b1c5c121e9c /basic.el | |
parent | 4108bfb79643248821fb1d62cae9a4ac7146f1bc (diff) |
Further configurations
* basic.el (eval-expression-print-length):
(eval-expression-print-level): Now echo are will print without limits.
(winner): Enable winner-mode at start up.
(input-decode-map):
(key-translation-map): Translate ESC to make the following key
modified by control.
(bookmark-completing-read):
(durand-bookmark-completing-read): Now it won't ask me for
confirmation about my choices.
* init.el ("durand-chercher-pdf"): Further enhance the convenience of
viewing PDFs.
("embark-conf.el"): Now I don't use embark anymore.
* view-conf.el (durand-view-map): Add my own way of viewing things.
(durand-open-targets): These are the things I can open.
(durand-open-object): Open things quickly.
Diffstat (limited to 'basic.el')
-rw-r--r-- | basic.el | 52 |
1 files changed, 52 insertions, 0 deletions
@@ -1,5 +1,11 @@ ;;; -*- lexical-binding: t; -*- +;;; No limit in printing, since I oft want to print the results of +;;; evaluating expressions. + +(set 'eval-expression-print-length nil) ;; A value of nil means no limit. +(set 'eval-expression-print-level nil) ;; A value of nil means no limit. + ;;; Important in order to read passwords (setq epg-pinentry-mode 'loopback) @@ -337,6 +343,52 @@ window horizontally." (define-key global-map (vector ?\s-D) #'dired-other-window) (define-key global-map (vector ?\s-v) #'durand-focus-completion-or-minibuffer) +;; I like to use winner mode now + +(require 'winner) + +(winner-mode 1) + +;;; Escape triggers super + +(define-key input-decode-map (vector 27) nil) +(define-key input-decode-map (vector 27) #'event-apply-control-modifier) +(define-key key-translation-map (vector 27) #'event-apply-control-modifier) + +;;; Don't ask me to confirm! + +;;;###autoload +(defun durand-bookmark-completing-read (prompt &optional default) + "Prompting with PROMPT, read a bookmark name in completion. +PROMPT will get a \": \" stuck on the end no matter what, so you +probably don't want to include one yourself. +Optional arg DEFAULT is a string to return if the user input is empty. +If DEFAULT is nil then return empty string for empty input. + +Don't ask me to confirm my choice. --- Durand" + (bookmark-maybe-load-default-file) ; paranoia + (if (listp last-nonmenu-event) + (bookmark-menu-popup-paned-menu t prompt + (if bookmark-sort-flag + (sort (bookmark-all-names) + 'string-lessp) + (bookmark-all-names))) + (let* ((completion-ignore-case bookmark-completion-ignore-case) + (default (unless (equal "" default) default)) + (prompt (concat prompt (if default + (format " (%s): " default) + ": ")))) + (completing-read prompt + (lambda (string pred action) + (if (eq action 'metadata) + '(metadata (category . bookmark)) + (complete-with-action + action bookmark-alist string pred))) + nil t nil 'bookmark-history default)))) + +(advice-add 'bookmark-completing-read :override #'durand-bookmark-completing-read) + + ;;; Package management ;;;###autoload |