bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Suggestion: indicate-empty-line tweak


From: Edward Welbourne
Subject: Suggestion: indicate-empty-line tweak
Date: Tue, 09 Jul 2002 10:53:07 +0200

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the address@hidden mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.2.1 (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2002-03-22 on raven, modified by Debian
configured using `configure  i386-debian-linux-gnu --prefix=/usr 
--sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib 
--infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --with-x=yes 
--with-x-toolkit=athena --without-gif'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I'm using the nice new feature indicate-empty-line and it is good.  It
lets me know when there's blank lines cluttering the end of the file,
e.g. caused by someone running past end-of-file by over-use of
down-arrow when M-> was intended and next-line-add-newlines was true.

However, it'd be just that tincy wincy bit better if it let me know
when the buffer doesn't end in a newline - an irritating glitch which
makes some programs behave ... surprisingly.

To illustrate, grab yourself a handy buffer, M-x set-variable
indicate-empty-line t, type a line with no newline at the end of the
buffer.  Now add that newline.  Notice that the buffer's appearance
doesn't change, aside from the position of the cursor.  Move the
cursor back to the end of the last line; type C-d and see no visible
change.  To determine whether a file ends in newline, I still have to
go to the end of the file - it isn't immediately visible.

[A solution I considered was to have the marker show on any line not
immediately preceded by a newline: but that would mislead in the case
of an all-hspace final line with no trailing newline.]

Please could the first marker be red (well, OK, the same colour as
`syntactic-error-highlight-face', or some such) or similarly different
when it *isn't* preceded by a newline ?  Or green when it *is* ...

Just any which way, can this mode include (possibly by setting
indicate-empty-line to something other than nil or t, e.g. the name of
the colour to use) the means to spot missing trailing newlines ?

Recent input:
C-r C-r C-r C-r C-r C-r C-a C-k C-n C-n C-n C-n C-n 
C-n C-y C-/ C-/ C-x o C-x o C-x C-f C-a C-k ~ / . e 
m <tab> <return> C-x k <return> C-x C-f M-p <M-backspace> 
s y <tab> i <backspace> e l <tab> i n <tab> <return> 
M-} M-} M-} C-n C-n M-f C-h v <return> C-n C-n C-x 
k <return> C-x o C-n C-n C-n M-f M-f M-f M-f C-h v 
<return> M-x e m a c s - b u <tab> <M-backspace> <M-backspace> 
r e p o r t - e m <tab> <return>

Recent messages:
1 new message read
No following nondeleted message
Expunging deleted messages...done
Saving file /home/eddy/mail/pending/primary...
Wrote /home/eddy/mail/pending/primary
Mark saved where search started
Mark set
Undo! [2 times]
Type C-x 4 b RET to restore the other window.  C-M-v to scroll the help.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]