From unknown Fri Jun 20 07:14:23 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#12161 <12161@debbugs.gnu.org> To: bug#12161 <12161@debbugs.gnu.org> Subject: Status: 24.1.50; delete-selection mode vs ask-user-about-supersession-threat Reply-To: bug#12161 <12161@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:14:23 +0000 retitle 12161 24.1.50; delete-selection mode vs ask-user-about-supersession= -threat reassign 12161 emacs submitter 12161 Matthew Woodcraft severity 12161 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 08 18:57:36 2012 Received: (at submit) by debbugs.gnu.org; 8 Aug 2012 22:57:37 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 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 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 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 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 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 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 From: Matthew Woodcraft To: bug-gnu-emacs@gnu.org Subject: 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> MIME-Version: 1.0 Content-Type: text/plain 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-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) 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) From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 08 22:27:44 2012 Received: (at 12161-done) by debbugs.gnu.org; 9 Aug 2012 02:27:45 +0000 Received: from localhost ([127.0.0.1]:43308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzITQ-0000gF-7L for submit@debbugs.gnu.org; Wed, 08 Aug 2012 22:27:44 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:9474) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzITO-0000g7-G9 for 12161-done@debbugs.gnu.org; Wed, 08 Aug 2012 22:27:42 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09Ld/LR/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="195324380" Received: from 75-119-242-209.dsl.teksavvy.com (HELO pastel.home) ([75.119.242.209]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 08 Aug 2012 22:19:34 -0400 Received: by pastel.home (Postfix, from userid 20848) id 13655599B1; Wed, 8 Aug 2012 22:19:34 -0400 (EDT) From: Stefan Monnier To: Matthew Woodcraft Subject: Re: bug#12161: 24.1.50; delete-selection mode vs ask-user-about-supersession-threat Message-ID: References: <878vdpq9sj.fsf@golux.woodcraft.me.uk> Date: Wed, 08 Aug 2012 22:19:33 -0400 In-Reply-To: <878vdpq9sj.fsf@golux.woodcraft.me.uk> (Matthew Woodcraft's message of "Wed, 08 Aug 2012 23:49:16 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12161-done Cc: 12161-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > 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)) Indeed, thanks. I've simplified it so it doesn't need to know about how safe_run_hook works. Stefan From unknown Fri Jun 20 07:14:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 06 Sep 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator