all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Comment conventions, adding an explicit Header.
Date: Thu, 30 Oct 2014 13:33:07 +0100	[thread overview]
Message-ID: <87sii5n3ek.fsf@gmail.com> (raw)
In-Reply-To: 87d299eu1d.fsf@newcastle.ac.uk

phillip.lord@newcastle.ac.uk (Phillip Lord) writes:

Hallo, 

> Currently, emacs uses comments of the form ";;; Commentary;" to
> effectively indicate section headers in the buffer.

I once did a pretty exhaustive analysis of the 'pathologies' of current
emacs lisp conventions for file structuring:

,----
| https://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00112.html
`----

and while maintainers did acknowledge the weaknesses I described, the
probability of introducing 'modern conventions' seems to tend towards
zero.

But for myself (always using outshine and navi-mode) I developed a
default file structure and a new way to store library meta-data, see
e.g. navi-mode.el:

,----
| 20 matches for "^;;;;? " in buffer: navi-mode.el
|       1:;;; navi-mode.el --- major-mode for easy buffer-navigation
|       7:;;;; MetaData
|      23:;;;; Commentary
|     270:;;;; ChangeLog
|     278:;;; Requires
|     283:;;; Mode Definitions
|     314:;;; Variables
|     315:;;;; Consts
|     316:;;;; Vars
|     335:;;;; Hooks
|     340:;;;; Fonts
|     341:;;;; Customs
|     960:;;; Defuns
|     961:;;;; Functions
|    1471:;;;; Commands
|    2156:;;; Menus and Keys
|    2157:;;;; Menus
|    2368:;;;; Keys
|    2516:;;; Run Hooks and Provide
|    2523:;;; navi-mode.el ends here
`----

with several subtrees under these headlines, e.g.

,----
|       1:;;; navi-mode.el --- major-mode for easy buffer-navigation
|       7:;;;; MetaData
|      23:;;;; Commentary
|      25:;;;;; About navi-mode
|      65:;;;;; Usage
|     245:;;;;; Installation
|     264:;;;;; Emacs Version
|     270:;;;; ChangeLog
|     278:;;; Requires [...]
`----

and this MetaData section, easily editable in Org-mode via outorg:

,----
| ;;;; MetaData
| ;;   :PROPERTIES:
| ;;   :copyright: Thorsten Jolitz
| ;;   :copyright-years: 2013+
| ;;   :version:  2.0
| ;;   :licence:  GPL 2 or later (free software)
| ;;   :licence-url: http://www.gnu.org/licenses/
| ;;   :part-of-emacs: no
| ;;   :author: Thorsten Jolitz
| ;;   :author_email: tjolitz AT gmail DOT com
| ;;   :git-repo: https://github.com/tj64/navi.git
| ;;   :git-clone: git://github.com/tj64/navi.git
| ;;   :inspiration:  occur-mode org-mode 
| ;;   :keywords: emacs navigation remote-buffer-control
| ;;   :END:
`----

[Note that I had to use oldschool instead of outshine headers and to
include the pathological last line ";;; navi-mode.el ends here", which
is not a headline at all, to please MELPA]

-- 
cheers,
Thorsten




  parent reply	other threads:[~2014-10-30 12:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 10:22 Comment conventions, adding an explicit Header Phillip Lord
2014-10-30 11:59 ` Eric S. Raymond
2014-10-30 12:24   ` Phillip Lord
2014-10-30 12:33 ` Thorsten Jolitz [this message]
2014-10-30 13:43 ` Stefan Monnier
2014-10-30 13:58   ` Phillip Lord
2014-10-30 15:36     ` Stefan Monnier
2014-10-30 16:38       ` Phillip Lord
2014-10-30 17:13         ` Stefan Monnier
2014-10-31 10:02           ` Phillip Lord
2014-10-31 14:07             ` Stefan Monnier
2014-10-31 16:10               ` Phillip Lord
2014-11-01  1:01     ` Stephen J. Turnbull
2014-11-03 10:04       ` Phillip Lord
2014-11-03 11:00         ` Stephen J. Turnbull
2014-11-03 15:22           ` Phillip Lord
2014-10-31 11:50 ` Gregor Zattler
2014-10-31 16:42   ` Phillip Lord

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=87sii5n3ek.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=emacs-devel@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.