GNU bug report logs - #17401
24.4.50; Narrow to {region,page,defun} in an indirect clone buffer in the other window

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Phil Sainty <psainty@HIDDEN>; dated Sun, 4 May 2014 10:40:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Removed tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 17401 <at> debbugs.gnu.org:


Received: (at 17401) by debbugs.gnu.org; 19 Sep 2020 14:14:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 19 10:14:30 2020
Received: from localhost ([127.0.0.1]:47659 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJddG-0002z2-9j
	for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 10:14:30 -0400
Received: from quimby.gnus.org ([95.216.78.240]:39114)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1kJddD-0002yl-97
 for 17401 <at> debbugs.gnu.org; Sat, 19 Sep 2020 10:14:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=pZdIR30tkiVcF7VtWH4ItRzwA8vaM/ulk8xaJAxE0cY=; b=a9s4E5lXDfgoXLZy7QSF89MLzN
 EjlF8SLs9YhBmk8cxGRIUzVWLnYxBDPh1Va1FllLF7NBO453SiCEJ1N0gvUMwLmsKAOFpU3jTmJsU
 uDCJ5GgPQnqZra3fdC4jZKmAtUUhBaYiLBZWzFgEuyTUf1CT9tjcY4S8Zreg97CF71pk=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1kJdd4-000461-Ez; Sat, 19 Sep 2020 16:14:21 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: "Zane Ashby" <contact@HIDDEN>
Subject: Re: bug#17401: 24.4.50; Narrow to {region,page,defun} in an
 indirect clone buffer in the other window
References: <53661891.40206@HIDDEN> <87ft7fgpbm.fsf@HIDDEN>
 <1b0f2c7f-c121-4564-8e0a-5bf5e62a867a@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEULBwZfOTOpa1vs
 1Mr///8qN6K2AAAAAWJLR0QEj2jZUQAAAAd0SU1FB+QJEw4KDPd64J8AAAGjSURBVDjLnZPrdcMw
 CIXBWUDgBQwsUIv9dysPOXZ62j/VyUPOJy7iQgAAiKe6+9w81xzA8QUDQJQLcAMZeSICUA40d1Jb
 AHABnaQ+VZV9EqsAWIFt1kFllsI/gA8ksUmUYE8wOLXVzxA1J2BtgNKA/YxMpdVg076NeSvGmRXh
 WYPm4QuMzmH5G9GeYHYdVGCrgmVz8YMsAXIBkJXjsBKLgCw9HWmPfFh6GbcuN+IdNlTpEFlDcIxC
 EFZKlOtRMI9ogNAN4gEonjlqnRQa1MDytqmbihGNWTvAkY5oguoWWTqf3s+2KvLqjFis2t0UvKyK
 Rsd5Udm7prijW4Ps84nDlmEJun/1iejXgqndp37a/I7wpZpU7Y547w649x8AfgDsBuZsXEDXOSBY
 69LcF4APMIHQHoAucLIL3iC2o8FXCI0PcCwQxTwBi64cMfUFWBr4AqdFmxOsKI25WVKahgPuWt0n
 XTlOJa3ZRTp6kq5bKUkWyGLns0AdHK+MIDseoP6sAC9P8YclX+9tDBbdYL63r8+I8bQU3ylw3SIx
 wi/rTwD/A98NUniNb/NXxQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0wOS0xOVQxNDoxMDoxMisw
 MDowME8PeyUAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMDktMTlUMTQ6MTA6MTIrMDA6MDA+UsOZ
 AAAAAElFTkSuQmCC
X-Now-Playing: Propaganda's _A Secret Wish (2)_: "Do Well (The First
 Cut-Duel-Jewel (Cut Rough)-Wonder-Bejewelled)"
Date: Sat, 19 Sep 2020 16:14:17 +0200
In-Reply-To: <1b0f2c7f-c121-4564-8e0a-5bf5e62a867a@HIDDEN> (Zane
 Ashby's message of "Fri, 18 Sep 2020 21:22:08 +0000")
Message-ID: <87v9g9rgzq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  "Zane Ashby" <contact@HIDDEN> writes: > More than
 happy to assign copyright to the FSF for this code, if > someone can kindly
 point me in the right direction? :) (Form sent off-list.) 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 17401
Cc: Phil Sainty <psainty@HIDDEN>, Drew
 Adams <drew.adams@HIDDEN>, 17401 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

"Zane Ashby" <contact@HIDDEN> writes:

> More than happy to assign copyright to the FSF for this code, if
> someone can kindly point me in the right direction? :)

(Form sent off-list.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17401; Package emacs. Full text available.

Message received at 17401 <at> debbugs.gnu.org:


Received: (at 17401) by debbugs.gnu.org; 19 Sep 2020 04:33:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 19 00:33:43 2020
Received: from localhost ([127.0.0.1]:45493 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJUZC-0000vB-0d
	for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 00:33:42 -0400
Received: from out5-smtp.messagingengine.com ([66.111.4.29]:53729)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <contact@HIDDEN>) id 1kJNq0-0007Hl-L1
 for 17401 <at> debbugs.gnu.org; Fri, 18 Sep 2020 17:22:37 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.nyi.internal (Postfix) with ESMTP id 3FBD15C00BC;
 Fri, 18 Sep 2020 17:22:31 -0400 (EDT)
Received: from imap2 ([10.202.2.52])
 by compute4.internal (MEProxy); Fri, 18 Sep 2020 17:22:31 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zaneashby.co.nz;
 h=mime-version:message-id:in-reply-to:references:date:from:to
 :cc:subject:content-type; s=fm3; bh=ullqeYQ2xF+CxycrajOjftPTA6Db
 Z9sC3fC+BlvD1vQ=; b=FDgnzGaOCJoRUGxyNsTDkytpBcUMwb8tBvCeuQaxQ57H
 WEB1REXwp4IjHO1jwbbNGrHEtJ7MLBkqtzyPzQArT5bsjiMlyLabvUSGUcsKJzy6
 em5D0rVekGLx8/Np4Hq2B0m6FZ2svmif79jcZQtNkQeHQKHw/kMofhGMXDmChwgd
 JnGn4r2PEbrxPfIuMRFSSX79TJE2v9YJ9VMQ8IwmTj65WjU2NoS4X1n0M71zcBWH
 RCTjxucJAWS09zteHz7G8pD7Vg82T+bsfzJuZ8jDGF7iIMfH5ao2Fgv5ZqdslSZz
 RViiXVFBhkeXfWdVoquqRpES16G7dKk7O/Bk4uhkSA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=ullqeY
 Q2xF+CxycrajOjftPTA6DbZ9sC3fC+BlvD1vQ=; b=R4VfGTQOeWllCR98InDHUa
 ZA0xUeHbpsX3geSjJiXpkn4uz8YBR/2hw/gefFfwv97MLK6dWfTgd2ikZ8wuC06y
 txiqdsjsfQ9eH3ec8Er+TMyj41hD4axaFe3eM/kbODxq/G+mYrWxkckCGGax3nDg
 i4wm+HRbVoqGIXlkNrkMYrGKpAiJjl/MZuhX7p826dbtQuNhS7MbCutA/YQ7LHsy
 2Aim8Zq//DzVajP3jiydQTLbGsNg0U7EXCeZlI9SoZL/zb24mphX6Zl2d9ppSDXl
 yeHIHbqqXRQPQdluzWDZ8meUaQ++Ld4tdnF66S7sq3G4rVQ/WYl56/Tj10+T0gqw
 ==
X-ME-Sender: <xms:FiVlX27Q3dQ6WkWfA_Wc3k7BMU7jqJw9GSjEdbcjBpJZ50-0LhVBRg>
 <xme:FiVlX_6uEr35KMMeWlWPhoN_Dt1SvEnaVITMiyzdJYcV6Q1TRpRWXVaNLahkS-mOf
 BoomKdiuNTZA5SlJ20>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrtdeigdduieduucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepofgfggfkjghffffhvffutgesthdtredtreerjeenucfhrhhomhepfdgkrghn
 vgcutehshhgshidfuceotghonhhtrggtthesiigrnhgvrghshhgshidrtghordhniieqne
 cuggftrfgrthhtvghrnhepueefledvvdfftdduvedvvddutdejvdegvddthfelhfeijefh
 jedtteeghfetkeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh
 hfrhhomheptghonhhtrggtthesiigrnhgvrghshhgshidrtghordhnii
X-ME-Proxy: <xmx:FiVlX1cOtdfYke9WKNaZDB1xNE4i2w6mqWw_y3kR-JeJ1Q_7VLR4ng>
 <xmx:FiVlXzKxEHIi7jFVGZuslHjfGkw-WvjRoaEAwSsvqdjzMLOhgymQdQ>
 <xmx:FiVlX6IiqoKqCD886HhPHfz5kiTvLj_D46EmFWW14mQ2UhN-GJvJlQ>
 <xmx:FyVlX8jwxdctmrR0biy-EfSsFAGa9o6Rv6-QzG_Bp_nmOVyZEo_w6w>
Received: by mailuser.nyi.internal (Postfix, from userid 501)
 id 32E21E0113; Fri, 18 Sep 2020 17:22:30 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.3.0-325-g8593b62-fm-20200916.004-g0f995879-bis
Mime-Version: 1.0
Message-Id: <1b0f2c7f-c121-4564-8e0a-5bf5e62a867a@HIDDEN>
In-Reply-To: <87ft7fgpbm.fsf@HIDDEN>
References: <53661891.40206@HIDDEN> <87ft7fgpbm.fsf@HIDDEN>
Date: Fri, 18 Sep 2020 21:22:08 +0000
From: "Zane Ashby" <contact@HIDDEN>
To: "Lars Ingebrigtsen" <larsi@HIDDEN>, "Phil Sainty" <psainty@HIDDEN>
Subject: =?UTF-8?Q?Re:_bug#17401:_24.4.50;
 _Narrow_to_{region,page,defun}_in_an_in?=
 =?UTF-8?Q?direct_clone_buffer_in_the_other_window?=
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 17401
X-Mailman-Approved-At: Sat, 19 Sep 2020 00:33:40 -0400
Cc: Drew Adams <drew.adams@HIDDEN>, 17401 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

More than happy to assign copyright to the FSF for this code, if someone can kindly point me in the right direction? :) 

