Douglas Lewan wrote:
Okay, but what exactly is the problem with it,
from Lisp?
The problem is that it changes the buffer.
If a (find-file) fails and you were depending on
the change of the current buffer all kinds of other
things might go wrong.
If you use (find-file-noselect), then the current
buffer doesn't change and any attempt to use that
buffer would fail. In particular, you should be
verifying that the (find-file-noselect) succeeded.
Gotcha, but then why not just have a single such
function that does the checking itself and aborts
further execution immediately after the initial,
failed attempt to find the file? Then 1 (onee)
function would be used, and with no need to
explicitely check if it succeeded?