all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs displaying backslash incorrectly
@ 2010-09-07 12:46 lraae
  2010-09-07 13:42 ` Tim X
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: lraae @ 2010-09-07 12:46 UTC (permalink / raw)
  To: help-gnu-emacs

Hi, I have a weird problem which I can't seem to find anything about
on the web: When I type a backslash, emacs displays it as a capital W
with a double strikethrough.

This is Emacs 23.1.1 on Linux Fedora 12 (2.6.32.19-163.fc12.i686.PAE).

I tried "emacs -q" to run without startup file, but the problem
remains. This is a school administered computer, so I don't have root
access.

Hope someone might have an idea how to proceed in solving this.


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

* Re: emacs displaying backslash incorrectly
  2010-09-07 12:46 emacs displaying backslash incorrectly lraae
@ 2010-09-07 13:42 ` Tim X
       [not found]   ` <fopo86l6f9l4i9ieor4iigp95a8i3lun2k@4ax.com>
  2010-09-07 13:50 ` Pascal J. Bourguignon
  2010-09-08  2:24 ` Jason Rumney
  2 siblings, 1 reply; 5+ messages in thread
From: Tim X @ 2010-09-07 13:42 UTC (permalink / raw)
  To: help-gnu-emacs

lraae <lcraae@gmail.com> writes:

> Hi, I have a weird problem which I can't seem to find anything about
> on the web: When I type a backslash, emacs displays it as a capital W
> with a double strikethrough.
>
> This is Emacs 23.1.1 on Linux Fedora 12 (2.6.32.19-163.fc12.i686.PAE).
>
> I tried "emacs -q" to run without startup file, but the problem
> remains. This is a school administered computer, so I don't have root
> access.
>
> Hope someone might have an idea how to proceed in solving this.

weird.

This is only a wild stab in the dark, but maybe it is a font issue? If
you enter a backslash and save it to a file and view it with something
outside of emacs, does it show up as a backslash or some other key?

Maybe try specifying a different font?

Tim

-- 
tcross (at) rapttech dot com dot au


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

* Re: emacs displaying backslash incorrectly
  2010-09-07 12:46 emacs displaying backslash incorrectly lraae
  2010-09-07 13:42 ` Tim X
@ 2010-09-07 13:50 ` Pascal J. Bourguignon
  2010-09-08  2:24 ` Jason Rumney
  2 siblings, 0 replies; 5+ messages in thread
From: Pascal J. Bourguignon @ 2010-09-07 13:50 UTC (permalink / raw)
  To: help-gnu-emacs

lraae <lcraae@gmail.com> writes:

> Hi, I have a weird problem which I can't seem to find anything about
> on the web: When I type a backslash, emacs displays it as a capital W
> with a double strikethrough.
>
> This is Emacs 23.1.1 on Linux Fedora 12 (2.6.32.19-163.fc12.i686.PAE).
>
> I tried "emacs -q" to run without startup file, but the problem
> remains. This is a school administered computer, so I don't have root
> access.
>
> Hope someone might have an idea how to proceed in solving this.

It may be because your terminal (or X window) is configured to send ₩
(Korean Won) when you type that key.

Or perhaps emacs has a keyboard translation translating \ to ₩.

Or perhaps \ is bound to a function inserting ₩.

Or perhaps you've activated an input method such that when you type \
you get ₩.


Since you get the same with emacs -q, it may be configured so in the
site initialization files.  Try again with emacs -Q to avoid those.


If it's X windows that's sending ₩, you may check first what key code
correspond to you backslash key with xev:

    M-x shell RET xev RET

When typing the backspace key in xev window, you should get something
like the following in the shell buffer:

KeyPress event, serial 27, synthetic NO, window 0x2400001,
    root 0x15e, subw 0x0, time 395774908, (1101,528), root:(1101,528),
    state 0x0, keycode 51 (keysym 0x5c, backslash), same_screen YES,
    XLookupString gives 1 bytes: (5c) "\"
    XmbLookupString gives 1 bytes: (5c) "\"
    XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x2400001,
    root 0x15e, subw 0x0, time 395774972, (1101,528), root:(1101,528),
    state 0x0, keycode 51 (keysym 0x5c, backslash), same_screen YES,
    XLookupString gives 1 bytes: (5c) "\"
    XFilterEvent returns: False

