emacs-devel
[Top][All Lists]
Advanced

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

Re: Shift selection using interactive spec


From: Juri Linkov
Subject: Re: Shift selection using interactive spec
Date: Sat, 29 Mar 2008 14:30:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

>>>> And the easiest way to do this is to change properties.
>>>
>>> I am not concerned about the easiest, but an appropriate way.
>>
>> Emacs should be easy to use and customize, not appropriate for some
>> abstract goal.
>
> Giving a function a well-defined default behavior is not customization.
> It is function definition.

Shift-selection is not an inherent part of function definition since
a function can normally work with or without this feature either way.

And it would be very confusing to set a default behavior using
interactive codes, but allow to modify it using properties.
The source of this confusion is non-obvious interaction between two ways
of doing the same thing.

>>> Properties are not part of either variable or function.  They are
>>> part of the symbol.
>>
>> So what?  There are already about 200 distinct properties in Emacs
>> attached indirectly to functions and variables via symbols, and they
>> modify the default behavior, so the documentation should reveal them
>> to users.
>
> But there is no _meaning_ conveyed by some property.  It is
> undocumented.

Of course, a property has a meaning, but it is different from the
meaning of a command.  For instance, `forward-char' has the meaning of
moving point right n characters.  OTOH, the `shift-selection' property
has the meaning of activating the mark before executing the command.
Those are different meanings of different features.

>>> Lisp is Lisp, and Scheme is Scheme.
>>
>> And Emacs is Emacs (_extensible_, _customizable_, _self-documenting_
>> real-time display editor).
>
> So what about "self-documenting" applies to arbitrary properties?  We
> don't document functions by disassembling them, but by documentation
> strings.  The presence of a property is not self-explanatory, and it is
> not apparent whether it may affect the variable, the function, or
> something else.

Actually you presented the argument against using interactive codes for
the shift-selection feature.  Using an interactive code will require
adding a text like "This command activates the mark before its execution
when Shift key is pressed" to the documentation string of the command.

But when the user will turn off this feature (external to the function
definition) the documentation string will lie to the user.

So it is clear that the shift-selection feature should not be part
of function definition (not to have an interactive code nor
corresponding text in its documentation string).

The only alternative to assigning properties to function symbols
I see is creating a new user option with a list of command names
that should activate the mark before their execution.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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