GNU bug report logs - #22147
Obsolete search-forward-lax-whitespace

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Fri, 11 Dec 2015 23:54:02 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Artur Malabarba <bruce.connor.am <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 22147 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: bug#22147: Obsolete search-forward-lax-whitespace
Date: Thu, 17 Dec 2015 18:47:37 +0000
2015-12-17 17:21 GMT+00:00 Drew Adams <drew.adams <at> oracle.com>:
>>> char-fold-symmetric could wait for later, but we definitely need
>>> char-fold-ad-hoc now before the release because the users should be
>>> able to customize the default rules.
>>
>> Indeed.  Once we do that, we also need a variable to determine
>> whether we should derive the default table from the unicode
>> standard (like we currently do) or just use an empty default with
>> the ad-hoc rules slapped on top.
>
> Users should be able to define their own equivalence classes (groups),
> not just one class.  Each class should be the value of a user option.
>
> Here is one simple and flexible way to do this:
>
> 1. Define a user option, `char-folding-classes', which is a list of
>    any number of (OPTION-NAME DOC-STRING) pairs, where OPTION-NAME
>    is a symbol that will name a user option and DOC-STRING is its doc
>    string.
>
>    Each symbol would automatically be used to define an option (a
>    defcustom) that the user can then use to define a given equivalence
>    class.
>
> 2. The generated defcustom for each user option specified in option
>    `char-folding-classes' would allow for any number of entries, each
>    of which could be a `choice' of either of these defcustom types:
>
>    a. An alist, such as used currently in my `char-fold-ad-hoc' option:
>       Each entry is a list of a char and the strings that fold into it.
>
>    b. A function that populates such an alist.

I appreciate you probably put quite a bit of thought into this, but
IMO this would be over-engineering.

I think we should define two simpole defcustoms that determine how the
character-fold-table is generated: character-fold-ad-hoc (an alist)
and character-fold-derive-from-unicode-decomposition (a boolean).
This should be immediately configurable by anyone, without requiring a
big initial investment.

Then we also make character-fold-table into a defvar, and document it
as a proper exposed API, so advanced users can change it however they
want with hooks and local vars to however many different
values/equiv-classes they want.

This would offer a dead-simple defcustom that covers most cases, while
still allowing the versatility of having multiple options for those
who need it.




This bug report was last modified 4 years and 308 days ago.

Previous Next


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