unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Remap key to UK pound sign
@ 2005-06-22 12:49 zaphod
  2005-06-22 13:48 ` Peter Dyballa
       [not found] ` <mailman.802.1119448232.2857.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 12+ messages in thread
From: zaphod @ 2005-06-22 12:49 UTC (permalink / raw)


GNU Emacs 22.0.50.1/Darwin ports/Mac OS X

I'm assuming this is an Emacs question rather than an OS X quetion but my £
key in Emacs produces only a rectangular character, ie. no use to anyone.
Can't find anything in the manual to solve this so anyone got any ideas how
to remap the key to the UK pound (£) sign?

The problem only exists within Emacs.

Zaphod

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

* Re: Remap key to UK pound sign
  2005-06-22 12:49 Remap key to UK pound sign zaphod
@ 2005-06-22 13:48 ` Peter Dyballa
       [not found] ` <mailman.802.1119448232.2857.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 12+ messages in thread
From: Peter Dyballa @ 2005-06-22 13:48 UTC (permalink / raw)



Am 22.06.2005 um 14:49 schrieb zaphod:

> The problem only exists within Emacs.
>

Which Emacs are you using, one for X11 or one for Aqua, i.e. a 'Carbon 
Emacs'?

Which fontsets and which encodings are you using?

Where is the Pound or Sterling character on your keyboard? Shift-4 
(where I have $, of course)? Can you type in Emacs 'C-h k' and then the 
£? What is it? When this £ is typed and appears as a box, can position 
the cursor on it and type 'C-u C-x ='? Particularly this output should 
explain what you've actually typed in that encoding and fontset.

--
Mit friedvollen Grüßen

   Pete

Without vi there is only GNU Emacs

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

* Re: Remap key to UK pound sign
       [not found] ` <mailman.802.1119448232.2857.help-gnu-emacs@gnu.org>
@ 2005-06-22 20:49   ` zaphod
  2005-06-22 21:18     ` Jason Rumney
  2005-06-22 21:43     ` Peter Dyballa
  2005-06-22 21:14   ` Jason Rumney
  1 sibling, 2 replies; 12+ messages in thread
From: zaphod @ 2005-06-22 20:49 UTC (permalink / raw)


Peter Dyballa wrote:

> Which Emacs are you using, one for X11 or one for Aqua, i.e. a 'Carbon
> Emacs'?

Carbon. Darwin-port version. No X11.
> 
> Which fontsets and which encodings are you using?

No idea about encoding but I think it uses the Mac fontset.

> 
> Where is the Pound or Sterling character on your keyboard? Shift-4

Shift-3

> (where I have $, of course)? Can you type in Emacs 'C-h k' and then the
> £? What is it?

Still produces useless rectangle character

 When this £ is typed and appears as a box, can position
> the cursor on it and type 'C-u C-x ='? 

Here's the result:

 character: £ (04243, 2211, 0x8a3, U+00A3)
    charset: latin-iso8859-1 (Right-Hand Part of Latin Alphabet 1 (ISO/IEC
8859-1): ISO-IR-100.)
 code point: 35
     syntax: w 	which means: word
   category: l:Latin
buffer code: 0x81 0xA3
  file code: 0xA3 (encoded by coding system iso-latin-1)
    display: no font available

However, in Emacs the £ sign shown above is a rectangle, ie. it changed to
what I need - £ - when I pasted it into this message via Mozilla. So, the
same character is producing 2 different characters in different programs.

Particularly this output should
> explain what you've actually typed in that encoding and fontset.
> 
> -- 
> Mit friedvollen Grüßen
> 
>   Pete

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

* Re: Remap key to UK pound sign
       [not found] ` <mailman.802.1119448232.2857.help-gnu-emacs@gnu.org>
  2005-06-22 20:49   ` zaphod
@ 2005-06-22 21:14   ` Jason Rumney
  1 sibling, 0 replies; 12+ messages in thread
From: Jason Rumney @ 2005-06-22 21:14 UTC (permalink / raw)


Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> Where is the Pound or Sterling character on your keyboard? Shift-4 
> (where I have $, of course)?

Usually it is Shift-3.

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

* Re: Remap key to UK pound sign
  2005-06-22 20:49   ` zaphod
@ 2005-06-22 21:18     ` Jason Rumney
  2005-06-23  0:28       ` zaphod
  2005-06-22 21:43     ` Peter Dyballa
  1 sibling, 1 reply; 12+ messages in thread
