From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthew Woodcraft Newsgroups: gmane.emacs.bugs Subject: bug#12161: 24.1.50; delete-selection mode vs ask-user-about-supersession-threat Date: Wed, 08 Aug 2012 23:49:16 +0100 Message-ID: <878vdpq9sj.fsf@golux.woodcraft.me.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1344466206 24156 80.91.229.3 (8 Aug 2012 22:50:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Aug 2012 22:50:06 +0000 (UTC) To: 12161@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 09 00:50:04 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SzF4m-0006ve-48 for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Aug 2012 00:50:04 +0200 Original-Received: from localhost ([::1]:58654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzF4j-0004FO-6u for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Aug 2012 18:50:01 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzF4f-0004FA-JK for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 18:49:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzF4e-0000tb-Jd for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 18:49:57 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzF4e-0000tX-Fp for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 18:49:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SzFCU-0004Qp-Fk for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 18:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matthew Woodcraft Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Aug 2012 22:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12161 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.134446665717002 (code B ref -1); Wed, 08 Aug 2012 22:58:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Aug 2012 22:57:37 +0000 Original-Received: from localhost ([127.0.0.1]:43164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzFC4-0004QA-L3 for submit@debbugs.gnu.org; Wed, 08 Aug 2012 18:57:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48013) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzFC2-0004Q3-04 for submit@debbugs.gnu.org; Wed, 08 Aug 2012 18:57:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzF4A-0000oJ-Pl for submit@debbugs.gnu.org; Wed, 08 Aug 2012 18:49:27 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:39997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzF4A-0000oF-Lt for submit@debbugs.gnu.org; Wed, 08 Aug 2012 18:49:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzF49-0004F2-OM for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 18:49:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzF48-0000o3-R6 for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 18:49:25 -0400 Original-Received: from hark.woodcraft.me.uk ([80.68.94.88]:55462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzF48-0000nb-Kv for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 18:49:24 -0400 Original-Received: from cpc3-cmbg10-0-0-cust455.5-4.cable.virginmedia.com ([81.102.141.200] helo=golux.woodcraft.me.uk) by hark.woodcraft.me.uk with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SzF41-0002WR-HS for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 23:49:17 +0100 Original-Received: from mjw by golux.woodcraft.me.uk with local (Exim 4.80) (envelope-from ) id 1SzF40-0000dB-Ek for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 23:49:16 +0100 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62959 Archived-At: The following code in delsel.el doesn't seem to be working any more: (file-supersession ;; If ask-user-about-supersession-threat signals an error, ;; stop safe_run_hooks from clearing out pre-command-hook. (and (eq inhibit-quit 'pre-command-hook) (setq inhibit-quit 'delete-selection-dummy)) I think it hasn't been adjusted for the changes in Emacs 24 which make safe_run_hooks remove a single function from the hook, rather than clearing out the hook altogether. If I change the (eq inhibit-quit 'pre-command-hook) to (equal inhibit-quit '(pre-command-hook . delete-selection-pre-hook)) then it works again for me. Full recipe to reproduce: echo 12345 > /tmp/testfile emacs -Q /tmp/testfile M-x delete-selection-mode (in another console: touch /tmp/testfile) C-M-h DEL At the prompt 'testfile changed on disk; really edit the buffer?', enter 'n' The prompt appears a second time; enter 'n' (or 'y') Now Emacs thinks it is in delete-selection-mode, but the pre-command-hook has mysteriously evaporated. ----- In GNU Emacs 24.1.50.2 (i486-pc-linux-gnu, GTK+ Version 3.4.2) of 2012-08-08 on golux, modified by Debian (emacs-snapshot package, version 2:20120807-1mjw1)