unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Juri Linkov <juri@linkov.net>
Cc: 22147@debbugs.gnu.org, Artur Malabarba <bruce.connor.am@gmail.com>
Subject: bug#22147: Obsolete search-forward-lax-whitespace
Date: Sun, 15 May 2016 14:51:35 -0700 (PDT)	[thread overview]
Message-ID: <8e655300-1a72-4df6-87cf-91fd006cb3d7@default> (raw)
In-Reply-To: <87shxjjb0h.fsf@mail.linkov.net>

> EmacsWiki is inaccessible to me due to its invalid server certificate.

I see.  I don't know anything about that.

> But thanks for pointing to EmacsMirror - I found your code at
> https://github.com/emacsmirror/character-fold-plus
> https://github.com/emacsmirror/isearch-plus
> which I hope is at the latest version.

Yes, I just checked, and those are the latest versions.

I don't know how often EmacsMirror is updated.  For a while (a year
or two ago, I think) I think it was not mirroring.  You can always
get my code from MELPA, which refreshes from EmacsWiki daily.

> > 2. More importantly, what I wrote in `character-fold+.el' worked
> > only at the time I wrote it and for a while thereafter, unfortunately.
> > Not too long after that, Artur Malabarba rewrote `character-fold.el',
> > so the code I wrote is no longer appropriate.
> 
> I see that you just moved the hard-coded alist to defcustom
> char-fold-ad-hoc.

Correct.  You can see how I use it.  I broke up some of the
character-fold.el code (at the time), in order to use parts of
it (a bit more modular).  Mainly, I broke out `update-char-fold-table'
so that it could be called in the :set functions of the two defcustoms.
So as soon as a user made changes, they were reflected in the behavior.

> I think that char-fold-ad-hoc is too ad-hoc naming.
> Using more wide-spread naming convention with a data type suffix -alist
> (like in display-buffer-alist, etc.) would provide a defcustom name
> char-fold-alist.

OK.  FWIW, I'm not a fan of putting the type ("alist") in the option
name, but I don't speak for what vanilla Emacs does.  If all we can
say about some value is that it takes the _form_ of an alist, that's
too bad.  Normally, we should be able to describe that value (content,
not just form).  It's better, IMO, if the name talks about what the
value is (content, purpose - something specific about it), and not
just say form it takes.

Another consideration (for me, at least): I think (and hope) that
eventually users will be able to have multiple such lists (sets)
of char mappings that they can choose (and mix and match - sets of
such sets, for different purposes/contexts).  IOW, I don't see just
a single set of ad-hoc char mappings.  But this is anyway for the
future.

> Another thing we need to do is to allow customization to remove
> default mappings.  Maybe this is possible by using the same
> defcustom with a rule like: remove default mappings when a char
> is mapped to an empty list, e.g.
> 
> - adding more mappings for ‘`’:
>   (defcustom char-fold-ad-hoc '((?` "❛" "‘" "‛" "󠀢" "❮" "‹"))
> 
> - removing default mappings for ‘`’:
>   (defcustom char-fold-ad-hoc '((?`))

Yes, I would think that would work (already).  But I could be wrong.

Thanks for taking a look at this.





  reply	other threads:[~2016-05-15 21:51 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-11 23:52 bug#22147: Obsolete search-forward-lax-whitespace Juri Linkov
2015-12-12  0:44 ` Artur Malabarba
2015-12-12 23:31   ` Juri Linkov
2015-12-13  0:29     ` Artur Malabarba
2015-12-14  0:23       ` Juri Linkov
2015-12-14  1:11         ` Artur Malabarba
2015-12-14 23:58           ` Juri Linkov
2015-12-15 10:15             ` Artur Malabarba
2015-12-16  0:57               ` Juri Linkov
2015-12-16  1:47                 ` Drew Adams
2016-05-14 20:45                   ` Juri Linkov
2016-05-14 22:20                     ` Artur Malabarba
2016-05-14 22:27                       ` Drew Adams
2016-05-15 20:45                       ` Juri Linkov
2016-05-14 22:22                     ` Drew Adams
2016-05-15 20:56                       ` Juri Linkov
2016-05-15 21:51                         ` Drew Adams [this message]
2016-05-17 20:55                           ` Juri Linkov
2016-05-17 21:55                             ` Drew Adams
2016-05-18  3:00                               ` Artur Malabarba
2016-05-18 19:34                                 ` Juri Linkov
2016-05-18 20:40                                   ` Artur Malabarba
2016-05-30 20:57                                     ` Juri Linkov
2016-06-01 15:03                                       ` Artur Malabarba
2020-09-05 14:54                                         ` Lars Ingebrigtsen
2020-09-07 18:34                                           ` Juri Linkov
2015-12-16 10:59                 ` Artur Malabarba
2015-12-17  0:57                   ` Juri Linkov
2015-12-17 16:33                     ` Artur Malabarba
2015-12-17 17:21                       ` Drew Adams
2015-12-17 18:47                         ` Artur Malabarba
2015-12-17 22:16                           ` Drew Adams
2015-12-18  0:55                             ` Artur Malabarba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8e655300-1a72-4df6-87cf-91fd006cb3d7@default \
    --to=drew.adams@oracle.com \
    --cc=22147@debbugs.gnu.org \
    --cc=bruce.connor.am@gmail.com \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).