unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Feature suggestion
@ 2012-06-01  2:25 Richard Stallman
  2012-06-01  2:46 ` Miles Bader
  2012-06-01  6:07 ` Eli Zaretskii
  0 siblings, 2 replies; 12+ messages in thread
From: Richard Stallman @ 2012-06-01  2:25 UTC (permalink / raw)
  To: emacs-devel

The output of C-u C-x =
should show some key sequences that would insert this character.

--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call



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

* Re: Feature suggestion
  2012-06-01  2:25 Feature suggestion Richard Stallman
@ 2012-06-01  2:46 ` Miles Bader
  2012-06-01  6:07 ` Eli Zaretskii
  1 sibling, 0 replies; 12+ messages in thread
From: Miles Bader @ 2012-06-01  2:46 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:
> The output of C-u C-x =
> should show some key sequences that would insert this character.

It already does, if the currently enabled input method can input it.

The functionality isn't really complete though, and could be improved.
For instance, it only works for some input methods -- e.g. "tex", but
not "korean-hangul".  Also it would nice if it would show other input
methods when the current input method doesn't handle a character.

-miles

-- 
Guilt, n. The condition of one who is known to have committed an indiscretion,
as distinguished from the state of him who has covered his tracks.



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

* Re: Feature suggestion
  2012-06-01  2:25 Feature suggestion Richard Stallman
  2012-06-01  2:46 ` Miles Bader
@ 2012-06-01  6:07 ` Eli Zaretskii
  2012-06-01  8:45   ` Andreas Schwab
  2012-06-01 20:33   ` Richard Stallman
  1 sibling, 2 replies; 12+ messages in thread
From: Eli Zaretskii @ 2012-06-01  6:07 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

> Date: Thu, 31 May 2012 22:25:29 -0400
> From: Richard Stallman <rms@gnu.org>
> 
> The output of C-u C-x =
> should show some key sequences that would insert this character.

Type "C-x 8 RET" followed by the hexadecimal code of the character
(shown by "C-u C-x ="), and Bob's your uncle.

Would mentioning that in the text do the job?



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

* Re: Feature suggestion
  2012-06-01  6:07 ` Eli Zaretskii
@ 2012-06-01  8:45   ` Andreas Schwab
  2012-06-01 20:33   ` Richard Stallman
  1 sibling, 0 replies; 12+ messages in thread
From: Andreas Schwab @ 2012-06-01  8:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: rms, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Thu, 31 May 2012 22:25:29 -0400
>> From: Richard Stallman <rms@gnu.org>
>> 
>> The output of C-u C-x =
>> should show some key sequences that would insert this character.
>
> Type "C-x 8 RET" followed by the hexadecimal code of the character
> (shown by "C-u C-x ="), and Bob's your uncle.

Or when using the ucs input method: uNNNN (that works only for BMP
characters).

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

* Re: Feature suggestion
  2012-06-01  6:07 ` Eli Zaretskii
  2012-06-01  8:45   ` Andreas Schwab
@ 2012-06-01 20:33   ` Richard Stallman
  2012-06-01 20:41     ` Drew Adams
  2012-06-08  8:47     ` Eli Zaretskii
  1 sibling, 2 replies; 12+ messages in thread
From: Richard Stallman @ 2012-06-01 20:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

    Type "C-x 8 RET" followed by the hexadecimal code of the character
    (shown by "C-u C-x ="), and Bob's your uncle.

    Would mentioning that in the text do the job?

Yes, it would.  That is an obscure command,
and I would not know what search string to use
to find it with apropos.

I think there is a way to enter characters by their long names, too,
but I don't recall what it is.  It would be good to mention that
method too.

--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call



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

* RE: Feature suggestion
  2012-06-01 20:33   ` Richard Stallman
@ 2012-06-01 20:41     ` Drew Adams
  2012-06-02 14:13       ` Drew Adams
                         ` (2 more replies)
  2012-06-08  8:47     ` Eli Zaretskii
  1 sibling, 3 replies; 12+ messages in thread
From: Drew Adams @ 2012-06-01 20:41 UTC (permalink / raw)
  To: rms, 'Eli Zaretskii'; +Cc: emacs-devel

> I think there is a way to enter characters by their long names, too,
> but I don't recall what it is.  It would be good to mention that
> method too.

`C-x 8 RET' (command `ucs-insert') also lets you complete against the char name.




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

* RE: Feature suggestion
  2012-06-01 20:41     ` Drew Adams
@ 2012-06-02 14:13       ` Drew Adams
  2012-06-02 19:19       ` Richard Stallman
  2012-06-03  7:45       ` Andreas Röhler
  2 siblings, 0 replies; 12+ messages in thread
From: Drew Adams @ 2012-06-02 14:13 UTC (permalink / raw)
  To: rms, 'Eli Zaretskii'; +Cc: emacs-devel

> > I think there is a way to enter characters by their long names, too,
> > but I don't recall what it is.  It would be good to mention that
> > method too.
> 
> `C-x 8 RET' (command `ucs-insert') also lets you complete 
> against the char name.

FWIW - 

