all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* insert unicode
@ 2006-01-05 20:00 Emabela
  2006-01-05 21:10 ` Peter Dyballa
  0 siblings, 1 reply; 11+ messages in thread
From: Emabela @ 2006-01-05 20:00 UTC (permalink / raw)





Hello Everybody,



I know that this is the simplest question,

but I could not find the answer.

So any help would be greatly appreciated.



How can I map a key to insert a unicode character

(say, U+XYZW)?



(define-key global-map "\M-a" ?????")



Thanks.



Regards,

B.





--------------------------Hirdetés-----------------------------

VÁLTSON SZÉLESSÁVRA 2006-BAN!

Kedvező árak, forgalomkorlátlan használat, és vilámgyors kiép
ítés.

Ne várjon tovább, jobbat úgysem talál!

Klikk ide: http://www.vipdsl.hu

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

* Re: insert unicode
  2006-01-05 20:00 insert unicode Emabela
@ 2006-01-05 21:10 ` Peter Dyballa
  2006-01-06  5:24   ` Ian Zimmerman
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Dyballa @ 2006-01-05 21:10 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 05.01.2006 um 21:00 schrieb Emabela:

> How can I map a key to insert a unicode character

	read-quoted-char-radix is a variable defined in `custom'.
	Its value is 16
	
	Documentation:
	*Radix for C-q and other uses of `read-quoted-char'.
	Legitimate radix values are 8, 10 and 16.
	
	You can customize this variable.


Then C-q a b c d <RET>. I think from CVS Emacs 22.0.50. I'm not sure  
whether Unicode makes sense in 21.4.

--
Greetings

   Pete

When in doubt, use brute force.
                 -- Ken Thompson

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

* Re: insert unicode
       [not found] <mailman.0.1136491361.26925.help-gnu-emacs@gnu.org>
@ 2006-01-06  2:11 ` B. T. Raven
  2006-03-28 12:41 ` Oliver Scholz
  1 sibling, 0 replies; 11+ messages in thread
From: B. T. Raven @ 2006-01-06  2:11 UTC (permalink / raw)



"Emabela" <emabela@vipmail.hu> wrote in message
news:mailman.0.1136491361.26925.help-gnu-emacs@gnu.org...



Hello Everybody,



I know that this is the simplest question,

but I could not find the answer.

So any help would be greatly appreciated.



How can I map a key to insert a unicode character

(say, U+XYZW)?



(define-key global-map "\M-a" ?????")



Thanks.



Regards,

B.


M-a is already bound to 'backward-sentence but anyway this might work:

(global-set-key "\M-a" (lambda () (interactive) (insert  ?ઔ)))

I have 21.3 and I do it this way: e.g. U+0A94 (some Gujarati glyph -
letter AU). Download the free (for non commercial use) Babelmap, find your
character and then copy it into Emacs, insert it after the question mark
in the above statement (in *scratch*), evaluate, test, and then put it in
your .emacs if you want to keep it:

ઔ

Ed

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

* Re: insert unicode
  2006-01-05 21:10 ` Peter Dyballa
@ 2006-01-06  5:24   ` Ian Zimmerman
  2006-01-06  9:55     ` Peter Dyballa
       [not found]     ` <mailman.82.1136541729.26925.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 11+ messages in thread
From: Ian Zimmerman @ 2006-01-06  5:24 UTC (permalink / raw)
  Cc: help-gnu-emacs


Peter> Then C-q a b c d <RET>. I think from CVS Emacs 22.0.50. I'm not
Peter> sure whether Unicode makes sense in 21.4.

But what happens to `quoted-insert'?

-- 
A true pessimist won't be discouraged by a little success.

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

* Re: insert unicode
@ 2006-01-06  8:52 Emabela
  0 siblings, 0 replies; 11+ messages in thread
From: Emabela @ 2006-01-06  8:52 UTC (permalink / raw)







I forgot to mention: I use emacs 21.4.



&gt; M-a is already bound to 'backward-sentence but anyway this might work:

&gt; (global-set-key "\M-a" (lambda () (interactive) (insert  ?ŕŞ&#6553
3;)))





