From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jeff Norden via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#54095: Feature request: make 'outline-blank-line' defcustom and local-safe. Date: Mon, 21 Feb 2022 14:12:40 -0600 Message-ID: <6147d939dc4455308a1392c99c8398b2@jnorden.com> Reply-To: Jeff Norden Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_3d7cbf148b0d6d2fd2a546f81175c748" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40579"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Roundcube Webmail/1.4.11 To: 54095@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 21 23:14:28 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMGwt-000AM1-90 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Feb 2022 23:14:27 +0100 Original-Received: from localhost ([::1]:57454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMGwr-0002W4-OD for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Feb 2022 17:14:25 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMGwV-0002Uk-09 for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 17:14:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nMGwU-0005Hn-Mq for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 17:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nMGwU-0003pA-ER for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 17:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jeff Norden Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Feb 2022 22:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54095 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.164548163714680 (code B ref -1); Mon, 21 Feb 2022 22:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Feb 2022 22:13:57 +0000 Original-Received: from localhost ([127.0.0.1]:39349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMGwO-0003og-6k for submit@debbugs.gnu.org; Mon, 21 Feb 2022 17:13:57 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:57692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMF3b-000718-De for submit@debbugs.gnu.org; Mon, 21 Feb 2022 15:13:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMF3a-000365-F7 for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 15:13:15 -0500 Original-Received: from fwd1.porkbun.com ([52.10.174.57]:58234) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMF3Y-000267-29 for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 15:13:13 -0500 Original-Received: by fwd1.porkbun.com (Postfix, from userid 497) id 9D611436EF; Mon, 21 Feb 2022 20:12:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jnorden.com; s=default; t=1645474375; bh=TMGs+h0wcul+diMxouXaG6GbXEvYIWi1NeXSf8zFtHw=; h=Date:From:To:Subject; b=bz59hZcwbP1xOKOg2OWrl6rr5xGgeVVEtMTLXIEBIatXS5SZlKvrljNogAzWVbmUP jtdWpcgO0YVGuBMeNgG7VtP/V3+L3g/KuwUSe1vx8SQ9gb6TEmhwqzTB5v46FDGOSs oBsDIxcqkiMq3kV/NriHRkQ9MILJJhgBY35uvzSA= Original-Received: from webmail.porkbun.com (unknown [35.86.129.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jeff@jnorden.com) by fwd1.porkbun.com (Postfix) with ESMTPSA id C46FC4374F; Mon, 21 Feb 2022 20:12:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jnorden.com; s=default; t=1645474361; bh=TMGs+h0wcul+diMxouXaG6GbXEvYIWi1NeXSf8zFtHw=; h=Date:From:To:Subject; b=j/kPQLexAUVy0ksBMInarobuSOBYrEfloW8ehUKr5osOspw57WtjfK4JUlnRtLKI9 E3k1mwdyqp/TIAFMdNW3Q0Gi/v5nuR2IQALHqQjaT+xDsbsOz+Tf4UezDNRfaYMYql Dp2VpA8a5B9VibCgeKi62FQwpuBNqkvwfuMYGY3U= X-Sender: jeff@jnorden.com Received-SPF: pass client-ip=52.10.174.57; envelope-from=SRS0=PFx3=TE=jnorden.com=jeff@porkbun.com; helo=fwd1.porkbun.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 21 Feb 2022 17:13:55 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:227388 Archived-At: --=_3d7cbf148b0d6d2fd2a546f81175c748 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed 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" ============================================================ --=_3d7cbf148b0d6d2fd2a546f81175c748 Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=outline_el.diff Content-Disposition: attachment; filename=outline_el.diff; size=593 LS0tIG91dGxpbmUuZWwub3JpZwkyMDIyLTAyLTIxIDEyOjA4OjUwLjEyNDgzODA4NyAtMDYwMAor Kysgb3V0bGluZS5lbAkyMDIyLTAyLTIxIDEzOjA1OjU5LjA4NzA3NTU0OSAtMDYwMApAQCAtMjk0 LDggKzI5NCwxMSBAQAogKGRlZnZhciBvdXRsaW5lLW1vZGUtaG9vayBuaWwKICAgIlRoaXMgaG9v ayBpcyBydW4gd2hlbiBvdXRsaW5lIG1vZGUgc3RhcnRzLiIpCiAKLShkZWZ2YXIgb3V0bGluZS1i bGFuay1saW5lIG5pbAotICAiTm9uLW5pbCBtZWFucyB0byBsZWF2ZSB1bmhpZGRlbiBibGFuayBs aW5lIGJlZm9yZSBoZWFkaW5nLiIpCisoZGVmY3VzdG9tIG91dGxpbmUtYmxhbmstbGluZSBuaWwK KyAgIk5vbi1uaWwgbWVhbnMgdG8gbGVhdmUgYW4gdW5oaWRkZW4gYmxhbmsgbGluZSBiZWZvcmUg aGVhZGluZ3MuIgorICA6dHlwZSAnYm9vbGVhbgorICA6dmVyc2lvbiAiMjIuMSIpCis7OzsjIyNh dXRvbG9hZChwdXQgJ291dGxpbmUtYmxhbmstbGluZSAnc2FmZS1sb2NhbC12YXJpYWJsZSAnYm9v bGVhbnApCiAKIDs7OyMjI2F1dG9sb2FkCiAoZGVmaW5lLWRlcml2ZWQtbW9kZSBvdXRsaW5lLW1v ZGUgdGV4dC1tb2RlICJPdXRsaW5lIgo= --=_3d7cbf148b0d6d2fd2a546f81175c748--