unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: Miles Bader <miles@gnu.org>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: fringe symbol for newline
Date: Thu, 10 Jul 2008 14:40:58 -0400	[thread overview]
Message-ID: <581AAD1F-E2A1-4280-9970-EFEC44D29D08@gmail.com> (raw)
In-Reply-To: <buofxqi5tfj.fsf@dhapc248.dev.necel.com>

[-- Attachment #1: Type: text/plain, Size: 1646 bytes --]

On 9 Jul 2008, at 23:06, Miles Bader wrote:

> David Reitter <david.reitter@gmail.com> writes:
>> Now that we have improved wrapping to support DTWW, it would be  
>> nice if
>> the fringe could mark visual lines that end with a newline.
>
> Note that you can rather easily cause a special symbol (e.g. ¶, ↲,  
> or
> what-have-you) to be displayed before newlines, using the display- 
> table.
>
> That seems to be what most other apps do anyway (rather than putting
> something "in the fringe")?

Right, and they also don't have fringes (at least not used for similar  
purposes).

That said, below is some code that does this for me (put together from  
code by Drew Adams and whitespace.el).
It's not simple enough for your average user to do this, and since  
it's a standard function in other editors, I would like to see this as  
a simple-to-enable standard function in 23, possibly even with an  
entry in the Options menu.  (I couldn't make whitespace (in 22) do the  
same.)

Also, I'd still prefer this to be in the fringe. It's a lot less  
intrusive.  You need this sort of information only occasionally.


(defface blank-newline
   '((((class color) (background dark))
      (:foreground "lightgrey" :bold t))
     (((class color) (background light))
      ( :foreground "lightgrey" :bold t))
     (t (:bold t :underline t)))
   "Face used to visualize NEWLINE char mapping.

See `blank-display-mappings'."
   :group 'blank)

;; 2230 = \x8B6
(setq buffer-display-table (make-display-table))
(aset buffer-display-table 10 (vector  32 (make-glyph-code  2230
						 'blank-newline) 10)) 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2193 bytes --]

  parent reply	other threads:[~2008-07-10 18:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-09 14:28 fringe symbol for newline David Reitter
2008-07-10  3:06 ` Miles Bader
2008-07-10 11:20   ` Vinicius Jose Latorre
2008-07-10 18:40   ` David Reitter [this message]
2008-07-10 20:04     ` Juri Linkov
2008-07-10 22:37     ` Vinicius Jose Latorre
2008-07-10 23:03       ` Juri Linkov
2008-07-10 23:58         ` Vinicius Jose Latorre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=581AAD1F-E2A1-4280-9970-EFEC44D29D08@gmail.com \
    --to=david.reitter@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).