From: Jason Rumney @ 2005-06-22 21:18 UTC (permalink / raw)


zaphod <none@none.com> writes:

>>  When this £ is typed and appears as a box, can position
>> the cursor on it and type 'C-u C-x ='? 
>
> Here's the result:
>
>  character: £ (04243, 2211, 0x8a3, U+00A3)
>     charset: latin-iso8859-1 (Right-Hand Part of Latin Alphabet 1 (ISO/IEC
> 8859-1): ISO-IR-100.)
....
>     display: no font available

There is your problem. The £ key is inserting the right character, but
Emacs does not know how to display it. I'm not familiar with Mac, but
I think you need to define a fontset to get mac-roman fonts mapped to
the correct characters in latin-1 etc.

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

* Re: Remap key to UK pound sign
  2005-06-22 20:49   ` zaphod
  2005-06-22 21:18     ` Jason Rumney
@ 2005-06-22 21:43     ` Peter Dyballa
  1 sibling, 0 replies; 12+ messages in thread
From: Peter Dyballa @ 2005-06-22 21:43 UTC (permalink / raw)



Am 22.06.2005 um 22:49 schrieb zaphod:

> Here's the result:
>
>  character: £ (04243, 2211, 0x8a3, U+00A3)
>     charset: latin-iso8859-1 (Right-Hand Part of Latin Alphabet 1 
> (ISO/IEC
> 8859-1): ISO-IR-100.)
>  code point: 35
>      syntax: w 	which means: word
>    category: l:Latin
> buffer code: 0x81 0xA3
>   file code: 0xA3 (encoded by coding system iso-latin-1)
>     display: no font available
>

Here above is the answer: "no font available."

You're lucky that the £ is defined in the MacRoman encoding! So all you 
need are fontsets from fonts of your system. To get a list of all 
available fonts:

1) find a name for the file containing all available fonts
2) write that name down in *scratch* buffer and copy it into a register
3) type M-x set-frame-fonts RET TAB TAB C-g
4) change back into the *Completions* buffer
5) save it to the file name in that register -- if you try to expand a 
file name the *Completions* buffer will contain these expansions!

Now create fontsets à la these templates (with the right fonts and the 
preferred sizes):

	(create-fontset-from-mac-roman-font "-*-bitstream vera sans 
mono-medium-r-*-*-9-*-*-*-*-*-mac-roman" nil "09pt_vera_sans_mono")
	(create-fontset-from-mac-roman-font "-*-letter 
gothic-medium-r-*-*-10-*-*-*-*-*-mac-roman"           nil 
"10pt_letter_gothic")
	(create-fontset-from-mac-roman-font 
"-*-courier-medium-r-*-*-11-*-*-*-*-*-mac-roman"                 nil 
"11pt_bitstream_courier")
	(create-fontset-from-mac-roman-font "-*-courier 
std-medium-r-*-*-12-*-*-*-*-*-mac-roman"             nil 
"12pt_courier_std")
	(create-fontset-from-mac-roman-font 
"-*-monaco-medium-r-*-*-13-*-*-*-*-*-mac-roman"                  nil 
"13pt_monaco")
	(create-fontset-from-mac-roman-font "-*-andale 
mono-medium-r-*-*-14-*-*-*-*-*-mac-roman"             nil 
"14pt_andale_mono")

Use in .emacs something like:

	(setq initial-frame-alist '(
	  (mouse-color	 . "blue")
	  (foreground-color . "midnightblue")
	  (background-color . "antiquewhite1")
	  (font . "fontset-13pt_courier_new")
	  (top . 10) (left . 650) (width . 89) (height . 60)))
	(setq default-frame-alist '(
	  (background-color 	 . "ghost white")
	  (foreground-color 	 . "grey10")
	  (cursor-color     	 . "purple")
	  (cursor-type      	 . box)
	  (vertical-scroll-bars . left)
	  (font . "fontset-12pt_bitstream_courier")
	  (top . 20) (left . 150) (width . 89) (height . 56)))

and

	(set-terminal-coding-system	'mac-roman)
	(set-default-coding-systems	'mac-roman)
	(prefer-coding-system		'mac-roman)

In cases when this setup fails you can add something like this to a 
file's header:

	;;; -*- mode: Text; coding: mac-roman-unix; -*-

Remember that in Carbon Emacs you're restricted to Mac encodings!

--
Greetings

   Pete

 From error to error, one discovers the entire truth.
                                                             -Sigmund 
Freud

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

* Re: Remap key to UK pound sign
  2005-06-22 21:18     ` Jason Rumney
