From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.devel Subject: Re: forward-comment and syntax-ppss Date: Sat, 17 Dec 2016 08:37:41 +0100 Message-ID: <871sx73t16.fsf@mbork.pl> References: <83fd1db0-7362-6117-c5cd-715398c0dea4@gmail.com> <20161207220447.GA4503@acm.fritz.box> <20161208201517.GB3120@acm.fritz.box> <20161209190747.GC2203@acm.fritz.box> <5a70902f-882e-f616-74b2-df6eb81fc70c@yandex.ru> <20161211101715.GA14084@acm.fritz.box> <51c0554f-40d0-37a5-b134-17058343aa3f@yandex.ru> <20161216200630.GB3858@acm.fritz.box> <1425775f-dae3-c63b-ee1e-fae81d0fbc96@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1481960253 27896 195.159.176.226 (17 Dec 2016 07:37:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 17 Dec 2016 07:37:33 +0000 (UTC) User-Agent: mu4e 0.9.17; emacs 26.0.50.1 Cc: Alan Mackenzie , Stefan Monnier , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 17 08:37:29 2016 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 1cI9Yc-00064o-1h for ged-emacs-devel@m.gmane.org; Sat, 17 Dec 2016 08:37:26 +0100 Original-Received: from localhost ([::1]:35592 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cI9Ye-0002JU-Rs for ged-emacs-devel@m.gmane.org; Sat, 17 Dec 2016 02:37:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cI9YY-0002C4-Q6 for emacs-devel@gnu.org; Sat, 17 Dec 2016 02:37:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cI9YV-000141-Mi for emacs-devel@gnu.org; Sat, 17 Dec 2016 02:37:22 -0500 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:33119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cI9YV-00013e-GQ for emacs-devel@gnu.org; Sat, 17 Dec 2016 02:37:19 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 5DAD31DA05B; Sat, 17 Dec 2016 08:37:16 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DNyCZljY2vjW; Sat, 17 Dec 2016 08:37:13 +0100 (CET) Original-Received: from localhost (static-dwadziewiec-jedenpiec7.echostar.pl [109.232.29.157]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 87D771DA058; Sat, 17 Dec 2016 08:37:13 +0100 (CET) In-reply-to: <1425775f-dae3-c63b-ee1e-fae81d0fbc96@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 195.110.48.8 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:210571 Archived-At: On 2016-12-17, at 01:18, Dmitry Gutov wrote: > On 17.12.2016 01:08, Stefan Monnier wrote: > >> While it might be a good direction, it's not as simple as it sounds, >> since many uses of the C-x n n command looks like "narrow to the region, >> and then apply to the whole buffer": I think it will be tricky >> to make overlays that mimick this behavior sufficiently well. > > I suppose it would break that usage, yes. > > mark-whole-buffer should still work, though, as well as command > sequences that use it. Or if it doesn't, we could provide a replacement > command on that same binding. And some getters, like > visible-area-beginning and visible-area-end, for functions that know > that they want to act on user-mode narrowing (*). > > Someone who actually uses narrowing interactively should weigh in on how > costly that transition might be. > > (*) Not sure if that leads to the similar problems as we have now, > though, like some basic code not knowing whether to use point-min or > visible-area-beginning. I use narrowing interactively /a lot/. (It's almost one of the Emacs' killer features.) Sometimes I just want to perform a query-replace limited to some region (I know it takes the active region into accout, I just sometimes like narrowing better - then, I can quit query-replace, fix something and hit (C-)M-% again. (I could use recursive edit, but I seldom remember about it.) Another use case is plain visibility: sometimes I just don't want to see anything but the part I'm working on. Maybe there are other use cases. I'll try to notice when I use narrowing and see what they are. Best, -- Marcin Borkowski