[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] Fix id generation in ox-rss.el
From: |
Matt Lundin |
Subject: |
[O] [PATCH] Fix id generation in ox-rss.el |
Date: |
Wed, 23 Jul 2014 14:23:53 -0500 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (gnu/linux) |
The attached patch fixes a bug in ox-rss.el that causes org-publish to
generate IDs in whatever org buffer emacs happens to be currently
visiting. I was puzzled why my org files were suddenly filled with
hundreds of ID entries. I discovered it happened when I called org
publish while visiting those files.
Thanks,
Matt
>From b482d2ebd53a60a91355433f49350b450869451e Mon Sep 17 00:00:00 2001
From: Matt Lundin <address@hidden>
Date: Wed, 23 Jul 2014 14:18:06 -0500
Subject: [PATCH] Fix ID generation in org-rss-publish-to-rss
* contrib/lisp/ox-rss.el: (org-rss-publish-to-rss) Fix a bug that
causes ID properties to be generated in org buffer emacs is
currently visiting rather than the file containing the feed. This
bug can cause hundreds of ID entries to be added to an org file
unrelated to the publishing project.
---
contrib/lisp/ox-rss.el | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el
index c69a37b..5cae288 100644
--- a/contrib/lisp/ox-rss.el
+++ b/contrib/lisp/ox-rss.el
@@ -204,11 +204,10 @@ publishing directory.
Return output file name."
(let ((bf (get-file-buffer filename)))
(if bf
- (progn
- (org-icalendar-create-uid filename 'warn-user)
(with-current-buffer bf
+ (org-icalendar-create-uid filename 'warn-user)
(org-rss-add-pubdate-property)
- (write-file filename)))
+ (write-file filename))
(find-file filename)
(org-icalendar-create-uid filename 'warn-user)
(org-rss-add-pubdate-property)
--
2.0.2
- [O] [PATCH] Fix id generation in ox-rss.el,
Matt Lundin <=