&gt; I have 21.3 and I do it this way: e.g. U+0A94 (some Gujarati glyph -

&gt; letter AU). Download the free (for non commercial use) Babelmap, find 
your

&gt; character and then copy it into Emacs, insert it after the question ma
rk

&gt; in the above statement (in *scratch*), evaluate, test, and then put it
 in

&gt; your .emacs if you want to keep it:



Thanks for your help.



Is it possible to specify the unicode character with latin-1 charaters?



Say,

(global-set-key "\M-a" (lambda () (interactive) (insert  ?\u+0a94)))

or something like that?

(so that the command would not depend on the encoding of .emacs)



; C-q is out of question (it's too complicated) :

; If I press the key a with acute (U+00E1) in xterm, emacs thinks

; I pressed M-a (according to view-lossage), and I

; frequently use that character.





Again, thanks for any help in advance.



Regards,

Bela





--------------------------Hirdetés-----------------------------

VÁLTSON SZÉLESSÁVRA 2006-BAN!

Kedvező árak, forgalomkorlátlan használat, és vilámgyors kiép
ítés.

Ne várjon tovább, jobbat úgysem talál!

Klikk ide: http://www.vipdsl.hu

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

* Re: insert unicode
  2006-01-06  5:24   ` Ian Zimmerman
@ 2006-01-06  9:55     ` Peter Dyballa
       [not found]     ` <mailman.82.1136541729.26925.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 11+ messages in thread
From: Peter Dyballa @ 2006-01-06  9:55 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 06.01.2006 um 06:24 schrieb Ian Zimmerman:

>
> Peter> Then C-q a b c d <RET>. I think from CVS Emacs 22.0.50. I'm not
> Peter> sure whether Unicode makes sense in 21.4.
>
> But what happens to `quoted-insert'?
>

It still works: C-q f RET -> ^O, C-q 9 RET -> TAB, C-q BSP RET -> ^?,  
C-q 1 2 3 RET -> ģ, C-q w RET -> w, ...

--
Greetings

   Pete

Time is an illusion. Lunchtime, doubly so.

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

* Re: insert unicode
       [not found]     ` <mailman.82.1136541729.26925.help-gnu-emacs@gnu.org>
@ 2006-01-09  9:46       ` Harald Hanche-Olsen
  2006-01-09 12:56         ` Peter Dyballa
  0 siblings, 1 reply; 11+ messages in thread
From: Harald Hanche-Olsen @ 2006-01-09  9:46 UTC (permalink / raw)


+ Peter Dyballa <Peter_Dyballa@Web.DE>:

| It still works: C-q f RET -> ^O, C-q 9 RET -> TAB, C-q BSP RET -> ^?,
| C-q 1 2 3 RET -> ģ, C-q w RET -> w, ...

But surely, only in a unicode emacs from CVS?  On emacs 21.3.1, I get

quoted-insert: Invalid character: 0443, 291, 0x123

(But I only have 21.3 and CVS emacsen to play with.  Don't know what
happens with 22, but I'd be surprised if it behaved differently than
21 in this respect.)

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- Debating gives most of us much more psychological satisfaction
  than thinking does: but it deprives us of whatever chance there is
  of getting closer to the truth.  -- C.P. Snow

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

* Re: insert unicode
  2006-01-09  9:46       ` Harald Hanche-Olsen
@ 2006-01-09 12:56         ` Peter Dyballa
  2006-01-11 12:36           ` kokrhac - Ales MATAS
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Dyballa @ 2006-01-09 12:56 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 09.01.2006 um 10:46 schrieb Harald Hanche-Olsen:

> But surely, only in a unicode emacs from CVS?  On emacs 21.3.1, I get
>
> quoted-insert: Invalid character: 0443, 291, 0x123
>
> (But I only have 21.3 and CVS emacsen to play with.  Don't know what
> happens with 22, but I'd be surprised if it behaved differently than
> 21 in this respect.)


Yes, you' re right: this only works in Unicode Emacs 23! In both GNU  
Emacs 21.3.50 and 22.0.50 I cannot input a character that is 'wider  
than two hex places'.

Well, Unicode Emacs is the one that works mostly well for me,  
although GNU Emacs 22.0.50 is coming close in handling Unicode ...

--
Greetings

   Pete                           <]
              o        __o         |__    o       HPV, the real
     ___o    /I       -\<,         |o \  -\),-%     high speed!