1. I use a variant (`ucsc-insert') of `ucs-insert' that has the same behavior
except for a negative prefix arg (`ucs-insert' is anyway a no-op for such an
arg):

* A negative arg is treated as its absolute value, so -3 inserts 3 copies of the
char, just like 3 does.

* A negative arg also automatically creates a command that inserts the same
character (accepting a prefix arg for multiple copies).  The command name is the
same as the char name, except lowercase and with SPC chars replaced by hyphens
(`-').  I bind it to `C-x 8 RET', obviously.

For example, if you use `C-- C-x 8 RET greek capital letter delta' (e.g., using
completion), then it defines a command `greek-capital-letter-delta' that inserts
that char.  Convenient for binding keys to effectively add Unicode chars to your
keyboard.

2. I define a macro, `ucsc-make-commands', that takes a regexp arg and defines
all such insertion commands for chars whose names match the regexp.

Examples:

(ucsc-make-commands "^math") ; Math symbols
(ucsc-make-commands "latin") ; Latin alphabet characters
(ucsc-make-commands "arabic")
(ucsc-make-commands "^cjk")  ; Chinese, Japanese, Korean characters
(ucsc-make-commands "^box drawings ")
(ucsc-make-commands "^greek [a-z]+ letter") ; Greek characters
(ucsc-make-commands
  "\\(^hangul\\|^circled hangul\\|^parenthesized hangul\\)")

Note that a drawback to using `ucs[c]-insert' with completion is that it is slow
- there are *many* Unicode chars.  This lets you use it when you really need it,
but have tailor-made insertion commands for the chars you use often.  And of
course even if you do not bind most such commands, completion against their
names is much quicker, since the domain is smaller (even if you create a lot of
such commands).

The code is here:
http://www.emacswiki.org/emacs/download/ucs-cmds.el
I have no objection to it being added to Emacs (the patch is trivial).




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

* Re: Feature suggestion
  2012-06-01 20:41     ` Drew Adams
  2012-06-02 14:13       ` Drew Adams
@ 2012-06-02 19:19       ` Richard Stallman
  2012-06-03  3:13         ` Miles Bader
  2012-06-03  7:45       ` Andreas Röhler
  2 siblings, 1 reply; 12+ messages in thread
From: Richard Stallman @ 2012-06-02 19:19 UTC (permalink / raw)
  To: Drew Adams; +Cc: eliz, emacs-devel

    `C-x 8 RET' (command `ucs-insert') also lets you complete against the char name.

The C-u C-x = message could mention both ways of using it -- why not?

--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call



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

* Re: Feature suggestion
  2012-06-02 19:19       ` Richard Stallman
@ 2012-06-03  3:13         ` Miles Bader
  2012-06-03 18:30           ` Richard Stallman
  0 siblings, 1 reply; 12+ messages in thread
From: Miles Bader @ 2012-06-03  3:13 UTC (permalink / raw)
  To: rms; +Cc: eliz, Drew Adams, emacs-devel

Richard Stallman <rms@gnu.org> writes:
>     `C-x 8 RET' (command `ucs-insert') also lets you complete against
> the char name.
>
> The C-u C-x = message could mention both ways of using it -- why not?

It does already mention the character name, which can entered directly
at the C-x 8 RET prompt.

-miles

-- 
We live, as we dream -- alone....



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

* Re: Feature suggestion
  2012-06-01 20:41     ` Drew Adams
  2012-06-02 14:13       ` Drew Adams
  2012-06-02 19:19       ` Richard Stallman
@ 2012-06-03  7:45       ` Andreas Röhler
  2 siblings, 0 replies; 12+ messages in thread
From: Andreas Röhler @ 2012-06-03  7:45 UTC (permalink / raw)
  To: emacs-devel

Am 01.06.2012 22:41, schrieb Drew Adams:
>> I think there is a way to enter characters by their long names, too,
>> but I don't recall what it is.  It would be good to mention that
>> method too.
>
> `C-x 8 RET' (command `ucs-insert') also lets you complete against the char name.
>
>
>

an alias `char-insert' might help a lot WRT apropos

thanks,

Andreas



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

* Re: Feature suggestion
  2012-06-03  3:13         ` Miles Bader
@ 2012-06-03 18:30           ` Richard Stallman
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Stallman @ 2012-06-03 18:30 UTC (permalink / raw)
  To: Miles Bader; +Cc: eliz, drew.adams, emacs-devel

    > The C-u C-x = message could mention both ways of using it -- why not?

    It does already mention the character name, which can entered directly
    at the C-x 8 RET prompt.

Yes.  My point is this text should SAY you can enter the name that way.

--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call



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

* Re: Feature suggestion
  2012-06-01 20:33   ` Richard Stallman
  2012-06-01 20:41     ` Drew Adams
@ 2012-06-08  8:47     ` Eli Zaretskii
  1 sibling, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2012-06-08  8:47 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

> Date: Fri, 01 Jun 2012 16:33:58 -0400
> From: Richard Stallman <rms@gnu.org>
> CC: emacs-devel@gnu.org
> 
>     Type "C-x 8 RET" followed by the hexadecimal code of the character
>     (shown by "C-u C-x ="), and Bob's your uncle.
> 
>     Would mentioning that in the text do the job?
> 
> Yes, it would.  That is an obscure command,
> and I would not know what search string to use
> to find it with apropos.
> 
> I think there is a way to enter characters by their long names, too,
> but I don't recall what it is.  It would be good to mention that
> method too.

I've done both in revision 108521 on the trunk.  It now says

      to input: type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"



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

end of thread, other threads:[~2012-06-08  8:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-01  2:25 Feature suggestion Richard Stallman
2012-06-01  2:46 ` Miles Bader
2012-06-01  6:07 ` Eli Zaretskii
2012-06-01  8:45   ` Andreas Schwab
2012-06-01 20:33   ` Richard Stallman
2012-06-01 20:41     ` Drew Adams
2012-06-02 14:13       ` Drew Adams
2012-06-02 19:19       ` Richard Stallman
2012-06-03  3:13         ` Miles Bader
2012-06-03 18:30           ` Richard Stallman
2012-06-03  7:45       ` Andreas Röhler
2012-06-08  8:47     ` Eli Zaretskii

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