(You may type C-c C-c in the shell buffer to kill xev).


On my keyboard, the keycode of the backslash key is 51 (decimal).   
It is translated to the keysym backslash (#x5c = ascii code for '\'),
which would be what my emacs would receive.

You can check the whole keycode->keysym translation map with:

    M-x shell RET xmodmap -pke RET


To reset the mapping of a key code you can use:

    M-x shell RET xmodmap -e 'keycode  51 = backslash bar'

assuming your backspace key has the keycode 51.


Notice that keycodes depend on the keyboard hardware.

You could keep around various custom xmodmap files, one per keyboard
model you use, and load them with:

    M-x shell RET xmodmap ~/rc/xmodmap-daskeyboard-3 RET

or whatever.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/


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

* Re: emacs displaying backslash incorrectly
  2010-09-07 12:46 emacs displaying backslash incorrectly lraae
  2010-09-07 13:42 ` Tim X
  2010-09-07 13:50 ` Pascal J. Bourguignon
@ 2010-09-08  2:24 ` Jason Rumney
  2 siblings, 0 replies; 5+ messages in thread
From: Jason Rumney @ 2010-09-08  2:24 UTC (permalink / raw)
  To: help-gnu-emacs

On Sep 7, 8:46 pm, lraae <lcr...@gmail.com> wrote:
> Hi, I have a weird problem which I can't seem to find anything about
> on the web: When I type a backslash, emacs displays it as a capital W
> with a double strikethrough.

You have a Korean keyboard?


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

* Re: emacs displaying backslash incorrectly
       [not found]   ` <fopo86l6f9l4i9ieor4iigp95a8i3lun2k@4ax.com>
@ 2010-09-13  7:20     ` lraae
  0 siblings, 0 replies; 5+ messages in thread
From: lraae @ 2010-09-13  7:20 UTC (permalink / raw)
  To: help-gnu-emacs

On Sep 12, 7:40 am, David Solimano <da...@solimano.org> wrote:
> On Tue, 07 Sep 2010 23:42:51 +1000, Tim X <t...@nospam.dev.null>
> wrote:
>
>
>
> >lraae <lcr...@gmail.com> writes:
>
> >> Hi, I have a weird problem which I can't seem to find anything about
> >> on the web: When I type a backslash, emacs displays it as a capital W
> >> with a double strikethrough.
>
> >> This is Emacs 23.1.1 on Linux Fedora 12 (2.6.32.19-163.fc12.i686.PAE).
>
> >> I tried "emacs -q" to run without startup file, but the problem
> >> remains. This is a school administered computer, so I don't have root
> >> access.
>
> >> Hope someone might have an idea how to proceed in solving this.
>
> >weird.
>
> >This is only a wild stab in the dark, but maybe it is a font issue? If
> >you enter a backslash and save it to a file and view it with something
> >outside of emacs, does it show up as a backslash or some other key?
>
> >Maybe try specifying a different font?
>
> >Tim
>
> Due some historical considerations with Japanese and Korean text
> encoding, it does seem that some fonts place Won or Yen signs where
> the backslash would usually be, eg:
>
> http://blogs.msdn.com/b/michkap/archive/2004/12/14/284838.aspxhttp://blogs.msdn.com/b/michkap/archive/2005/10/12/479561.aspx
>
> So it's not terribly surprising that a font would exhibit this
> behavior.
>
> David

Thank you all for your help and insights!

I should of course have mentioned that this seems to be purely a
display artifact in emacs, as the backslash works correctly outside of
emacs and also if saved to file from emacs. Also I don't have a
Korean, but a Norwegian, keyboard :)

The problem actually appears to be a font issue:
* emacs was set to use a font called Baekmuk Gulim
* changing the font to Monospace does not solve the problem
* changing the font to Sans (which makes emacs use DejaVu Sans) solves
the problem

And I'm happy, though not entirely sure what to conclude from this.

Lars


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

end of thread, other threads:[~2010-09-13  7:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-07 12:46 emacs displaying backslash incorrectly lraae
2010-09-07 13:42 ` Tim X
     [not found]   ` <fopo86l6f9l4i9ieor4iigp95a8i3lun2k@4ax.com>
2010-09-13  7:20     ` lraae
2010-09-07 13:50 ` Pascal J. Bourguignon
2010-09-08  2:24 ` Jason Rumney

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.