unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Inserting by name and describing some PUA characters
@ 2021-01-03  7:36 Janusz S. Bień
  2021-01-03 15:20 ` Eli Zaretskii
  2021-01-06 15:03 ` Janusz S. Bień
  0 siblings, 2 replies; 10+ messages in thread
From: Janusz S. Bień @ 2021-01-03  7:36 UTC (permalink / raw)
  To: emacs-devel

Hi!

PUA stands for Unicode Private Use Area, cf. e.g.
https://en.wikipedia.org/wiki/Private_Use_Areas.

I use systematically the PUA characters defined by MUFI,
cf. e.g. https://en.wikipedia.org/wiki/Medieval_Unicode_Font_Initiative.

Recently I made a quick and dirty solution for my own feature request

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32599

(in a slightly different way than suggested originally).

The files and the documentation are available at
https://github.com/jsbien/unicode4polish in the Emacs-MUFI directory.

Please consider improving and expanding my solution and making it
available as e.g. ELPA or non-ELPA package.

Best regards

Janusz

-- 
             ,   
Janusz S. Bien
emeryt (emeritus)
https://sites.google.com/view/jsbien



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Inserting by name and describing some PUA characters
  2021-01-03  7:36 Inserting by name and describing some PUA characters Janusz S. Bień
@ 2021-01-03 15:20 ` Eli Zaretskii
  2021-01-03 15:36   ` Janusz S. Bień
  2021-01-06 15:03 ` Janusz S. Bień
  1 sibling, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2021-01-03 15:20 UTC (permalink / raw)
  To: jsbien; +Cc: emacs-devel

> From: jsbien@mimuw.edu.pl (Janusz S. Bień)
> Date: Sun, 03 Jan 2021 08:36:28 +0100
> 
> PUA stands for Unicode Private Use Area, cf. e.g.
> https://en.wikipedia.org/wiki/Private_Use_Areas.
> 
> I use systematically the PUA characters defined by MUFI,
> cf. e.g. https://en.wikipedia.org/wiki/Medieval_Unicode_Font_Initiative.
> 
> Recently I made a quick and dirty solution for my own feature request
> 
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32599
> 
> (in a slightly different way than suggested originally).
> 
> The files and the documentation are available at
> https://github.com/jsbien/unicode4polish in the Emacs-MUFI directory.
> 
> Please consider improving and expanding my solution and making it
> available as e.g. ELPA or non-ELPA package.

Thanks.

I may be missing something, but I couldn't find in your Github
repository the infrastructure that could be used to tell Emacs to
interpret arbitrary ranges of PUA codepoints as characters with
certain properties.  Could you please point me to the parts I missed?



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Inserting by name and describing some PUA characters
  2021-01-03 15:20 ` Eli Zaretskii
@ 2021-01-03 15:36   ` Janusz S. Bień
  2021-01-03 15:44     ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Janusz S. Bień @ 2021-01-03 15:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On Sun, Jan 03 2021 at 17:20 +02, Eli Zaretskii wrote:
>> From: jsbien@mimuw.edu.pl (Janusz S. Bień)
>> Date: Sun, 03 Jan 2021 08:36:28 +0100
>> 
>> PUA stands for Unicode Private Use Area, cf. e.g.
>> https://en.wikipedia.org/wiki/Private_Use_Areas.
>> 
>> I use systematically the PUA characters defined by MUFI,
>> cf. e.g. https://en.wikipedia.org/wiki/Medieval_Unicode_Font_Initiative.
>> 
>> Recently I made a quick and dirty solution for my own feature request
>> 
>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32599
>> 
>> (in a slightly different way than suggested originally).
>> 
>> The files and the documentation are available at
>> https://github.com/jsbien/unicode4polish in the Emacs-MUFI directory.
>> 
>> Please consider improving and expanding my solution and making it
>> available as e.g. ELPA or non-ELPA package.
>
> Thanks.
>
> I may be missing something, but I couldn't find in your Github
> repository the infrastructure that could be used to tell Emacs to
> interpret arbitrary ranges of PUA codepoints as characters with
> certain properties.  Could you please point me to the parts I missed?

You haven't missed nothing. My knowledge of ELisp is too rudimentary for
creating such an infrastructure myself.

However in the documentation I described the procedure needed to tell
Emacs to interpret arbitrary ranges of PUA codepoints as characters with
*names*. It definitely can be extended to handle other properties but I
have not investigated this aspect.

So my repository contains just a proof-of-concept (which also is useful
for me personally).

Regards - Janusz

-- 
             ,   
Janusz S. Bien
emeryt (emeritus)
https://sites.google.com/view/jsbien



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Inserting by name and describing some PUA characters
  2021-01-03 15:36   ` Janusz S. Bień
