[Top][All Lists]

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

Re: wrong type error in local variables

From: Douglas Lewan
Subject: Re: wrong type error in local variables
Date: Thu, 2 Jul 2020 22:24:49 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 7/2/20 10:00 PM, Emanuel Berg via Users list for the GNU Emacs text editor wrote:
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?

I understand. Such a solution has already been proposed here. I'm just responding to the world we currently live in. And, yes, encapsulation of such issues is a reasonable thing.

(908) 720 7908

If this is what winning looks like, I'd hate to see what losing is.

reply via email to

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