On Fri, Sep 18, 2020, at 1:57 PM, Lars Ingebrigtsen wrote:
> 
> We'd need copyright assignment papers for something like this.  Zane,
> would you be willing to assign copyright for this code to the FSF?
> 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17401; Package emacs. Full text available.

Message received at 17401 <at> debbugs.gnu.org:


Received: (at 17401) by debbugs.gnu.org; 18 Sep 2020 16:02:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 18 12:02:44 2020
Received: from localhost ([127.0.0.1]:44260 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJIqS-00083v-3D
	for submit <at> debbugs.gnu.org; Fri, 18 Sep 2020 12:02:44 -0400
Received: from userp2120.oracle.com ([156.151.31.85]:56144)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1kJIqQ-00081a-3S
 for 17401 <at> debbugs.gnu.org; Fri, 18 Sep 2020 12:02:42 -0400
Received: from pps.filterd (userp2120.oracle.com [127.0.0.1])
 by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08IFwSR9027583;
 Fri, 18 Sep 2020 16:02:36 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=X3sW1JEGpxTKIVhwm+JOZtHCTkIJ9UoPtKdMlAw0fyQ=;
 b=paZhI/ScUFXymV7EKIZKglxTAutUt90UXngIrdwzwRkpXNvVs8/WKXltkCHDBYwlRuku
 V0syhC5YohCDb9MM2+pgedVKmaPcYNPaHN8bzrALnAB8kcaUNysmiJt86aE9wdlk0v42
 np3s0aNVBIJwdBmBjvrmCMZFQVVWjvWmiQx9D9eemXJhF0sDosBMiIpDhKjLvrDZ///a
 114NyQajw/rkdo4UBV6DJ99mp5d9jkZxZO7253ukyX2dHd9xOzFXbitSmWPo6t7J1E21
 sxvklcFnloPbTnENhwK4HImJIKe8BWNVy5423ULmKXWEbpvCfd6tz2OZSIGOv6wAQeUa wg== 
Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79])
 by userp2120.oracle.com with ESMTP id 33j91e1pmx-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Fri, 18 Sep 2020 16:02:36 +0000
Received: from pps.filterd (userp3020.oracle.com [127.0.0.1])
 by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08IFu4Nx025182;
 Fri, 18 Sep 2020 16:02:35 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by userp3020.oracle.com with ESMTP id 33hm372q6m-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Fri, 18 Sep 2020 16:02:35 +0000
Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7])
 by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08IG2SS9005126;
 Fri, 18 Sep 2020 16:02:31 GMT
MIME-Version: 1.0
Message-ID: <bf6f227e-d360-44e4-8c79-8f30ca93d812@default>
Date: Fri, 18 Sep 2020 16:02:27 +0000 (UTC)
From: Drew Adams <drew.adams@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>, Phil Sainty <psainty@HIDDEN>
Subject: RE: bug#17401: 24.4.50; Narrow to {region,page,defun} in an indirect
 clone buffer in the other window
References: <53661891.40206@HIDDEN> <87ft7fgpbm.fsf@HIDDEN>
In-Reply-To: <87ft7fgpbm.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5044.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9748
 signatures=668679
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 bulkscore=0 mlxlogscore=999
 malwarescore=0 mlxscore=0 phishscore=0 adultscore=0 suspectscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000
 definitions=main-2009180129
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9748
 signatures=668679
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0
 impostorscore=0
 priorityscore=1501 malwarescore=0 suspectscore=0 mlxlogscore=999
 clxscore=1011 adultscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0
 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2006250000 definitions=main-2009180129
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 17401
Cc: contact@HIDDEN, 17401 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> > That post provides a function which creates a indirect clone of
> > the current buffer, and narrows to the marked region in that, so
> > that you have both the original un-narrowed buffer and the narrowed
> > indirect clone available simultaneously.
> >
> > This is incredibly useful, and it seems like an obvious contender
> > for standard functionality in Emacs.
> >
> > I'm attaching a patch which uses that approach to implement the
> > following functions and bindings:
> >
> > C-x 4 n n: narrow-to-region-indirect-other-window
> > C-x 4 n p: narrow-to-page-indirect-other-window
> > C-x 4 n d: narrow-to-defun-indirect-other-window
>=20
> Sounds like a good idea to me, and seems to be a logical extension.
> Anybody got an opinion?
>=20
> However:
>=20
> > It's still essentially Zane's code, so I've confirmed that he's
> > happy for me to send this, and am CCing this to him.
>=20
> We'd need copyright assignment papers for something like this.  Zane,
> would you be willing to assign copyright for this code to the FSF?

FWIW, `narrow-indirect.el' is based on this and extends
it in a few ways.  From the Commentary (and the wiki page):

;;  Acknowledgments:
;;
;;   The idea and original code for a command that combines narrowing
;;   with cloning a buffer as an indirect-buffer is due to Zane Ashby:
;;   https://demonastery.org/2013/04/emacs-narrow-to-region-indirect/.
;;
;;   In Emacs bug thread #17401, Phil Sainty proposed adding three
;;   commands to Emacs based on this approach.  Lennart Borgman
;;   contributed code that uses, in the cloned buffer name, some text
;;   based on the narrowed region.
;;
;;   The code in `narrow-indirect.el' extends this a bit and provides
;;   a couple of user options and some alternative (prefix-argument)
;;   behavior.  It is doubtful that Emacs Dev will ever adopt features
;;   such as those defined here, and if they do then this library can
;;   at least help for Emacs versions prior to their addition.

Description here:

https://www.emacswiki.org/emacs/NarrowIndirect

Code:

https://www.emacswiki.org/emacs/download/narrow-indirect.el




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17401; Package emacs. Full text available.
Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 17401 <at> debbugs.gnu.org:


