From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: charles@aurox.ch (Charles A. Roelli) Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master abd1825: Ensure that we can find definitions when buffer is narrowed Date: Wed, 13 Dec 2017 21:16:39 +0100 Message-ID: References: <20171210145422.30001.90205@vcs0.savannah.gnu.org> <20171210145424.0E878211A6@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1513196091 3201 195.159.176.226 (13 Dec 2017 20:14:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 13 Dec 2017 20:14:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 13 21:14:46 2017 Return-path: Envelope-to: ged-emacs-devel@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 1ePDQT-0000Sf-OW for ged-emacs-devel@m.gmane.org; Wed, 13 Dec 2017 21:14:46 +0100 Original-Received: from localhost ([::1]:37459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePDQZ-000786-7T for ged-emacs-devel@m.gmane.org; Wed, 13 Dec 2017 15:14:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePDPM-0006Gi-Ef for emacs-devel@gnu.org; Wed, 13 Dec 2017 15:13:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePDPG-0005WJ-Kw for emacs-devel@gnu.org; Wed, 13 Dec 2017 15:13:36 -0500 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:40626) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ePDPG-0005VY-BS for emacs-devel@gnu.org; Wed, 13 Dec 2017 15:13:30 -0500 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 6C10C225F8 for ; Wed, 13 Dec 2017 20:05:53 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:subject:subject:in-reply-to:to:from:from:message-id :date:date; s=dkim; t=1513195552; x=1514059553; bh=jQRD7tB0QS5fx OS3N2olij4q2A5bIgu2dOs1s6E+fVM=; b=Lb4rVhLAdzjEkapLRF9WHmIne3Wqd +zqJGePOmxbFqPwSQ47OvqIDKHkTljJOFPDtzz0xaspj+hbk6rN518wXvB4kXJSZ hTbkIBnMJNkp116XwWc0RGWyHdnhyM/s6mdxJ847HRK/6LWZwe4sk2Oln95HJXl7 iwtEJtpw9oZAsw= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id VHYK9x75fP-W for ; Wed, 13 Dec 2017 20:05:52 +0000 (UTC) Original-Received: from gray (125.85.192.178.dynamic.wline.res.cust.swisscom.ch [178.192.85.125]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 2CBBD225E2; Wed, 13 Dec 2017 20:05:50 +0000 (UTC) In-reply-to: (message from Stefan Monnier on Tue, 12 Dec 2017 15:56:44 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 37.35.109.145 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:221020 Archived-At: > Its docstring also doesn't really make it clear what it means and how to > use it. Looking at the current users, a slightly different var might > work better. E.g. > (defvar widen-to-pos-function > (lambda (pos) > (if (not (<= (point-min) pos (point-max))) > (widen)))) Sounds good to me. What do you think would be better, to supplement widen-automatically with widen-to-pos-function, or remove widen-automatically and only offer widen-to-pos-function? From a user's perspective, it might be useful to keep both around (allowing widen-automatically to easily be set to nil in some buffers where it's unwanted).