From: Douglas Lewan <d.lewan2000@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Return values of (find-file-noselect), etc.
Date: Sun, 6 Jan 2019 14:06:21 -0500 [thread overview]
Message-ID: <71340fe0-7373-f407-3bc7-7a2dcaf6b3b3@gmail.com> (raw)
I'm writing cpio-mode for emacs whose definition calls
(switch-to-buffer) to present an affiliated buffer that contains a
dired-like interface.
If I have my emacs environment set up to call (cpio-mode) when it
detects that a file is a cpio archive, then, e.g. (find-file-noselect
"cpio-archive"), returns the dired-style buffer, not the buffer of the
found file. So, any processing based on the newly found file is done
with the dired-style buffer instead of the buffer with the newly found file.
Is that the expected behavior? The docstring(s) are vague about the
return value for finding one file. It's explicit about finding multiple
files using wildcards. The info documentation, however, is explicit
about the return value for finding one file. On the other hand, these
functions boil down to (find-file-noselect-1), which returns the value
from (current-buffer). That is, it may be returning a value that wasn't
made explicit.
I'm really just curious.
Thanks.
--
,Doug
Douglas Lewan
+1 (908) 720-7908
Give me "assloads of config" over "some other person thought they could decide what I like" any day. - Szmo, on reddit, 2017 Sep 05
next reply other threads:[~2019-01-06 19:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-06 19:06 Douglas Lewan [this message]
2019-01-06 22:13 ` Return values of (find-file-noselect), etc Stefan Monnier
2019-01-07 0:49 ` Douglas Lewan
2019-01-07 3:06 ` Stefan Monnier
2019-01-07 7:36 ` Douglas Lewan
2019-01-08 18:07 ` Stefan Monnier
2019-01-08 19:12 ` Douglas Lewan
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=71340fe0-7373-f407-3bc7-7a2dcaf6b3b3@gmail.com \
--to=d.lewan2000@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
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).