From: Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Cc: emacs-w3m@namazu.org
Subject: some Emacs-w3m goodies
Date: Sat, 27 Mar 2021 04:13:47 +0100 [thread overview]
Message-ID: <87zgypb85w.fsf@zoho.eu> (raw)
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
reply other threads:[~2021-03-27 3:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zgypb85w.fsf@zoho.eu \
--to=help-gnu-emacs@gnu.org \
--cc=emacs-w3m@namazu.org \
--cc=moasenwood@zoho.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).