@ 2005-06-23  0:28       ` zaphod
  2005-06-23  8:41         ` Peter Dyballa
       [not found]         ` <mailman.939.1119517905.2857.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 12+ messages in thread
From: zaphod @ 2005-06-23  0:28 UTC (permalink / raw)


Jason Rumney wrote:

> There is your problem. The £ key is inserting the right character, but
> Emacs does not know how to display it. I'm not familiar with Mac, but
> I think you need to define a fontset to get mac-roman fonts mapped to
> the correct characters in latin-1 etc.

Rather I think the developers of this version of Emacs need to test it properly.

Zaphod

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

* Re: Remap key to UK pound sign
  2005-06-23  0:28       ` zaphod
@ 2005-06-23  8:41         ` Peter Dyballa
       [not found]         ` <mailman.939.1119517905.2857.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 12+ messages in thread
From: Peter Dyballa @ 2005-06-23  8:41 UTC (permalink / raw)



Am 23.06.2005 um 02:28 schrieb zaphod:

> Rather I think the developers of this version of Emacs need to test it  
> properly.
>

Recent Carbon Emacsen use QuickDraw from the days of Mac OS 8 or 9  
(last millennium). Then, there were anything but Mac encodings, I think  
Mac OS 9.1 brought some early Unicode support to the Mac. I remember  
that I already had some struggle with fontsets then. Today the  
developers can't test everything unless they're hundred or more. Check  
in CharacterPalette the Unicode blocks, i.e. scripts supported by  
Unicode! The few developers that actually work on display issues can't  
do that. And it's a nice feature allowing me to customize some things  
... Prêt-à-porter Carbon Emacsen exist too. They have the font or  
fontset and other issues fixed. Why didn't you choose any of these:  
(http://prdownloads.sourceforge.net/aquamacs/Aquamacs-Emacs 
-0.9.2b8.dmg?download + http://aquamacs.org/,  
http://yaced.sourceforge.net/,  
http://www.apple.com/downloads/macosx/unix_open_source/ 
carbonemacspackage.html ?

The cheap solution is to use the bitmapped GNU Intl fonts  
-etl-fixed-... I think all European glyphs are contained in them, but  
they look pretty ugly. So Carbon Emacs is something of a hack near the  
end of a dead-end street. There is an effort going on to use ATSUI to  
'render' text in Emacs. I can't see much progress, and Christmas  
(2006?) is far away either.

The best performance is brought to you by Unicode Emacs 23. It runs in  
X11. When using Apple's quartz-wm as proxy for your preferred Window  
Manager you can copy&paste with other Quartz/Aqua based Mac OS X tools.  
Similarly well is GNU Emacs 22 performing in X11, it only needs some  
more advise in fontsets.

--
Greetings

   Pete


"Evolution"            o           __o                     _o _
           °\___o      /0~         -\<,              ^\___ /=\\_/-%
oo~_______ /\ /\______/ \_________O/ O_______________o===>-->O--o____
""

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

* Re: Remap key to UK pound sign
       [not found]         ` <mailman.939.1119517905.2857.help-gnu-emacs@gnu.org>
@ 2005-06-23 21:13           ` zaphod
  2005-06-23 22:06             ` Peter Dyballa
  2005-06-28  7:08           ` Stefan Monnier
  1 sibling, 1 reply; 12+ messages in thread
From: zaphod @ 2005-06-23 21:13 UTC (permalink / raw)


Peter Dyballa wrote:

> Recent Carbon Emacsen use QuickDraw from the days of Mac OS 8 or 9 
> (last millennium). Then, there were anything but Mac encodings, I think 
> Mac OS 9.1 brought some early Unicode support to the Mac. I remember 
> that I already had some struggle with fontsets then. Today the 
> developers can't test everything unless they're hundred or more. Check 
> in CharacterPalette the Unicode blocks, i.e. scripts supported by 
> Unicode! The few developers that actually work on display issues can't 
> do that. And it's a nice feature allowing me to customize some things 
> ... Prêt-à-porter Carbon Emacsen exist too. They have the font or 
> fontset and other issues fixed. Why didn't you choose any of these: 
> (http://prdownloads.sourceforge.net/aquamacs/Aquamacs-Emacs
> -0.9.2b8.dmg?download + http://aquamacs.org/, 
> http://yaced.sourceforge.net/, 
> http://www.apple.com/downloads/macosx/unix_open_source/
> carbonemacspackage.html ?
> 
> The cheap solution is to use the bitmapped GNU Intl fonts 
> -etl-fixed-... I think all European glyphs are contained in them, but 
> they look pretty ugly. So Carbon Emacs is something of a hack near the 
> end of a dead-end street. There is an effort going on to use ATSUI to 
> 'render' text in Emacs. I can't see much progress, and Christmas 
> (2006?) is far away either.
> 
> The best performance is brought to you by Unicode Emacs 23. It runs in 
> X11. When using Apple's quartz-wm as proxy for your preferred Window 
> Manager you can copy&paste with other Quartz/Aqua based Mac OS X tools. 
> Similarly well is GNU Emacs 22 performing in X11, it only needs some 
> more advise in fontsets.

'Fraid this is well over my head. I just want an editor that works so that I
can get some work done instead of having to know as much as the Emacs
development team just to get it working :-(

Zaphod

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

* Re: Remap key to UK pound sign
  2005-06-23 21:13           ` zaphod
@ 2005-06-23 22:06             ` Peter Dyballa
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Dyballa @ 2005-06-23 22:06 UTC (permalink / raw)



Am 23.06.2005 um 23:13 schrieb zaphod:

> 'Fraid this is well over my head. I just want an editor that works so 
> that I
> can get some work done instead of having to know as much as the Emacs
> development team just to get it working :-(
>

Then this is a better environment:

------------------------------- Info --------------------------------
List Post: <mailto:macosx-emacs@email.esm.psu.edu>
List Archives: <http://www.esm.psu.edu/mac-tex/MacOSX-Emacs-Digests/>


--
Greetings

   Pete

"Eternity is a terrible thought. I mean, where's it going to end?"
                                                    - Tom Stoppard

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

* Re: Remap key to UK pound sign
       [not found]         ` <mailman.939.1119517905.2857.help-gnu-emacs@gnu.org>
  2005-06-23 21:13           ` zaphod
@ 2005-06-28  7:08           ` Stefan Monnier
  2005-06-28  8:19             ` Peter Dyballa
  1 sibling, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2005-06-28  7:08 UTC (permalink / raw)


> they look pretty ugly. So Carbon Emacs is something of a hack near the  end
> of a dead-end street.

Thank you for your kind encouragement.  For your information, "Carbon Emacs"
is a lot more than just rendering text.  This part can be changed without
redoing the whole port.  So no, Carbon Emacs is not a dead-end.  Only some
part of it might be considered as such.

If you want people to improve Carbon Emacs, in the future I'd recommend you
think about the idea of not denigrating their work,


        Stefan

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

* Re: Remap key to UK pound sign
  2005-06-28  7:08           ` Stefan Monnier
@ 2005-06-28  8:19             ` Peter Dyballa
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Dyballa @ 2005-06-28  8:19 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 28.06.2005 um 09:08 schrieb Stefan Monnier:

> If you want people to improve Carbon Emacs, in the future I'd 
> recommend you
> think about the idea of not denigrating their work,
>

I'm sorry!

Stefan and others: I did want to be that rude, I rather wanted to state 
that Carbon Emacs versions 21 and 22 are going in the wrong direction 
when they use Quickdraw based routines to render text. It wasn't good 
last millennium, it can't be good today sticking to some proprietary 
Mac encodings. I'd wish more work would be put into the new font 
handling in Carbon Emacs 23! I made its X11 variant already my default 
GNU Emacs ...

--
Greetings

   Pete

"Eternity is a terrible thought. I mean, where's it going to end?"
                                                    - Tom Stoppard

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

end of thread, other threads:[~2005-06-28  8:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-22 12:49 Remap key to UK pound sign zaphod
2005-06-22 13:48 ` Peter Dyballa
     [not found] ` <mailman.802.1119448232.2857.help-gnu-emacs@gnu.org>
2005-06-22 20:49   ` zaphod
2005-06-22 21:18     ` Jason Rumney
2005-06-23  0:28       ` zaphod
2005-06-23  8:41         ` Peter Dyballa
     [not found]         ` <mailman.939.1119517905.2857.help-gnu-emacs@gnu.org>
2005-06-23 21:13           ` zaphod
2005-06-23 22:06             ` Peter Dyballa
2005-06-28  7:08           ` Stefan Monnier
2005-06-28  8:19             ` Peter Dyballa
2005-06-22 21:43     ` Peter Dyballa
2005-06-22 21:14   ` Jason Rumney

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