all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jonas Bernoulli <jonas@bernoul.li>
To: Eli Zaretskii <eliz@gnu.org>, Drew Adams <drew.adams@oracle.com>
Cc: 42397@debbugs.gnu.org
Subject: bug#42397: [PATCH 00/14] Use outline headings and some cosmetics
Date: Thu, 16 Jul 2020 20:34:51 +0200	[thread overview]
Message-ID: <878sfjpaus.fsf@bernoul.li> (raw)
In-Reply-To: <83blkflboc.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Thu, 16 Jul 2020 08:12:24 -0700 (PDT)
>> From: Drew Adams <drew.adams@oracle.com>
>> 
>> I thought we had a pretty standard header format.

I thought so too... and that I was following them.

Maybe it is just that our respective selective memory
focuses on a different aspect?

>> I've been respecting that for decades in my own
>> libraries.  Now it's changed?
>
> You have a point there.
>
> Jonas, please compare what you propose with the tips we have in the
> "Comment Tips" node of the ELisp manual, and seed if there's any
> discrepancies.  If there are, I think we should discuss first (on
> emacs-devel).

After reading (info "(elisp) Comment Tips") again, I think I remembered
correctly.  Quoting the ;;; entry in full:

> ‘;;;’
>      Comments that start with three semicolons, ‘;;;’, should start at
>      the left margin.  We use them for comments which should be
>      considered a heading by Outline minor mode.  By default, comments
>      starting with at least three semicolons (followed by a single space
>      and a non-whitespace character) are considered headings, comments
>      starting with two or fewer are not.  Historically, triple-semicolon
>      comments have also been used for commenting out lines within a
>      function, but this use is discouraged.
> 
>      When commenting out entire functions, use two semicolons.

This says that three semicolons are for "headings".
There is no mention of "separators".

And the only node to older conventions is about using three semicolons
to comment out parts of functions.

It seems pretty clear to me that the use of three or more semicolons is
now reserved for (outline) headings.  Of course there are also autoload
coolies but those don't have a space after the semicolons.

Do you still think this has to be discussed on emacs-devel?

Normally I don't divide the ";;; Commentary:" section into multiple
sub-sections.  In this particular case I have done so because (a) it
is long (b) splitting into sibling sections, as was done before, seems
wrong to me.

Also note that I don't turn all the sections that contain code and
follow the ";;; Code:" heading into sub-sections of that section.  I
don't think the "Comment Tips" are clear on that matter but it seems
to me that they imply that I should do so.  If so, then I disagree
based on my experience.

Seeing this

,----
| ;;; foo.el --- Foo bar baz
| ;;; Commentary:...
| ;;; Code:...
| ;;; foo.el ends here
`----

is almost entirely useless (because almost the same for all libraries
that do it like this), whereas

,----
| ;;; foo.el --- Foo bar baz
| ;;; Commentary:...
| ;;; Code:...
| ;;; Options...
| ;;; List Mode...
| ;;; List Commands...
| ;;; Integrations
| ;;; foo.el ends here
`----

is very useful in my experience as it instantly gives a quick overview
of how the code is structured etc.

