unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master c1b1801 1/2: Make atomic cell update in data area.
       [not found] ` <20190728144622.446D820CC5@vcs0.savannah.gnu.org>
@ 2019-07-28 18:48   ` Stefan Monnier
  2019-07-29 20:32     ` Vincent Belaïche
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2019-07-28 18:48 UTC (permalink / raw)
  To: Vincent Belaïche; +Cc: emacs-devel

>     Make atomic cell update in data area.
>     * lisp/ses.el (ses-write-cells): Set inhibit-quit to t during the data
>       area write.

An alternative to inhibit-quit here is to use `atomic-change-group`.


        Stefan




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

* RE: [Emacs-diffs] master c1b1801 1/2: Make atomic cell update in data area.
  2019-07-28 18:48   ` [Emacs-diffs] master c1b1801 1/2: Make atomic cell update in data area Stefan Monnier
@ 2019-07-29 20:32     ` Vincent Belaïche
  2019-07-29 21:05       ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Vincent Belaïche @ 2019-07-29 20:32 UTC (permalink / raw)
  To: Stefan Monnier, Vincent Belaïche; +Cc: emacs-devel@gnu.org

AFAIU the advantage of atomic-change-group is with regard to
undoing. But SES has its own undo mecanism. So, I am not sure whether
atomic-change-group would have any great added value.

Anyway, I suspect that some operations are such as if you quit in the
middle of them, the result of undoing is not guaranteed. You probably
have to ses-reconstruct-all just after undoing.



De : Emacs-devel <emacs-devel-bounces+vincent.b.1=hotmail.fr@gnu.org> de la part de Stefan Monnier <monnier@iro.umontreal.ca>
Envoyé : dimanche 28 juillet 2019 20:48
À : Vincent Belaïche <vincentb1@users.sourceforge.net>
Cc : emacs-devel@gnu.org <emacs-devel@gnu.org>
Objet : Re: [Emacs-diffs] master c1b1801 1/2: Make atomic cell update in data area. 
 
>     Make atomic cell update in data area.
>     * lisp/ses.el (ses-write-cells): Set inhibit-quit to t during the data
>       area write.

An alternative to inhibit-quit here is to use `atomic-change-group`.


        Stefan




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

* Re: [Emacs-diffs] master c1b1801 1/2: Make atomic cell update in data area.
  2019-07-29 20:32     ` Vincent Belaïche
@ 2019-07-29 21:05       ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2019-07-29 21:05 UTC (permalink / raw)
  To: Vincent Belaïche; +Cc: Vincent Belaïche, emacs-devel@gnu.org

> AFAIU the advantage of atomic-change-group is with regard to
> undoing.

No, it uses undo internally, but that's about it.

The advantages are:
- In case an error occurs in the middle of the processing, you won't be
  left with half of the change done.  I.e. the same advantage as
  inhibit-quit but extended to any *error*.
- it doesn't set inhibit-quit, so if some operation happens to inf-loop
  in there, the user can still interrupt it with C-g.


        Stefan




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

end of thread, other threads:[~2019-07-29 21:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20190728144621.18551.16746@vcs0.savannah.gnu.org>
     [not found] ` <20190728144622.446D820CC5@vcs0.savannah.gnu.org>
2019-07-28 18:48   ` [Emacs-diffs] master c1b1801 1/2: Make atomic cell update in data area Stefan Monnier
2019-07-29 20:32     ` Vincent Belaïche
2019-07-29 21:05       ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).