all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* can undo unamalgamation be turned off reliably and completely?
@ 2020-11-29  5:20 Samuel Wales
  2020-11-29  8:57 ` Óscar Fuentes
  2020-11-29 20:01 ` Michael Heerdegen
  0 siblings, 2 replies; 10+ messages in thread
From: Samuel Wales @ 2020-11-29  5:20 UTC (permalink / raw)
  To: help-gnu-emacs

this has been a struggle for 20+ years.  maybe longer..

emacs hardcodes 20 characters [as of emacs 25-ish, commands also] for
amalgamation.  (hardcoding?)

i never want this.  no matter what.  (except, if some internal code
relies on it, then i want that to not break.)

what can i do to get rid of undo amalgamation so that i never have to
deal with this issue again?  i want an undo boundary after every
character and command that i interactively run.  as normal, just like
emacs would be without amalgamation.

the many things i have tried have been unsatisfactory.  emacs changes
under me to ignore undo-boundary [bug report filed, fixed, thanks], or
it adds new commands that bunch up, or it does not allow checking
whether i interactivity called the command.

i use undo-tree.

i use emacs 25.

thank you.


p.s.  if possible, please include me in addition to the mailing list
address, so your reply doesn't get lost in a folder.  thank you.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can undo unamalgamation be turned off reliably and completely?
  2020-11-29  5:20 can undo unamalgamation be turned off reliably and completely? Samuel Wales
@ 2020-11-29  8:57 ` Óscar Fuentes
  2020-11-29 20:01 ` Michael Heerdegen
  1 sibling, 0 replies; 10+ messages in thread
From: Óscar Fuentes @ 2020-11-29  8:57 UTC (permalink / raw)
  To: Samuel Wales; +Cc: help-gnu-emacs

Samuel Wales <samologist@gmail.com> writes:

> this has been a struggle for 20+ years.  maybe longer..
>
> emacs hardcodes 20 characters [as of emacs 25-ish, commands also] for
> amalgamation.  (hardcoding?)
>
> i never want this.  no matter what.  (except, if some internal code
> relies on it, then i want that to not break.)
>
> what can i do to get rid of undo amalgamation so that i never have to
> deal with this issue again?

As per C-h v amalgamating-undo-limit :

(setq amalgamating-undo-limit 1)

Not tested.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can undo unamalgamation be turned off reliably and completely?
  2020-11-29  5:20 can undo unamalgamation be turned off reliably and completely? Samuel Wales
  2020-11-29  8:57 ` Óscar Fuentes
@ 2020-11-29 20:01 ` Michael Heerdegen
  2020-11-30  1:59   ` Samuel Wales
  1 sibling, 1 reply; 10+ messages in thread
From: Michael Heerdegen @ 2020-11-29 20:01 UTC (permalink / raw)
  To: help-gnu-emacs

Samuel Wales <samologist@gmail.com> writes:

> emacs hardcodes 20 characters [as of emacs 25-ish, commands also] for
> amalgamation.  (hardcoding?)

No, as it has been mentioned, amalgamating-undo-limit defaults to 20,
that's it (although it's a little bit more complicated since the
behavior is controlled by a timer).  Setting it to 1 should completely
disable any amalgating ... amalgation ... how do you write that without
spell checker barfing?  Ah, I need even more a's, ok.

> or it adds new commands that bunch up, or it does not allow checking
> whether i interactivity called the command.

Are these additional problems you experienced?  Have you investigated or
reported them?

Thanks,

Michael.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can undo unamalgamation be turned off reliably and completely?
  2020-11-29 20:01 ` Michael Heerdegen
@ 2020-11-30  1:59   ` Samuel Wales
  2020-11-30  3:08     ` Michael Heerdegen
  0 siblings, 1 reply; 10+ messages in thread
From: Samuel Wales @ 2020-11-30  1:59 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

amalgamating-undo-limit does not exist in my emacs 25.  in what
version did/will it first appear?