Received: (at 17401) by debbugs.gnu.org; 18 Sep 2020 13:57:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 18 09:57:50 2020
Received: from localhost ([127.0.0.1]:43850 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJGtZ-0006W3-Mw
	for submit <at> debbugs.gnu.org; Fri, 18 Sep 2020 09:57:50 -0400
Received: from quimby.gnus.org ([95.216.78.240]:54706)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1kJGtX-0006Vp-9b
 for 17401 <at> debbugs.gnu.org; Fri, 18 Sep 2020 09:57:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=sa1XRt6o3BZrPzme7Wdw4QTWjfa+kndhQk9w91prGOA=; b=uatAh3e9RAkmmRM53ZzeytJM0+
 tHf6Is0N36Az+VsceDKicBJWc0m5391U2CQSMEASpAh55nggbOK9kgLL52dx2LN3U51ht0hs58WZm
 wQHcykVvOaem6q63OZzP2vGxbRx97LLlw3MXg3eZQqfl+PhUz4YxF2MgU03jkkDI5Kb8=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1kJGtK-0006Xu-Fn; Fri, 18 Sep 2020 15:57:40 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Phil Sainty <psainty@HIDDEN>
Subject: Re: bug#17401: 24.4.50; Narrow to {region,page,defun} in an
 indirect clone buffer in the other window
References: <53661891.40206@HIDDEN>
X-Now-Playing: Stina Nordenstam's _The World Is Saved_: "Butterfly"
Date: Fri, 18 Sep 2020 15:57:33 +0200
In-Reply-To: <53661891.40206@HIDDEN> (Phil Sainty's message of "Sun, 04
 May 2014 22:38:09 +1200")
Message-ID: <87ft7fgpbm.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Phil Sainty <psainty@HIDDEN> writes: > That post
 provides
 a function which creates a indirect clone of > the current buffer, and narrows
 to the marked region in that, so > that you have both the original un-narrowed
 buffer and the narrow [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 17401
Cc: contact@HIDDEN, 17401 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Phil Sainty <psainty@HIDDEN> writes:

> That post provides a function which creates a indirect clone of
> the current buffer, and narrows to the marked region in that, so
> that you have both the original un-narrowed buffer and the narrowed
> indirect clone available simultaneously.
>
> This is incredibly useful, and it seems like an obvious contender
> for standard functionality in Emacs.
>
> I'm attaching a patch which uses that approach to implement the
> following functions and bindings:
>
> C-x 4 n n: narrow-to-region-indirect-other-window
> C-x 4 n p: narrow-to-page-indirect-other-window
> C-x 4 n d: narrow-to-defun-indirect-other-window

Sounds like a good idea to me, and seems to be a logical extension.
Anybody got an opinion?

However:

> It's still essentially Zane's code, so I've confirmed that he's
> happy for me to send this, and am CCing this to him.

We'd need copyright assignment papers for something like this.  Zane,
would you be willing to assign copyright for this code to the FSF?

diff --git a/lisp/bindings.el b/lisp/bindings.el
index a1751a253c..e2b4ceb08e 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -1418,6 +1418,9 @@ esc-map
 
 (define-key ctl-x-4-map "a" 'add-change-log-entry-other-window)
 (define-key ctl-x-4-map "c" 'clone-indirect-buffer-other-window)
+(define-key ctl-x-4-map "nn" 'narrow-to-region-indirect-other-window)
+(define-key ctl-x-4-map "np" 'narrow-to-page-indirect-other-window)
+(define-key ctl-x-4-map "nd" 'narrow-to-defun-indirect-other-window)
 
 ;; Signal handlers
 (define-key special-event-map [sigusr1] 'ignore)
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 8c18557c79..94edd8fdd6 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -647,6 +647,16 @@ narrow-to-defun
       (re-search-backward "^\n" (- (point) 1) t)
       (narrow-to-region beg end))))
 
+(defun narrow-to-defun-indirect-other-window (&optional arg)
+  "`narrow-to-defun' in a cloned indirect buffer in the other window.
+
+See `clone-indirect-buffer'."
+  (interactive)
+  (let ((buf (clone-indirect-buffer nil nil)))
+    (with-current-buffer buf
+      (narrow-to-defun arg))
+    (pop-to-buffer buf)))
+
 (defcustom insert-pair-alist
   '((?\( ?\)) (?\[ ?\]) (?\{ ?\}) (?\< ?\>) (?\" ?\") (?\' ?\') (?\` ?\'))
   "Alist of paired characters inserted by `insert-pair'.
diff --git a/lisp/simple.el b/lisp/simple.el
index 7dc695848b..8e360a0076 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -8947,6 +8947,16 @@ clone-indirect-buffer-other-window
   (let ((pop-up-windows t))
     (clone-indirect-buffer newname display-flag norecord)))
 
+(defun narrow-to-region-indirect-other-window (start end)
+  "`narrow-to-region' in a cloned indirect buffer in the other window.
+
+See `clone-indirect-buffer'."
+  (interactive "r")
+  (deactivate-mark)
+  (let ((buf (clone-indirect-buffer nil nil)))
+    (with-current-buffer buf
+      (narrow-to-region start end))
+    (pop-to-buffer buf)))
 
 ;;; Handling of Backspace and Delete keys.
 
diff --git a/lisp/textmodes/page.el b/lisp/textmodes/page.el
index 029ba96691..e729c020a7 100644
--- a/lisp/textmodes/page.el
+++ b/lisp/textmodes/page.el
@@ -143,6 +143,16 @@ page--count-lines-page
               (count-lines (point) opoint)
               (count-lines opoint end))))))
 
+(defun narrow-to-page-indirect-other-window (&optional arg)
+  "`narrow-to-page' in a cloned indirect buffer in the other window.
+
+See `clone-indirect-buffer'."
+  (interactive "P")
+  (let ((buf (clone-indirect-buffer nil nil)))
+    (with-current-buffer buf
+      (narrow-to-page arg))
+    (pop-to-buffer buf)))
+
 (defun count-lines-page ()
   "Report number of lines on current page, and how many are before or after point."
   (interactive)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17401; Package emacs. Full text available.

Message received at 17401 <at> debbugs.gnu.org:


Received: (at 17401) by debbugs.gnu.org; 11 May 2014 04:12:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 11 00:12:54 2014
Received: from localhost ([127.0.0.1]:58569 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WjL89-0000o8-Il
	for submit <at> debbugs.gnu.org; Sun, 11 May 2014 00:12:53 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:27692)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1WjL86-0000nr-W1
 for 17401 <at> debbugs.gnu.org; Sun, 11 May 2014 00:12:51 -0400
Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 s4B4Ci2u025136
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Sun, 11 May 2014 04:12:45 GMT
Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231])
 by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s4B4Cgbd008733
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
 Sun, 11 May 2014 04:12:44 GMT
Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25])
 by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s4B4Cgrf023390;
 Sun, 11 May 2014 04:12:42 GMT
MIME-Version: 1.0
Message-ID: <758cb6d1-f13d-412c-8669-ae5eb23dea6b@default>
Date: Sat, 10 May 2014 21:12:44 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Phil Sainty <psainty@HIDDEN>, Lennart Borgman
 <lennart.borgman@HIDDEN>
Subject: RE: bug#17401: 24.4.50; Narrow to {region,page,defun} in an indirect
 clone buffer in the other window
References: <53661891.40206@HIDDEN>
 <CANbX365u-6RuzYVUD1nQvEb2_vEaRgmm3C+JqJEJa6ktWBjLbw@HIDDEN>
 <536E2451.3090808@HIDDEN>
In-Reply-To: <536E2451.3090808@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8  (707110) [OL
 12.0.6691.5000 (x86)]
Content-Type: multipart/mixed;
 boundary="__1399781562616236572abhmp0019.oracle.com"
X-Source-IP: ucsinet22.oracle.com [156.151.31.94]
X-Spam-Score: -3.0 (---)
X-Debbugs-Envelope-To: 17401
Cc: contact@HIDDEN, 17401 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.0 (---)

--__1399781562616236572abhmp0019.oracle.com
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

> I was initially against the idea of naming the indirect buffer
> according to the narrowed region, for the simple reason that the
> name stops making sense as soon as you widen the buffer.
>=20
> However, I expect that people are far less likely to widen these
> buffers (as opposed to simply killing them); and this naming
> approach would certainly be useful in the buffer list, so I think
> it's a good idea after all.
>=20
> I've also noticed there are some org-mode specific narrowing
> commands as well, which should probably be supported. I did
> consider whether we could support all existing narrowing commands
> automagically with some trickery, but I concluded that the only
> approach I could think of was too convoluted and brittle for its
> own good, so I think simply adding a new function alongside each
> existing one is still the most practical way to go.
>=20
> Do we want both a `narrow-to-*-indirect' and an `...-other-window'
> variant for each case? I think the latter works very nicely with
> the C-x 4 n prefix (as per the initial patch), but I can see the
> utility in providing both functions.

I agree about killing vs widening indirect buffers.  And I
don't find a need for same-window versions of the commands,
for my own use.

FWIW, attached is what I've been using lately.

The default buffer naming is similar to what Lennart suggested,
but (for the non-defun command) the region text (with whitespace
collapsed) is used, not the first line.  And the buffer-name
length is limited.  And the text following the original name is
separated by ` | ' instead of being enclosed in <...>.

Two options control naming: one limits the length, the other
is a name prefix (e.g., to easily distinguish indirect buffers).

A prefix arg prompts you for the new buffer name.

For defun narrowing, a negative prefix arg prompts you for the
text that follows ` | ' (in place of the defun object name).

To me, being able to provide names different from the default
is important.

--

(FWIW, I also use library `wide-n.el', which lets you widen
to any number of narrowings of the same buffer - e.g., cycle.
http://www.emacswiki.org/emacs-de/MultipleNarrowings)
--__1399781562616236572abhmp0019.oracle.com
Content-Type: application/octet-stream; name="narrow-other.el"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="narrow-other.el"

KGRlZmN1c3RvbSBuYXJyb3dlZC1idWYtbmFtZS1tYXggNjAKICAiTWF4IGxlbmd0aCBvZiBjbG9u
ZWQgaW5kaXJlY3QgYnVmZmVyIG5hbWUsIGZvciBuYXJyb3dpbmcgY29tbWFuZHMuIgogIDp0eXBl
ICcocmVzdHJpY3RlZC1zZXhwIDp0YWcgIk1heCBsZW5ndGggb2YgYnVmZmVyIG5hbWUiCiAgICAg
ICAgICA6bWF0Y2gtYWx0ZXJuYXRpdmVzICgobGFtYmRhICh4KSAoYW5kIChpbnRlZ2VycCB4KSAg
KD4geCAwKSkpKQogICAgICAgICAgOnZhbHVlIGlnbm9yZSkKICA6Z3JvdXAgJ2VkaXRpbmcpCgoo
ZGVmY3VzdG9tIG5hcnJvd2VkLWJ1Zi1uYW1lLXByZWZpeCAiIgogICJOYW1lIHByZWZpeCBmb3Ig
aW5kaXJlY3QgYnVmZmVyIGNsb25lZCBieSBgbmFycm93LSotaW5kaXJlY3QqJyBjb21tYW5kcy4K
VXNpbmcgYSBub24tZW1wdHkgcHJlZml4IGxldHMgeW91IGVhc2lseSBkaXN0aW5ndWlzaCB0aGUg
aW5kaXJlY3QKYnVmZmVycyBmcm9tIHRoZSBvcmlnaW5hbC4iCiAgOnR5cGUgJ3N0cmluZyA6Z3Jv
dXAgJ2VkaXRpbmcpCgooZGVmdW4gbmFycm93LXRvLWRlZnVuLWluZGlyZWN0LW90aGVyLXdpbmRv
dyAoJm9wdGlvbmFsIGZ1bGwtbmFtZSB0ZXh0KQogICJgbmFycm93LXRvLWRlZnVuJyBpbiBhIGNs
b25lZCBpbmRpcmVjdCBidWZmZXIgaW4gdGhlIG90aGVyIHdpbmRvdy4KVGhlIG5hbWUgb2YgdGhl
IGluZGlyZWN0IGJ1ZmZlciBkZXBlbmRzIG9uIHRoZSB1c2Ugb2YgYSBwcmVmaXggYXJnOgoKKiBO
byBwcmVmaXggYXJnOiB0aGUgY3VycmVudCBidWZmZXIgbmFtZSwgYnV0IHdpdGggYCB8IE5BTUUn
CiAgYXBwZW5kZWQsIHdoZXJlIE5BTUUgaXMgdGhlIG5hbWUgb2YgdGhlIG9iamVjdCBkZWZpbmVk
IGJ5IHRoZSBkZWZ1bi4KCiogUHJlZml4IGFyZyA8IDAgOiBsaWtlIG5vIHByZWZpeCBhcmcsIGJ1
dCB5b3UgYXJlIHByb21wdGVkIGZvciBOQU1FLgoKKiBQcmVmaXggYXJnID49IDA6IHlvdSBhcmUg
cHJvbXB0ZWQgZm9yIHRoZSBmdWxsIGJ1ZmZlciBuYW1lLgoKSG93ZXZlciwgdGhlIGJ1ZmZlciBu
YW1lIGlzIGluIGFueSBjYXNlIHRydW5jYXRlZCBhdApgbmFycm93ZWQtYnVmLW5hbWUtbWF4JyBj
aGFycy4KCk5vbi1pbnRlcmFjdGl2ZWx5OgoqIEZVTEwtTkFNRSBpcyB0aGUgZnVsbCBidWZmZXIg
bmFtZSwgYW5kIFRFWFQgaXMgaWdub3JlZC4KKiBURVhUIGlzIHVzZWQgZm9yIE5BTUUsIGlmIEZV
TEwtTkFNRSBpcyBuaWwuCgpTZWUgYGNsb25lLWluZGlyZWN0LWJ1ZmZlcicuIgogIChpbnRlcmFj
dGl2ZQogICAobGlzdCAoYW5kIGN1cnJlbnQtcHJlZml4LWFyZwogICAgICAgICAgICAgIChuYXRu
dW1wIChwcmVmaXgtbnVtZXJpYy12YWx1ZSBjdXJyZW50LXByZWZpeC1hcmcpKQogICAgICAgICAg
ICAgIChyZWFkLXN0cmluZyAiQnVmZmVyIG5hbWU6ICIpKQogICAgICAgICAoYW5kIGN1cnJlbnQt
cHJlZml4LWFyZwogICAgICAgICAgICAgICg8IChwcmVmaXgtbnVtZXJpYy12YWx1ZSBjdXJyZW50
LXByZWZpeC1hcmcpIDApCiAgICAgICAgICAgICAgKHJlYWQtc3RyaW5nICJCdWZmZXIgbmFtZSBz
dWZmaXg6ICIpKSkpCiAgKHJlcXVpcmUgJ3doaWNoLWZ1bmMpCiAgKGxldCAoKGhlcmUgIChwb2lu
dCkpKQogICAgKG1hcmstZGVmdW4pCiAgICAobmFycm93LXRvLXJlZ2lvbi1pbmRpcmVjdC1vdGhl
ci13aW5kb3cKICAgICAocmVnaW9uLWJlZ2lubmluZykgKHJlZ2lvbi1lbmQpIGhlcmUgZnVsbC1u
YW1lCiAgICAgKGFuZCAobm90IGZ1bGwtbmFtZSkgIChvciB0ZXh0ICAod2hpY2gtZnVuY3Rpb24p
KSkpKSkKICAgICAKKGRlZnVuIG5hcnJvdy10by1yZWdpb24taW5kaXJlY3Qtb3RoZXItd2luZG93
IChzdGFydCBlbmQgaGVyZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICZvcHRpb25hbCBmdWxsLW5hbWUgdGV4dCBtc2dwKQogICJgbmFycm93LXRvLXJlZ2lv
bicgaW4gYSBjbG9uZWQgaW5kaXJlY3QgYnVmZmVyIGluIHRoZSBvdGhlciB3aW5kb3cuClRoZSBp
bmRpcmVjdCBidWZmZXIgaXMgbmFtZWQgdGhlIHNhbWUgYXMgdGhlIGN1cnJlbnQgYnVmZmVyLCBl
eGNlcHQ6CgogKiBJdCBpcyBwcmVmaXhlZCBieSB0aGUgdmFsdWUgb2Ygb3B0aW9uIGBuYXJyb3dl
ZC1idWYtbmFtZS1wcmVmaXgnLgogKiBJdCBpcyBzdWZmaXhlZCBieSBgIHwgVEVYVCcsIHdoZXJl
IFRFWFQgaXMgdGhlIHJlZ2lvbiB0ZXh0LgoKSG93ZXZlciwgdGhlIGJ1ZmZlciBuYW1lIGlzIGlu
IGFueSBjYXNlIHRydW5jYXRlZCBhdApgbmFycm93ZWQtYnVmLW5hbWUtbWF4JyBjaGFycy4KCk5v
bi1pbnRlcmFjdGl2ZWx5OgpTVEFSVCBhbmQgRU5EIGFyZSB0aGUgcmVnaW9uIGJlZ2lubmluZyBh
bmQgZW5kLgpIRVJFIGlzIHdoZXJlIHRvIHBsYWNlIHRoZSBjdXJzb3IsIHJlbGF0aXZlIHRvIFNU
QVJULgpURVhUIGlzIHByZWZpeGVkIGJ5IGAgfCAnIGFuZCBhcHBlbmRlZCB0byB0aGUgb3JpZ2lu
YWwKIGJ1ZmZlciBuYW1lLCB3aGljaCBpcyBhcHBlbmRlZCB0byBgbmFycm93ZWQtYnVmLW5hbWUt
cHJlZml4JyB0byBuYW1lCiB0aGUgbmV3IGJ1ZmZlci4KSWYgRlVMTC1OQU1FIGlzIGEgc3RyaW5n
IHRoZW4gaXQgaXMgdXNlZCBhcyB0aGUgY29tcGxldGUgaW5kaXJlY3QKYnVmZmVyIG5hbWUuICAo
VEVYVCBpcyB0aGVuIGlnbm9yZWQuKQoKU2VlIGBjbG9uZS1pbmRpcmVjdC1idWZmZXInLiIKICAo
aW50ZXJhY3RpdmUKICAgKGxpc3QgKHJlZ2lvbi1iZWdpbm5pbmcpIChyZWdpb24tZW5kKSAocG9p
bnQpCiAgICAgICAgIChhbmQgY3VycmVudC1wcmVmaXgtYXJnICAocmVhZC1zdHJpbmcgIkJ1ZmZl
ciBuYW1lOiAiKSkKICAgICAgICAgbmlsICdNU0dQKSkKICAoaWYgKGFuZCAoPSBzdGFydCBlbmQp
ICBtc2dwKQogICAgICAobWVzc2FnZSAiUmVnaW9uIGlzIGVtcHR5IikKICAgIChkZWFjdGl2YXRl
LW1hcmspCiAgICAobGV0KiAoKGJ1ZiAgKG9yIGZ1bGwtbmFtZQogICAgICAgICAgICAgICAgICAg
ICB0ZXh0CiAgICAgICAgICAgICAgICAgICAgIChyZXBsYWNlLXJlZ2V4cC1pbi1zdHJpbmcKICAg
ICAgICAgICAgICAgICAgICAgICJcXChccyBcXCkrIiAiXDEiCiAgICAgICAgICAgICAgICAgICAg
ICAocmVwbGFjZS1yZWdleHAtaW4tc3RyaW5nCiAgICAgICAgICAgICAgICAgICAgICAgIlxcYFxz
K1xcfFxzK1xcJyIgIiIKICAgICAgICAgICAgICAgICAgICAgICAoYnVmZmVyLXN1YnN0cmluZy1u
by1wcm9wZXJ0aWVzIHN0YXJ0IGVuZCkpKSkpCiAgICAgICAgICAgKGJ1ZiAgKG9yIGZ1bGwtbmFt
ZQogICAgICAgICAgICAgICAgICAgICAoY29uY2F0IG5hcnJvd2VkLWJ1Zi1uYW1lLXByZWZpeCAo
YnVmZmVyLW5hbWUpICIgfCAiIGJ1ZikpKQogICAgICAgICAgIChidWYgIChvciBmdWxsLW5hbWUK
ICAgICAgICAgICAgICAgICAgICAgKHN1YnN0cmluZyBidWYgMCAobWluIChsZW5ndGggYnVmKSBu
YXJyb3dlZC1idWYtbmFtZS1tYXgpKSkpCiAgICAgICAgICAgKGJ1ZiAgKGNsb25lLWluZGlyZWN0
LWJ1ZmZlciBidWYgbmlsKSkpCiAgICAgICh3aXRoLWN1cnJlbnQtYnVmZmVyIGJ1ZiAobmFycm93
LXRvLXJlZ2lvbiBzdGFydCBlbmQpIChnb3RvLWNoYXIgaGVyZSkpCiAgICAgIChwb3AtdG8tYnVm
ZmVyIGJ1ZikpKSkKCihkZWZpbmUta2V5IGN0bC14LTQtbWFwICJubiIgJ25hcnJvdy10by1yZWdp
b24taW5kaXJlY3Qtb3RoZXItd2luZG93KQooZGVmaW5lLWtleSBjdGwteC00LW1hcCAibmQiICdu
YXJyb3ctdG8tZGVmdW4taW5kaXJlY3Qtb3RoZXItd2luZG93KQoK
--__1399781562616236572abhmp0019.oracle.com--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17401; Package emacs. Full text available.

Message received at 17401 <at> debbugs.gnu.org:


Received: (at 17401) by debbugs.gnu.org; 10 May 2014 20:58:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 10 16:58:22 2014
Received: from localhost ([127.0.0.1]:58422 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WjELd-0000BJ-S9
	for submit <at> debbugs.gnu.org; Sat, 10 May 2014 16:58:22 -0400
Received: from mail-yh0-f51.google.com ([209.85.213.51]:59866)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <jlf@HIDDEN>) id 1WjELb-0000Ay-4n
 for 17401 <at> debbugs.gnu.org; Sat, 10 May 2014 16:58:20 -0400
Received: by mail-yh0-f51.google.com with SMTP id f73so425741yha.10
 for <17401 <at> debbugs.gnu.org>; Sat, 10 May 2014 13:58:13 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
 :date:message-id:subject:to:cc:content-type;
 bh=CW4MDFE96oDM38IIJaOXuLxFNuxfp/gfC/dVxtqf97s=;
 b=GyJDBAMi3ACT4V6SlUpIwIl8tMYotZ2GMK8ne70TJoTU/tTti56R3+vZcSK8D0rspv
 Bxi/+Yr3jlYDyEl8g6Wb5lbakW0TgdzzG2wcfuIbswuOmyhzZ5Xyy+73U9LetqVdLMfC
 PHuSd2WkpF2LozP4waqcEFG/UfBDj4BBT2euiveiHEkui/VrIpZnKMPKeJM+R9nOBEB9
 rZC7cFfK+jTM3WDuXWgVqm0cBFlPCCGoqL1h26VvdPAvtVKW5zoyKRdsaBj2fXsZp1/W
 bv7fDIkuIuZ8wjuZE5M93FAa/Ld13ZQmglPEtoYi5HC6Vap3fZ1dCme1KD0eWm7se1i0
 lUKg==
X-Gm-Message-State: ALoCoQkjWK4YXdoavK+IkompYcTNIDYzfIbmRWWNq7NlqPTi9rqIu2xxQ4gNDRU/RcJrVFiLtEzP
X-Received: by 10.236.137.8 with SMTP id x8mr26466136yhi.4.1399755493382; Sat,
 10 May 2014 13:58:13 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.170.117.65 with HTTP; Sat, 10 May 2014 13:57:43 -0700 (PDT)
In-Reply-To: <536E2451.3090808@HIDDEN>
References: <53661891.40206@HIDDEN>
 <CANbX365u-6RuzYVUD1nQvEb2_vEaRgmm3C+JqJEJa6ktWBjLbw@HIDDEN>
 <536E2451.3090808@HIDDEN>
From: Josh <josh@HIDDEN>
Date: Sat, 10 May 2014 13:57:43 -0700
X-Google-Sender-Auth: DZiaK9MktOZnCGHAlqjpAhDskKA
Message-ID: <CANdFEAH-xPB+0Jtfr3ZMBn9fUMJB_ZKX5ebxKk-g1nHWRdW4Aw@HIDDEN>
Subject: Re: bug#17401: 24.4.50; Narrow to {region,page,defun} in an indirect
 clone buffer in the other window
To: Phil Sainty <psainty@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 17401
Cc: Lennart Borgman <lennart.borgman@HIDDEN>, contact@HIDDEN,
 17401 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Sat, May 10, 2014 at 6:06 AM, Phil Sainty <psainty@HIDDEN> wrote:
> I've also noticed there are some org-mode specific narrowing
> commands as well, which should probably be supported. I did
> consider whether we could support all existing narrowing commands
> automagically with some trickery, but I concluded that the only
> approach I could think of was too convoluted and brittle for its
> own good, so I think simply adding a new function alongside each
> existing one is still the most practical way to go.
>
> Do we want both a `narrow-to-*-indirect' and an `...-other-window'
> variant for each case? I think the latter works very nicely with
> the C-x 4 n prefix (as per the initial patch), but I can see the
> utility in providing both functions.

What about doing something like `append-next-kill', for example a
new `next-narrow-indirect' command bound to `C-x n i'?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17401; Package emacs. Full text available.

Message received at 17401 <at> debbugs.gnu.org:


Received: (at 17401) by debbugs.gnu.org; 10 May 2014 13:07:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 10 09:07:19 2014
Received: from localhost ([127.0.0.1]:57825 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Wj6zm-0007JO-TB
	for submit <at> debbugs.gnu.org; Sat, 10 May 2014 09:07:19 -0400
Received: from nctlincom01.orcon.net.nz ([60.234.4.69]:51510)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <psainty@HIDDEN>) id 1Wj6zj-0007J7-9G
 for 17401 <at> debbugs.gnu.org; Sat, 10 May 2014 09:07:16 -0400
Received: from mx4.orcon.net.nz (mx4.orcon.net.nz [219.88.242.54])
 by nctlincom01.orcon.net.nz (8.14.3/8.14.3/Debian-9.4) with ESMTP id
 s4ADCdgE005338; Sun, 11 May 2014 01:12:39 +1200
Received: from 121-99-136-8.bng1.tvc.orcon.net.nz ([121.99.136.8]
 helo=[10.1.1.5]) by mx4.orcon.net.nz with esmtpa (Exim 4.69)
 (envelope-from <psainty@HIDDEN>)
 id 1Wj6ze-0008G4-Tw; Sun, 11 May 2014 01:07:10 +1200
Message-ID: <536E2451.3090808@HIDDEN>
Date: Sun, 11 May 2014 01:06:25 +1200
From: Phil Sainty <psainty@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 5.1;
 rv:24.0) Gecko/20100101 Thunderbird/24.5.0
MIME-Version: 1.0
To: Lennart Borgman <lennart.borgman@HIDDEN>
Subject: Re: bug#17401: 24.4.50; Narrow to {region,page,defun} in an indirect
 clone buffer in the other window
References: <53661891.40206@HIDDEN>
 <CANbX365u-6RuzYVUD1nQvEb2_vEaRgmm3C+JqJEJa6ktWBjLbw@HIDDEN>
In-Reply-To: <CANbX365u-6RuzYVUD1nQvEb2_vEaRgmm3C+JqJEJa6ktWBjLbw@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Bayes-Prob: 0.0194 (Score 0, tokens from: @@RPTN, default)
X-Spam-Score: -3.00 () [Hold at 4.00] CC(NZ:-3)
X-CanIt-Geo: ip=121.99.136.8; country=NZ; latitude=-41.0000; longitude=174.0000;
 http://maps.google.com/maps?q=-41.0000,174.0000&z=6
X-CanItPRO-Stream: base:default
X-Canit-Stats-ID: 06M0dcDBM - a31b9009bcb2 - 20140511
X-Scanned-By: CanIt (www . roaringpenguin . com) on 172.16.100.174
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 17401
Cc: contact@HIDDEN, 17401 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On 8/05/2014 12:05, Lennart Borgman wrote:
> Here is my current version (which I think perhaps Phil can
> make something better of)

I was initially against the idea of naming the indirect buffer
according to the narrowed region, for the simple reason that the
name stops making sense as soon as you widen the buffer.

However, I expect that people are far less likely to widen these
buffers (as opposed to simply killing them); and this naming
approach would certainly be useful in the buffer list, so I think
it's a good idea after all.

I've also noticed there are some org-mode specific narrowing
commands as well, which should probably be supported. I did
consider whether we could support all existing narrowing commands
automagically with some trickery, but I concluded that the only
approach I could think of was too convoluted and brittle for its
own good, so I think simply adding a new function alongside each
existing one is still the most practical way to go.

Do we want both a `narrow-to-*-indirect' and an `...-other-window'
variant for each case? I think the latter works very nicely with
the C-x 4 n prefix (as per the initial patch), but I can see the
utility in providing both functions.


-Phil






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17401; Package emacs. Full text available.

Message received at 17401 <at> debbugs.gnu.org:


Received: (at 17401) by debbugs.gnu.org; 8 May 2014 00:06:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 07 20:06:23 2014
Received: from localhost ([127.0.0.1]:54952 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WiBqw-00067r-PD
	for submit <at> debbugs.gnu.org; Wed, 07 May 2014 20:06:23 -0400
Received: from mail-we0-f171.google.com ([74.125.82.171]:43968)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <lennart.borgman@HIDDEN>) id 1WiBqt-00067c-Bj
 for 17401 <at> debbugs.gnu.org; Wed, 07 May 2014 20:06:20 -0400
Received: by mail-we0-f171.google.com with SMTP id w62so1774692wes.30
 for <17401 <at> debbugs.gnu.org>; Wed, 07 May 2014 17:06:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc:content-type;
 bh=mCc8xyXZrsTRXTpVV2WXCSt7Mz5OAJbxCqM2JI15lG0=;
 b=wCSX+UcdYbdnalyD8Ag/Nayrn5eBNS8dkoqi1GMMwifkmTAVDOeb69lWLHQ2JTHRNZ
 1CZiF6j5g/brVhwz49Z2L7ldgG4IY0ymJjQt/8fOBeBMeA0DS4zSREp8nOb/+h4NpGe8
 HyJMZXBPTrDx7sq1oPOoWMV1z0msd95iA0u71qu85AWdupPKka9gAQKGU5qOKC4cRNuY
 a3HJIIT7DdPkueeNnIssuT6isPqlY1gOboy/DnDV8iG4hC24DOqHr3S94/uC+ojZ4j4n
 1x56nYy/nu2yDkQvLctIM0DttCnyT5rphjsaMPqZaxRhHhdrfdSQdT6N8G6Uue3mGnkz
 GOqg==
X-Received: by 10.180.12.238 with SMTP id b14mr717038wic.16.1399507573570;
 Wed, 07 May 2014 17:06:13 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.195.12.201 with HTTP; Wed, 7 May 2014 17:05:33 -0700 (PDT)
In-Reply-To: <53661891.40206@HIDDEN>
References: <53661891.40206@HIDDEN>
From: Lennart Borgman <lennart.borgman@HIDDEN>
Date: Thu, 8 May 2014 02:05:33 +0200
Message-ID: <CANbX365u-6RuzYVUD1nQvEb2_vEaRgmm3C+JqJEJa6ktWBjLbw@HIDDEN>
Subject: Re: bug#17401: 24.4.50; Narrow to {region,page,defun} in an indirect
 clone buffer in the other window
To: Phil Sainty <psainty@HIDDEN>
Content-Type: multipart/alternative; boundary=001a11c36692c8817804f8d83f80
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 17401
Cc: contact@HIDDEN, 17401 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a11c36692c8817804f8d83f80
Content-Type: text/plain; charset=UTF-8

Here is my current version (which I think perhaps Phil can make something
better of):

(defun narrow-to-region-indirect (start end here name-suffix)
  "Restrict editing in this buffer to the current region, indirectly."
  (interactive (list (region-beginning) (region-end) (region-beginning) ""))
  (deactivate-mark)
  (let ((posdiff (- here start))
        (name (buffer-name))
        (line name-suffix))
    (save-excursion
      (goto-char start)
      (while (and (not (eobp)) (string= line ""))
        (setq line (buffer-substring-no-properties (point-at-bol)
(point-at-eol)))
        (setq line (replace-regexp-in-string "^\s+\\|\s+$" "" line))
        (forward-line)))
    (let* ((bn (concat name " <" line ">"))
           (buf (clone-indirect-buffer bn nil)))
      (with-current-buffer buf
        (narrow-to-region start end)
        (goto-char start)
        (forward-char posdiff))
      (switch-to-buffer buf))))

(defun narrow-to-defun-indirect ()
  "Restrict editing in this buffer to the current function, indirectly."
  (interactive)
  (require 'which-func)
  (let ((here (point))
        (suffix (which-function)))
    (mark-defun)
    (narrow-to-region-indirect (region-beginning) (region-end) here
suffix)))



On Sun, May 4, 2014 at 12:38 PM, Phil Sainty <psainty@HIDDEN> wrote:

> I encountered a blog post by Zane Ashby detailing this idea, and it
> was one of those "why did I never think of that?" moments, because
> I was doing this manually on a regular basis.
>
> http://demonastery.org/2013/04/emacs-narrow-to-region-indirect/
>
> That post provides a function which creates a indirect clone of
> the current buffer, and narrows to the marked region in that, so
> that you have both the original un-narrowed buffer and the narrowed
> indirect clone available simultaneously.
>
> This is incredibly useful, and it seems like an obvious contender
> for standard functionality in Emacs.
>
> I'm attaching a patch which uses that approach to implement the
> following functions and bindings:
>
> C-x 4 n n: narrow-to-region-indirect-other-window
> C-x 4 n p: narrow-to-page-indirect-other-window
> C-x 4 n d: narrow-to-defun-indirect-other-window
>
> It's still essentially Zane's code, so I've confirmed that he's
> happy for me to send this, and am CCing this to him.
>
>
> -Phil
>
>
>
>
>
> In GNU Emacs 24.4.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
>  of 2014-05-03 on xerxes
> Windowing system distributor `The X.Org Foundation', version 11.0.11300000
> System Description:     Ubuntu 12.04.4 LTS
>
> Configured using:
>  `configure --prefix=/usr/local/src/emacs/usr/local --without-sound'
>
> Configured features:
> XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK DBUS GSETTINGS NOTIFY GNUTLS
> LIBXML2 FREETYPE XFT ZLIB
>
> Important settings:
>   value of $LANG: en_NZ.UTF-8
>   locale-coding-system: utf-8-unix
>
> Major mode: Lisp Interaction
>
> Minor modes in effect:
>   tooltip-mode: t
>   electric-indent-mode: t
>   mouse-wheel-mode: t
>   tool-bar-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   blink-cursor-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
>
> Recent input:
> <help-echo> M-x r e p o r t - e m <tab> <return>
>
> Recent messages:
> For information about GNU Emacs and the GNU system, type C-h C-a.
> user-error: End of history; no default available
>
> Load-path shadows:
> None found.
>
> Features:
> (shadow sort gnus-util mail-extr emacsbug message dired format-spec
> rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
> rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
> ietf-drums mm-util help-fns mail-prsvr mail-utils time-date tooltip
> electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
> tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
> lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
> scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
> georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
> korean japanese hebrew greek romanian slovak czech european ethiopic
> indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
> abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files
> text-properties overlay sha1 md5 base64 format env code-pages mule
> custom widget hashtable-print-readable backquote make-network-process
> dbusbind gfilenotify dynamic-setting system-font-setting
> font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
>
> Memory information:
> ((conses 16 74917 6338)
>  (symbols 48 17834 0)
>  (miscs 40 35 138)
>  (strings 32 10321 4869)
>  (string-bytes 1 288458)
>  (vectors 16 9191)
>  (vector-slots 8 374331 12806)
>  (floats 8 63 98)
>  (intervals 56 170 0)
>  (buffers 960 11)
>  (heap 1024 19710 771))
>
>
>

--001a11c36692c8817804f8d83f80
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Here is my current version (which I think perhaps Phil can=
 make something better of):<br><br><div>(defun narrow-to-region-indirect (s=
tart end here name-suffix)</div><div>=C2=A0 &quot;Restrict editing in this =
buffer to the current region, indirectly.&quot;</div>

<div>=C2=A0 (interactive (list (region-beginning) (region-end) (region-begi=
nning) &quot;&quot;))</div><div>=C2=A0 (deactivate-mark)</div><div>=C2=A0 (=
let ((posdiff (- here start))</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (name (=
buffer-name))</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (line name-suffix))</di=
v>

<div>=C2=A0 =C2=A0 (save-excursion</div><div>=C2=A0 =C2=A0 =C2=A0 (goto-cha=
r start)</div><div>=C2=A0 =C2=A0 =C2=A0 (while (and (not (eobp)) (string=3D=
 line &quot;&quot;))</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq line (buff=
er-substring-no-properties (point-at-bol) (point-at-eol)))</div>

<div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq line (replace-regexp-in-string &quot=
;^\s+\\|\s+$&quot; &quot;&quot; line))</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 (forward-line)))</div><div>=C2=A0 =C2=A0 (let* ((bn (concat name &quot;=
 &lt;&quot; line &quot;&gt;&quot;))</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0(buf (clone-indirect-buffer bn nil)))</div>

<div>=C2=A0 =C2=A0 =C2=A0 (with-current-buffer buf</div><div>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 (narrow-to-region start end)</div><div>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 (goto-char start)</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (forward-cha=
r posdiff))</div><div>=C2=A0 =C2=A0 =C2=A0 (switch-to-buffer buf))))</div><=
div><br></div>

<div>(defun narrow-to-defun-indirect ()</div><div>=C2=A0 &quot;Restrict edi=
ting in this buffer to the current function, indirectly.&quot;</div><div>=
=C2=A0 (interactive)</div><div>=C2=A0 (require &#39;which-func)</div><div>=
=C2=A0 (let ((here (point))</div>

<div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (suffix (which-function)))</div><div>=C2=
=A0 =C2=A0 (mark-defun)</div><div>=C2=A0 =C2=A0 (narrow-to-region-indirect =
(region-beginning) (region-end) here suffix)))</div><div><br></div></div><d=
iv class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">

On Sun, May 4, 2014 at 12:38 PM, Phil Sainty <span dir=3D"ltr">&lt;<a href=
=3D"mailto:psainty@HIDDEN" target=3D"_blank">psainty@HIDDEN</a>=
&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0=
 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I encountered a blog post by Zane Ashby detailing this idea, and it<br>
was one of those &quot;why did I never think of that?&quot; moments, becaus=
e<br>
I was doing this manually on a regular basis.<br>
<br>
<a href=3D"http://demonastery.org/2013/04/emacs-narrow-to-region-indirect/"=
 target=3D"_blank">http://demonastery.org/2013/04/emacs-narrow-to-region-in=
direct/</a><br>
<br>
That post provides a function which creates a indirect clone of<br>
the current buffer, and narrows to the marked region in that, so<br>
that you have both the original un-narrowed buffer and the narrowed<br>
indirect clone available simultaneously.<br>
<br>
This is incredibly useful, and it seems like an obvious contender<br>
for standard functionality in Emacs.<br>
<br>
I&#39;m attaching a patch which uses that approach to implement the<br>
following functions and bindings:<br>
<br>
C-x 4 n n: narrow-to-region-indirect-other-window<br>
C-x 4 n p: narrow-to-page-indirect-other-window<br>
C-x 4 n d: narrow-to-defun-indirect-other-window<br>
<br>
It&#39;s still essentially Zane&#39;s code, so I&#39;ve confirmed that he&#=
39;s<br>
happy for me to send this, and am CCing this to him.<br>
<br>
<br>
-Phil<br>
<br>
<br>
<br>
<br>
<br>
In GNU Emacs 24.4.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)<br>
=C2=A0of 2014-05-03 on xerxes<br>
Windowing system distributor `The X.Org Foundation&#39;, version 11.0.11300=
000<br>
System Description: =C2=A0 =C2=A0 Ubuntu 12.04.4 LTS<br>
<br>
Configured using:<br>
=C2=A0`configure --prefix=3D/usr/local/src/emacs/usr/local --without-sound&=
#39;<br>
<br>
Configured features:<br>
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK DBUS GSETTINGS NOTIFY GNUTLS<br>
LIBXML2 FREETYPE XFT ZLIB<br>
<br>
Important settings:<br>
=C2=A0 value of $LANG: en_NZ.UTF-8<br>
=C2=A0 locale-coding-system: utf-8-unix<br>
<br>
Major mode: Lisp Interaction<br>
<br>
Minor modes in effect:<br>
=C2=A0 tooltip-mode: t<br>
=C2=A0 electric-indent-mode: t<br>
=C2=A0 mouse-wheel-mode: t<br>
=C2=A0 tool-bar-mode: t<br>
=C2=A0 menu-bar-mode: t<br>
=C2=A0 file-name-shadow-mode: t<br>
=C2=A0 global-font-lock-mode: t<br>
=C2=A0 font-lock-mode: t<br>
=C2=A0 blink-cursor-mode: t<br>
=C2=A0 auto-composition-mode: t<br>
=C2=A0 auto-encryption-mode: t<br>
=C2=A0 auto-compression-mode: t<br>
=C2=A0 line-number-mode: t<br>
=C2=A0 transient-mark-mode: t<br>
<br>
Recent input:<br>
&lt;help-echo&gt; M-x r e p o r t - e m &lt;tab&gt; &lt;return&gt;<br>
<br>
Recent messages:<br>
For information about GNU Emacs and the GNU system, type C-h C-a.<br>
user-error: End of history; no default available<br>
<br>
Load-path shadows:<br>
None found.<br>
<br>
Features:<br>
(shadow sort gnus-util mail-extr emacsbug message dired format-spec<br>
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse<br>
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045<br>
ietf-drums mm-util help-fns mail-prsvr mail-utils time-date tooltip<br>
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd<br=
>
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment<br>
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select<br>
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham<br=
>
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao<br>
korean japanese hebrew greek romanian slovak czech european ethiopic<br>
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple<br>
abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files<br>
text-properties overlay sha1 md5 base64 format env code-pages mule<br>
custom widget hashtable-print-readable backquote make-network-process<br>
dbusbind gfilenotify dynamic-setting system-font-setting<br>
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)<br>
<br>
Memory information:<br>
((conses 16 74917 6338)<br>
=C2=A0(symbols 48 17834 0)<br>
=C2=A0(miscs 40 35 138)<br>
=C2=A0(strings 32 10321 4869)<br>
=C2=A0(string-bytes 1 288458)<br>
=C2=A0(vectors 16 9191)<br>
=C2=A0(vector-slots 8 374331 12806)<br>
=C2=A0(floats 8 63 98)<br>
=C2=A0(intervals 56 170 0)<br>
=C2=A0(buffers 960 11)<br>
=C2=A0(heap 1024 19710 771))<br>
<br>
<br>
</blockquote></div><br></div>

--001a11c36692c8817804f8d83f80--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17401; Package emacs. Full text available.

Message received at 17401 <at> debbugs.gnu.org:


Received: (at 17401) by debbugs.gnu.org; 4 May 2014 13:44:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 04 09:44:03 2014
Received: from localhost ([127.0.0.1]:50404 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Wgwi2-0003GP-OJ
	for submit <at> debbugs.gnu.org; Sun, 04 May 2014 09:44:03 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:27340)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1Wgwhz-0003Fn-Du
 for 17401 <at> debbugs.gnu.org; Sun, 04 May 2014 09:44:00 -0400
Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 s44DhqiL027390
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Sun, 4 May 2014 13:43:52 GMT
Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85])
 by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s44Dho1s001825
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
 Sun, 4 May 2014 13:43:50 GMT
Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15])
 by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s44DhnHY006912;
 Sun, 4 May 2014 13:43:50 GMT
MIME-Version: 1.0
Message-ID: <a9c7b7a5-e7ab-480f-8d41-207456e502a5@default>
Date: Sun, 4 May 2014 06:43:51 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Phil Sainty <psainty@HIDDEN>, 17401 <at> debbugs.gnu.org
Subject: RE: bug#17401: 24.4.50; Narrow to {region,page,defun} in an indirect
 clone buffer in the other window
References: <53661891.40206@HIDDEN>
In-Reply-To: <53661891.40206@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8  (707110) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: ucsinet22.oracle.com [156.151.31.94]
X-Spam-Score: -3.0 (---)
X-Debbugs-Envelope-To: 17401
Cc: contact@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.0 (---)

+1




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17401; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 May 2014 10:39:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 04 06:39:20 2014
Received: from localhost ([127.0.0.1]:50378 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WgtpH-0005Ga-Ib
	for submit <at> debbugs.gnu.org; Sun, 04 May 2014 06:39:20 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40743)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <psainty@HIDDEN>) id 1WgtpE-0005GC-5W
 for submit <at> debbugs.gnu.org; Sun, 04 May 2014 06:39:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <psainty@HIDDEN>) id 1Wgtp2-0007g8-Gf
 for submit <at> debbugs.gnu.org; Sun, 04 May 2014 06:39:11 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:44358)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <psainty@HIDDEN>) id 1Wgtp2-0007g4-Dh
 for submit <at> debbugs.gnu.org; Sun, 04 May 2014 06:39:04 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:42414)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <psainty@HIDDEN>) id 1Wgtow-0004GM-2c
 for bug-gnu-emacs@HIDDEN; Sun, 04 May 2014 06:39:04 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <psainty@HIDDEN>) id 1Wgtoq-0007dC-0v
 for bug-gnu-emacs@HIDDEN; Sun, 04 May 2014 06:38:58 -0400
