* fringe symbol for newline @ 2008-07-09 14:28 David Reitter 2008-07-10 3:06 ` Miles Bader 0 siblings, 1 reply; 8+ messages in thread From: David Reitter @ 2008-07-09 14:28 UTC (permalink / raw) To: Emacs-Devel devel [-- Attachment #1: Type: text/plain, Size: 457 bytes --] 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. Currently, we can only mark continuations, but given that continuations are rather common, and lines with a newline at the end more rare (marking the end of paragraphs), I would much prefer to mark the exceptional lines. This would provide analogous functionality to longlines-show-hard- newlines in longlines-mode. [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 2193 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: fringe symbol for newline 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 0 siblings, 2 replies; 8+ messages in thread From: Miles Bader @ 2008-07-10 3:06 UTC (permalink / raw) To: David Reitter; +Cc: Emacs-Devel devel 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")? -Miles -- Defenceless, adj. Unable to attack. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: fringe symbol for newline 2008-07-10 3:06 ` Miles Bader @ 2008-07-10 11:20 ` Vinicius Jose Latorre 2008-07-10 18:40 ` David Reitter 1 sibling, 0 replies; 8+ messages in thread From: Vinicius Jose Latorre @ 2008-07-10 11:20 UTC (permalink / raw) To: Miles Bader; +Cc: David Reitter, Emacs-Devel devel 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")? > Yes, please, see the whitespace.el package. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: fringe symbol for newline 2008-07-10 3:06 ` Miles Bader 2008-07-10 11:20 ` Vinicius Jose Latorre @ 2008-07-10 18:40 ` David Reitter 2008-07-10 20:04 ` Juri Linkov 2008-07-10 22:37 ` Vinicius Jose Latorre 1 sibling, 2 replies; 8+ messages in thread From: David Reitter @ 2008-07-10 18:40 UTC (permalink / raw) To: Miles Bader; +Cc: Emacs-Devel devel [-- 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 --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: fringe symbol for newline 2008-07-10 18:40 ` David Reitter @ 2008-07-10 20:04 ` Juri Linkov 2008-07-10 22:37 ` Vinicius Jose Latorre 1 sibling, 0 replies; 8+ messages in thread From: Juri Linkov @ 2008-07-10 20:04 UTC (permalink / raw) To: David Reitter; +Cc: Emacs-Devel devel, Miles Bader > 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. Yes, it is less intrusive in the fringe. Everyone who wants to display more intrusive ¶ before newlines can activate whitespace-mode. > (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 It is 182 = ?\xB6 in Emacs 23. > (setq buffer-display-table (make-display-table)) > (aset buffer-display-table 10 (vector 32 (make-glyph-code 2230 > 'blank-newline) 10)) -- Juri Linkov http://www.jurta.org/emacs/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: fringe symbol for newline 2008-07-10 18:40 ` David Reitter 2008-07-10 20:04 ` Juri Linkov @ 2008-07-10 22:37 ` Vinicius Jose Latorre 2008-07-10 23:03 ` Juri Linkov 1 sibling, 1 reply; 8+ messages in thread From: Vinicius Jose Latorre @ 2008-07-10 22:37 UTC (permalink / raw) To: David Reitter; +Cc: Emacs-Devel devel, Miles Bader David Reitter wrote: > 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). Hmmmm, ok, how do the symbols look in the fringe? That is, I was thinking something like: | LF RF | COMMENT | | This is a short line. | a short line (short symbol) | | an empty line (no symbol) | + This is a very very ver < | starts a very long line (begin symbol) | > y long line that finish < | middle of a very long line (middle symbol) | - s here. | ends a very long line (end symbol) Where, RF means Right Fringe and LF means Left Fringe. But it seems that David's suggestion is: | LF RF | COMMENT | This is a short line. | a short line | | | an empty line (paragraph symbol) | This is a very very ver < | starts a very long line | > y long line that finish < | middle of a very long line | s here. | ends a very long line > 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.) Well, to use whitespace package in Emacs 21 and/or 22, please, download it from the EmacsWiki: http://www.emacswiki.org/cgi-bin/emacs/download/whitespace.el This version is prepared to run in Emacs 21, 22 and 23. > 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. Well, indeed it's less intrusive. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: fringe symbol for newline 2008-07-10 22:37 ` Vinicius Jose Latorre @ 2008-07-10 23:03 ` Juri Linkov 2008-07-10 23:58 ` Vinicius Jose Latorre 0 siblings, 1 reply; 8+ messages in thread From: Juri Linkov @ 2008-07-10 23:03 UTC (permalink / raw) To: Vinicius Jose Latorre; +Cc: David Reitter, emacs-devel, Miles Bader > Hmmmm, ok, how do the symbols look in the fringe? > > That is, I was thinking something like: > > | LF RF | COMMENT > | | This is a short line. | a short line (short symbol) > | | an empty line (no symbol) > | + This is a very very ver < | starts a very long line (begin symbol) > | > y long line that finish < | middle of a very long line (middle symbol) > | - s here. | ends a very long line (end symbol) > > Where, RF means Right Fringe and LF means Left Fringe. > > But it seems that David's suggestion is: > > | LF RF | COMMENT > | This is a short line. | a short line > | | | an empty line (paragraph symbol) > | This is a very very ver < | starts a very long line > | > y long line that finish < | middle of a very long line > | s here. | ends a very long line I thought that a suggested variant was rather like: > | LF RF | COMMENT > | This is a short line. ¶ | ends a short line (paragraph symbol) > | | an empty line > | This is a very very ver | starts a very long line > | y long line that finish | middle of a very long line > | s here. ¶ | ends a very long line (paragraph symbol) i.e. just like `(aset buffer-display-table 10 (vector 32 2230 10))', but with the paragraph symbol in the fringe instead of the buffer. -- Juri Linkov http://www.jurta.org/emacs/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: fringe symbol for newline 2008-07-10 23:03 ` Juri Linkov @ 2008-07-10 23:58 ` Vinicius Jose Latorre 0 siblings, 0 replies; 8+ messages in thread From: Vinicius Jose Latorre @ 2008-07-10 23:58 UTC (permalink / raw) To: Juri Linkov; +Cc: David Reitter, emacs-devel, Miles Bader Juri Linkov wrote: >> Hmmmm, ok, how do the symbols look in the fringe? >> >> That is, I was thinking something like: >> >> | LF RF | COMMENT >> | | This is a short line. | a short line (short symbol) >> | | an empty line (no symbol) >> | + This is a very very ver < | starts a very long line (begin symbol) >> | > y long line that finish < | middle of a very long line (middle symbol) >> | - s here. | ends a very long line (end symbol) >> >> Where, RF means Right Fringe and LF means Left Fringe. >> >> But it seems that David's suggestion is: >> >> | LF RF | COMMENT >> | This is a short line. | a short line >> | | | an empty line (paragraph symbol) >> | This is a very very ver < | starts a very long line >> | > y long line that finish < | middle of a very long line >> | s here. | ends a very long line >> > > I thought that a suggested variant was rather like: > > >> | LF RF | COMMENT >> | This is a short line. ¶ | ends a short line (paragraph symbol) >> | | an empty line >> | This is a very very ver | starts a very long line >> | y long line that finish | middle of a very long line >> | s here. ¶ | ends a very long line (paragraph symbol) >> > > i.e. just like `(aset buffer-display-table 10 (vector 32 2230 10))', > but with the paragraph symbol in the fringe instead of the buffer. > Indeed, hmmmm, so the suggestion should be (marking all line which ends with newline): | LF RF | COMMENT | This is a short line. ¶ | ends a short line (paragraph symbol) | ¶ | an empty line (paragraph symbol) | This is a very very ver | starts a very long line | y long line that finish | middle of a very long line | s here. ¶ | ends a very long line (paragraph symbol) ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-07-10 23:58 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
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).