* org-archive-add-header-to-new-files
@ 2013-01-28 12:51 Christopher Schmidt
2013-01-30 10:51 ` org-archive-add-header-to-new-files Bastien
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Schmidt @ 2013-01-28 12:51 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 380 bytes --]
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 <christopher@ch.ristopher.com>
* org-archive.el (org-archive-add-header-to-new-files): New
option.
(org-archive-subtree): Honour
org-archive-add-header-to-new-files.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff, Size: 927 bytes --]
--- 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))))
[-- Attachment #3: Type: text/plain, Size: 21 bytes --]
Christopher
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-archive-add-header-to-new-files
2013-01-28 12:51 org-archive-add-header-to-new-files Christopher Schmidt
@ 2013-01-30 10:51 ` Bastien
2013-01-30 19:19 ` org-archive-add-header-to-new-files Christopher Schmidt
0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2013-01-30 10:51 UTC (permalink / raw)
To: emacs-orgmode
Hi Christopher,
Christopher Schmidt <christopher@ch.ristopher.com> writes:
> 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 <christopher@ch.ristopher.com>
>
> * org-archive.el (org-archive-add-header-to-new-files): New
> option.
> (org-archive-subtree): Honour
> org-archive-add-header-to-new-files.
Thanks for the ChangeLog, would be even greater to have it directly
within the patch as produced by git format-patch!
In master, I added `org-archive-file-header-format' which see.
Thanks for this idea,
--
Bastien
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-archive-add-header-to-new-files
2013-01-30 10:51 ` org-archive-add-header-to-new-files Bastien
@ 2013-01-30 19:19 ` Christopher Schmidt
0 siblings, 0 replies; 3+ messages in thread
From: Christopher Schmidt @ 2013-01-30 19:19 UTC (permalink / raw)
To: emacs-orgmode
Bastien <bzg@altern.org> writes:
> Thanks for the ChangeLog, would be even greater to have it directly
> within the patch as produced by git format-patch!
>
> In master, I added `org-archive-file-header-format' which see.
>
> Thanks for this idea,
Thank you very much.
Christopher
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-30 19:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-28 12:51 org-archive-add-header-to-new-files Christopher Schmidt
2013-01-30 10:51 ` org-archive-add-header-to-new-files Bastien
2013-01-30 19:19 ` org-archive-add-header-to-new-files Christopher Schmidt
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).