* end of line symbol
@ 2005-12-03 6:35 Emabela
2005-12-03 9:15 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Emabela @ 2005-12-03 6:35 UTC (permalink / raw)
Hello everybody,
I am new to emacs and find it great.
Excuse me if the following question
is too trivial, but I tried to find example .emacs files
and search through the documentation,
without any success so far.
I would like to see where the end of line
characters are. That is, at the end of lines
a pilcrow sign (\P in TeX) would be nice.
How can it be done?
Thanks for any help.
Regards,
B.
--------------------------Hirdetés-----------------------------
KARÁCSONYI NYEREMÉNYJÁTÉK A FŐNYEREMÉNNYEL!
Nyerj értékes ajándékokat mindössze egy regisztrációval.
Klikk ide:http://www.fonyeremeny.hu
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: end of line symbol
2005-12-03 6:35 end of line symbol Emabela
@ 2005-12-03 9:15 ` Eli Zaretskii
2005-12-03 15:17 ` Drew Adams
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2005-12-03 9:15 UTC (permalink / raw)
> From: "Emabela" <emabela@vipmail.hu>
> Date: Sat, 3 Dec 2005 07:35:03 +0100
>
> I would like to see where the end of line
> characters are. That is, at the end of lines
> a pilcrow sign (\P in TeX) would be nice.
>
> How can it be done?
I don't think there is such a feature, because Emacs solves this the
other way around: it can show you the trailing whitespace, so that you
know where the last non-whitespace character of a line is NOT the end
of the line. The feature that shows trailing whitespace is optional;
you can turn it on by setting the variable show-trailing-whitespace to
non-nil value in the buffers you want to see that.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: end of line symbol
2005-12-03 9:15 ` Eli Zaretskii
@ 2005-12-03 15:17 ` Drew Adams
0 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2005-12-03 15:17 UTC (permalink / raw)
> I would like to see where the end of line
> characters are. That is, at the end of lines
> a pilcrow sign (\P in TeX) would be nice.
>
> How can it be done?
I don't think there is such a feature, because Emacs solves this the
other way around: it can show you the trailing whitespace, so that you
know where the last non-whitespace character of a line is NOT the end
of the line. The feature that shows trailing whitespace is optional;
you can turn it on by setting the variable show-trailing-whitespace to
non-nil value in the buffers you want to see that.
Let us know about your use case - why do you want to see the newline
character?
Perhaps you are used to word-processing applications where text is not
divided into lines but into paragraphs, and the pilcrow tells you where the
paragraph ends. In such apps, you often must make sure to select the pilcrow
along with the paragraph text, in order to be sure to have selected the
paragraph entity (structure).
In Emacs, text is usually divided by newline characters - it doesn't need to
be, but it often is. That is, it is divided into lines - the newline
characters (Control-J) separate the lines. The same principle is in effect:
you can select the text in a line with or without the newline character at
its end. Commands like `kill-line' (bound to `C-k') normally include the
newline in the selection, but there are sometimes user options for
controlling this.
If you want to _see_ the newline characters, just look at them: whenever you
see a visible line break, there is a (single) newline character. (In some
modes, such as longlines, some of those newline characters might be
temporary, for display and editing purposes, and be removed upon saving to a
file.) If you drag your mouse across a line, that selects the line text. If
you continue to drag the mouse down slightly and toward the beginning of the
next line, you'll select the newline also - and you will see that the region
highlighting extends from the end of the line text to the edge of the
window.
If you want to search for a newline character, use `C-s C-q C-j'. If you
want to highlight trailing whitespace _besides_ the newline character, do as
Eli suggested above.
In sum, a visible line break shows you a newline character. You can select
it or not, when you select line text.
There is, as far as I know, no out-of-the-box way to show newlines with a
special symbol (as opposed to showing them as line breaks), but that could
easily be written. It hasn't been done, probably, because it's not that
useful in Emacs - Emacs is different from paragraph-oriented word
processors, as mentioned above.
HTH.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: end of line symbol
[not found] <mailman.17741.1133591721.20277.help-gnu-emacs@gnu.org>
@ 2005-12-03 15:53 ` Johan Bockgård
2005-12-03 20:48 ` Johan Bockgård
0 siblings, 1 reply; 6+ messages in thread
From: Johan Bockgård @ 2005-12-03 15:53 UTC (permalink / raw)
"Emabela" <emabela@vipmail.hu> writes:
> I would like to see where the end of line characters are. That is,
> at the end of lines a pilcrow sign (\P in TeX) would be nice.
(unless standard-display-table
(setq standard-display-table (make-display-table)))
(aset standard-display-table ?\n [?\x8b6 ?\n])
--
Johan Bockgård
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: end of line symbol
@ 2005-12-03 20:27 Emabela
0 siblings, 0 replies; 6+ messages in thread
From: Emabela @ 2005-12-03 20:27 UTC (permalink / raw)
>(unless standard-display-table
> (setq standard-display-table (make-display-table)))
> (aset standard-display-table ?\n [?\x8b6 ?\n])
Thanks very much!
It works! It's great! :-)
Why I need it: I used other editors,
and I was angry when I typed in some texts
in one editor and the text was displayed totally
different way in another one. It is not quite nice,
even in LaTeX. That's why I would like to see the end of line
characters.
Once again, thank you for your help.
Regards, B.
--------------------------Hirdetés-----------------------------
KARÁCSONYI NYEREMÉNYJÁTÉK A FŐNYEREMÉNNYEL!
Nyerj értékes ajándékokat mindössze egy regisztrációval.
Klikk ide:http://www.fonyeremeny.hu
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: end of line symbol
2005-12-03 15:53 ` Johan Bockgård
@ 2005-12-03 20:48 ` Johan Bockgård
0 siblings, 0 replies; 6+ messages in thread
From: Johan Bockgård @ 2005-12-03 20:48 UTC (permalink / raw)
bojohan+news@dd.chalmers.se (Johan Bockgård) writes:
> (unless standard-display-table
> (setq standard-display-table (make-display-table)))
> (aset standard-display-table ?\n [?\x8b6 ?\n])
This will take effect in all buffers. If you find it too annoying (I
certainly would!), you can turn it on locally in a buffer by using
`buffer-display-table' instead (e.g in a mode hook).
--
Johan Bockgård
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-12-03 20:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-03 6:35 end of line symbol Emabela
2005-12-03 9:15 ` Eli Zaretskii
2005-12-03 15:17 ` Drew Adams
[not found] <mailman.17741.1133591721.20277.help-gnu-emacs@gnu.org>
2005-12-03 15:53 ` Johan Bockgård
2005-12-03 20:48 ` Johan Bockgård
-- strict thread matches above, loose matches on Subject: below --
2005-12-03 20:27 Emabela
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).