all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: 37036@debbugs.gnu.org
Subject: bug#37036: [PATCH] Inconsistent ASCII and Latin char categories
Date: Thu, 15 Aug 2019 22:23:00 +0300	[thread overview]
Message-ID: <83o90qp71n.fsf@gnu.org> (raw)
In-Reply-To: <2B0EDC85-CAAE-4658-AA6D-85AF4842BFCF@acm.org> (message from Mattias Engdegård on Thu, 15 Aug 2019 19:37:49 +0200)

> From: Mattias Engdegård <mattiase@acm.org>
> Date: Thu, 15 Aug 2019 19:37:49 +0200
> Cc: 37036@debbugs.gnu.org
> 
> 15 aug. 2019 kl. 18.59 skrev Eli Zaretskii <eliz@gnu.org>:
> > 
> > What about "abcdef^A^B"?  Does M-f stop before the control characters?
> 
> Yes. Does forward-word use categories?

No.  Sorry, it was my faulty memory.  It uses char-script-table
instead.

> The more categories are arbitrary, the less useful they are.

I think they should become entirely useless, i.e. we should stop using
them.  We have the entire Unicode database with all the character
properties for quite some time now, and should favor using that
instead.  Categories are an old kludgey hack, which goes back to
pre-Unicode Emacs; it can never be anything but arbitrary, and we will
never be able to fix that anywhere near completely.

> Why would anyone use categories to discriminate characters if they do not have a sensible, useful and predictable structure?

I don't know why anyone should.  My recommendation is to just say no.

> Consider the function fill-polish-nobreak-p. It is clearly written with the assumption of a reasonable definition of the Latin category, and it doesn't work as expected because of that.

Can you tell the details of where this function doesn't work?  I'd
like to understand why fixing it needs to change the categories.

> It is perfectly clear that categories have been introduced in an ad-hoc way to solve problems as they arose, but that doesn't mean that no mistakes were made even for those narrow purposes.

I don't think we should fix those mistakes, because that's an
impossible goal.  We should instead gradually stop using categories
for anything serious, certainly for any new code.  We should use the
UCD properties and the various char-tables built upon that instead.





  reply	other threads:[~2019-08-15 19:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 12:17 bug#37036: [PATCH] Inconsistent ASCII and Latin char categories Mattias Engdegård
2019-08-15 15:27 ` Eli Zaretskii
2019-08-15 15:46   ` Mattias Engdegård
2019-08-15 16:23     ` Eli Zaretskii
2019-08-15 16:30       ` Mattias Engdegård
2019-08-15 16:59         ` Eli Zaretskii
2019-08-15 17:37           ` Mattias Engdegård
2019-08-15 19:23             ` Eli Zaretskii [this message]
2019-08-15 19:46               ` Eli Zaretskii
2019-08-15 22:19               ` Mattias Engdegård
2019-08-16  9:33                 ` Eli Zaretskii
2019-08-16 10:48                   ` Mattias Engdegård

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

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

  git send-email \
    --in-reply-to=83o90qp71n.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=37036@debbugs.gnu.org \
    --cc=mattiase@acm.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.