* linux/gcc, apostrophs display problem
@ 2009-02-23 13:45 towi
2009-02-28 8:53 ` Vagn Johansen
0 siblings, 1 reply; 4+ messages in thread
From: towi @ 2009-02-23 13:45 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
when gcc prints warnings or errors it puts identifiers in two strange
single-quotes.
When I do "M-x compile" with "gcc textm.c" the apostrophs are printed
fine.
But, when I have a more complex project with automake and libtool and
everything, when I compile "M-x compile" and "make" the apostrophs get
converted somehow so that emacs displays them as octal codes.
For example:
../../../../trunk/src/mediator/Utils/PortingDBMap.cpp:18: warning:
\342\200\230utils::PortingDBMap::entries\342\200\231 should be
initialized in the member initialization list
I realize that the above codes are UTF-8 apostrophs, and when I copy-
pasted them here they even appeared as apostrophs. Therefor, I gather,
the output is still ok in some sense.
But why is it displayed fine this way and quoted the other way? Do I
have to switch the encoding on the "*compilation*" buffer? And how
would I do that? Or can I pass the output through a filter, just
replacing the nasty UTF-8 chars with a simple '-tick? Can I configure
emacs to do this?
Thanks in advance.
tschau, towi.
PS: I am quite versed in Linux and programming in general, but not as
secure in emacs-lisp -- more a copy-and-paste guy in that area... ;-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux/gcc, apostrophs display problem
2009-02-23 13:45 linux/gcc, apostrophs display problem towi
@ 2009-02-28 8:53 ` Vagn Johansen
2009-03-04 15:20 ` towi
0 siblings, 1 reply; 4+ messages in thread
From: Vagn Johansen @ 2009-02-28 8:53 UTC (permalink / raw)
To: help-gnu-emacs
towi <towitowi@gmail.com> writes:
> Hi,
>
> when gcc prints warnings or errors it puts identifiers in two strange
> single-quotes.
>
> When I do "M-x compile" with "gcc textm.c" the apostrophs are printed
> fine.
>
> But, when I have a more complex project with automake and libtool and
> everything, when I compile "M-x compile" and "make" the apostrophs get
> converted somehow so that emacs displays them as octal codes.
> For example:
>
> ../../../../trunk/src/mediator/Utils/PortingDBMap.cpp:18: warning:
> \342\200\230utils::PortingDBMap::entries\342\200\231 should be
> initialized in the member initialization list
>
> I realize that the above codes are UTF-8 apostrophs, and when I copy-
> pasted them here they even appeared as apostrophs. Therefor, I gather,
> the output is still ok in some sense.
>
> But why is it displayed fine this way and quoted the other way?
fine? you mean differently?
It is probably because of different settings of an environment
variable.
I am able to get different quotes by modifying the LANG variable.
Read more about it here
http://www.mcs.vuw.ac.nz/cgi-bin/info2www?(gcc)Environment+Variables
>> Do I
> have to switch the encoding on the "*compilation*" buffer? And how
> would I do that? Or can I pass the output through a filter, just
> replacing the nasty UTF-8 chars with a simple '-tick? Can I configure
> emacs to do this?
I use the code below to replace the UTF-8 chars with ` and '
(unless standard-display-table ; Default value is nil!
(setq standard-display-table (make-display-table)))
(aset standard-display-table #x53978 [96])
(aset standard-display-table #x53979 [39])
--
Vagn Johansen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux/gcc, apostrophs display problem
2009-02-28 8:53 ` Vagn Johansen
@ 2009-03-04 15:20 ` towi
2009-03-04 15:37 ` towi
0 siblings, 1 reply; 4+ messages in thread
From: towi @ 2009-03-04 15:20 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
"""
(unless standard-display-table ; Default value is nil!
(setq standard-display-table (make-display-table)))
(aset standard-display-table #x53978 [96])
(aset standard-display-table #x53979 [39])
"""
into .emacs and.... it works! Hey, great! Unbeliable. Do I understand
this...?
Sort of...
#x53978
is the emacs-internal represenation of that apostroph? What _is_
emacs' internal representation of characters? Can I use this also to
replace all tabs with '*' or all spaces with '_'? lets try...
"""
(aset standard-display-table ?U [?X] )
"""
Cool, making an "X" from a "U" :-). Ok, understuud. Thanks, that was
exacltly what I wanted to know.
I do not recognize the "?..." and "[?...]" form of the arguments here,
they came from the documentation of "standard-display-table". Can I
trouble you to give me an additional hint here?
thanks,
tschau, towi.
On Feb 28, 9:53 am, Vagn Johansen <gonz...@hotmail.com> wrote:
> towi <towit...@gmail.com> writes:
> > Hi,
>
> > when gcc prints warnings or errors it puts identifiers in two strange
> > single-quotes.
>
> > When I do "M-x compile" with "gcc textm.c" theapostrophsare printed
> > fine.
>
> > But, when I have a more complex project with automake and libtool and
> > everything, when I compile "M-x compile" and "make" theapostrophsget
> > converted somehow so that emacs displays them as octalcodes.
> > For example:
>
> > ../../../../trunk/src/mediator/Utils/PortingDBMap.cpp:18: warning:
> > \342\200\230utils::PortingDBMap::entries\342\200\231 should be
> > initialized in the member initialization list
>
> > I realize that theabovecodesareUTF-8apostrophs, and when I copy-
> > pasted them here they even appeared asapostrophs. Therefor, I gather,
> > the output is still ok in some sense.
>
> > But why is it displayed fine this way and quoted the other way?
>
> fine? you mean differently?
>
> It is probably because of different settings of an environment
> variable.
>
> I am able to get different quotes by modifying the LANG variable.
>
> Read more about it here
>
> http://www.mcs.vuw.ac.nz/cgi-bin/info2www?(gcc)Environment+Variables
>
> >> Do I
> > have to switch the encoding on the "*compilation*" buffer? And how
> > would I do that? Or can I pass the output through a filter, just
> > replacing the nastyUTF-8chars with a simple '-tick? Can I configure
> > emacs to do this?
>
> I use the code below to replace theUTF-8chars with ` and '
>
> (unless standard-display-table ; Default value is nil!
> (setq standard-display-table (make-display-table)))
>
> (aset standard-display-table #x53978 [96])
> (aset standard-display-table #x53979 [39])
>
> --
> Vagn Johansen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux/gcc, apostrophs display problem
2009-03-04 15:20 ` towi
@ 2009-03-04 15:37 ` towi
0 siblings, 0 replies; 4+ messages in thread
From: towi @ 2009-03-04 15:37 UTC (permalink / raw)
To: help-gnu-emacs
Hello^2,
> """
> (unless standard-display-table ; Default value is nil!
> (setq standard-display-table (make-display-table)))
> (aset standard-display-table #x53978 [96])
> (aset standard-display-table #x53979 [39])
> """
> into .emacs and.... it works! Hey, great! Unbeliable. Do I understand
ups, I was wrong. I forgot that I got this only in with automake
Makefile "make" emacs-compiles, not when I directly call "gcc" in the
emacs-compile.
But: a) you display-table-tip is also ver useful
and b) your other tip works. now really.
M-x compile
LC_ALL=ascii make all
now does _not_ display this nasty UTF-8 apostrophs.
and if I want them back, I can get them with
M-x compile
LANG=en_GB.UTF-8 make all
superb.
thanks again.
tt.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-04 15:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-23 13:45 linux/gcc, apostrophs display problem towi
2009-02-28 8:53 ` Vagn Johansen
2009-03-04 15:20 ` towi
2009-03-04 15:37 ` towi
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.