help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: can undo unamalgamation be turned off reliably and completely?


From: Samuel Wales
Subject: Re: can undo unamalgamation be turned off reliably and completely?
Date: Wed, 2 Dec 2020 20:42:18 -0700

just realized this-command-keys is not a solution.  lots of things are
called by keys somewhere in the call stack.

On 12/1/20, Samuel Wales <samologist@gmail.com> wrote:
> um, i meant if non-nil.
>
> On 12/1/20, Samuel Wales <samologist@gmail.com> wrote:
>> (setq undo-auto-current-boundary-timer t) does not work in my emacs 25
>> to turn off amalgamating.
>>
>> however, i /might/ have thought of a solution.  called-interactively-p
>> does not work reliably with defadvice, but this-command-keys might be
>> a substitute.  then maybe i can advise all amalgamating commands, and
>> if nil, do undo-boundary.  untested.
>>
>> and then when emacs 26 rolls around, i will try using (setq
>> amalgamating-undo-limit 1).  which i presume will work.  thank you for
>> all of your comments and, if any of you implemented turning off
>> amalgamation, for doing that too.
>>
>>
>> On 11/30/20, Michael Heerdegen <michael_heerdegen@web.de> wrote:
>>> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>>
>>>> > If you set this variable to, say, t, that should turn off this
>>>> > feature.
>>>> > Should exist in 25.  May be named "undo-auto--current-boundary-timer"
>>>> > there.
>>>>
>>>> No, this part of undo was all hard coded in C in Emacs-25.
>>>
>>> I see the timer variable being introduced in Lisp with this commit:
>>>
>>> | 44dfa86b7d382b84564d68472da1448d08f48129
>>> | Author:     Phillip Lord <phillip.lord@newcastle.ac.uk>
>>> | AuthorDate: Thu Aug 6 21:33:58 2015 +0100
>>> | Commit:     Phillip Lord <phillip.lord@russet.org.uk>
>>> | CommitDate: Thu Nov 12 21:06:05 2015 +0000
>>> |
>>> | Parent:     0aec2aaccd * lisp/emacs-lisp/package.el: Simplify
>>> describe-package-1
>>> | Contained:  emacs-25 emacs-26 master
>>> | Follows:    emacs-24.5-rc3-fixed (5481)
>>> | Precedes:   emacs-25.0.90 (1955)
>>> |
>>> | The heuristic that Emacs uses to add an `undo-boundary' has been
>>> | reworked, as it interacts poorly with functions on `post-command-hook'
>>> | or `after-change-functions'.
>>>
>>> Am I interpreting the "Contained" and "Precedes" fields wrong?
>>>
>>>> It got rewritten in Elisp for Emacs-26, which indeed makes it possible
>>>> to
>>>> change it much more easily.
>>>
>>> How would you deactivate it in versions not yet having the rewrite?
>>>
>>>
>>> Thanks,
>>>
>>> Michael.
>>>
>>>
>>>
>>
>>
>> --
>> The Kafka Pandemic
>>
>> Please learn what misopathy is.
>> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>>
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



reply via email to

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