emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Maus <dmaus@ictsoc.de>
To: emacs-orgmode@gnu.org
Subject: [PATCH 1/2] Load XML library if necessary.
Date: Wed,  7 Jul 2010 08:22:23 +0200	[thread overview]
Message-ID: <1278483744-8255-1-git-send-email-dmaus@ictsoc.de> (raw)
In-Reply-To: <AANLkTinBmSIrgzNfRORw0ylwngk2kf86DD2uL7CElPy9@mail.gmail.com>

* org-feed.el (org-feed-unescape, org-feed-parse-atom-feed): Load XML
library if necessary.

Function that use xml.el must require 'xml to make sure it is loaded
at runtime.
---
 lisp/org-feed.el |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lisp/org-feed.el b/lisp/org-feed.el
index 999bfd8..e41ad97 100644
--- a/lisp/org-feed.el
+++ b/lisp/org-feed.el
@@ -270,6 +270,7 @@ have been saved."
 
 (defun org-feed-unescape (s)
   "Unescape protected entities in S."
+  (require 'xml)
   (let ((re (concat "&\\("
 		    (mapconcat 'car xml-entity-alist "\\|")
 		    "\\);")))
@@ -630,6 +631,7 @@ containing the properties `:guid' and `:item-full-text'.
 
 The `:item-full-text' property actually contains the sexp
 formatted as a string, not the original XML data."
+  (require 'xml)
   (with-current-buffer buffer
     (widen)
     (let ((feed (car (xml-parse-region (point-min) (point-max)))))
-- 
1.7.1

  reply	other threads:[~2010-07-07  6:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-07  2:53 [Org-mode] feed.el Mark Scala
2010-07-07  6:22 ` David Maus [this message]
2010-07-07  6:50   ` [PATCH 1/2] Load XML library if necessary Carsten Dominik
2010-07-07  6:22 ` [PATCH 2/2] Change indentation to match coding style guideline David Maus
2010-07-07  6:47   ` Patchwork: Patch 122 Accepted Carsten Dominik
2010-07-07  6:25 ` [Org-mode] feed.el David Maus

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1278483744-8255-1-git-send-email-dmaus@ictsoc.de \
    --to=dmaus@ictsoc.de \
    --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 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).