[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Friendlier dired experience [CODE INCLUDED]
From: |
Stefan Monnier |
Subject: |
Re: Friendlier dired experience [CODE INCLUDED] |
Date: |
Fri, 06 Nov 2020 09:14:25 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> Hmm. I'm looking at the code for bookmarks and the variable
> bookmark-alist, and what I see is that directory bookmarks have a NIL
> handler, ie. function bookmark-default-handler, which runs function
> find-file-noselect, which is directly or indirectly called by
> "everyone", including diredc. 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.
Sounds about right, yes.
> The ugly part of the 'hijack' is keeping the code of the
> advice in sync with the underlying function.
Your code doesn't need to depend on the code of
`bookmark-default-handler`: It only depends on the name of that
function, on the fact that it is called for the entries in which you're
interested (and on the fact that it is called in exactly the same way as
any other bookmark handler).
So as far as advice go, it should be pretty stable.
> What about the case of diredc-mode being enabled, but the current-frame
> isn't the diredc frame (ie. the user is not currently using dired)? You
> wouldn't want to jump to that frame and open the directory in one of its
> windows?
Your advice gets to decide which behavior you get.
Stefan
- Re: Friendlier dired experience [CODE INCLUDED], (continued)
- Re: Friendlier dired experience [CODE INCLUDED], Arthur Miller, 2020/11/05
- Re: Friendlier dired experience [CODE INCLUDED], Stefan Monnier, 2020/11/05
- Re: Friendlier dired experience [CODE INCLUDED], Adam Porter, 2020/11/05
- Re: Friendlier dired experience [CODE INCLUDED], Stefan Monnier, 2020/11/05
- RE: Friendlier dired experience [CODE INCLUDED], Drew Adams, 2020/11/05
- RE: Friendlier dired experience [CODE INCLUDED], Drew Adams, 2020/11/05
- Re: Friendlier dired experience [CODE INCLUDED], Arthur Miller, 2020/11/05
- Re: Friendlier dired experience [CODE INCLUDED], Jean Louis, 2020/11/05
- RE: Friendlier dired experience [CODE INCLUDED], Drew Adams, 2020/11/05
- Re: Friendlier dired experience [CODE INCLUDED], Boruch Baum, 2020/11/06
- Re: Friendlier dired experience [CODE INCLUDED],
Stefan Monnier <=
- RE: Friendlier dired experience [CODE INCLUDED], Drew Adams, 2020/11/06
- Re: Friendlier dired experience [CODE INCLUDED], Adam Porter, 2020/11/06
- RE: Friendlier dired experience [CODE INCLUDED], Drew Adams, 2020/11/06
- Re: Friendlier dired experience [CODE INCLUDED], Adam Porter, 2020/11/06
- Re: Friendlier dired experience [CODE INCLUDED], Daniel MartÃn, 2020/11/06
- Re: Friendlier dired experience [CODE INCLUDED], Boruch Baum, 2020/11/08
- Re: Friendlier dired experience [CODE INCLUDED], Arthur Miller, 2020/11/08
- Re: Friendlier dired experience [CODE INCLUDED], Boruch Baum, 2020/11/08
- Re: Friendlier dired experience [CODE INCLUDED], Jean Louis, 2020/11/08
- RE: Friendlier dired experience [CODE INCLUDED], Drew Adams, 2020/11/08