unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs support for --hyperlink in ls?
@ 2022-05-03 11:08 Stephen Eglen
  2022-05-03 11:35 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Eglen @ 2022-05-03 11:08 UTC (permalink / raw)
  To: emacs-devel

Various programs, including ls (GNU coreutils 9.0), now contain
--hyperlink flag and similar to markup file names with the full
file-path.  The full file name is embedded using 'OSC 8 escape sequence'
so that it can be hidden in terminal emualators and recognised as a hyperlink.

For a video example using the kitty terminal, see

https://download.calibre-ebook.com/videos/kitty.mp4

the relevant part starts about 3min in; several other terminals also
support this feature.  Further documentation of this feature is on the
following page

https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda

Should Emacs support these OSC 8 hyperlinks in things like *shell*?

If I run M-x shell, of course, these hyperlinks appear verbatim.

$ ls -1 --hyperlink /etc | head -5

%1b]8;;file://light/etc/acpi\aacpi%1b]8;;\a
%1b]8;;file://light/etc/adjtime\aadjtime%1b]8;;\a
%1b]8;;file://light/etc/alsa\aalsa%1b]8;;\a
%1b]8;;file://light/etc/anacrontab\aanacrontab%1b]8;;\a
%1b]8;;file://light/etc/ant.conf\aant.conf%1b]8;;\a

If people think it worth trying, I might start hacking something to work
e.g. on comint-output-filter-functions but presumably this might be
something that eshell, ansi-term and vterm might also benefit from?

Stephen



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-06 12:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-03 11:08 Emacs support for --hyperlink in ls? Stephen Eglen
2022-05-03 11:35 ` Eli Zaretskii
2022-05-03 20:38   ` Stephen Eglen
2022-05-04  5:48     ` Eli Zaretskii
2022-05-06 12:17       ` Augusto Stoffel

Code repositories for project(s) associated with this public inbox

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

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).