From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: xref in a narrowed buffer? Date: Wed, 04 Mar 2020 10:46:37 -0500 Message-ID: References: <2528b0fe-1cb7-578e-f16b-d914d616f645@yandex.ru> Mime-Version: 1.0 Content-Type: text/x-markdown; coding=UTF-8 Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="2890"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Robert Pluim , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 04 16:47:21 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j9WEz-0000h2-9y for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Mar 2020 16:47:21 +0100 Original-Received: from localhost ([::1]:36020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9WEy-000291-CD for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Mar 2020 10:47:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49095) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9WEM-0001WO-AC for emacs-devel@gnu.org; Wed, 04 Mar 2020 10:46:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9WEL-0003fB-5b for emacs-devel@gnu.org; Wed, 04 Mar 2020 10:46:42 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46143) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j9WEK-0003dz-Va for emacs-devel@gnu.org; Wed, 04 Mar 2020 10:46:41 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 047518102E; Wed, 4 Mar 2020 10:46:40 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 446C08063A; Wed, 4 Mar 2020 10:46:38 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1583336798; bh=1B92HeLi9N93WUSERSb04tm9HCJhLlpP/cDoyArckac=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=pZdWU9dUjNMuKsw8ATVo8/io97LotqIcOcJimoJYGUY4nM27MWx/uoY57t0feTQO9 eejN+oC2nW4y/s9CxW5+Q3EVRm+4QXnuExeBtLY7URzrGGr4sPiHt3yPr6dAlH2rmr v6mOf614YHvLZTLaVa4+Pjt99OwWN6ag9pOU9qU82ScMyKpoyY2wm0LEHLpD2EAie8 skId/bdgJFe7RDX7F/NkkgGYISLIu0A7WnlBMkUc9n2gijrDk8HWUxGFlNd/vxn+bQ rgoGuqRvdScIVyDE+/3roOrdQpBlM44GV0peda6kG5lL0Hp4vyzApfRLRl0R4xynJj UOaR5/JJcWZiw== Original-Received: from pastel (unknown [216.154.50.221]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EFEC91203B9; Wed, 4 Mar 2020 10:46:37 -0500 (EST) In-Reply-To: <2528b0fe-1cb7-578e-f16b-d914d616f645@yandex.ru> (Dmitry Gutov's message of "Wed, 4 Mar 2020 17:20:53 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245219 Archived-At: >> Should 'xref-goto-ref' widen the buffer before attempting to jump to >> the definition? Or should 'xref-find-definitions' not show definitions >> that are outside the narrowed area? > > The latter is pretty hard to do, so the former, I guess. It could also signal a clean error telling the user the destination is outside of the narrowed region, so the user can decide whether to widen or not (and is aware of the fact that the source of the problem is the narrowing). Stefan