[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
some Emacs-w3m goodies
From: |
Emanuel Berg |
Subject: |
some Emacs-w3m goodies |
Date: |
Sat, 27 Mar 2021 04:13:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Some Emacs-w3m goodies for your viewing pleasure.
Well, goodies and goodies, they are good but isn't/shouldn't
that stuff be built-in? Pretty basic stuff, come to think
about it. Nothing too faaancy going on. Really!
https://dataswamp.org/~incal/emacs-init/w3m/w3m-incal.el lines
73-97
[ xi is a shell program (or zsh script actually) to get data
to X; don't worry about that. Or here it is if you'd like to
check it out: https://dataswamp.org/~incal/scripts/xi - it
is the old hack. a good hack. that was considered very
clever the first time anyone saw it. for sure. but father
time you know ]
(defun w3m-kill-url-and-title ()
(interactive)
(let ((tit (w3m-current-title))
(url w3m-current-url) )
(unless (equal tit "<no-title>"))
(kill-new (format "%s # %s" url tit))
(message "%s" (current-kill 0)) ))
(defun w3m-kill-title ()
(interactive)
(kill-new (w3m-current-title) )
(message "%s" (current-kill 0)) )
(defun w3m-kill-url-dwim ()
(interactive)
(let*((url (or (w3m-anchor) (thing-at-point 'url) w3m-current-url))
(cmd (format "echo \"%s\" | xi" url)) )
(kill-new url)
(shell-command cmd) )
(message "%s" (current-kill 0)) )
(defun w3m-goto-url-kill-current ()
(interactive)
(when w3m-current-url (kill-new w3m-current-url))
(call-interactively #'w3m-goto-url) )
--
underground experts united
https://dataswamp.org/~incal
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- some Emacs-w3m goodies,
Emanuel Berg <=