From: Drew Adams <drew.adams@oracle.com>
To: Juri Linkov <juri@jurta.org>
Cc: Karl Fogel <kfogel@red-bean.com>, 15329@debbugs.gnu.org
Subject: bug#15329: saveplace restores dired positions to random places
Date: Mon, 16 Dec 2013 13:15:43 -0800 (PST) [thread overview]
Message-ID: <ff651071-0e40-4a28-9f88-c8e4d2c17218@default> (raw)
In-Reply-To: <87zjo05x8e.fsf@mail.jurta.org>
> > 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.
next prev parent reply other threads:[~2013-12-16 21:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-10 20:45 bug#15329: saveplace restores dired positions to random places Juri Linkov
2013-09-11 20:45 ` Juri Linkov
2013-09-12 16:12 ` Karl Fogel
2013-09-12 16:12 ` Karl Fogel
2013-09-12 19:13 ` Stefan Monnier
2013-09-12 19:13 ` Stefan Monnier
2013-09-12 20:52 ` Juri Linkov
2013-10-03 21:37 ` Karl Fogel
2013-12-15 20:20 ` Juri Linkov
2013-12-15 21:43 ` Drew Adams
2013-12-16 20:58 ` Juri Linkov
2013-12-16 21:15 ` Drew Adams [this message]
2013-12-20 20:20 ` Juri Linkov
2013-12-21 2:09 ` Karl Fogel
2013-10-03 21:37 ` Karl Fogel
2013-09-12 20:52 ` Juri Linkov
2013-09-11 20:45 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ff651071-0e40-4a28-9f88-c8e4d2c17218@default \
--to=drew.adams@oracle.com \
--cc=15329@debbugs.gnu.org \
--cc=juri@jurta.org \
--cc=kfogel@red-bean.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.