From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: xref and displaying locations in appropriate window or frame Date: Sun, 24 Jan 2016 20:27:29 +0300 Message-ID: <56A50981.7070809@yandex.ru> References: <83wprimto9.fsf@gnu.org> <56916C10.6050004@yandex.ru> <83oacumqmj.fsf@gnu.org> <56917246.1010800@yandex.ru> <5691795E.9010008@yandex.ru> <83lh7ym725.fsf@gnu.org> <5691D768.3020908@yandex.ru> <83bn8tmnvq.fsf@gnu.org> <56928356.2000609@yandex.ru> <8360z1mkfc.fsf@gnu.org> <5696EE9D.2090708@yandex.ru> <838u3si22k.fsf@gnu.org> <5697C7A8.6060601@yandex.ru> <83wprcgjxk.fsf@gnu.org> <5697DA3B.3070706@yandex.ru> <83io2wggh8.fsf@gnu.org> <5697EC73.6040302@yandex.ru> <83fuy0gf2j.fsf@gnu.org> <5697F3C9.5040702@yandex.ru> <83bn8ogd8c.fsf@gnu.org> <56980073.7050604@yandex.ru> <838u3rhpzk.fsf@gnu.org> <569D3ADC.5060803@yandex.ru> <83si1sa47q.fsf@gnu.org> <56A06965.7050501@yandex.ru> <83r3ha97yu.fsf@gnu.org> <56A434A9.6040404@yandex.ru> <837fiz3rv5.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 1453656465 7057 80.91.229.3 (24 Jan 2016 17:27:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Jan 2016 17:27:45 +0000 (UTC) Cc: rudalics@gmx.at, eller.helmut@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 24 18:27:41 2016 Return-path: Envelope-to: ged-emacs-devel@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 1aNORw-00061E-LA for ged-emacs-devel@m.gmane.org; Sun, 24 Jan 2016 18:27:40 +0100 Original-Received: from localhost ([::1]:32958 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNORw-0000hL-2Y for ged-emacs-devel@m.gmane.org; Sun, 24 Jan 2016 12:27:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNORt-0000hF-BY for emacs-devel@gnu.org; Sun, 24 Jan 2016 12:27:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNORo-000408-C5 for emacs-devel@gnu.org; Sun, 24 Jan 2016 12:27:37 -0500 Original-Received: from mail-lb0-x235.google.com ([2a00:1450:4010:c04::235]:35578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNORo-0003zU-3H; Sun, 24 Jan 2016 12:27:32 -0500 Original-Received: by mail-lb0-x235.google.com with SMTP id bc4so63193736lbc.2; Sun, 24 Jan 2016 09:27:31 -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-type:content-transfer-encoding; bh=6B6xhnHZh+4uBqm4I2lDxiXltpdzuFgKKKCdfeYgJmk=; b=YGf5M/VD6tgE1WbEC0SxU+QamytjSnkYTioEYn+97c6hO6T97cMEzb5IRg7U0r4D5S xhcuqUryA9iSTl0zXS2LQU8xoajShqIAo2gusGkNpscdTDM5lY8odOvjRBR6+wQjYuJi d9JJk9LXorH1NoNoExYKFUdqdqo1ofAA2yupNqLTvYeCrO/YuC0rMyjppWaYTReSd1rG FT2XH8aDLXB/BBEsxDaj2IbTb305uEMY0wrlJih7ZnsZF8qquvbJZUfWBlEHuwDwI3QQ O8BXBG28J5oNoGU/rWZxUdc08oeiDdCqaCncSW0K1CNi9WqXX0h/LDKcubib9XK/vd7K Ktdg== 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-type :content-transfer-encoding; bh=6B6xhnHZh+4uBqm4I2lDxiXltpdzuFgKKKCdfeYgJmk=; b=aVNBsCpF6wF7Xrci8sOWi/332ABmluuFs2w1CAl9QeYfXA092H900xrUQGuAeVPbO1 J98fOyOJXO2JfmfcphCnB/8BroahlWnD40u54Sn+6jHkjbDEsDqFq7oXlnndvwy6+OHt awzEHKtQhZrzuFupJzG1KlFnGnq7CyUyQt30i/lXlEbFIhzoWgjcJeFnDPZ7Jdm4rEp6 iVCDCJanxcvxEaHeRl+kkAzlaKuAlBwAvAFBCt1iool0XsLMFyGcgb9n1s8LKBTCVZqO GYLH8nPlePJkvilclJUg3UXmtwpNcLgM/gCcoTcwaNE7kBQuY4fp2jGh+d12auUbZAbW sFgQ== X-Gm-Message-State: AG10YOSOAJnC+IhTyTqFO3TWCc1J2HX/3cNV5xd1PbFnLKQCeQ8NB3hC1/7jbkvZyAdCaw== X-Received: by 10.112.198.102 with SMTP id jb6mr4748651lbc.44.1453656451249; Sun, 24 Jan 2016 09:27:31 -0800 (PST) Original-Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id o3sm2226436lfb.39.2016.01.24.09.27.30 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 24 Jan 2016 09:27:30 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 In-Reply-To: <837fiz3rv5.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c04::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:198711 Archived-At: On 01/24/2016 06:43 PM, Eli Zaretskii wrote: >> xref-find-definitions has a family of commands (namely -other-window and >> -other-frame) which promise to display the location somewhere else than >> the current window. > > But AFAICS they only do that if there's a single candidate for the > definition, i.e. if the *xref* buffer is not displayed at all. Which > confused the heck out of me the first time I tried "C-x 5 .", btw. They do it for the final destination, but not for buffers temporarily displayed when you press `n' or `p'. E.g.: Press `C-x 4 .', type log-edit-menu, pick an element, press RET - and you'll see its location displayed in the "other" window. Same with `C-x 5 .', though to see the expected effect the destination buffer must not be already displayed in the current frame. But if we're not allowed to hide *xref* on RET either, xref-goto-xref and xref-show-location-at-point's behavior should be close to this, and only differ in which window ends up being selected. >> That seems to make the most sense, but it will obscure the original >> code. Maybe we'd want to consult it while picking the exact option >> among the suggested definitions? > > I don't think I understand you here. By "obscure the original code" > do you mean the code will be harder to read? Or do you mean something > else? > > And what do you mean by "consult" -- consult what? I only mean that the original buffer will be hidden, and the user won't be able to look at its contents while making the choice. Which might be considered bad, for the default behavior. Maybe not too terrible, though. (When there's only one option, jumping to it in the current window seems best to me, so changing M-. to be bound to xref-find-definitions-other-window instead doesn't seem like a good alternative.)