diff options
author | jao <jao@gnu.org> | 2022-01-25 16:35:35 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-01-25 16:36:55 +0000 |
commit | 4536dcaf53a6a090dd3d8afe95e007ab0410dc2f (patch) | |
tree | b088e19be0623cd11b7f04b6f8558fb056a6ab10 | |
parent | 8db8d3bafa2a4cbceebf14cec3a3178c61b86420 (diff) | |
download | elibs-4536dcaf53a6a090dd3d8afe95e007ab0410dc2f.tar.gz elibs-4536dcaf53a6a090dd3d8afe95e007ab0410dc2f.tar.bz2 |
bettter eww-auto-rename-buffer
-rw-r--r-- | eww.org | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -131,12 +131,17 @@ (eww-download-directory jao-sink-dir) (eww-header-line-format " %u") (eww-form-checkbox-selected-symbol "☒") - (eww-auto-rename-buffer 'jao-eww-buffer-title) (eww-buffer-name-length 180)) :config (with-eval-after-load "org" (require 'ol-eww nil t)) + (defun jao-eww-buffer-name () + (when-let ((s (or (plist-get eww-data :title) + (plist-get eww-data :url)))) + (when (not (string-blank-p s)) (format "%s" s)))) + (setq eww-auto-rename-buffer #'jao-eww-buffer-name) + :bind (:map eww-mode-map (("b" . eww-back-url) ("B" . eww-forward-url) ("d" . jao-download) |