Received: from nctlincom01.orcon.net.nz ([60.234.4.69]:46454)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <psainty@HIDDEN>) id 1Wgtop-0007cL-Fv
 for bug-gnu-emacs@HIDDEN; Sun, 04 May 2014 06:38:51 -0400
Received: from mx9.orcon.net.nz (mx9.orcon.net.nz [219.88.242.59])
 by nctlincom01.orcon.net.nz (8.14.3/8.14.3/Debian-9.4) with ESMTP id
 s44AheDf023505; Sun, 4 May 2014 22:43:40 +1200
Received: from 121-99-136-8.bng1.tvc.orcon.net.nz ([121.99.136.8]
 helo=[10.1.1.5]) by mx9.orcon.net.nz with esmtpa (Exim 4.69)
 (envelope-from <psainty@HIDDEN>)
 id 1Wgtoi-0004RH-CM; Sun, 04 May 2014 22:38:44 +1200
Message-ID: <53661891.40206@HIDDEN>
Date: Sun, 04 May 2014 22:38:09 +1200
From: Phil Sainty <psainty@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 5.1;
 rv:24.0) Gecko/20100101 Thunderbird/24.5.0
MIME-Version: 1.0
To: bug-gnu-emacs@HIDDEN
Subject: 24.4.50; Narrow to {region,page,defun} in an indirect clone buffer
 in the other window
