From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Vincent =?UTF-8?Q?Bela=C3=AFche?= Newsgroups: gmane.emacs.bugs Subject: bug#26395: 25.1; ses.el git master, inhibit-quit on some cell evaluations Date: Sat, 27 Jul 2019 16:20:16 +0200 Message-ID: References: <87k26v1wkb.fsf@blah.blah> <87k1c5nmo2.fsf@mouse.gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="208561"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 Cc: Vincent =?UTF-8?Q?Bela=C3=AFche?= , 26395@debbugs.gnu.org To: Lars Ingebrigtsen , Kevin Ryde Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 27 16:21:09 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hrNZM-000s9S-Rb for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Jul 2019 16:21:08 +0200 Original-Received: from localhost ([::1]:45960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrNZK-0000as-QG for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Jul 2019 10:21:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45035) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrNZI-0000am-8V for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 10:21:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hrNZH-00011U-49 for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 10:21:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36283) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hrNZH-00010z-0c for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 10:21:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hrNZF-0004SS-MY for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 10:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vincent =?UTF-8?Q?Bela=C3=AFche?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Jul 2019 14:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26395 X-GNU-PR-Package: emacs Original-Received: via spool by 26395-submit@debbugs.gnu.org id=B26395.156423722917083 (code B ref 26395); Sat, 27 Jul 2019 14:21:01 +0000 Original-Received: (at 26395) by debbugs.gnu.org; 27 Jul 2019 14:20:29 +0000 Original-Received: from localhost ([127.0.0.1]:45104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrNYi-0004RS-0W for submit@debbugs.gnu.org; Sat, 27 Jul 2019 10:20:29 -0400 Original-Received: from mail-wm1-f67.google.com ([209.85.128.67]:37727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrNYf-0004RE-Ar for 26395@debbugs.gnu.org; Sat, 27 Jul 2019 10:20:26 -0400 Original-Received: by mail-wm1-f67.google.com with SMTP id f17so49851804wme.2 for <26395@debbugs.gnu.org>; Sat, 27 Jul 2019 07:20:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=s57al2hNlR3Kja+/s/QJzrLaYJvN1OskyzJKR6OGKgE=; b=h4fYeUH2E7kLnH5Fcf2GH/0GVWYlrxnUPrgT3VFxW+XcZ53/wQiv5CEdRoC7PIX3Qk TtorQSKf1aSgf080KUMJcC+egnsci5JlLRtZnMGDYNpUlYvVXtdkpSBWVgM7VTgf2c0W 6NJgQuw5ffLE5/gksQwtVE1/3QLiEMgSBJ49Rj4S2KZl3Zzd6D8QA0c/WdxEU8zZURR6 HA3VgRT/TgE1L82y3nCGNkQcY187EobOsm0cFtm03P2sPPrUf7nQhK7TSrBB0bpbaKIS CbNYTqxxp4edXvpQK8LYaMS3zuwVbacaLkn0zAXOns+ofLuvZjgE5q0ihBfxQk0gMLTw vcqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=s57al2hNlR3Kja+/s/QJzrLaYJvN1OskyzJKR6OGKgE=; b=bR5Q1XRJbiCcTLHxy4TEZA5ZMnB2UwEjcNtS4UM3INftPyXzQS5h5+qXBfYdOg8m7b mBScdyGr5bI5OkTxis0HV+EkI0581zf+B4QfCZcwGHr7YOvUmgjVbwxALnl7tjeDfiYb QGLXBcKOzF7bpe44VroaqQUHROByZn2/1ySLHQ07UdEzg/xv2ZR8sqzSZbx+rEba8CJH mwfUmPMieWbhLIbMnyD+PLCc79EH1NZeyR6vmlZkPsB8Ps7fE7Lk7psOoV6P0a2kiOos 4/EuGcK52/0Cylv5y0RjdNmOMHQQwQKsCHJpG2Bk1GUINDSb34ryKUhzwG7JLzd5aClq DwZA== X-Gm-Message-State: APjAAAUEca0dLc0K5IhzBBGwuhqs2AQORStF5VifTkR9WtffsrrTeAps atdzAjOq/9aWa6XzpsvlX+A= X-Google-Smtp-Source: APXvYqxcCd5nxuaz8FtSfQPfFIdzKgK4Ye24DfqXffCOPlLT4+u/U8+EJdJkLbOtCxsh0tUp+2++Fw== X-Received: by 2002:a1c:cb43:: with SMTP id b64mr88835423wmg.135.1564237219527; Sat, 27 Jul 2019 07:20:19 -0700 (PDT) Original-Received: from [192.168.1.19] (arennes-656-1-376-211.w90-32.abo.wanadoo.fr. [90.32.124.211]) by smtp.googlemail.com with ESMTPSA id z5sm38768048wmf.48.2019.07.27.07.20.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Jul 2019 07:20:18 -0700 (PDT) In-Reply-To: <87k1c5nmo2.fsf@mouse.gnus.org> Content-Language: fr X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163873 Archived-At: 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 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. >