diff options
| -rw-r--r-- | eww.org | 9 | ||||
| -rw-r--r-- | exwm.org | 2 | ||||
| -rw-r--r-- | init.org | 9 | ||||
| -rw-r--r-- | lib/doc/jao-doc-view.el | 18 | ||||
| -rw-r--r-- | lib/themes/jao-themes.el | 2 | 
5 files changed, 27 insertions, 13 deletions
| @@ -106,6 +106,12 @@  * Visiting links in a page    #+begin_src emacs-lisp +    (defun jao-eww-copy-link () +      (interactive) +      (when-let (lnk (or (car (eww-links-at-point)) (eww-current-url))) +        (message "%s" lnk) +        (kill-new lnk))) +      (defun jao-eww--at-link ()        (and (get-text-property (point) 'shr-url)             (not (get-text-property (point) 'eww-form)))) @@ -188,6 +194,7 @@        :bind (:map eww-mode-map (("b" . eww-back-url)                                  ("B" . eww-forward-url) +                                ("c" . jao-eww-copy-link)                                  ("d" . eww-download)                                  ("D" . jao-download)                                  ("f" . eww-lnum-follow) @@ -206,7 +213,7 @@                                  ("w" . org-eww-copy-for-org-mode)                                  ("W" . jao-eww-close)                                  ("x" . jao-rss-subscribe) -                                ("y" . eww-copy-page-url) +                                ("y" . jao-eww-copy-link)                                  ("C-c C-w" . jao-eww-close))))    #+end_src @@ -370,7 +370,7 @@    #+end_src  * Hydras    #+begin_src emacs-lisp -    (major-mode-hydra-define+ pdf-view-mode nil +    (major-mode-hydra-define+ (doc-view-mode pdf-view-mode) nil        ("External"         (("z" jao-exwm-open-with-zathura "open with zathura")          ("m" jao-exwm-open-with-mupdf "open with mupdf")))) @@ -1485,7 +1485,6 @@        ;; (use-package biblio :ensure t)      #+END_SRC  * PDFs -  - ~M-x doc-view-presentation~  *** doc-view      #+begin_src emacs-lisp        (use-package doc-view @@ -3095,7 +3094,7 @@        (defun jao-org--set-geiser-impl () (setq-local geiser-repl--impl 'guile))        (add-hook 'org-mode-hook #'jao-org--set-geiser-impl) -      (jao-load-path "geiser/geiser") +      (jao-load-path "geiser/geiser/elisp")        (use-package geiser          :init          (setq geiser-repl-history-filename "~/.emacs.d/cache/geiser-history") @@ -3105,6 +3104,12 @@        (jao-load-path "geiser/mit")        (use-package geiser-mit) +      ;; (jao-load-path "geiser/chicken") +      ;; (use-package geiser-chicken) + +      ;; (jao-load-path "geiser/chibi") +      ;; (use-package geiser-chibi) +        (jao-load-path "geiser/chez")        (use-package geiser-chez          :init (setq geiser-chez-binary "scheme")) diff --git a/lib/doc/jao-doc-view.el b/lib/doc/jao-doc-view.el index 5c6cbbc..713caf9 100644 --- a/lib/doc/jao-doc-view.el +++ b/lib/doc/jao-doc-view.el @@ -87,10 +87,6 @@  (defun jao-doc-view-is-pdf (file) (string-match-p ".*\\.pdf$" file)) -(defun jao-doc-view-title (&optional fname) -  (let ((base (file-name-base (or fname (buffer-file-name))))) -    (capitalize (replace-regexp-in-string "-" " " base)))) -  (defun jao-doc-view-title->file (title)    (concat (mapconcat 'downcase (split-string title nil t) "-") ".pdf")) @@ -133,6 +129,12 @@        (setq outline (cdr outline)))      (replace-regexp-in-string "[[:blank:]]+" " " cur-title))) +(defun jao-doc-view-title (&optional fname) +  (if (or fname (not (derived-mode-p 'doc-view-mode 'pdf-view-mode))) +      (let ((base (file-name-base (or fname (buffer-file-name))))) +        (capitalize (replace-regexp-in-string "-" " " base))) +    (or (jao-doc-view-section-title) (jao-doc-view-title buffer-file-name)))) +  ;;; imenu  (defun jao-doc-view--enable-imenu () @@ -187,7 +189,8 @@    (if doc-view--current-converter-processes        (message "DocView: please wait till conversion finished.")      (let ((txt (expand-file-name "doc.txt" (doc-view--current-cache-dir))) -          (page (doc-view-current-page))) +          (page (doc-view-current-page)) +          (urls))        (if (file-readable-p txt)            (with-current-buffer (find-file-noselect txt)              (goto-char (point-min)) @@ -195,8 +198,7 @@              (let ((end (save-excursion                           (if (re-search-forward page-delimiter nil t)                               (point) -                           (point-max)))) -                  (urls)) +                           (point-max)))))                (while (re-search-forward "https?://" end t)                  (push (thing-at-point-url-at-point) urls))                urls)) @@ -206,7 +208,7 @@    "Visit URL displayed in this page."    (interactive nil doc-view-mode)    (let ((urls (jao-doc-view--page-urls))) -    (if (null urls) +    (if (zerop (length urls))          (message "No URLs in this page")        (when-let (url (completing-read "URL: " urls nil nil                                        (when (null (cdr urls)) (car urls)))) diff --git a/lib/themes/jao-themes.el b/lib/themes/jao-themes.el index a7e59b1..5d2ee79 100644 --- a/lib/themes/jao-themes.el +++ b/lib/themes/jao-themes.el @@ -533,7 +533,7 @@              (eww-valid-certificate (~ success))              (eww-form-select bx)              (eww-form-text bx (p f11)) -            (eww-form-textarea bx (c nil "grey90")) +            (eww-form-textarea bx)              (eww-form-submit (~ button)))            `((factor-font-lock-comment (~ font-lock-comment-face))              (factor-font-lock-constructor (~ font-lock-function-name-face)) | 
