From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Edward Welbourne Newsgroups: gmane.emacs.bugs Subject: Suggestion: indicate-empty-line tweak Date: Tue, 09 Jul 2002 10:53:07 +0200 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: Reply-To: eddy@opera.no NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1026204806 14088 127.0.0.1 (9 Jul 2002 08:53:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 9 Jul 2002 08:53:26 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17RqkP-0003f7-00 for ; Tue, 09 Jul 2002 10:53:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17Rql6-0001D9-00; Tue, 09 Jul 2002 04:54:08 -0400 Original-Received: from pat.opera.com ([193.69.113.22] helo=whorl.intern.opera.no) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17Rqk9-00010g-00 for ; Tue, 09 Jul 2002 04:53:09 -0400 Original-Received: from eddy by whorl.intern.opera.no with local (Exim 3.35 #1 (Debian)) id 17Rqk7-0001Qb-00 for ; Tue, 09 Jul 2002 10:53:07 +0200 Original-To: bug-gnu-emacs@gnu.org Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:2544 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:2544 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 C-x k C-x C-f M-p s y i e l i n M-} M-} M-} C-n C-n M-f C-h v C-n C-n C-x k C-x o C-n C-n C-n M-f M-f M-f M-f C-h v M-x e m a c s - b u r e p o r t - e m 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.