Christopher G D Tipper | 1 Jul 2004 13:57
Picon

insert sterling character

Hi,

I have a US keyboard, but I'd like to remap Ctrl-Shift-$ to produce a sterling 
symbol. I have searched info, but can't seem to find a function to insert a 
literal character at the point. Can anyone tell me what function ???? must be 
to get this simple mapping right?

(global-set-key [?\C-$] (lambda () (??? '£))

(Please excuse any syntactical errors, I haven't read the elisp manual...)

Christopher
--------------------------------o00o--------------------------------
  "Since light travels faster than sound, isn't that why 
   some people appear bright until you hear them speak" 
                                          - Steve Wright

Dr Francis J. Wright | 1 Jul 2004 15:54
Picon
Favicon

RE: insert sterling character

> From: 
> help-emacs-windows-bounces+f.j.wright=qmul.ac.uk <at> gnu.org 
> [mailto:help-emacs-windows-bounces+f.j.wright=qmul.ac.uk <at> gnu.o
> rg] On Behalf Of Christopher G D Tipper
> Sent: Thursday, 1 July 2004 12:57 pm
> To: help-emacs-windows <at> gnu.org
> Subject: [h-e-w] insert sterling character
> 
> Hi,
> 
> I have a US keyboard, but I'd like to remap Ctrl-Shift-$ to 
> produce a sterling symbol. I have searched info, but can't 
> seem to find a function to insert a literal character at the 
> point. Can anyone tell me what function ???? must be to get 
> this simple mapping right?
> 
> (global-set-key [?\C-$] (lambda () (??? '£))
> 
> (Please excuse any syntactical errors, I haven't read the 
> elisp manual...)
> 
> Christopher

Any of the following should insert a pound sterling character (i.e. they
work for me):

(insert ?£)

(insert 2211)

(Continue reading)

Jason Rumney | 1 Jul 2004 16:08
Picon

Re: insert sterling character

Dr Francis J. Wright wrote:

>Any of the following should insert a pound sterling character (i.e. they
>work for me):
>
>(insert ?£)
>
>(insert 2211)
>
>(insert ?\x8a3)
>
>The latter two have the advantage of not needing a pound sterling key!
>  
>
They also have the disadvantage of being dependant on the internal 
character representation, which will change from emacs-mule to utf-8 in 
future (probably 22.1)

Another alternative is:

 (insert (make-char 'latin-iso8859-1 163))

Peter Kaiser | 1 Jul 2004 17:43
Picon

Re: insert sterling character

Dr Francis J. Wright wrote:

> To write an interactive command (rather than just a Lisp function), you will
> need something like this:
> (global-set-key [?\C-$] (lambda () (interactive "*") (insert 2211)))

Couldn't that "*" cause a bit of trouble?

     (global-set-key [?\C-$] (lambda () (interactive) (insert 163)))

works for me and is a bit simpler.

Pete

Dr Francis J. Wright | 1 Jul 2004 17:52
Picon
Favicon

RE: insert sterling character

> From: 
> help-emacs-windows-bounces+f.j.wright=qmul.ac.uk <at> gnu.org 
> [mailto:help-emacs-windows-bounces+f.j.wright=qmul.ac.uk <at> gnu.o
> rg] On Behalf Of Peter Kaiser
> Sent: Thursday, 1 July 2004 4:44 pm
> To: GNU emacs for Windows
> Subject: Re: [h-e-w] insert sterling character
> 
> Dr Francis J. Wright wrote:
> 
> > To write an interactive command (rather than just a Lisp function), 
> > you will need something like this:
> > (global-set-key [?\C-$] (lambda () (interactive "*") (insert 2211)))
> 
> Couldn't that "*" cause a bit of trouble?
> 
>      (global-set-key [?\C-$] (lambda () (interactive) (insert 163)))
> 
> works for me and is a bit simpler.
> 
> Pete

The "*" just means that Emacs complains a bit sooner if the buffer is
read-only.  It's not essential; I just feel that it's probably good form to
include it in any interactive function that will modify the buffer.

I guess 163 is the UK-ASCII code for £ and 2211 is the (current) internal
Emacs code.  If I enter £ into an Emacs buffer by pressing the £ key on my
keyboard and then do C-x =, Emacs tells me that the character code is 2211,
which is why I used that.
(Continue reading)

Christopher G D Tipper | 1 Jul 2004 21:46
Picon

RE: insert sterling character

Thanks for all your advice.

The command I put in _emacs in the end was:
(global-set-key [?\C-$] (lambda () (interactive "*") (insert (make-char 'latin-
iso8859-1 163))))

It works.

Christopher

On 1 Jul 2004 at 16:52, Dr Francis J. Wright wrote:

> > Dr Francis J. Wright wrote:
> > 
> > > To write an interactive command (rather than just a Lisp function), 
> > > you will need something like this:
> > > (global-set-key [?\C-$] (lambda () (interactive "*") (insert 2211)))
> > 
> > Couldn't that "*" cause a bit of trouble?
> > 
> >      (global-set-key [?\C-$] (lambda () (interactive) (insert 163)))
> > 
> > works for me and is a bit simpler.
> > 
> > Pete
> 
> The "*" just means that Emacs complains a bit sooner if the buffer is
> read-only.  It's not essential; I just feel that it's probably good form to
> include it in any interactive function that will modify the buffer.
> 
(Continue reading)

Ludwig, Mark | 8 Jul 2004 03:51

Network switching with GNUClient & GNUServ

Wizards,

 

I use Emacs on my Windows laptop.  I have added the registry stuff so I have an “Edit with Emacs” option on the context menu for every file type; this invokes path\gnuclientw.exe -q -F "%L" and works great as long as the same network interface(s) are active that were when the server was started.  When the network interfaces come or go, the GNU Client seems unable to communicate with the server, or the server is unable to manipulate Emacs.

 

Has anyone else noticed this – and solved it?

 

Mark

--

"The longest you can really expect to work is four hours....  There are lots of exotic fruit juices and mineral water and little snacks around."

  --John Cleese describing working on the Shrek sequel

 

David Vanderschel | 8 Jul 2004 05:28
Picon

Re: Network switching with GNUClient & GNUServ

On Wednesday, July 07, "Ludwig, Mark" <mark.ludwig <at> ugs.com> wrote:
>I use Emacs on my Windows laptop.  I have added the registry stuff so I
>have an "Edit with Emacs" option on the context menu for every file
>type; this invokes path\gnuclientw.exe -q -F "%L" and works great as
>long as the same network interface(s) are active that were when the
>server was started.  When the network interfaces come or go, the GNU
>Client seems unable to communicate with the server, or the server is
>unable to manipulate Emacs.

>Has anyone else noticed this - and solved it?

Yes.  There are two versions of gnuserv - one which
uses TCP/IP and one which uses mailboxes for
communication.  Problems such as you have observed
will affect the former.  (Mine breaks if I just tell
ZoneAlarm to shut down 'net access.)  You would
probably be happier with the mailbox version.
Unfortunately, I can no longer find that one in the
place where I originally got it.  Perhaps someone else
knows from where it can be downloaded nowadays.

Regards,
  David V.

Eli Daniel | 8 Jul 2004 16:12
Picon

RE: Network switching with GNUClient & GNUServ

Francis Wright has a copy of Nico François' gnuserv port (which uses
mailslots) here:

http://centaur.maths.qmw.ac.uk/Emacs/files/gnuserv.zip

This is the version I'm using with great success.

-Eli

-----Original Message-----
From: help-emacs-windows-bounces+eli.daniel=verizon.net <at> gnu.org
[mailto:help-emacs-windows-bounces+eli.daniel=verizon.net <at> gnu.org] On Behalf
Of David Vanderschel
Sent: Wednesday, July 07, 2004 11:29 PM
To: help-emacs-windows <at> gnu.org
Subject: Re: [h-e-w] Network switching with GNUClient & GNUServ

On Wednesday, July 07, "Ludwig, Mark" <mark.ludwig <at> ugs.com> wrote:
>I use Emacs on my Windows laptop.  I have added the registry stuff so I 
>have an "Edit with Emacs" option on the context menu for every file 
>type; this invokes path\gnuclientw.exe -q -F "%L" and works great as 
>long as the same network interface(s) are active that were when the 
>server was started.  When the network interfaces come or go, the GNU 
>Client seems unable to communicate with the server, or the server is 
>unable to manipulate Emacs.

>Has anyone else noticed this - and solved it?

Yes.  There are two versions of gnuserv - one which
uses TCP/IP and one which uses mailboxes for
communication.  Problems such as you have observed
will affect the former.  (Mine breaks if I just tell
ZoneAlarm to shut down 'net access.)  You would
probably be happier with the mailbox version.
Unfortunately, I can no longer find that one in the
place where I originally got it.  Perhaps someone else
knows from where it can be downloaded nowadays.

Regards,
  David V.

Martin Stemplinger | 11 Jul 2004 21:43
Picon
Picon

Re: how to change my emacs fonts to Lucida Console?

On Die Jun 29 2004 at 10:31, "linhua" <linhua <at> sjtu.edu.cn> wrote:

> Hi all:
>     I have tried for a long time, but I can't find any related articles. Can anyone tell we how to change my Emacs'
font to Lucida
> Console or any fonts else exist in windows 2000?
I use something like 
;;; Set the default font and frame size
(setq default-frame-alist
      '((background-mode . light)
        (right-fringe . 0)
        (left-fringe)
        (font . "-outline-ProggyCleanTT-normal-r-normal-normal-16-120-96-96-c-70-iso8859-1")
        (border-color . "black")
        (tool-bar-lines . 1)
        (menu-bar-lines . 1)
        (background-color . "AntiqueWhite2")
        (nil)))

to find out which fonts there is the menu point Options -> Set
Font/Fontset that lets you try fonts. M-x describe-fontset tells you
then the name of the font which you can insert into lines as above.

HTH
Martin


Gmane