summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brand <michael.ch.brand@gmail.com>2014-02-08 18:09:42 +0100
committerMichael Brand <michael.ch.brand@gmail.com>2014-02-08 18:09:42 +0100
commit7fd1838e78a5b7b8b4d04e61396dd15a75cda133 (patch)
treef0a232bde5be18fa28c34d170953be7c30a94f07
parent9d85d96748b8084896d516759740e6d01fd8f8f2 (diff)
downloadorg-mode-7fd1838e78a5b7b8b4d04e61396dd15a75cda133.tar.gz
org-feed.el: Add config variant for current buffer
* lisp/org-feed.el (org-feed-alist): When FILE is nil the target becomes the current buffer each time the feed update is invoked.
-rw-r--r--lisp/org-feed.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/org-feed.el b/lisp/org-feed.el
index c8a9258..7df762a 100644
--- a/lisp/org-feed.el
+++ b/lisp/org-feed.el
@@ -116,7 +116,9 @@ to create inbox items in Org. Each entry is a list with the following items:
name a custom name for this feed
URL the Feed URL
-file the target Org file where entries should be listed
+file the target Org file where entries should be listed, when
+ nil the target becomes the current buffer each time the
+ feed update is invoked
headline the headline under which entries should be listed
Additional arguments can be given using keyword-value pairs. Many of these
@@ -296,7 +298,7 @@ it can be a list structured like an entry in `org-feed-alist'."
(catch 'exit
(let ((name (car feed))
(url (nth 1 feed))
- (file (nth 2 feed))
+ (file (or (nth 2 feed) (buffer-file-name (current-buffer))))
(headline (nth 3 feed))
(filter (nth 1 (memq :filter feed)))
(formatter (nth 1 (memq :formatter feed)))