unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* wrong type error in local variables
@ 2020-07-02 14:46 Douglas Lewan
  2020-07-02 15:06 ` Joost Kremers
  2020-07-02 15:56 ` Stefan Monnier
  0 siblings, 2 replies; 20+ messages in thread
From: Douglas Lewan @ 2020-07-02 14:46 UTC (permalink / raw)
  To: help-gnu-emacs

I have a TeX file with the following local variables:

     Local Variables:
     eval: (ab-new-buffer (prog1 (find-file "chapter16.tex") (message "After find file.")))
     End:

The (find-file) succeeds. (There's a buffer with that file and I see the 
message.) However, overall I get this error:

     File local-variables error: (wrong-type-argument stringp nil)

I assume the call to (ab-new-buffer) gets the error, but as far as I can 
tell that call never happens. (ab-new-buffer) has the following definition:

     (defun ab-new-buffer (buffer-or-name)
       (error "Now in (ab-new-buffer)."))

I never see that error.
What am I missing?

FYI The data above are obviously reduced to a minimal case. With the 
correct definition of (ab-new-buffer) a full battery of tests passes.

-- 
,Doug
d.lewan2000@gmail.com
(908) 720 7908

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



^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: wrong type error in local variables
@ 2020-07-03  8:33 Anders Munch
  2020-07-03 10:36 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2020-07-03 14:07 ` Douglas Lewan
  0 siblings, 2 replies; 20+ messages in thread
From: Anders Munch @ 2020-07-03  8:33 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg:
>> Okay, but what exactly is the problem with it, from Lisp?
Douglas Lewan:
> The problem is that it changes the buffer.

Which is sometimes what you want.
I grepped my personal elisp for find-file, and found three uses, neither of which
could be replaced by find-file-noselect.

regards,
Anders

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2020-07-03 14:07 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-02 14:46 wrong type error in local variables Douglas Lewan
2020-07-02 15:06 ` Joost Kremers
2020-07-02 15:59   ` Douglas Lewan
2020-07-02 15:56 ` Stefan Monnier
2020-07-02 16:36   ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-07-02 17:09     ` Douglas Lewan
2020-07-02 17:45       ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-07-02 17:42     ` Stefan Monnier
2020-07-03  1:19       ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-07-03  1:40         ` Douglas Lewan
2020-07-03  2:00           ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-07-03  2:24             ` Douglas Lewan
2020-07-03  3:45           ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-07-03  5:13             ` Douglas Lewan
2020-07-03  6:05               ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-07-02 17:04   ` Douglas Lewan
2020-07-02 17:15   ` Douglas Lewan
  -- strict thread matches above, loose matches on Subject: below --
2020-07-03  8:33 Anders Munch
2020-07-03 10:36 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-07-03 14:07 ` Douglas Lewan

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).