all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* some Emacs-w3m goodies
@ 2021-03-27  3:13 Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; only message in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-03-27  3:13 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: emacs-w3m

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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-27  3:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-27  3:13 some Emacs-w3m goodies Emanuel Berg via Users list for the GNU Emacs text editor

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.