Content-Type: multipart/mixed; boundary="------------090900020107060507090508"
X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN, default)
X-CanIt-Geo: ip=121.99.136.8; country=NZ; latitude=-41.0000; longitude=174.0000;
 http://maps.google.com/maps?q=-41.0000,174.0000&z=6
X-CanItPRO-Stream: base:default
X-Canit-Stats-ID: 06LVKHEEo - a697450d8bf0 - 20140504
X-Scanned-By: CanIt (www . roaringpenguin . com) on 172.16.100.174
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
Cc: contact@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

This is a multi-part message in MIME format.
--------------090900020107060507090508
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit

I encountered a blog post by Zane Ashby detailing this idea, and it
was one of those "why did I never think of that?" moments, because
I was doing this manually on a regular basis.

http://demonastery.org/2013/04/emacs-narrow-to-region-indirect/

That post provides a function which creates a indirect clone of
the current buffer, and narrows to the marked region in that, so
that you have both the original un-narrowed buffer and the narrowed
indirect clone available simultaneously.

This is incredibly useful, and it seems like an obvious contender
for standard functionality in Emacs.

I'm attaching a patch which uses that approach to implement the
following functions and bindings:

C-x 4 n n: narrow-to-region-indirect-other-window
C-x 4 n p: narrow-to-page-indirect-other-window
C-x 4 n d: narrow-to-defun-indirect-other-window