___/\ /\___./ \___...O/ O____.....`-O-'-()--o_________________

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

* Re: insert unicode
  2006-01-09 12:56         ` Peter Dyballa
@ 2006-01-11 12:36           ` kokrhac - Ales MATAS
  0 siblings, 0 replies; 11+ messages in thread
From: kokrhac - Ales MATAS @ 2006-01-11 12:36 UTC (permalink / raw)


Peter Dyballa wrote:

> Yes, you' re right: this only works in Unicode Emacs 23! In both GNU  
> Emacs 21.3.50 and 22.0.50 I cannot input a character that is 'wider  
> than two hex places'.
> 
> Well, Unicode Emacs is the one that works mostly well for me,  although 
> GNU Emacs 22.0.50 is coming close in handling Unicode ...
> 

I'm not an expert, but you can insert (in 20.0.50) with C-q a character 
that is wider than 2 hex places. But the numer is not unicode code. 
(E.g. try C-q 5 3 9 7 c ... with (setq read-quoted-char-radix 16) )

	Ales Matas
	   }I{

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

* Re: insert unicode
       [not found] <mailman.0.1136491361.26925.help-gnu-emacs@gnu.org>
  2006-01-06  2:11 ` B. T. Raven
@ 2006-03-28 12:41 ` Oliver Scholz
  2006-03-28 12:54   ` Oliver Scholz
  1 sibling, 1 reply; 11+ messages in thread
From: Oliver Scholz @ 2006-03-28 12:41 UTC (permalink / raw)


"Emabela" <emabela@vipmail.hu> writes:

[...]
> How can I map a key to insert a unicode character
>
> (say, U+XYZW)?
>
>
>
> (define-key global-map "\M-a" ?????")

In Emacs 22:

(defun my-insert-ucs (hex)
  (interactive "sHexadecimal code: ")
  (ucs-insert hex))

(define-key global-map [?\C-c ?u] #'my-insert-ucs)


    Oliver
-- 
8 Germinal an 214 de la Révolution
Liberté, Egalité, Fraternité!

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

* Re: insert unicode
  2006-03-28 12:41 ` Oliver Scholz
@ 2006-03-28 12:54   ` Oliver Scholz
  0 siblings, 0 replies; 11+ messages in thread
From: Oliver Scholz @ 2006-03-28 12:54 UTC (permalink / raw)


[Follow up to myself]

Oliver Scholz <alkibiades@gmx.de> writes:

> "Emabela" <emabela@vipmail.hu> writes:
>
> [...]
>> How can I map a key to insert a unicode character
>>
>> (say, U+XYZW)?
>>
>>
>>
>> (define-key global-map "\M-a" ?????")
>
> In Emacs 22:
>
> (defun my-insert-ucs (hex)
>   (interactive "sHexadecimal code: ")
>   (ucs-insert hex))
>
> (define-key global-map [?\C-c ?u] #'my-insert-ucs)

Scrap that. Just:

(define-key global-map [?\C-c ?u] #'ucs-insert)


    Oliver
-- 
8 Germinal an 214 de la Révolution
Liberté, Egalité, Fraternité!

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

end of thread, other threads:[~2006-03-28 12:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-05 20:00 insert unicode Emabela
2006-01-05 21:10 ` Peter Dyballa
2006-01-06  5:24   ` Ian Zimmerman
2006-01-06  9:55     ` Peter Dyballa
     [not found]     ` <mailman.82.1136541729.26925.help-gnu-emacs@gnu.org>
2006-01-09  9:46       ` Harald Hanche-Olsen
2006-01-09 12:56         ` Peter Dyballa
2006-01-11 12:36           ` kokrhac - Ales MATAS
  -- strict thread matches above, loose matches on Subject: below --
2006-01-06  8:52 Emabela
     [not found] <mailman.0.1136491361.26925.help-gnu-emacs@gnu.org>
2006-01-06  2:11 ` B. T. Raven
2006-03-28 12:41 ` Oliver Scholz
2006-03-28 12:54   ` Oliver Scholz

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.