From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: [PATCH] Fix id generation in ox-rss.el Date: Wed, 23 Jul 2014 14:23:53 -0500 Message-ID: <87a97z7uba.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XA298-0004PD-AN for emacs-orgmode@gnu.org; Wed, 23 Jul 2014 15:24:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XA28t-0001NH-6F for emacs-orgmode@gnu.org; Wed, 23 Jul 2014 15:24:14 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:44736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XA28s-0001Mt-Ui for emacs-orgmode@gnu.org; Wed, 23 Jul 2014 15:23:59 -0400 Received: from archbook (unknown [50.172.132.15]) by mail.messagingengine.com (Postfix) with ESMTPA id 5A4E9C007AF for ; Wed, 23 Jul 2014 15:23:54 -0400 (EDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-ID-generation-in-org-rss-publish-to-rss.patch >From b482d2ebd53a60a91355433f49350b450869451e Mon Sep 17 00:00:00 2001 From: Matt Lundin 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 --=-=-=--