From: Matt Lundin <mdl@imapmail.org>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [PATCH] Fix id generation in ox-rss.el
Date: Wed, 23 Jul 2014 14:23:53 -0500 [thread overview]
Message-ID: <87a97z7uba.fsf@fastmail.fm> (raw)
[-- Attachment #1: Type: text/plain, Size: 322 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-ID-generation-in-org-rss-publish-to-rss.patch --]
[-- Type: text/x-diff, Size: 1239 bytes --]
From b482d2ebd53a60a91355433f49350b450869451e Mon Sep 17 00:00:00 2001
From: Matt Lundin <mdl@imapmail.org>
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.
---
| 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--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
next reply other threads:[~2014-07-23 19:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 19:23 Matt Lundin [this message]
2014-07-27 12:05 ` [PATCH] Fix id generation in ox-rss.el Bastien
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=87a97z7uba.fsf@fastmail.fm \
--to=mdl@imapmail.org \
--cc=emacs-orgmode@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.