Start a section on hyperlinking and web navigating

This commit is contained in:
Gerard Vermeulen 2022-02-13 16:13:13 +01:00
parent be94fe93ea
commit e840908b51
1 changed files with 41 additions and 0 deletions

View File

@ -3008,6 +3008,47 @@ and names in buffers for debugging.
:CUSTOM_ID: sec:applications
:END:
** [[info:emacs#Hyperlinking][Hyperlinking and Web Navigation Features (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:hyperlinking-web-navigating
:END:
*** [[info:emacs#Goto Address mode][Goto address mode (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:goto-address-mode
:END:
Listing [[lst:configure-goto-address-mode]]:
1. Enables =goto-address-prog-mode= for programming modes and
=goto-address-mode= for a selection of other modes.
2. Defines a function to toggle =goto-address-prog-mode= for programming modes
and =goto-address-mode= for other modes.
3. Binds {{{kbd(C-c C-o)}}} to =goto-address-at-point= in
=goto-address-highlight-keymap=.
#+caption[Configure =goto-address-mode=]:
#+caption: Configure =goto-address-mode=.
#+name: lst:configure-goto-address-mode
#+begin_src emacs-lisp
(when (cl-every #'fboundp '(goto-address-mode goto-address-prog-mode))
(defun toggle-goto-address-dwim-mode ()
"Toggle `goto-address-mode' or `goto-address-prog-mode' smartly.
In case of `prog-mode', toggle the latter, else the former."
(interactive)
(if (derived-mode-p 'prog-mode)
(call-interactively #'goto-address-prog-mode)
(call-interactively #'goto-address-mode)))
(dolist (hook '(eshell-mode-hook shell-mode-hook org-mode-hook))
(add-hook hook #'goto-address-mode))
(add-hook 'prog-mode-hook #'goto-address-prog-mode)
(with-eval-after-load 'goto-addr
(define-key goto-address-highlight-keymap
(kbd "C-c C-o") #'goto-address-at-point)))
#+end_src
** [[https://github.com/skeeto/elfeed#readme][Elfeed: Emacs web feed reader]]
:PROPERTIES:
:CUSTOM_ID: sec:emacs-web-feed-reader