It's still essentially Zane's code, so I've confirmed that he's
happy for me to send this, and am CCing this to him.


-Phil





In GNU Emacs 24.4.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
 of 2014-05-03 on xerxes
Windowing system distributor `The X.Org Foundation', version 11.0.11300000
System Description:	Ubuntu 12.04.4 LTS

Configured using:
 `configure --prefix=/usr/local/src/emacs/usr/local --without-sound'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK DBUS GSETTINGS NOTIFY GNUTLS
LIBXML2 FREETYPE XFT ZLIB

Important settings:
  value of $LANG: en_NZ.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> M-x r e p o r t - e m <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
user-error: End of history; no default available

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util help-fns mail-prsvr mail-utils time-date tooltip
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 74917 6338)
 (symbols 48 17834 0)
 (miscs 40 35 138)
 (strings 32 10321 4869)
 (string-bytes 1 288458)
 (vectors 16 9191)
 (vector-slots 8 374331 12806)
 (floats 8 63 98)
 (intervals 56 170 0)
 (buffers 960 11)
 (heap 1024 19710 771))



--------------090900020107060507090508
Content-Type: text/plain; charset=windows-1252;
 name="narrow-indirect-other-buffer.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="narrow-indirect-other-buffer.patch"

diff --git a/lisp/bindings.el b/lisp/bindings.el
index 7093b8e..e8352ef 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -1270,6 +1270,9 @@ if `inhibit-field-text-motion' is non-nil."
 
 (define-key ctl-x-4-map "a" 'add-change-log-entry-other-window)
 (define-key ctl-x-4-map "c" 'clone-indirect-buffer-other-window)
+(define-key ctl-x-4-map "nn" 'narrow-to-region-indirect-other-window)
+(define-key ctl-x-4-map "np" 'narrow-to-page-indirect-other-window)
+(define-key ctl-x-4-map "nd" 'narrow-to-defun-indirect-other-window)
 
 ;; Signal handlers
 (define-key special-event-map [sigusr1] 'ignore)
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 3ff65ff..7119ef6 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -556,6 +556,16 @@ Optional ARG is ignored."
       (re-search-backward "^\n" (- (point) 1) t)
       (narrow-to-region beg end))))
 
+(defun narrow-to-defun-indirect-other-window (&optional arg)
+  "`narrow-to-defun' in a cloned indirect buffer in the other window.
+
+See `clone-indirect-buffer'."
+  (interactive)
+  (let ((buf (clone-indirect-buffer nil nil)))
+    (with-current-buffer buf
+      (narrow-to-defun arg))
+    (pop-to-buffer buf)))
+
 (defvar insert-pair-alist
   '((?\( ?\)) (?\[ ?\]) (?\{ ?\}) (?\< ?\>) (?\" ?\") (?\' ?\') (?\` ?\'))
   "Alist of paired characters inserted by `insert-pair'.