Ps: I have written a few packages to make `outline-minor-mode' a
    bit nicer: mainly `bicycle', but also `outline-minor-faces'
    and `backline'.

    https://github.com/tarsius/bicycle
    https://github.com/tarsius/outline-minor-faces
    https://github.com/tarsius/backline







  reply	other threads:[~2020-07-16 18:34 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 14:47 bug#42397: [PATCH 00/14] Use outline headings and some cosmetics Jonas Bernoulli
2020-07-16 14:54 ` bug#42397: [PATCH 01/14] ; * lisp/epg.el (epg-signature-to-string): Use cl-case Jonas Bernoulli
2020-07-16 14:54   ` bug#42397: [PATCH 02/14] ; * lisp/epg.el (epg-signature-to-string): Tiny refactor Jonas Bernoulli
2020-07-16 14:54     ` bug#42397: [PATCH 03/14] ; * lisp/epg.el (epg-no-data-reason-alist): Fix typo in message Jonas Bernoulli
2020-07-16 14:54       ` bug#42397: [PATCH 04/14] * lisp/epa.el (epa--derived-mode-p): Remove unnecessary alias Jonas Bernoulli
2020-07-16 14:54         ` bug#42397: [PATCH 05/14] Split EasyPG libraries into outline sections Jonas Bernoulli
2020-07-16 14:54           ` bug#42397: [PATCH 06/14] * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Fix indentation Jonas Bernoulli
2020-07-16 14:54             ` bug#42397: [PATCH 07/14] * lisp/progmodes/compile.el: Remove unnecessary comments Jonas Bernoulli
2020-07-16 14:54               ` bug#42397: [PATCH 08/14] ; * lisp/whitespace.el: Capitalize "Code" section heading Jonas Bernoulli
2020-07-16 14:54                 ` bug#42397: [PATCH 09/14] * lisp/mail/smtpmail.el: Use outline headings Jonas Bernoulli
2020-07-16 14:54                   ` bug#42397: [PATCH 10/14] * test/src/emacs-module-tests.el: Use proper " Jonas Bernoulli
2020-07-16 14:54                     ` bug#42397: [PATCH 11/14] * lisp/obsolete/longlines.el: " Jonas Bernoulli
2020-07-16 14:54                       ` bug#42397: [PATCH 12/14] * lisp/net/imap.el: " Jonas Bernoulli
2020-07-16 14:54                         ` bug#42397: [PATCH 13/14] * lisp/font-lock.el: Split the Commentary into subsections Jonas Bernoulli
2020-07-16 14:54                           ` bug#42397: [PATCH 14/14] * lisp/font-lock.el: No longer mark each end of a section explicitly Jonas Bernoulli
2020-07-16 15:24                             ` Eli Zaretskii
2020-07-16 15:27             ` bug#42397: [PATCH 06/14] * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Fix indentation Eli Zaretskii
2020-07-16 16:56               ` Jonas Bernoulli
2020-07-16 17:17                 ` Robert Pluim
2020-07-16 17:54                   ` Jonas Bernoulli
2020-07-16 18:23                     ` Noam Postavsky
2020-07-16 18:40                       ` Jonas Bernoulli
2020-07-16 19:25                 ` Eli Zaretskii
2020-07-16 21:52                   ` Jonas Bernoulli
2020-07-17  3:40                     ` Eli Zaretskii
2020-07-17 18:19                       ` Jonas Bernoulli
2020-07-17 10:49             ` Basil L. Contovounesios
2020-07-17 18:23               ` Jonas Bernoulli
2020-07-16 15:21       ` bug#42397: [PATCH 03/14] ; * lisp/epg.el (epg-no-data-reason-alist): Fix typo in message Eli Zaretskii
2020-07-16 16:57         ` Jonas Bernoulli
2020-07-16 17:24     ` bug#42397: [PATCH 02/14] ; * lisp/epg.el (epg-signature-to-string): Tiny refactor Robert Pluim
2020-07-16 18:03       ` Jonas Bernoulli
2020-07-16 17:22   ` bug#42397: [PATCH 01/14] ; * lisp/epg.el (epg-signature-to-string): Use cl-case Robert Pluim
2020-07-16 17:57     ` Jonas Bernoulli
2020-07-16 15:09 ` bug#42397: This message is a test Jonas Bernoulli
2020-07-16 15:12 ` bug#42397: [PATCH 00/14] Use outline headings and some cosmetics Drew Adams
2020-07-16 15:30   ` Eli Zaretskii
2020-07-16 18:34     ` Jonas Bernoulli [this message]
2020-07-17  6:29       ` Eli Zaretskii
2020-08-10 21:14 ` bug#42397: [PATCH v2 00/16] " Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 01/16] ; * lisp/epg.el (epg-signature-to-string): Use cl-case Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 02/16] ; * lisp/epg.el (epg-signature-to-string): Tiny refactor Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 03/16] ; * lisp/epg.el (epg-no-data-reason-alist): Fix typo in message Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 04/16] * lisp/epa.el (epa--derived-mode-p): Remove unnecessary alias Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 05/16] Split EasyPG libraries into outline sections Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 06/16] Merge two conditions and fix indentation Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 07/16] * lisp/progmodes/compile.el: Remove unnecessary comments Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 08/16] ; * lisp/whitespace.el: Capitalize "Code" section heading Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 09/16] * lisp/mail/smtpmail.el: Use outline headings Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 10/16] * test/src/emacs-module-tests.el: Use proper " Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 11/16] * lisp/obsolete/longlines.el: " Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 12/16] * lisp/net/imap.el: " Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 13/16] * lisp/font-lock.el: Split the Commentary into subsections Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 14/16] * lisp/font-lock.el: No longer use headings as end of section markers Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 15/16] ; * lisp/emacs-lisp/autoload.el: Begin summary line with three semicolons Jonas Bernoulli
2020-08-10 21:14   ` bug#42397: [PATCH v2 16/16] Update section heading conventions for libraries Jonas Bernoulli
2020-08-12 16:54     ` Eli Zaretskii
2020-08-16 18:43 ` bug#42397: [PATCH 00/14] Use outline headings and some cosmetics Jonas Bernoulli
2020-08-16 19:29   ` Stefan Kangas

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878sfjpaus.fsf@bernoul.li \
    --to=jonas@bernoul.li \
    --cc=42397@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    /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 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.