From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: character folding future [was: Questions about isearch] Date: Tue, 1 Dec 2015 07:48:56 -0800 (PST) Message-ID: References: <83lh9lx6oi.fsf@gnu.org> <83a8q1x1cn.fsf@gnu.org> <87h9k74pkw.fsf@gmail.com> <83bnafse4f.fsf@gnu.org> <878u5jrvih.fsf@rub.de> <87mvtyqzyx.fsf@mbork.pl> <831tbaqwwv.fsf@gnu.org> <893eaaa4-6867-4e3f-a926-85f650367d6f@default> 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 1448984984 2221 80.91.229.3 (1 Dec 2015 15:49:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Dec 2015 15:49:44 +0000 (UTC) Cc: Eli Zaretskii , Stephen Berman , Richard Stallman , emacs-devel To: bruce.connor.am@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 01 16:49:33 2015 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 1a3nBG-0008TA-7r for ged-emacs-devel@m.gmane.org; Tue, 01 Dec 2015 16:49:26 +0100 Original-Received: from localhost ([::1]:53365 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3nBF-0005Se-Nx for ged-emacs-devel@m.gmane.org; Tue, 01 Dec 2015 10:49:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3nB5-0005RV-VR for emacs-devel@gnu.org; Tue, 01 Dec 2015 10:49:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3nB0-0005Tx-5j for emacs-devel@gnu.org; Tue, 01 Dec 2015 10:49:15 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:18867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3nAv-0005TM-O4; Tue, 01 Dec 2015 10:49:05 -0500 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id tB1Fmwj5021564 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 1 Dec 2015 15:48:59 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id tB1Fmwsv005270 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 1 Dec 2015 15:48:58 GMT Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id tB1Fmv7j027500; Tue, 1 Dec 2015 15:48:58 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 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:195680 Archived-At: > > 1. An option, `char-fold-ad-hoc', for the ad hoc char foldings. > > Default value: the same ad hoc foldings as vanilla Emacs > > (quotation marks). >=20 > Thanks for the code again. A list of ad-hoc foldings for the user to > customize (your `char-fold-ad-hoc') is something I want too (ideally, > as soon as 25.1). The reason I didn't include it initially is that the > character-fold-table can take many seconds to generate, so it's pretty > important that it be generated at compile time. >=20 > I suppose one solution is to make it a defcustom with a :set property > that updates the char-fold-table, and clearly state in the docstring > that editing this variable can add several seconds to emacs startup > time. 1. Do you really see that "character-fold-table can take many seconds to generate"? I don't see that, AFAICT. 2. Have you tried it? What difference do you see in the generation time? Did you really see that it "can add several seconds"? 3. I do it now in `character-fold+.el'. (Did it for `char-fold-symmetric' from the outset, but just now added it also for `char-fold-ad-hoc'.) And AFAICT there is no noticeable time difference in initializing, and none for updating `character-fold-table' after a user customizes `char-fold-ad-hoc'. Not noticeable is quite different from "many seconds" or "several seconds". Maybe this is platform dependent? I'm using MS Windows 7 on an average laptop that is a few years old (nothing special wrt memory or CPU). Do you see the same thing I see, in terms of time, if you try `character-fold+.el'? 4. There _is_ a noticeable delay when a user customizes `char-fold-symmetric', of course - that does a lot more work. But there is no delay for that initially. It is off by default, so `update-char-fold-table' does nothing with it, except when a user customizes or toggles it on. 5. I think it makes sense in any case to factor out the code that creates/updates the table (as in my function `update-char-fold-table').