From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#38219: Error on leaving Ediff after killing vital buffer Date: Sat, 16 Nov 2019 22:18:24 +0200 Organization: LINKOV.NET Message-ID: <87o8xbu3wn.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="43233"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: Richard Copley , 38219@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 16 22:10:12 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 1iW5Kc-000B79-9N for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Nov 2019 22:10:10 +0100 Original-Received: from localhost ([::1]:50110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iW5Kb-0002WN-5E for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Nov 2019 16:10:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55869) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iW5Ib-0008An-Dm for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2019 16:08:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iW5Ia-0001SV-8m for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2019 16:08:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59198) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iW5Ia-0001SM-4k for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2019 16:08:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iW5IZ-0005k6-VJ for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2019 16:08:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Nov 2019 21:08:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38219 X-GNU-PR-Package: emacs Original-Received: via spool by 38219-submit@debbugs.gnu.org id=B38219.157393844221956 (code B ref 38219); Sat, 16 Nov 2019 21:08:03 +0000 Original-Received: (at 38219) by debbugs.gnu.org; 16 Nov 2019 21:07:22 +0000 Original-Received: from localhost ([127.0.0.1]:39773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iW5Ht-0005i4-N9 for submit@debbugs.gnu.org; Sat, 16 Nov 2019 16:07:21 -0500 Original-Received: from cadetblue.birch.relay.mailchannels.net ([23.83.209.28]:40219) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iW5Hq-0005hv-OI for 38219@debbugs.gnu.org; Sat, 16 Nov 2019 16:07:19 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id B366CE0A2F; Sat, 16 Nov 2019 21:07:17 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a75.g.dreamhost.com (100-96-45-206.trex.outbound.svc.cluster.local [100.96.45.206]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 3B919E0556; Sat, 16 Nov 2019 21:07:17 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a75.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Sat, 16 Nov 2019 21:07:17 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Arch-Oafish: 2b77b7643f504f89_1573938437466_2443735945 X-MC-Loop-Signature: 1573938437465:192469534 X-MC-Ingress-Time: 1573938437465 Original-Received: from pdx1-sub0-mail-a75.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a75.g.dreamhost.com (Postfix) with ESMTP id 10FBB7F6FA; Sat, 16 Nov 2019 13:07:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=DTgb4M5JrgTnB9oyPLOoXt01naI=; b= d85okJPrcdS7HfH/aSnchB3jwtzsiQo0P04sQweRGaEY1Qz/u3ZsXOY5OE4PWcAX dKqJij+Z07M6PM5bIYAWcwgLmz6YPw3UT9+eMlHDggolNNq95RG1I97CUCqEaxOx izZBZ6O588YChucjn4RM4CBtMtRZHfe4p5fS2G7pQR8= Original-Received: from mail.jurta.org (m91-129-102-1.cust.tele2.ee [91.129.102.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a75.g.dreamhost.com (Postfix) with ESMTPSA id 774C97F700; Sat, 16 Nov 2019 13:07:09 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a75 In-Reply-To: (martin rudalics's message of "Fri, 15 Nov 2019 17:35:58 +0100") 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:171742 Archived-At: > 'y-or-n-p' mangles 'this-command'. Something like the attached patch > should fix that. Can the same be said about read-from-minibuffer? Shouldn't read-from-minibuffer mangle 'this-command'? What it some command wants to check if 'this-command' is 'exit-minibuffer' afterwards? Shouldn't this change better to be localized to callers in ediff, instead of adding such hack? > diff --git a/lisp/subr.el b/lisp/subr.el > index eaec223585..68e25c96d9 100644 > --- a/lisp/subr.el > +++ b/lisp/subr.el > @@ -2828,7 +2828,8 @@ y-or-n-p > (concat prompt > (if (or (zerop l) (eq ?\s (aref prompt (1- l)))) > "" " ") > - (if dialog "" "(y or n) ")))))) > + (if dialog "" "(y or n) "))))) > + (old-this-command this-command)) > (cond > (noninteractive > (setq prompt (funcall padded prompt)) > @@ -2858,6 +2859,7 @@ y-or-n-p > (let ((ret (eq answer 'act))) > (unless noninteractive > (message "%s%c" prompt (if ret ?y ?n))) > + (setq this-command old-this-command) > ret))) > >