* bug#54095: Feature request: make 'outline-blank-line' defcustom and local-safe.
@ 2022-02-21 20:12 Jeff Norden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-22 13:51 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Norden via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-02-21 20:12 UTC (permalink / raw)
To: 54095
[-- Attachment #1: Type: text/plain, Size: 1491 bytes --]
I've been playing with outline-mode for the first time in a while. I've
got a
simple suggestion: it seems like the `outline-blank-line' variable ought
to be
customizable and file-local safe. It causes a single blank line to
separate
hidden heading lines when there is at least one blank line in the
un-hidden
text.
If you leave blank lines before some headings and not others, it
provides an
additional visual way of grouping them, without the need to create
another
heading level. This is handy if the distinction is temporary, as in:
"I'm done
with these sections, but still working on those."
A trivial patch is below (and also attached). Version 22.1 is a guess on
my
part, someone with better git skills than me could probably check it.
Thanks!
-Jeff
============================================================
--- outline.el.orig 2022-02-21 12:08:50.124838087 -0600
+++ outline.el 2022-02-21 13:05:59.087075549 -0600
@@ -294,8 +294,11 @@
(defvar outline-mode-hook nil
"This hook is run when outline mode starts.")
-(defvar outline-blank-line nil
- "Non-nil means to leave unhidden blank line before heading.")
+(defcustom outline-blank-line nil
+ "Non-nil means to leave an unhidden blank line before headings."
+ :type 'boolean
+ :version "22.1")
+;;;###autoload(put 'outline-blank-line 'safe-local-variable 'booleanp)
;;;###autoload
(define-derived-mode outline-mode text-mode "Outline"
============================================================
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: outline_el.diff --]
[-- Type: text/x-diff; name=outline_el.diff, Size: 593 bytes --]
--- outline.el.orig 2022-02-21 12:08:50.124838087 -0600
+++ outline.el 2022-02-21 13:05:59.087075549 -0600
@@ -294,8 +294,11 @@
(defvar outline-mode-hook nil
"This hook is run when outline mode starts.")
-(defvar outline-blank-line nil
- "Non-nil means to leave unhidden blank line before heading.")
+(defcustom outline-blank-line nil
+ "Non-nil means to leave an unhidden blank line before headings."
+ :type 'boolean
+ :version "22.1")
+;;;###autoload(put 'outline-blank-line 'safe-local-variable 'booleanp)
;;;###autoload
(define-derived-mode outline-mode text-mode "Outline"
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#54095: Feature request: make 'outline-blank-line' defcustom and local-safe.
2022-02-21 20:12 bug#54095: Feature request: make 'outline-blank-line' defcustom and local-safe Jeff Norden via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-02-22 13:51 ` Lars Ingebrigtsen
2022-02-22 17:05 ` Juri Linkov
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-22 13:51 UTC (permalink / raw)
To: Jeff Norden; +Cc: 54095
Jeff Norden <jeff@jnorden.com> writes:
> A trivial patch is below (and also attached). Version 22.1 is a guess
> on my part, someone with better git skills than me could probably
> check it.
Thanks; pushed to Emacs 29.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#54095: Feature request: make 'outline-blank-line' defcustom and local-safe.
2022-02-22 13:51 ` Lars Ingebrigtsen
@ 2022-02-22 17:05 ` Juri Linkov
2022-02-23 12:16 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2022-02-22 17:05 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 54095, Jeff Norden
>> A trivial patch is below (and also attached). Version 22.1 is a guess
>> on my part, someone with better git skills than me could probably
>> check it.
>
> Thanks; pushed to Emacs 29.
Maybe the same way as outline-blank-line defines whether to show ^J
between outline headings, the same variable or another similar variable
could define whether to also include ^L as a separator between outlines.
This will fix the problem reported in bug#51016.
Then 'outline-blank-line' could be e.g. a regexp like [^J^L]+.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#54095: Feature request: make 'outline-blank-line' defcustom and local-safe.
2022-02-22 17:05 ` Juri Linkov
@ 2022-02-23 12:16 ` Lars Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-23 12:16 UTC (permalink / raw)
To: Juri Linkov; +Cc: 54095, Jeff Norden
Juri Linkov <juri@linkov.net> writes:
> Maybe the same way as outline-blank-line defines whether to show ^J
> between outline headings, the same variable or another similar variable
> could define whether to also include ^L as a separator between outlines.
> This will fix the problem reported in bug#51016.
>
> Then 'outline-blank-line' could be e.g. a regexp like [^J^L]+.
Hm... I think a separate variable would be better for that -- having a
boolean here is nice for easy on/off in .dir-locals.el.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-23 12:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-21 20:12 bug#54095: Feature request: make 'outline-blank-line' defcustom and local-safe Jeff Norden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-22 13:51 ` Lars Ingebrigtsen
2022-02-22 17:05 ` Juri Linkov
2022-02-23 12:16 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.