parent
244dc53be8
commit
1433a39160
43
init.el
43
init.el
|
@ -515,7 +515,12 @@
|
|||
"Setup eww bookmark integration."
|
||||
(setq-local bookmark-make-record-function #'bookmark-eww--make)))
|
||||
|
||||
(:bind "b" #'bookmark-set
|
||||
(:bind "RET" (defun eww/browse-url (arg)
|
||||
(interactive "P")
|
||||
(if-let ((url (thing-at-point 'url)))
|
||||
(browse-url url)
|
||||
(call-interactively #'acdw/link-hint-open-link)))
|
||||
"b" #'bookmark-set
|
||||
"B" #'bookmark-jump
|
||||
"M-n" nil
|
||||
"M-p" nil))
|
||||
|
@ -525,6 +530,9 @@
|
|||
(add-hook 'after-save-hook
|
||||
#'executable-make-buffer-file-executable-if-script-p))
|
||||
|
||||
(setup elec-pair
|
||||
(electric-pair-mode +1))
|
||||
|
||||
(setup files
|
||||
(:option auto-save-file-name-transforms `((".*" ,(acdw/dir "auto-save/" t) t))
|
||||
auto-save-list-file-prefix (acdw/dir "auto-save-list/.saves-" t)
|
||||
|
@ -978,8 +986,7 @@ specific to most general, they are these:
|
|||
shr-max-width fill-column
|
||||
shr-max-image-proportion 0.6
|
||||
shr-image-animate t
|
||||
shr-discard-aria-hidden t
|
||||
shr-folding-mode t))
|
||||
shr-discard-aria-hidden t))
|
||||
|
||||
(setup text
|
||||
(:hook turn-on-auto-fill
|
||||
|
@ -1235,7 +1242,11 @@ specific to most general, they are these:
|
|||
lui-fill-remove-face-from-newline nil)
|
||||
|
||||
(:hook #'visual-fill-column-mode
|
||||
#'visual-line-mode)
|
||||
#'visual-line-mode
|
||||
#'enable-lui-track)
|
||||
|
||||
(:face lui-time-stamp-face
|
||||
((t :inherit font-lock-comment-face)))
|
||||
|
||||
(:local-set visual-fill-column-extra-text-width
|
||||
(cons acdw-irc/left-margin 0)
|
||||
|
@ -1247,9 +1258,7 @@ specific to most general, they are these:
|
|||
nyan-mode nil
|
||||
line-number-mode nil
|
||||
column-number-mode nil
|
||||
file-percentage-mode nil)
|
||||
|
||||
(:hook #'enable-lui-track)))
|
||||
file-percentage-mode nil)))
|
||||
|
||||
(setup (:straight (consult
|
||||
:host github
|
||||
|
@ -1533,6 +1542,7 @@ See also `crux-reopen-as-root-mode'."
|
|||
(:hook #'reading-mode)
|
||||
(:local-set shr-max-image-proportion 0.9
|
||||
shr-width nil
|
||||
shr-max-width nil
|
||||
fill-column 0)
|
||||
;; see https://irreal.org/blog/?p=8885
|
||||
(:bind "SPC" (defun elfeed-scroll-up-command (&optional arg)
|
||||
|
@ -2293,25 +2303,6 @@ the default is \"/\"."
|
|||
(:also-load eldoc)
|
||||
(eldoc-add-command 'paredit-backward-delete 'paredit-close-round))
|
||||
|
||||
;; (setup (:straight paredit)
|
||||
;; (:bind "DEL" #'paredit-backward-delete
|
||||
;; "C-<backspace>" #'paredit-backward-kill-word
|
||||
;; "M-w" #'paredit-copy-as-kill
|
||||
;; "RET" #'paredit-newline)
|
||||
|
||||
;; (:unbind "M-s" ; paredit-splice-sexp
|
||||
;; "C-j" ; paredit-newline (rebound to RET)
|
||||
;; )
|
||||
|
||||
;; (:hook-into emacs-lisp-mode
|
||||
;; ielm-mode sly-repl-mode
|
||||
;; lisp-mode
|
||||
;; lisp-interaction-mode
|
||||
;; scheme-mode)
|
||||
|
||||
;; (:also-load eldoc)
|
||||
;; (eldoc-add-command 'paredit-backward-delete 'paredit-close-round))
|
||||
|
||||
(setup (:straight paren-face)
|
||||
(:hook-into emacs-lisp-mode
|
||||
ielm-mode sly-repl-mode
|
||||
|
|
|
@ -33,13 +33,18 @@ Otherwise, cdr should be a function that takes two points (see `count-words')."
|
|||
|
||||
(defun acdw-modeline/buffer-name () ; gonsie
|
||||
"Display the buffer name in a face reflecting its modified status."
|
||||
(propertize (concat (format " %-20s" (truncate-string 20 (buffer-name) "~")))
|
||||
'face 'bold
|
||||
;; (if (buffer-modified-p)
|
||||
;; 'font-lock-warning-face
|
||||
;; 'font-lock-type-face)
|
||||
'help-echo (or (buffer-file-name)
|
||||
(buffer-name))))
|
||||
(propertize
|
||||
(concat
|
||||
(format " %-20s"
|
||||
(truncate-string 20
|
||||
(string-trim (buffer-name) "*" "*")
|
||||
"~")))
|
||||
'face 'bold
|
||||
;; (if (buffer-modified-p)
|
||||
;; 'font-lock-warning-face
|
||||
;; 'font-lock-type-face)
|
||||
'help-echo (or (buffer-file-name)
|
||||
(buffer-name))))
|
||||
|
||||
(defun acdw-modeline/erc ()
|
||||
"ERC indicator for the modeline."
|
||||
|
@ -90,31 +95,32 @@ Otherwise, cdr should be a function that takes two points (see `count-words')."
|
|||
(defun acdw-modeline/modified () ; modified from `simple-modeline'
|
||||
"Displays a color-coded buffer modification/read-only
|
||||
indicator in the mode-line."
|
||||
(if (not (string-match-p "\\*.*\\*" (buffer-name)))
|
||||
(let* ((read-only (and buffer-read-only (buffer-file-name)))
|
||||
(modified (buffer-modified-p)))
|
||||
(propertize
|
||||
(concat " "
|
||||
(cond
|
||||
((derived-mode-p 'special-mode
|
||||
'lui-mode)
|
||||
"~")
|
||||
(read-only "=")
|
||||
(modified "+")
|
||||
(t "-")))
|
||||
'help-echo (format
|
||||
(concat "Buffer is %s and %smodified\n"
|
||||
"mouse-1: Toggle read-only status.")
|
||||
(if read-only "read-only" "writable")
|
||||
(if modified "" "not "))
|
||||
'local-map (purecopy (simple-modeline-make-mouse-map
|
||||
'mouse-1
|
||||
(lambda (event)
|
||||
(interactive "e")
|
||||
(with-selected-window
|
||||
(posn-window (event-start event))
|
||||
(read-only-mode 'toggle)))))
|
||||
'mouse-face 'mode-line-highlight))))
|
||||
(let* ((read-only (and buffer-read-only (buffer-file-name)))
|
||||
(modified (buffer-modified-p)))
|
||||
(propertize
|
||||
(concat " "
|
||||
(cond
|
||||
((string-match-p "\\*.*\\*" (buffer-name))
|
||||
"*")
|
||||
((derived-mode-p 'special-mode
|
||||
'lui-mode)
|
||||
"~")
|
||||
(read-only "=")
|
||||
(modified "+")
|
||||
(t "-")))
|
||||
'help-echo (format
|
||||
(concat "Buffer is %s and %smodified\n"
|
||||
"mouse-1: Toggle read-only status.")
|
||||
(if read-only "read-only" "writable")
|
||||
(if modified "" "not "))
|
||||
'local-map (purecopy (simple-modeline-make-mouse-map
|
||||
'mouse-1
|
||||
(lambda (event)
|
||||
(interactive "e")
|
||||
(with-selected-window
|
||||
(posn-window (event-start event))
|
||||
(read-only-mode 'toggle)))))
|
||||
'mouse-face 'mode-line-highlight)))
|
||||
|
||||
(defun acdw-modeline/narrowed ()
|
||||
"Display an indication if the buffer is narrowed."
|
||||
|
@ -195,7 +201,7 @@ is, if point < mark."
|
|||
(defun acdw-modeline/wc ()
|
||||
"Display current `wc-buffer-stats'."
|
||||
(when (bound-and-true-p wc-mode)
|
||||
(or wc-buffer-stats " [w]")))
|
||||
(format "%8s" (or (cadr wc-buffer-stats) "[w]"))))
|
||||
|
||||
(defun acdw-modeline/winum ()
|
||||
"Show the `winum' number of the current window in the modeline.
|
||||
|
|
|
@ -465,7 +465,8 @@ probably abandon it at some point for a better solution (see:
|
|||
(save-excursion
|
||||
(save-match-data
|
||||
(widen)
|
||||
(while (not (org-entry-is-todo-p))
|
||||
(while (not (or (org-entry-is-todo-p)
|
||||
(org-entry-is-done-p)))
|
||||
;; TODO: need a better error message
|
||||
(org-previous-visible-heading 1))
|
||||
(org-narrow-to-subtree))))
|
||||
|
|
Loading…
Reference in New Issue