Compare commits
2 Commits
19cd9ad9e0
...
9117f3b779
Author | SHA1 | Date | |
---|---|---|---|
9117f3b779 | |||
966aa9e91e |
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,7 +3,6 @@
|
|||||||
# git status --ignored
|
# git status --ignored
|
||||||
|
|
||||||
# Directories:
|
# Directories:
|
||||||
/_minted-README
|
|
||||||
/eln-cache
|
/eln-cache
|
||||||
/elpa
|
/elpa
|
||||||
/etc/yasnippet/snippets/latex-mode/auto/
|
/etc/yasnippet/snippets/latex-mode/auto/
|
||||||
@ -22,6 +21,7 @@ nuggy.py
|
|||||||
pyproject.toml
|
pyproject.toml
|
||||||
variables.el
|
variables.el
|
||||||
worg-backend-dependent-execution-update.org
|
worg-backend-dependent-execution-update.org
|
||||||
|
yegge.html
|
||||||
|
|
||||||
# File suffixes:
|
# File suffixes:
|
||||||
*-autoloads.el
|
*-autoloads.el
|
||||||
@ -32,7 +32,6 @@ worg-backend-dependent-execution-update.org
|
|||||||
*.elc
|
*.elc
|
||||||
*.fdb_latexmk
|
*.fdb_latexmk
|
||||||
*.fls
|
*.fls
|
||||||
*.html
|
|
||||||
*.lof
|
*.lof
|
||||||
*.log
|
*.log
|
||||||
*.lol
|
*.lol
|
||||||
|
17
README.org
17
README.org
@ -5739,22 +5739,19 @@ Listing [[lst:configure-browse-url]] configures =browse-url=.
|
|||||||
:CUSTOM_ID: sec:emacs-web-wowser
|
:CUSTOM_ID: sec:emacs-web-wowser
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
#+caption[Rename =eww= buffers and display =pdf= links properly]:
|
#+caption[Display =pdf= links properly in =eww=]:
|
||||||
#+caption: Rename =eww= buffers and display =pdf= links properly.
|
#+caption: Display =pdf= links properly in =eww=.
|
||||||
#+name: lst:rename-eww-buffer-display-pdf-links
|
#+name: lst:display-pdf-links-in-eww
|
||||||
#+begin_src emacs-lisp -n :results silent
|
#+begin_src emacs-lisp -n :results silent
|
||||||
(with-eval-after-load 'eww
|
(with-eval-after-load 'eww
|
||||||
|
;; GAV: Renaming `eww' buffers conflicts with `desktop-save-mode'.
|
||||||
|
;; GAV: Setting `eww-restore-desktop' to something else fails too.
|
||||||
|
(setopt eww-restore-desktop nil)
|
||||||
|
|
||||||
(defun eww-display-pdf-as-binary (fn &rest args)
|
(defun eww-display-pdf-as-binary (fn &rest args)
|
||||||
(let ((buffer-file-coding-system 'binary))
|
(let ((buffer-file-coding-system 'binary))
|
||||||
(apply fn args)))
|
(apply fn args)))
|
||||||
|
|
||||||
(defun eww-rename-buffer ()
|
|
||||||
"Rename the buffer using title or url."
|
|
||||||
(let* ((title (plist-get eww-data :title))
|
|
||||||
(name (or (and (eq "" title) (plist-get eww-data :url)) title)))
|
|
||||||
(rename-buffer (format "*%s # eww*" name) t)))
|
|
||||||
|
|
||||||
(add-hook 'eww-after-render-hook #'eww-rename-buffer)
|
|
||||||
(advice-add 'eww-display-pdf :around #'eww-display-pdf-as-binary))
|
(advice-add 'eww-display-pdf :around #'eww-display-pdf-as-binary))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user