From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] scratch/widen-less a4ba846: Replace prog-widen with consolidating widen calls Date: Fri, 01 Dec 2017 22:27:35 +0100 Message-ID: <87bmjit9yw.fsf@galago> References: <20171129233237.27462.23351@vcs0.savannah.gnu.org> <20171129233238.504B5204F1@vcs0.savannah.gnu.org> <5d668ce5-1482-a3d4-c01b-7d996a532567@yandex.ru> <20171130214621.GA22157@ACM> <27985594-3bb4-ce88-8928-2ccfeac13eae@yandex.ru> <20171201154913.GB3840@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1512163700 9880 195.159.176.226 (1 Dec 2017 21:28:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 1 Dec 2017 21:28:20 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Alan Mackenzie , Tom Tromey , Dmitry Gutov , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 01 22:28:16 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 1eKsqx-00022F-TY for ged-emacs-devel@m.gmane.org; Fri, 01 Dec 2017 22:28:12 +0100 Original-Received: from localhost ([::1]:33088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKsr4-0002sR-Ly for ged-emacs-devel@m.gmane.org; Fri, 01 Dec 2017 16:28:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKsqR-0002sM-UU for emacs-devel@gnu.org; Fri, 01 Dec 2017 16:27:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKsqQ-0007dh-WB for emacs-devel@gnu.org; Fri, 01 Dec 2017 16:27:39 -0500 Original-Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:41320) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eKsqQ-0007cO-Pp for emacs-devel@gnu.org; Fri, 01 Dec 2017 16:27:38 -0500 Original-Received: by mail-wm0-x235.google.com with SMTP id g75so5853389wme.0 for ; Fri, 01 Dec 2017 13:27:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=nV6/Ahkkrxbixhyszra17PHw3EIVYbs2m1NLe6Yelz0=; b=UhscNkseyhNAHK3ZEUp1+eaod28usvVG2zyNKs6g43Fv1krWzfkvypwtWGKPuWKBhn vxMx3s7VxrVBScPEQHEY3ymPwsHjVfnRtgcy/atryXXQLrtd8KpH0xd6N3UMb+awjKWD TAFBvMlPSFdIXWwkSmU7SBGIzLt6DT8tGE2coGPO3kCIPwtPiHCoWDihNguSV9/jI2CI 1Cv6aU0iIZUlLqy/n03iQeTiLSML2/j873Pi1gCtYdpBZ5L4gl3wdbfAw3kelsAgFhpi P051Uq6ChJt1uFGMuQstqu3DakBIBfMHEm4nFriKjCUIejqbPiWZ4O2XowwgKjrLADUt FMDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=nV6/Ahkkrxbixhyszra17PHw3EIVYbs2m1NLe6Yelz0=; b=EOZusBu5kZUyv2e6zNPzXl26DmjEcCry3OQzPCz2vr6uiJXH7t10EE7fEKwckkEXr3 GJE5KBAJUDwyc1h2SftpJzsum9/Ztoau2mvYRT/00ZvZY2maT3idF1E09SLQeKUVAvkU 60mwwsEXozay78ogICluSnrGk3R10ndNXMfnJTP/H5ssCo0kNQkz9bk44ERJf+GQuJru MTa08MW/S5z90rHOB8b9kpFL1hyQcPH1x2jDVw/Xie4AUL+OyIAReWt0qMvlkMfjJrWb BJ9b57ifMtbVrNxjVdvkxlBo+U1HW4cqnT2i7BKztl+x/NppGf6cD4DoGrCZCrxZawSd DrNw== X-Gm-Message-State: AJaThX6JZ8YBVdu4em+bLctHOMqiQGc130K4XCNa+xbMtw8Y2kzFfpLU Ivr4zbfvAJl6CXSF+FNAabw= X-Google-Smtp-Source: AGs4zMbyBgNcjLR8GpOMBC8i09MhwecZ3U9hIE7W1x+lbqBwbZBZw26SH22xJ8CPvspOttKWvpTP5g== X-Received: by 10.80.176.38 with SMTP id i35mr19974586edd.156.1512163657497; Fri, 01 Dec 2017 13:27:37 -0800 (PST) Original-Received: from localhost ([2001:1c00:a06:1f00:29ba:931f:25e8:40a7]) by smtp.gmail.com with ESMTPSA id m23sm3849457edc.27.2017.12.01.13.27.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Dec 2017 13:27:36 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Fri, 01 Dec 2017 13:03:05 -0500") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::235 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:220592 Archived-At: Please correct me if I am wrong but the current patch requires all modes to use `prog-widen` and reserve `widen` to the interactive use, right? If so, this is the opposite of the older idea of adding `hard-limits` for widening which only multi-modes should use. I have proposed a patch for `set-widen-limits` 1.5 years ago which still lives in scratch/hard-narrow branch. It turned to be a pretty straightforward feat and worked without requiring any changes of the excising elisp code. The lengthy discussion started here: https://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00629.html Somewhere along the way we decided in favor of adding an extra `hard` argument to `narrow` instead of having a new `set-widen-limits` function. That turned to be impossible as it required backward-incompatible changes to the byte-code. I run out of steam by then and the whole idea died :( If adding a new function is back on the table then I think `set-widen-limits` is a better approach than `prog-widen`. It doesn't impose new restrictions on the existing code and it avoids introducing new types of narrowing or widening. Unless something changed in the meanwhile, the changes to the C code to make that work were minimal. If there is interest I can get it another shot. Vitalie