* use-hard-newlines
@ 2015-08-28 6:36 Andreas Röhler
2015-08-28 9:28 ` use-hard-newlines Artur Malabarba
2015-08-29 20:23 ` use-hard-newlines Philipp Stephani
0 siblings, 2 replies; 6+ messages in thread
From: Andreas Röhler @ 2015-08-28 6:36 UTC (permalink / raw)
To: emacs-devel
Hi all,
is the concept of use-hard-newlines still considered useful?
Just looking how to simplify fill-paragraph.
AFAICS it introduces complexity which doesn't contribute, not reallly.
Cheers,
Andreas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: use-hard-newlines
2015-08-28 6:36 use-hard-newlines Andreas Röhler
@ 2015-08-28 9:28 ` Artur Malabarba
2015-08-28 21:18 ` use-hard-newlines Richard Stallman
2015-08-29 20:23 ` use-hard-newlines Philipp Stephani
1 sibling, 1 reply; 6+ messages in thread
From: Artur Malabarba @ 2015-08-28 9:28 UTC (permalink / raw)
To: Andreas Röhler; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 86 bytes --]
Longlines.el uses it, but it's been obsolete since 24.5 so I wouldn't worry
about it.
[-- Attachment #2: Type: text/html, Size: 112 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: use-hard-newlines
2015-08-28 9:28 ` use-hard-newlines Artur Malabarba
@ 2015-08-28 21:18 ` Richard Stallman
0 siblings, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2015-08-28 21:18 UTC (permalink / raw)
To: bruce.connor.am; +Cc: andreas.roehler, emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> Longlines.el uses it, but it's been obsolete since 24.5 so I wouldn't worry
> about it.
We should not delete a feature so soon after labeling it as obsolete.
Most Emacs users are not using Emacs 24.5 now. They have not had a
chance to see that longlines.el is deprecated. We should keep it
working for a few years at least.
--
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: use-hard-newlines
2015-08-28 6:36 use-hard-newlines Andreas Röhler
2015-08-28 9:28 ` use-hard-newlines Artur Malabarba
@ 2015-08-29 20:23 ` Philipp Stephani
1 sibling, 0 replies; 6+ messages in thread
From: Philipp Stephani @ 2015-08-29 20:23 UTC (permalink / raw)
To: Andreas Röhler, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1113 bytes --]
Andreas Röhler <andreas.roehler@online.de> schrieb am Fr., 28. Aug. 2015 um
08:47 Uhr:
> Hi all,
>
> is the concept of use-hard-newlines still considered useful?
>
> Just looking how to simplify fill-paragraph.
>
> AFAICS it introduces complexity which doesn't contribute, not reallly.
>
I think the concept of hard newlines is useful, just like the concept of
non-breaking spaces. Especially in code comments I often want a line break
that is unaffected by fill-paragraph without requiring an empty line.
However the current implementation is not optimal because hard newlines
rely on a text property instead of a distinct character, so IIUC hard
newlines will be lost when saving (except for enriched mode, which seems
mostly unused these days). Instead I'd suggest that Emacs observe the LINE
SEPARATOR (U+2028) and PARAGRAPH SEPARATOR (U+2029) characters: currently
they are displayed as horizontal whitespace instead of line breaks, and
fill-paragraph treats both like no-break spaces. Instead, fill-paragraph
should treat U+2028 like a soft newline and U+2029 like a hard newline.
[-- Attachment #2: Type: text/html, Size: 1398 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* use-hard-newlines
@ 2004-09-03 1:22 Luc Teirlinck
2004-09-04 3:29 ` use-hard-newlines Richard Stallman
0 siblings, 1 reply; 6+ messages in thread
From: Luc Teirlinck @ 2004-09-03 1:22 UTC (permalink / raw)
When visiting a file that Emacs earlier saved in text/enriched format,
Enriched mode is turned on, but hard newlines do not work. The
reason is that visiting the file sets the major mode _after_
enriched-mode is called and has set the non-permanent local variable
`use-hard-newlines' to t. That is futile, because
`kill-all-local-variables' kills it.
Since the variable `enriched-mode' is a permanent local, would it not
be consistent to make the closely related `use-hard-newlines'
permanent local too? The trivial patch below does that. This solves
the problem described above. I could install the patch if there are
no objections.
===File ~/paragraphs-diff===================================
*** paragraphs.el 13 Jun 2004 17:08:05 -0500 1.72
--- paragraphs.el 02 Sep 2004 19:37:08 -0500
***************
*** 34,39 ****
--- 34,40 ----
"Paragraph and sentence parsing."
:group 'editing)
+ (put 'use-hard-newlines 'permanent-local t)
(define-minor-mode use-hard-newlines
"Minor mode to distinguish hard and soft newlines.
When active, the functions `newline' and `open-line' add the
============================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-08-29 20:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-28 6:36 use-hard-newlines Andreas Röhler
2015-08-28 9:28 ` use-hard-newlines Artur Malabarba
2015-08-28 21:18 ` use-hard-newlines Richard Stallman
2015-08-29 20:23 ` use-hard-newlines Philipp Stephani
-- strict thread matches above, loose matches on Subject: below --
2004-09-03 1:22 use-hard-newlines Luc Teirlinck
2004-09-04 3:29 ` use-hard-newlines Richard Stallman
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).