From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: xref in a narrowed buffer? Date: Wed, 04 Mar 2020 18:38:52 +0200 Message-ID: <83h7z4vzvn.fsf@gnu.org> References: <2528b0fe-1cb7-578e-f16b-d914d616f645@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="112117"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rpluim@gmail.com, monnier@iro.umontreal.ca, 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 17:39:49 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 1j9X3k-000T1O-Pe for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Mar 2020 17:39:48 +0100 Original-Received: from localhost ([::1]:36568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9X3j-0004Zw-Qa for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Mar 2020 11:39:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60593) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9X3D-000443-BJ for emacs-devel@gnu.org; Wed, 04 Mar 2020 11:39:16 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54185) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j9X3C-0006mj-Kq; Wed, 04 Mar 2020 11:39:14 -0500 Original-Received: from [176.228.60.248] (port=1249 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j9X3B-0004aN-UT; Wed, 04 Mar 2020 11:39:14 -0500 In-Reply-To: (message from Dmitry Gutov on Wed, 4 Mar 2020 18:04:50 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:245225 Archived-At: > From: Dmitry Gutov > Date: Wed, 4 Mar 2020 18:04:50 +0200 > Cc: Robert Pluim , emacs-devel@gnu.org > > > 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). > > True. It's also an option. > > I don't use narrowing, and don't understand its intended behavior, so > someone else should make the choice on what is the best approach here. Signaling an error sounds TRT to me. When you narrow a buffer, Emacs should behave as if the parts outside the restriction didn't exist.