emacs-devel
[Top][All Lists]
Advanced

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

Re: Making `interactive' conditional


From: Óscar Fuentes
Subject: Re: Making `interactive' conditional
Date: Tue, 12 Jan 2016 05:59:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

"Herring, Davis" <address@hidden> writes:

>>>> (and (not read-only) visiting-file)
>>>
>>> So now you can't invoke it in *scratch*?
>>
>> I don't expect to use Lisp predicates, no. Allowing those when the
>> filtering is executed has unbounded time complexity.
>
> I didn't mean "the object that describes the applicability conditions
> is not a form"; I meant that a command defined with that constraint
> would not be usable in *scratch* because it would fail the
> "visiting-file" condition.

Well, if *scratch* is read-only, then yes, the command will not appear
on the M-x list.

>> Filtering out editing commands when the buffer is not meant to be edited
>> in any case enters into the "the user plausibly is not looking for this
>> command" category.
>
> Like `kill-line', which is totally useless in a read-only buffer,
> right?

kill-line has a documented function when the buffer is read-only, so it
is not an editing command in the sense discussed above.

> Again, I'm not claiming these problems are insurmountable -- just that
> it's very hard to get right, because the exceptional cases are
> numerous.

I wouldn't say "very hard", but "requiring attention". No doubt there
will be cases with wrong annotations, but those will be eventually
corrected, like happens with every other feature. And those bugs are not
hard to fix nor critical, because the user will be able to find the
command by disabling the filtering, in case it was active.




reply via email to

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