From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] widen-limits c331b66: Implement buffer-widen-limits functionality Date: Wed, 23 Mar 2016 12:58:27 +0100 Message-ID: <877fgtpfrw.fsf@gmail.com> References: <20160322022539.16038.77264@vcs.savannah.gnu.org> <8737riqouj.fsf@gmail.com> <221845e0-b194-433e-bfbc-105272ae5752@default> <87twjyp21k.fsf@gmail.com> <56F242E0.7060004@online.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1458734338 25667 80.91.229.3 (23 Mar 2016 11:58:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2016 11:58:58 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andreas =?utf-8?Q?R=C3=B6hler?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 23 12:58:54 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aihR6-0006wk-Cn for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2016 12:58:52 +0100 Original-Received: from localhost ([::1]:43478 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aihR6-0003Fb-1d for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2016 07:58:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aihQp-0003FT-7u for emacs-devel@gnu.org; Wed, 23 Mar 2016 07:58:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aihQk-0002td-7y for emacs-devel@gnu.org; Wed, 23 Mar 2016 07:58:35 -0400 Original-Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:35836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aihQk-0002tV-0b for emacs-devel@gnu.org; Wed, 23 Mar 2016 07:58:30 -0400 Original-Received: by mail-wm0-x236.google.com with SMTP id l68so192265182wml.0 for ; Wed, 23 Mar 2016 04:58:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=a2uCxSsq0tMJ1aET4435iQBFUUWusZ10zowMbr7wCkY=; b=sLwoy8hnKAIXV3GVpPHT5//ovvlMnVMajLzu1V1XbIRpZeWYfqkGJ3fb1KBlJzSEug PJvMQq2kRl8Q7gtvAuaeWdCut0JipUSYRBQnqxie7CIkC8OVjoK7erN/IKzAsRKEFlQi YDcfKXB+3WfGlqSVbgO0keXwGNTtKoWp3AKkYWXkwBPEHoeNA0s4yKi/EItONO6vu2IL lBoWISifoGxyDy9tLrlGnmwwJkCTNvTizgp+xmmOoI9OfFtiC397Veb6p3RGrVUR3kR5 wBG6MsFUrA1HB5VMe39Y6qX9Sclcm9ovxz+8xJQY/JPTSmi11vThlPJFn5t8pB4bI56r N2Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=a2uCxSsq0tMJ1aET4435iQBFUUWusZ10zowMbr7wCkY=; b=N7YeUO4TupCTd58k6OQ0Cvxa9ncIPK7YM0LY7VbhNlmuRV07RT4LM+2irCBsUNC3/l O+W/4s8RHk4LIJE0XdFYMb9GIhk4L0C5irHGcmtt3Ui3LK5MnTyBShH5BrDmGL4G1juF 6T9GxJdBlSL9HK6+K7gg2KoZWswaUSSnT3bkLzN5GLAljPpRON0Oxz7nMNf6kc8LJ/Iv AwiORtEUvj8KP2AqCnssN1KYZc9f0nYboJK4O0RBf8Gie+hMC49vRqT5UU6iHiWmdqgh hXPGXShdeypweYD6vVoac6nCBCdesr73iNPcodck6fzcH358oGKBjBJq/RkP1TnWpTxT Jyvg== X-Gm-Message-State: AD7BkJLGPP//+jG1M3MOmj7iljYforUNlZ9iyFzk3df182ne708AuPcIAV+F2Lyk0kO+5Q== X-Received: by 10.28.128.83 with SMTP id b80mr3538832wmd.6.1458734309178; Wed, 23 Mar 2016 04:58:29 -0700 (PDT) Original-Received: from localhost ([143.176.214.220]) by smtp.gmail.com with ESMTPSA id h1sm2620314wme.8.2016.03.23.04.58.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Mar 2016 04:58:28 -0700 (PDT) In-Reply-To: <56F242E0.7060004@online.de> ("Andreas =?utf-8?Q?R=C3=B6hler?= =?utf-8?Q?=22's?= message of "Wed, 23 Mar 2016 08:16:48 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202128 Archived-At: >> On Wed, Mar 23 2016 08:16, Andreas R=C3=B6hler wrote: > preventing unwanted widen instead seems the way to go. That's precisely what extra limit do. Prevent unwanted widen. How do you pr= opose to implement that? I see 4 ways to go about it: 1) Add an extra prog-widen and teach all modes out there to use it in con= texts like syntax-parsing, indentation, font-lock and who know what else. A = half backed version of this in already part of emacs. 2) Have low level restrictions directly in `widen` and a macro `with-widen-limit` that multi-modes can use. This is the current patch. 3) Have two types of narrowing (soft and hard). This is harder to impleme= nt but has the benefit that it can be used in non-transient situations li= ke Info mode. 4) Bring widen to elisp and allow minor modes (and Info mode) advice wide= n in whatever way they see. I think (1) is a bad idea. (4) is simplest and very general. (3) might be u= seful but it's hard. (2) is implemented to get rid of (1). I proposed (4) very early in the thread, but didn't hear much support for it. There are only three trivial usages of Fwiden in C code. Bringing `narr= ow` to elisp is equally easy. Vitalie