@ 2021-01-03 15:44     ` Eli Zaretskii
  0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2021-01-03 15:44 UTC (permalink / raw)
  To: jsbien; +Cc: emacs-devel

> From: jsbien@mimuw.edu.pl (Janusz S. Bień)
> Cc: emacs-devel@gnu.org
> Date: Sun, 03 Jan 2021 16:36:59 +0100
> 
> > I may be missing something, but I couldn't find in your Github
> > repository the infrastructure that could be used to tell Emacs to
> > interpret arbitrary ranges of PUA codepoints as characters with
> > certain properties.  Could you please point me to the parts I missed?
> 
> You haven't missed nothing. My knowledge of ELisp is too rudimentary for
> creating such an infrastructure myself.
> 
> However in the documentation I described the procedure needed to tell
> Emacs to interpret arbitrary ranges of PUA codepoints as characters with
> *names*. It definitely can be extended to handle other properties but I
> have not investigated this aspect.

Thanks, I see the documentation now.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Inserting by name and describing some PUA characters
  2021-01-03  7:36 Inserting by name and describing some PUA characters Janusz S. Bień
  2021-01-03 15:20 ` Eli Zaretskii
@ 2021-01-06 15:03 ` Janusz S. Bień
  2021-01-06 15:52   ` Eli Zaretskii
  1 sibling, 1 reply; 10+ messages in thread
From: Janusz S. Bień @ 2021-01-06 15:03 UTC (permalink / raw)
  To: emacs-devel

On Sun, Jan 03 2021 at  8:36 +01, Janusz S. Bień wrote:
> Hi!
>
> PUA stands for Unicode Private Use Area, cf. e.g.
> https://en.wikipedia.org/wiki/Private_Use_Areas.
>
> I use systematically the PUA characters defined by MUFI,
> cf. e.g. https://en.wikipedia.org/wiki/Medieval_Unicode_Font_Initiative.
>
> Recently I made a quick and dirty solution for my own feature request
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32599
>
> (in a slightly different way than suggested originally).
>
> The files and the documentation are available at
> https://github.com/jsbien/unicode4polish in the Emacs-MUFI directory.

I just noticed a serious bug. Looks like I misunderstood the meaning of
'define-char-code-property'.

I hoped that the second call to it will just supplement the table with
additional values. However looks like the table is recreated from
scratch and in consequence it contains only the MUFI names provided by
me.

I will appreciate your help.

Best regards

Janusz

-- 
             ,   
Janusz S. Bien
emeryt (emeritus)
https://sites.google.com/view/jsbien



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Inserting by name and describing some PUA characters
  2021-01-06 15:03 ` Janusz S. Bień
@ 2021-01-06 15:52   ` Eli Zaretskii
  2021-01-06 16:13     ` Janusz S. Bień
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2021-01-06 15:52 UTC (permalink / raw)
  To: jsbien; +Cc: emacs-devel

> From: jsbien@mimuw.edu.pl (Janusz S. Bień)
> Date: Wed, 06 Jan 2021 16:03:21 +0100
> 
> I just noticed a serious bug. Looks like I misunderstood the meaning of
> 'define-char-code-property'.
> 
> I hoped that the second call to it will just supplement the table with
> additional values. However looks like the table is recreated from
> scratch and in consequence it contains only the MUFI names provided by
> me.

That's correct, AFAIU.

Why did you need to supplement the table, and which table was it?



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Inserting by name and describing some PUA characters
  2021-01-06 15:52   ` Eli Zaretskii
@ 2021-01-06 16:13     ` Janusz S. Bień
  2021-01-06 16:51       ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Janusz S. Bień @ 2021-01-06 16:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On Wed, Jan 06 2021 at 17:52 +02, Eli Zaretskii wrote:
>> From: jsbien@mimuw.edu.pl (Janusz S. Bień)
>> Date: Wed, 06 Jan 2021 16:03:21 +0100
>> 
>> I just noticed a serious bug. Looks like I misunderstood the meaning of
>> 'define-char-code-property'.
>> 
>> I hoped that the second call to it will just supplement the table with
>> additional values. However looks like the table is recreated from
>> scratch and in consequence it contains only the MUFI names provided by
>> me.
>
> That's correct, AFAIU.
>
> Why did you need to supplement the table, and which table was it?

I just noticed that I forgot to push 'mufi-name.el' to the repository
(https://github.com/jsbien/unicode4polish/). I have done it now. Below
is a fragment:

--8<---------------cut here---------------start------------->8---

(define-char-code-property 'name
  #^[nil nil char-code-property-table nil #^^[1 0 nil nil nil nil nil
  
[...]

J JJ C K T P H] [A AE YA YAE EO E YEO YE O WA WAE OE YO U WEO WE WI YU EU YI I] [G GG GS N NJ NH D L LG LM LB LS LT LP LH M B BS S SS NG J C K T P H]]]]
  "Unicode character name.
Property value is a string or nil.
The value nil stands for the default value \"null string\").")

--8<---------------cut here---------------end--------------->8---

I expected that the names of the PUA MUFI characters will be added to
the existing Unicode names. However after evaluating it 'describe-char'
doesn't show the names of the Unicode character. I assume the culprit is
'mufi-name.el' but of course the problem can be more complicated.

Regards

Janusz

-- 
             ,   
Janusz S. Bien
emeryt (emeritus)
https://sites.google.com/view/jsbien



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Inserting by name and describing some PUA characters
  2021-01-06 16:13     ` Janusz S. Bień
