From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#28864: 25.3.50; next-error-no-select does select Date: Fri, 20 Oct 2017 16:21:31 +0900 Message-ID: <87mv4m5lok.fsf@gmail.com> References: <87bml72qck.fsf@gmail.com> <4045abe7-1acb-314b-b9ac-72b62db30570@yandex.ru> <87sheh270d.fsf@gmail.com> <6f3b7c2c-31af-8eb2-8f13-a9ba17d3d8e6@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1508484139 3008 195.159.176.226 (20 Oct 2017 07:22:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 20 Oct 2017 07:22:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 28864@debbugs.gnu.org, Noam Postavsky To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 20 09:22:15 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5RdD-00087E-Q6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Oct 2017 09:22:12 +0200 Original-Received: from localhost ([::1]:52492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5RdJ-00014M-Jw for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Oct 2017 03:22:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5Rd8-00013x-R0 for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 03:22:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5Rd4-0000fI-P2 for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 03:22:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42352) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5Rd4-0000fC-L3 for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 03:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e5Rd4-0000sn-Fw for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 03:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Oct 2017 07:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28864 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28864-submit@debbugs.gnu.org id=B28864.15084841073372 (code B ref 28864); Fri, 20 Oct 2017 07:22:02 +0000 Original-Received: (at 28864) by debbugs.gnu.org; 20 Oct 2017 07:21:47 +0000 Original-Received: from localhost ([127.0.0.1]:51033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5Rcp-0000sK-Fh for submit@debbugs.gnu.org; Fri, 20 Oct 2017 03:21:47 -0400 Original-Received: from mail-pf0-f175.google.com ([209.85.192.175]:49011) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5Rcn-0000s4-Tb for 28864@debbugs.gnu.org; Fri, 20 Oct 2017 03:21:46 -0400 Original-Received: by mail-pf0-f175.google.com with SMTP id b79so9817586pfk.5 for <28864@debbugs.gnu.org>; Fri, 20 Oct 2017 00:21:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version; bh=1JbaoIwb05TQrlVZ2/3BwW68rsoy52p5Dy4hdDEbXmU=; b=QGB+C6vI5OZvGNUAmDp4J/FRf7mZeixQHvP+7UX0om8k7B9Cp5qkF9mosdoa3FYf1b muy+9TeNQ5lE0UgQer7QUTbVjjQkTP3uRQZVReVvyD4yzDb5WCcVDOhQZZIBlxlzuLeY wmmmFY9pkxVhsZhzm/mA09Do3RPmL/9gouk+ymg4M6XQAw1+bZHjh37NF3SM+9q5tfXI AojrwiLds+OzbddQT7Mbd2JmCCYhN398rgzVKHBoadIRFZ766wpPg1m2+AaB+6wmwKHs ZjP5jatM0c1dDYUKpAUlBhhAHELvZEOFFQcxYPZH621pSKPLtrzCVXdpSorjE/IVgYzL DRDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=1JbaoIwb05TQrlVZ2/3BwW68rsoy52p5Dy4hdDEbXmU=; b=AUaH9DKOs9Z3H0R5YEZ1VAsU5TjJ96+lYDJzxiNc++Sb9jMsN63g9YWoYmitXPpU+A D6ndQGyIRZkngpTgvTkwOXeTUz5I+EUAOl/Dx0ZAR7b/Esp6AhlINiafnmBcaa5gkOLA cNqAw9Uf78bRtine7q6Eu5wYuhYcmaOVevXK07IHWYVBfW65D99n/q8waBNW8LQbi06Y eFqhcEOccw+0pBxAoQ0rr1YkaHzYTmOb7NupJqjOgRKqCGXIlCtG79oDBmlG4x62DU6y naXpjeAq7cLBNfKbtWGUDHCPhLs3sBDZmLMULK5o3ZXgBJXp/swEsbT7muxtf1eY48XU le+w== X-Gm-Message-State: AMCzsaVTL7U3Z0yfKA60OoKI/jl7ej+BFDXjdOvwsiQlgos7g2vsOT0g crgl1sq39Z3RBEfzJCANXK0= X-Google-Smtp-Source: ABhQp+Te4Vvc4BZG/5EAp9gsDaS5JpamL3VXZDRdgzqxplPfa2ccUWjlqOz5cHE94f6uoxSlNuJONg== X-Received: by 10.99.43.71 with SMTP id r68mr3704187pgr.348.1508484099874; Fri, 20 Oct 2017 00:21:39 -0700 (PDT) Original-Received: from calancha-pc (203.191.218.133.dy.bbexcite.jp. [133.218.191.203]) by smtp.gmail.com with ESMTPSA id e84sm831951pfd.1.2017.10.20.00.21.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2017 00:21:39 -0700 (PDT) In-Reply-To: <6f3b7c2c-31af-8eb2-8f13-a9ba17d3d8e6@yandex.ru> (Dmitry Gutov's message of "Wed, 18 Oct 2017 10:44:45 +0300") 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: 208.118.235.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:138745 Archived-At: Dmitry Gutov writes: > On 10/17/17 5:17 PM, Tino Calancha wrote: > >> Thank you for the help! >> Here your patch fix the issue. Maybe you just have tested the patch >> more carefuly than me; I just run some `grep-find' commands and I keep >> always inside my window. > > It kind of improves something, but the behavior is still wonky and > counter-intuitive. Here are my steps: I think I understand it now: * change-log-mode sets 'next-error-last-buffer' to the current buffer (the ChangeLog source). We can restrict to not do that when we are calling 'next-error-no-select. I think some people don't like to use this-command in such situations; alternatively, we could use `change-log-mode-hook' but the patch below is shorter and explicit. Suggestions are very welcome --8<-----------------------------cut here---------------start------------->8--- commit 76391d208a1a89e2f84c58fb889bc1f19bdd3ce8 Author: Tino Calancha Date: Fri Oct 20 16:10:16 2017 +0900 Dont select the source with next-error-no-select * lisp/vc/add-log.el (change-log-mode): Dont change next-error-last-buffer when we are visiting the source with next-error-no-select (Bug#28864). diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index 392147b14d..e557c49de5 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -1068,7 +1068,8 @@ change-log-mode 'change-log-end-of-defun) ;; next-error function glue (setq next-error-function 'change-log-next-error) - (setq next-error-last-buffer (current-buffer))) + (unless (eq this-command 'next-error-no-select) ; Bug#28864 + (setq next-error-last-buffer (current-buffer)))) (defun change-log-next-buffer (&optional buffer wrap) "Return the next buffer in the series of ChangeLog file buffers. --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 27.0.50 (build 29, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-10-20 Repository revision: 658853aebb0ae2ee243276e04a7672fa7525ec5c