unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Vincent Belaïche" <vincent.belaiche@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>,
	Kevin Ryde <user42_kevin@yahoo.com.au>
Cc: "Vincent Belaïche" <vincentb1@users.sourceforge.net>,
	26395@debbugs.gnu.org
Subject: bug#26395: 25.1; ses.el git master, inhibit-quit on some cell evaluations
Date: Sat, 27 Jul 2019 16:20:16 +0200	[thread overview]
Message-ID: <ca9720f0-ad7e-980b-ee19-53593be9d104@gmail.com> (raw)
In-Reply-To: <87k1c5nmo2.fsf@mouse.gnus.org>

Hello,

I am not sure what was the exact intention, as this is code which was
written before I became maintainer of SES.

My understanding is that if you quit during modifying the formulas, then
the SES object that under the hood holds all the inputs of the
spreadsheet might get corrupt, and then it would be impossible to
recover from that situation. However, since some processing (updating
the cell values) might be quite lengthy, you want to be able to quit
during that.

Probably there should be some indicator in the mode bar that the
referenes/values/ or display are « dirty », after some quit has occurred
and until the user makes some repair cell reference all + recalculate
all + redisplay all.

Please note that :

- the « repair cell reference » exists ---
   ses-repair-cell-reference-all --- this is one of the additions I did.

- recalculate all exists --- ses-recalculate-all

- but there is not redisplay-all as such, you need to call
   ses-reconstruct-all that will do all three operations, to my
   knonwledge there is no way if you just want to repair the display (for
   instance you have quitted during changing a column width, so the
   cells references and value are not broken, just the display is broken)

FYI, Updating the cell value through the formulaes is made by
post-command-hook, not during the editing of the formula by itself.

Please not that when time allows, my intention was to add some commands
to make some cell permutations (for instance row or column
transposition). I have still not done that, because there are remaining
bugs with the cell renaming, and I wish to solve that before. Also,
quiting/undoing during cell renaming is probably not well supported.

Anyway this discussion is certainly usefull as I have not yet thought
how to handle quiting during such a permutation, and handling undoing of
it --- idealy quitting would be possible, and undoing would undo only
that part that have been done before the quit.

   Vincent.


Le 26/07/2019 à 11:57, Lars Ingebrigtsen a écrit :
 > Kevin Ryde <user42_kevin@yahoo.com.au> writes:
 >
 >> In debian packaged emacs 25.1 but git head ses.el, it seems cell
 >> evaluations sometimes run with inhibit-quit.  For example, initial entry
 >>
 >>     emacs -Q /tmp/foo.ses
 >>     Ret                           # enter formula
 >>     inhibit-quit Ret              # the formula
 >>     =>
 >>     displays t
 >>
 >> I hoped no inhibit-quit while running formulas (and thought there wasn't
 >> previously), as protection against slow or accidentally infinite forms.
 >>
 >> I noticed this in my stock charting program where I communicate with a
 >> database sub-process by accept-process-input, and that func doesn't run
 >> under inhibit-quit.  I could with-local-quit and bail out in a sensible
 >> way, but perhaps there's not meant to be inhibit-quit anyway.
 >
 > Yes, ses.el binds inhibit-quit all over the place, presumably out of an
 > overabundance of caution (not wanting to mess up the display). But it
 > shouldn't do that while computing the formulas, you'd think.
 >
 > I've Cc'd the maintainer; perhaps he can weigh in here.
 >






  reply	other threads:[~2019-07-27 14:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-08  2:07 bug#26395: 25.1; ses.el git master, inhibit-quit on some cell evaluations Kevin Ryde
2019-07-26  9:57 ` Lars Ingebrigtsen
2019-07-27 14:20   ` Vincent Belaïche [this message]
2019-07-27 15:52     ` Lars Ingebrigtsen
2019-07-28  0:37     ` Kevin Ryde
2019-07-28 15:11       ` Vincent Belaïche
2019-07-28  3:00     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca9720f0-ad7e-980b-ee19-53593be9d104@gmail.com \
    --to=vincent.belaiche@gmail.com \
    --cc=26395@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=user42_kevin@yahoo.com.au \
    --cc=vincentb1@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).