emacs-devel
[Top][All Lists]
Advanced

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

Re: Undesired interactive call of major mode command


From: Stephen Berman
Subject: Re: Undesired interactive call of major mode command
Date: Tue, 25 Nov 2014 22:58:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

On Sun, 23 Nov 2014 22:56:16 -0500 Stefan Monnier <address@hidden> wrote:

>> - If you call todo-mode in an empty non-file buffer, you get the error
>>   (wrong-type-argument arrayp nil) because todo-mode calls
>>   (file-truename (buffer-file-name)) (this was the error of bug#19112).
>
> Signaling such an error is indeed a bug here.  Better emit a message.

Ok.

>> - If you call todo-mode in a non-empty buffer (whether or not it is
>>   visiting a file (except a Todo mode file, of course), you get the
>>   Todo mode error "Invalid or missing todo-categories sexp", because the
>>   buffer text does not conform to the Todo mode file format.
>
> That's probably OK.
>
>> - If you call todo-mode in a buffer visiting an empty file, you get no
>>   error, but since the buffer is then in Todo mode, if you invoke any
>>   Todo mode command you'll get an error, again because of the invalid
>>   file format for Todo mode.
>
> Of course, an alternative might be to move some of the code outside of
> todo-mode to some other function.

Sorry, I don't follow you; what code?

Steve Berman



reply via email to

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