all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Comment conventions, adding an explicit Header.
@ 2014-10-30 10:22 Phillip Lord
  2014-10-30 11:59 ` Eric S. Raymond
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Phillip Lord @ 2014-10-30 10:22 UTC (permalink / raw)
  To: emacs-devel



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

However, the header of the file has no section indicator -- so, the
copyright, the ";; Author:" metadata and so on.

I was wondering how many things (if any) would break, if this were
changed. So:

;;; blah.el --- Dull file

;; This file is not part of Emacs

;; Author: Phillip Lord <phillip.lord@newcastle.ac.uk>

Would become:


;;; blah.el --- Dull file

;;; Header:

;; This file is not part of Emacs

;; Author: Phillip Lord <phillip.lord@newcastle.ac.uk>


Putting the header on the third or second line is deliberate; various
parts of emacs use the first line semantics, including  -*-
lexical-binding: t -*-.


Why do I ask?

I have written a mode which transforms an Emacs-Lisp file into an
org-mode file. So you can view (and edit) your comments in org-mode,
while maintaining a normal elisp file (i.e. it doesn't require tangling
as an org-mode babel file would). In this process ";;; Commentary:"
lines get transformed into Org mode section one headers. This works
nicely, but the lack of a ";;; Header:" line, means that the metadata
and copyright is outside of the org-mode structure. Adding a ";;;
Header:" is a simple way of circumventing this.

Phil



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-11-03 15:22 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.