emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] org-archive-add-header-to-new-files


From: Christopher Schmidt
Subject: [O] org-archive-add-header-to-new-files
Date: Mon, 28 Jan 2013 12:51:49 +0000 (GMT)

Hi Org,

here is a patch to master that allows one to inhibit the addition of the
header line to newly created archive files.

    2013-01-28  Christopher Schmidt  <address@hidden>

            * org-archive.el (org-archive-add-header-to-new-files): New
            option.
            (org-archive-subtree): Honour
            org-archive-add-header-to-new-files.

--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -71,6 +71,12 @@ This variable is obsolete and has no effect anymore, instead 
add or remove
   :group 'org-archive
   :type 'boolean)
 
+(defcustom org-archive-add-header-to-new-files t
+  "Non-nil means to add a header line (\"Archived entries from
+file FILE-NAME\") to newly created archive files."
+  :group 'org-archive
+  :type 'boolean)
+
 (defcustom org-archive-subtree-add-inherited-tags 'infile
   "Non-nil means append inherited tags when archiving a subtree."
   :group 'org-archive
@@ -278,7 +284,8 @@ this heading."
              (let ((org-insert-mode-line-in-empty-file t)
                    (org-inhibit-startup t))
                (call-interactively 'org-mode)))
-         (when newfile-p
+         (when (and newfile-p
+                    org-archive-add-header-to-new-files)
            (goto-char (point-max))
            (insert (format "\nArchived entries from file %s\n\n"
                            (buffer-file-name this-buffer))))
        Christopher

reply via email to

[Prev in Thread] Current Thread [Next in Thread]