i am glad that this [i hope] solves the problem in a future [to my]
version of emacs.  i wonder if it is solvable in emacs 25 also.

more below:

On 11/29/20, Michael Heerdegen <michael_heerdegen@web.de> wrote:
> Are these additional problems you experienced?  Have you investigated or
> reported them?

i only experienced them trying to stop the amalgamating.

one [checking interactivity] is mentioned clearly in a docstring as
being unreliable, so i hopefully presume it is in a bug report
someplace.  i have confirmed its unreliability, is all.

the other [adding bunching commands] is presumably a feature for those
who, unlike me, can tolerate amalgamation.  it was mentioned in NEWS
around emacs 24-25 ish.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can undo unamalgamation be turned off reliably and completely?
  2020-11-30  1:59   ` Samuel Wales
@ 2020-11-30  3:08     ` Michael Heerdegen
  2020-11-30  4:44       ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Heerdegen @ 2020-11-30  3:08 UTC (permalink / raw)
  To: help-gnu-emacs

Samuel Wales <samologist@gmail.com> writes:

> amalgamating-undo-limit does not exist in my emacs 25.  in what
> version did/will it first appear?

Ok, I see, it has been introduced 1 year ago, and before that the 20 was
hardcoded.

Do you have this variable?

| undo-auto-current-boundary-timer is a variable defined in `simple.el'.
| [...]
| Current timer which will run `undo-auto--boundary-timer' or nil.
| 
| If set to non-nil, this will effectively disable the timer.

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.

Michael.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can undo unamalgamation be turned off reliably and completely?
  2020-11-30  3:08     ` Michael Heerdegen
@ 2020-11-30  4:44       ` Stefan Monnier
  2020-11-30 16:42         ` Michael Heerdegen
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2020-11-30  4:44 UTC (permalink / raw)
  To: help-gnu-emacs

> 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.

It got rewritten in Elisp for Emacs-26, which indeed makes it possible to
change it much more easily.


        Stefan




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can undo unamalgamation be turned off reliably and completely?
  2020-11-30  4:44       ` Stefan Monnier
@ 2020-11-30 16:42         ` Michael Heerdegen
  2020-12-02  4:51           ` Samuel Wales
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Heerdegen @ 2020-11-30 16:42 UTC (permalink / raw)
  To: help-gnu-emacs

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.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can undo unamalgamation be turned off reliably and completely?
  2020-11-30 16:42         ` Michael Heerdegen
@ 2020-12-02  4:51           ` Samuel Wales
  2020-12-02  4:52             ` Samuel Wales
  0 siblings, 1 reply; 10+ messages in thread
From: Samuel Wales @ 2020-12-02  4:51 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

(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



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can undo unamalgamation be turned off reliably and completely?
  2020-12-02  4:51           ` Samuel Wales
@ 2020-12-02  4:52             ` Samuel Wales
  2020-12-03  3:42               ` Samuel Wales
  0 siblings, 1 reply; 10+ messages in thread
From: Samuel Wales @ 2020-12-02  4:52 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can undo unamalgamation be turned off reliably and completely?
  2020-12-02  4:52             ` Samuel Wales
@ 2020-12-03  3:42               ` Samuel Wales
  0 siblings, 0 replies; 10+ messages in thread
From: Samuel Wales @ 2020-12-03  3:42 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-12-03  3:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-29  5:20 can undo unamalgamation be turned off reliably and completely? Samuel Wales
2020-11-29  8:57 ` Óscar Fuentes
2020-11-29 20:01 ` Michael Heerdegen
2020-11-30  1:59   ` Samuel Wales
2020-11-30  3:08     ` Michael Heerdegen
2020-11-30  4:44       ` Stefan Monnier
2020-11-30 16:42         ` Michael Heerdegen
2020-12-02  4:51           ` Samuel Wales
2020-12-02  4:52             ` Samuel Wales
2020-12-03  3:42               ` Samuel Wales

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.