GNU bug report logs -
#15329
saveplace restores dired positions to random places
Previous Next
Reported by: Juri Linkov <juri <at> jurta.org>
Date: Tue, 10 Sep 2013 20:51:02 UTC
Severity: minor
Tags: patch
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
Message #32 received at 15329 <at> debbugs.gnu.org (full text, mbox):
> > Is `dired-directory' really the right test here? I am used to seeing
> > (derived-mode-p 'dired-mode) for that purpose (assuming I understand the
> > purpose here).
>
> Yes, `dired-directory' is the right test, because `dired-directory'
> is used as a key in `save-place-alist'.
OK.
> > There is, BTW, nothing in the doc string of `dired-directory' that says
> > what a nil value means.
>
> Thanks for pointing to the doc string of `dired-directory' where I noticed:
>
> May be a list, in which case the car is the
> directory name and the cdr is the list of files to mention.
Yes, I use that use case quite a lot.
> This case should be handled properly that I added to the following patch.
Great.
> > Should code now instead be using `dired-directory' to test whether the
> > mode is (derived from) Dired?
>
> Yes, code should be using `dired-directory' now.
OK. Do you happen to know whether that is only the case now or has been the
case all along?
`dired-directory' is old, but I have always seen `derived-mode-p' used for
the test - and I see it still, e.g., for `dired-toggle-read-only'. Or does
it perhaps not matter at all which we use? Looking for what is best to use
with multiple Emacs versions.
> > If so, then at the very least the doc string of that variable should
> > describe such a Boolean meaning: nil means not in Dired mode or a mode
> > derived from it (or whatever the completely correct interpretation is).
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Are you sure that nil means not in Dired mode or a mode derived from it?
I posed a question; I didn't make a statement. Let's please describe what
nil means here, whatever that might be.
> Anyway, this is a new version:
Thanks for taking the cons case into account.
This bug report was last modified 11 years and 150 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.