@ 2021-01-06 16:51       ` Eli Zaretskii
  2021-01-06 16:53         ` Janusz S. Bień
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2021-01-06 16:51 UTC (permalink / raw)
  To: jsbien; +Cc: emacs-devel

> From: jsbien@mimuw.edu.pl (Janusz S. Bień)
> Cc: emacs-devel@gnu.org
> Date: Wed, 06 Jan 2021 17:13:42 +0100
> 
> --8<---------------cut here---------------start------------->8---
> 
> (define-char-code-property 'name
>   #^[nil nil char-code-property-table nil #^^[1 0 nil nil nil nil nil
>   
> [...]
> 
> J JJ C K T P H] [A AE YA YAE EO E YEO YE O WA WAE OE YO U WEO WE WI YU EU YI I] [G GG GS N NJ NH D L LG LM LB LS LT LP LH M B BS S SS NG J C K T P H]]]]
>   "Unicode character name.
> Property value is a string or nil.
> The value nil stands for the default value \"null string\").")
> 
> --8<---------------cut here---------------end--------------->8---
> 
> I expected that the names of the PUA MUFI characters will be added to
> the existing Unicode names. However after evaluating it 'describe-char'
> doesn't show the names of the Unicode character. I assume the culprit is
> 'mufi-name.el' but of course the problem can be more complicated.

I think with the current infrastructure you will have to regenerate
uni-name.el such that it includes information both from
UnicodeData.txt and from MUFI.  uni-name.el will then be loaded when
first used.

Alternatively, I think you could use put-char-code-property to modify
the 'name' property of the PUA codepoints you want to use for MUFI.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Inserting by name and describing some PUA characters
  2021-01-06 16:51       ` Eli Zaretskii
@ 2021-01-06 16:53         ` Janusz S. Bień
  2021-01-07  8:23           ` Janusz S. Bień
  0 siblings, 1 reply; 10+ messages in thread
From: Janusz S. Bień @ 2021-01-06 16:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On Wed, Jan 06 2021 at 18:51 +02, Eli Zaretskii wrote:

[...]

> I think with the current infrastructure you will have to regenerate
> uni-name.el such that it includes information both from
> UnicodeData.txt and from MUFI.  uni-name.el will then be loaded when
> first used.
>
> Alternatively, I think you could use put-char-code-property to modify
> the 'name' property of the PUA codepoints you want to use for MUFI.

Thanks for the suggestions.

Janusz

-- 
             ,   
Janusz S. Bien
emeryt (emeritus)
https://sites.google.com/view/jsbien



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Inserting by name and describing some PUA characters
  2021-01-06 16:53         ` Janusz S. Bień
@ 2021-01-07  8:23           ` Janusz S. Bień
  0 siblings, 0 replies; 10+ messages in thread
From: Janusz S. Bień @ 2021-01-07  8:23 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On Wed, Jan 06 2021 at 17:53 +01, Janusz S. Bień wrote:
> On Wed, Jan 06 2021 at 18:51 +02, Eli Zaretskii wrote:
>
> [...]
>
>> I think with the current infrastructure you will have to regenerate
>> uni-name.el such that it includes information both from
>> UnicodeData.txt and from MUFI.  uni-name.el will then be loaded when
>> first used.

I have done this and pushed to the repository.

JSB

-- 
             ,   
Janusz S. Bien
emeryt (emeritus)
https://sites.google.com/view/jsbien



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-01-07  8:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-03  7:36 Inserting by name and describing some PUA characters Janusz S. Bień
2021-01-03 15:20 ` Eli Zaretskii
2021-01-03 15:36   ` Janusz S. Bień
2021-01-03 15:44     ` Eli Zaretskii
2021-01-06 15:03 ` Janusz S. Bień
2021-01-06 15:52   ` Eli Zaretskii
2021-01-06 16:13     ` Janusz S. Bień
2021-01-06 16:51       ` Eli Zaretskii
2021-01-06 16:53         ` Janusz S. Bień
2021-01-07  8:23           ` Janusz S. Bień

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).