emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Friendlier dired experience [CODE INCLUDED]


From: Drew Adams
Subject: RE: Friendlier dired experience [CODE INCLUDED]
Date: Fri, 6 Nov 2020 08:28:04 -0800 (PST)

> So, I suppose a way to 'hijack' the
> bookmark process would be to advise around function
> bookmark-default-handler checking for the current buffer's major-mode,
> the state of variable diredc-mode and whether the bookmark is a
> directory. The ugly part of the 'hijack' is keeping the code of the
> advice in sync with the underlying function.

Are you looking for a way to have your own
bookmark-handling code do what you want with a
vanilla bookmark for a directory?  Is that it?

Why not instead define your own bookmark handler
for directory bookmarks?  That's what bookmark
handlers are for.

FWIW -

In Bookmark+ Dired buffers have their own bookmark
handler.  Bookmarking a Dired buffer records not
just the directory location but also its `ls'
switches, which files are marked, which subdirs
are inserted, and which (sub)dirs are hidden.
Jumping to a Dired bookmark restores all of that.

IOW, Dired bookmarks are really Dired bookmarks.
They don't just "invoke Dired in a default way on
this directory".  Dired gives you a particular
kind of directory listing.  That's what should be
bookmarkable.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]