nov-mode and bookmarks

This commit is contained in:
Chris Cochrun 2021-09-12 07:27:33 -05:00
parent 689c811bba
commit 58ccd2197c
2 changed files with 85 additions and 59 deletions

View file

@ -604,7 +604,8 @@ Consult has a lot of nice functions like Ivy's Counsel functions (enhanced searc
:states 'normal :states 'normal
:keymaps 'override :keymaps 'override
"si" 'consult-imenu "si" 'consult-imenu
"so" 'consult-org-heading)) "so" 'consult-org-heading
"sm" 'bookmark-jump))
#+end_src #+end_src
*** MARGINALIA *** MARGINALIA
@ -1209,6 +1210,7 @@ Part of this config includes some special capture templates for my work as a you
"RET" 'chris/org-dwim-at-point "RET" 'chris/org-dwim-at-point
"gC" 'chris/org-columns-view "gC" 'chris/org-columns-view
"ge" 'org-edit-src-code "ge" 'org-edit-src-code
"gr" 'revert-buffer
"t" 'org-todo) "t" 'org-todo)
('insert org-mode-map ('insert org-mode-map
"C-i" 'completion-at-point) "C-i" 'completion-at-point)
@ -1887,7 +1889,16 @@ Let's use pdf-tools for a lot better interaction with pdfs.
(use-package nov (use-package nov
:mode ("\\.epub\\'" . nov-mode) :mode ("\\.epub\\'" . nov-mode)
:config :config
(add-hook 'nov-mode-hook 'visual-fill-column-mode))
(defun chris/setup-nov-mode
(interactive)
(visual-fill-column-mode)
(display-line-numbers-mode -1)
(variable-pitch-mode +1)
(setq visual-fill-column-width 100
visual-fill-column-center-text t))
(add-hook 'nov-mode-hook 'chris/setup-nov-mode))
#+end_src #+end_src
** EAF (Emacs Application Framework) ** EAF (Emacs Application Framework)
@ -1920,7 +1931,9 @@ interfere with the default `bongo-playlist-buffer'."
(enclosure (elt (car (elfeed-entry-enclosures entry)) 0)) (enclosure (elt (car (elfeed-entry-enclosures entry)) 0))
(url (if (string-prefix-p "https://thumbnails" enclosure) (url (if (string-prefix-p "https://thumbnails" enclosure)
link link
enclosure)) (if (string= enclosure nil)
link
enclosure)))
(title (elfeed-entry-title entry)) (title (elfeed-entry-title entry))
(bongo-pl chris/elfeed-bongo-playlist) (bongo-pl chris/elfeed-bongo-playlist)
(buffer (get-buffer-create bongo-pl))) (buffer (get-buffer-create bongo-pl)))

19
init.el
View file

@ -344,7 +344,8 @@ vertically."
:states 'normal :states 'normal
:keymaps 'override :keymaps 'override
"si" 'consult-imenu "si" 'consult-imenu
"so" 'consult-org-heading)) "so" 'consult-org-heading
"sm" 'bookmark-jump))
(use-package marginalia (use-package marginalia
:bind (:map minibuffer-local-map :bind (:map minibuffer-local-map
@ -811,6 +812,7 @@ vertically."
"RET" 'chris/org-dwim-at-point "RET" 'chris/org-dwim-at-point
"gC" 'chris/org-columns-view "gC" 'chris/org-columns-view
"ge" 'org-edit-src-code "ge" 'org-edit-src-code
"gr" 'revert-buffer
"t" 'org-todo) "t" 'org-todo)
('insert org-mode-map ('insert org-mode-map
"C-i" 'completion-at-point) "C-i" 'completion-at-point)
@ -1414,7 +1416,16 @@ If on a:
(use-package nov (use-package nov
:mode ("\\.epub\\'" . nov-mode) :mode ("\\.epub\\'" . nov-mode)
:config :config
(add-hook 'nov-mode-hook 'visual-fill-column-mode))
(defun chris/setup-nov-mode
(interactive)
(visual-fill-column-mode)
(display-line-numbers-mode -1)
(variable-pitch-mode +1)
(setq visual-fill-column-width 100
visual-fill-column-center-text t))
(add-hook 'nov-mode-hook 'chris/setup-nov-mode))
(use-package eaf (use-package eaf
:straight (:host github :repo "manateelazycat/emacs-application-framework" :straight (:host github :repo "manateelazycat/emacs-application-framework"
@ -1440,7 +1451,9 @@ interfere with the default `bongo-playlist-buffer'."
(enclosure (elt (car (elfeed-entry-enclosures entry)) 0)) (enclosure (elt (car (elfeed-entry-enclosures entry)) 0))
(url (if (string-prefix-p "https://thumbnails" enclosure) (url (if (string-prefix-p "https://thumbnails" enclosure)
link link
enclosure)) (if (string= enclosure nil)
link
enclosure)))
(title (elfeed-entry-title entry)) (title (elfeed-entry-title entry))
(bongo-pl chris/elfeed-bongo-playlist) (bongo-pl chris/elfeed-bongo-playlist)
(buffer (get-buffer-create bongo-pl))) (buffer (get-buffer-create bongo-pl)))