From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#20489: 25.0.50; next-error-find-buffer chooses non-current buffer without good reason Date: Mon, 29 Feb 2016 05:15:10 +0200 Message-ID: References: <86wq0q602w.fsf@yandex.ru> <56CA4FD1.3060609@yandex.ru> <838u26cvf4.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1456715783 7863 80.91.229.3 (29 Feb 2016 03:16:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Feb 2016 03:16:23 +0000 (UTC) Cc: 20489@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 29 04:16:12 2016 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 1aaEJf-0001Ie-5J for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Feb 2016 04:16:11 +0100 Original-Received: from localhost ([::1]:33723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaEJe-0005AB-DE for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Feb 2016 22:16:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaEJZ-00058b-T1 for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2016 22:16:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaEJW-00081X-NN for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2016 22:16:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaEJW-00081T-JN for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2016 22:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aaEJW-0002PQ-CW for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2016 22:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Feb 2016 03:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20489 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20489-submit@debbugs.gnu.org id=B20489.14567157209203 (code B ref 20489); Mon, 29 Feb 2016 03:16:02 +0000 Original-Received: (at 20489) by debbugs.gnu.org; 29 Feb 2016 03:15:20 +0000 Original-Received: from localhost ([127.0.0.1]:51188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaEIq-0002ON-5g for submit@debbugs.gnu.org; Sun, 28 Feb 2016 22:15:20 -0500 Original-Received: from mail-wm0-f49.google.com ([74.125.82.49]:35270) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaEIo-0002O8-B4 for 20489@debbugs.gnu.org; Sun, 28 Feb 2016 22:15:18 -0500 Original-Received: by mail-wm0-f49.google.com with SMTP id l68so43379197wml.0 for <20489@debbugs.gnu.org>; Sun, 28 Feb 2016 19:15:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=oYpiyGxAzXLdqLnj4X0lf93EE3TlwUScgfhHtRKOFJI=; b=luzNxykz7A5ddb6LLE+gthqRfN/s1RGaFqenO98FbiCqj/YXV+PG3/Y6SgZPIrfBZj fh6qJzYgBugNiDCsZozaMHohP68pvMjrJsICHTTsi2IVodmTZOghPRh4xq3fzls8lteF cptx0zEMtFKQ+HTvnnTGRTbkAxeJNQDq3JXAev6Fkoc28XchVPSqGvsJqH1ZFXHX1VrF U8gX66/M3q2Lqkbgj8so7NFZZgNfHzWmg7qy1qHtsxT7O+VkRUDL7FIOAXLZ3jpkt4JH I8vr1aI5yfaGST8023oRP2DwKgVwtw07aGYv82O1FN1DsZBJcFUYstnSJxNzV43EeWYR EbCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=oYpiyGxAzXLdqLnj4X0lf93EE3TlwUScgfhHtRKOFJI=; b=giG+v6zoawk5FImBDiwFl+N1fJWYrymae4i87R79OhNQz3/kpqXBALL/SKEdjM852V J2zHKKuLeI4ybcB72NSuuPAVUF4ZnEjda20UZQ3blZfS3NKcN+mqrHomdG1tja36ajcp 0vNGbTR5rJ2mumC5ACLaePpgjmsODxNod0hWQkBCVhf0+L+8OYpBcj+J0Xv9hqNi4BSd 1MdtgAWHn9uKWHPppChj+IPO1tNQQ2GkK9WX/52qzCuro/+boDu2PcrN0hev2huWDg5K edip5BfRKnIwcB2NzQKi2XN4m0g1ABYW9fWSTLeVRBW+Hju/6lhW3iJMQi6MfCKRtueW TqEQ== X-Gm-Message-State: AD7BkJKfQp7E+avL9H3hhlnTsp8wo0LY0c+1AAsW3r09EzjUq82OCLT2vzQvnTr/ZnsffA== X-Received: by 10.28.92.13 with SMTP id q13mr8613847wmb.43.1456715712838; Sun, 28 Feb 2016 19:15:12 -0800 (PST) Original-Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id j10sm23687102wjb.46.2016.02.28.19.15.11 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 28 Feb 2016 19:15:11 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 In-Reply-To: <838u26cvf4.fsf@gnu.org> 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114071 Archived-At: On 02/27/2016 12:14 PM, Eli Zaretskii wrote: > . When one uses next-error to step through hits found by Dired's 'A' > command, point in the *xref* buffer doesn't move to the hit that is > visited in the window displayed above *xref*. Given how next-error > works in other cases, I think users will expect point to move > accordingly; at least I did. It would be helpful, but it doesn't seem like `next-error' was designed with this in mind. After all, xref--next-error-function does move point, and that doesn't help (probably because it's called inside with-current-buffer, see next-error-internal). Wrapping xref--next-error-function's definition in (with-selected-window (get-buffer-window xref-buffer-name) ...) does help, but that seems silly. > . I see the places I visited marked by a special face in *xref* > (good!), but I don't quite understand when they get marked. No special face, these are just unadorned buffer-substring values: the ones that have faces applied, are from buffer areas that had been touched by font-lock, the others hadn't. We could remove faces from all lines for consistency, but seeing them on at least some results is nice. > They > certainly don't get marked as I move through hits with next-error > or with an explicit RET on a hit in the *xref* buffer. Perhaps we > should mark them in real time? Not sure how to introduce that feature into the API in a generic fashion. Perhaps if we decided that the "summary" of each xref-match instance is always defined by the buffer contents? Having match-xrefs use a distinct structure from "normal" xrefs seems appropriate, but to fully go this way, I think we'll need the find-buffer-delayed feature first (http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00060.html). Because then we couldn't afford to have the location buffers closed (or reopen them all) when the xref buffer is rendered.