[PATCH] change semantics of "delete" LFUNs again (was: Re: Assertion from command-sequence)

Jean-Marc Lasgouttes lasgouttes at lyx.org
Mon Nov 28 16:40:44 UTC 2022


Le 21/02/2022 à 15:10, Jean-Marc Lasgouttes a écrit :
> Le 21/02/2022 à 03:27, Scott Kostyshak a écrit :
>> On Sun, Feb 20, 2022 at 07:20:24PM +0100, Jean-Marc Lasgouttes wrote:
>>> I really wonder why this special behavior is by default, since it is 
>>> only
>>> useful for interactive edition.
>>>
>>> I would prefer to have
>>>    char-delete-forward confirm
>>> bound to the <del> key.
>>
>> That sounds reasonable to me.
> 
> Here is what I came up with. Scott, please tell me whether the bit in 
> release notes makes sense.
> 
> What is missing here is the prefs2prefs_lfun.py part. I tried it a bit, 
> but python does not like me. Could somebody help for this part?
> 
> The interesting functions are (word|char)-delete-(for|back)ward
 > * If there is no argument, add argument `confirm'.
> * If the argument is `force', remove it.
> * If it is another string, remove it too actually (although it should 
> not happen)
> 
> I really do not understand how this magic python thing works. I have not 
> been able to make it match any of my regexes.

Ping!

Here is an updated version of the patch. I need help for the 
prefs2prefs_lfun.py script, along the lines presented above. Can someone 
do it or at least give directions?

Note that the patch as it stands changes the behavior of LyX: I did not 
add 'confirm' to the commands in lib/bind/, since I expect that to be 
done by pref2pref.

Just as a reminder, the goal is to have char-delete-backwards without 
argument actually delete previous element, without consideration of 
confirmation that are only relevant to interactive use.

Once sorted out, this would be candidate for 2.4.0.

JMarc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fixup-71623b88-change-semantics-of-delete-LFUNs-agai.patch
Type: text/x-patch
Size: 7000 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20221128/18e23191/attachment.bin>


More information about the lyx-devel mailing list