unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Suggestion: indicate-empty-line tweak
@ 2002-07-09  8:53 Edward Welbourne
  2002-07-09  9:07 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Edward Welbourne @ 2002-07-09  8:53 UTC (permalink / raw)


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 bug-gnu-emacs@gnu.org 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.

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

* Re: Suggestion: indicate-empty-line tweak
  2002-07-09  8:53 Suggestion: indicate-empty-line tweak Edward Welbourne
@ 2002-07-09  9:07 ` Andreas Schwab
  2002-07-09  9:24   ` Edward Welbourne
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2002-07-09  9:07 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Edward Welbourne <eddy@opera.no> writes:

|> 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.

You could set require-final-newline, not exactly the same, but perhaps
close enough.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Suggestion: indicate-empty-line tweak
  2002-07-09  9:07 ` Andreas Schwab
@ 2002-07-09  9:24   ` Edward Welbourne
  0 siblings, 0 replies; 3+ messages in thread
From: Edward Welbourne @ 2002-07-09  9:24 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Thanks for that - duly set to "ask" - but, indeed, not quite what I
want.  I want this to be visible while visiting the file.  Note also
the inevitable

(eval-after-load
    'comint
    '(add-hook comint-mode
	'(lambda () (setq indicate-empty-line "green"))))

or something similar.

	Eddy.

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

end of thread, other threads:[~2002-07-09  9:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-09  8:53 Suggestion: indicate-empty-line tweak Edward Welbourne
2002-07-09  9:07 ` Andreas Schwab
2002-07-09  9:24   ` Edward Welbourne

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).