unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jeff Norden via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 54095@debbugs.gnu.org
Subject: bug#54095: Feature request: make 'outline-blank-line' defcustom and local-safe.
Date: Mon, 21 Feb 2022 14:12:40 -0600	[thread overview]
Message-ID: <6147d939dc4455308a1392c99c8398b2@jnorden.com> (raw)

[-- 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"

             reply	other threads:[~2022-02-21 20:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 20:12 Jeff Norden via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-02-22 13:51 ` bug#54095: Feature request: make 'outline-blank-line' defcustom and local-safe Lars Ingebrigtsen
2022-02-22 17:05   ` Juri Linkov
2022-02-23 12:16     ` Lars Ingebrigtsen

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=6147d939dc4455308a1392c99c8398b2@jnorden.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=54095@debbugs.gnu.org \
    --cc=jeff@jnorden.com \
    /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).