* Extended ascii characters in emacs lisp
@ 2012-04-20 21:37 Richard H Lee
2012-04-20 23:06 ` Gregory Benjamin
2012-04-20 23:25 ` PJ Weisberg
0 siblings, 2 replies; 5+ messages in thread
From: Richard H Lee @ 2012-04-20 21:37 UTC (permalink / raw)
To: help-gnu-emacs
Hi (again),
I'm using fill-column-indicator.el to set a column margin at column 80
in emacs. Currently it uses the pipe "|" symbol as the margin character.
I would like to change it one of the extended ascii characters, e.g. the
solid block / long vertical pipe. I can set it to standard ascii
characters using:
(setq fci-rule-character ?\101)
e.g. this will set the character to "A". But if I go over 127 into
extended-ascii, I get:
Invalid read syntax: ?
What is the emacs lisp syntax for extended ascii characters?
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Extended ascii characters in emacs lisp
2012-04-20 21:37 Extended ascii characters in emacs lisp Richard H Lee
@ 2012-04-20 23:06 ` Gregory Benjamin
2012-04-20 23:25 ` PJ Weisberg
1 sibling, 0 replies; 5+ messages in thread
From: Gregory Benjamin @ 2012-04-20 23:06 UTC (permalink / raw)
To: help-gnu-emacs
On Fri, Apr 20, 2012 at 10:37:02PM +0100, Richard H Lee wrote:
> Hi (again),
>
> I'm using fill-column-indicator.el to set a column margin at column
> 80 in emacs. Currently it uses the pipe "|" symbol as the margin
> character.
>
> I would like to change it one of the extended ascii characters, e.g.
> the solid block / long vertical pipe. I can set it to standard ascii
> characters using:
>
> (setq fci-rule-character ?\101)
>
> e.g. this will set the character to "A". But if I go over 127 into
> extended-ascii, I get:
>
> Invalid read syntax: ?
>
> What is the emacs lisp syntax for extended ascii characters?
Instead of extended ascii, I just tried unicode, for example:
(ucs-insert "2503")┃
See Unicode standard 6.1 Box Drawing for other choices.
Best,
Greg
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Extended ascii characters in emacs lisp
2012-04-20 21:37 Extended ascii characters in emacs lisp Richard H Lee
2012-04-20 23:06 ` Gregory Benjamin
@ 2012-04-20 23:25 ` PJ Weisberg
2012-04-21 11:49 ` Richard H Lee
[not found] ` <mailman.372.1335008989.751.help-gnu-emacs@gnu.org>
1 sibling, 2 replies; 5+ messages in thread
From: PJ Weisberg @ 2012-04-20 23:25 UTC (permalink / raw)
To: Richard H Lee; +Cc: help-gnu-emacs
On Fri, Apr 20, 2012 at 2:37 PM, Richard H Lee
<ricardohenrylee@gmail.com> wrote:
> Hi (again),
>
> I'm using fill-column-indicator.el to set a column margin at column 80 in
> emacs. Currently it uses the pipe "|" symbol as the margin character.
>
> I would like to change it one of the extended ascii characters, e.g. the
> solid block / long vertical pipe. I can set it to standard ascii characters
> using:
>
> (setq fci-rule-character ?\101)
>
> e.g. this will set the character to "A". But if I go over 127 into
> extended-ascii, I get:
>
> Invalid read syntax: ?
Actually, it can go up to 511 (a.k.a. "?\777").
See:
http://www.gnu.org/software/emacs/manual/html_node/elisp/General-Escape-Syntax.html
> What is the emacs lisp syntax for extended ascii characters?
Standard way according to the above link is to use the unicode code
point, i.e. "?\u2503". You might want to just use a character
literal, "?┃", if you don't mind having a ┃ in your source file.
-PJ
Gehm's Corollary to Clark's Law: Any technology distinguishable from
magic is insufficiently advanced.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Extended ascii characters in emacs lisp
2012-04-20 23:25 ` PJ Weisberg
@ 2012-04-21 11:49 ` Richard H Lee
[not found] ` <mailman.372.1335008989.751.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 5+ messages in thread
From: Richard H Lee @ 2012-04-21 11:49 UTC (permalink / raw)
To: help-gnu-emacs
On 21/04/12 00:25, PJ Weisberg wrote:
> Standard way according to the above link is to use the unicode code
> point, i.e. "?\u2503".
I used this solution.
What I did not originally realise was that extended ascii is not really
that well supported in Linux (my os), as it is more of a DOS / Windows
standard.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Extended ascii characters in emacs lisp
[not found] ` <mailman.372.1335008989.751.help-gnu-emacs@gnu.org>
@ 2012-04-24 13:31 ` Jason Rumney
0 siblings, 0 replies; 5+ messages in thread
From: Jason Rumney @ 2012-04-24 13:31 UTC (permalink / raw)
To: gnu.emacs.help; +Cc: help-gnu-emacs
On Saturday, 21 April 2012 19:49:40 UTC+8, Richard H Lee wrote:
> What I did not originally realise was that extended ascii is not really
> that well supported in Linux (my os), as it is more of a DOS / Windows
> standard.
I guess you mean the graphics drawing characters of codepage-437, which is very definitely a DOS relic. Even Windows support for it these days is not widespread outside of the command console.
Unicode has these characters and more. See etc/charsets/IBM437.map in the Emacs source distribution (or installed under /usr/share/emacs or similar path), or http://en.wikipedia.org/wiki/Code_page_437 for mappings.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-04-24 13:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-20 21:37 Extended ascii characters in emacs lisp Richard H Lee
2012-04-20 23:06 ` Gregory Benjamin
2012-04-20 23:25 ` PJ Weisberg
2012-04-21 11:49 ` Richard H Lee
[not found] ` <mailman.372.1335008989.751.help-gnu-emacs@gnu.org>
2012-04-24 13:31 ` 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).