help-gnu-emacs
[Top][All Lists]
Advanced

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

Return values of (find-file-noselect), etc.


From: Douglas Lewan
Subject: Return values of (find-file-noselect), etc.
Date: Sun, 6 Jan 2019 14:06:21 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Icedove/52.9.1

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




reply via email to

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