diff --git a/lisp/simple.el b/lisp/simple.el
index 1484339..156d1bd 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -7570,6 +7570,16 @@ front of the list of recently selected ones."
   (let ((pop-up-windows t))
     (clone-indirect-buffer newname display-flag norecord)))
 
+(defun narrow-to-region-indirect-other-window (start end)
+  "`narrow-to-region' in a cloned indirect buffer in the other window.
+
+See `clone-indirect-buffer'."
+  (interactive "r")
+  (deactivate-mark)
+  (let ((buf (clone-indirect-buffer nil nil)))
+    (with-current-buffer buf
+      (narrow-to-region start end))
+    (pop-to-buffer buf)))
 
 ;;; Handling of Backspace and Delete keys.
 
diff --git a/lisp/textmodes/page.el b/lisp/textmodes/page.el
index d535108..866e96a 100644
--- a/lisp/textmodes/page.el
+++ b/lisp/textmodes/page.el
@@ -125,6 +125,16 @@ thus showing a page other than the one point was originally in."
 			(point)))))
 (put 'narrow-to-page 'disabled t)
 
+(defun narrow-to-page-indirect-other-window (&optional arg)
+  "`narrow-to-page' in a cloned indirect buffer in the other window.
+
+See `clone-indirect-buffer'."
+  (interactive "P")
+  (let ((buf (clone-indirect-buffer nil nil)))
+    (with-current-buffer buf
+      (narrow-to-page arg))
+    (pop-to-buffer buf)))
+
 (defun count-lines-page ()
   "Report number of lines on current page, and how many are before or after point."
   (interactive)

--------------090900020107060507090508--




Acknowledgement sent to Phil Sainty <psainty@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#17401; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 14 Dec 2020 17:30:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.