emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-feed-update doesn't understand the file name of a target Org


From: David Maus
Subject: Re: [O] org-feed-update doesn't understand the file name of a target Org-file when it is not a constant
Date: Sat, 18 Jun 2011 23:12:12 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

At Fri, 17 Jun 2011 21:30:51 +0400,
Евгений Курбатов wrote:
> 
> Hello!
> 
> I do some elisp code to download the latest RSS feeds from some resource:
> 
> (setq debug-on-error t)
> (org-mode)
> (org-feed-update
>  '("arxiv"
>    "http://export.arxiv.org/rss/astro-ph";
>    (concat "~/org/arxiv-" (format-time-string "%Y-%m-%d.org"))
>    "arXiv.org"
>    )
>  )
> 
> The goal is to get an unique Org file for feeds per day. However, the error 
> is rising:
> 
> Debugger entered--Lisp error: (wrong-type-argument stringp (concat 
> "~/org/arxiv-" (format-time-string "%Y-%m-%d.org")))
>   expand-file-name((concat "~/org/arxiv-" (format-time-string 
> "%Y-%m-%d.org")))
>   find-file-noselect((concat "~/org/arxiv-" (format-time-string 
> "%Y-%m-%d.org")) nil nil nil)
>   find-file((concat "~/org/arxiv-" (format-time-string "%Y-%m-%d.org")))
>   org-feed-goto-inbox-internal((concat "~/org/arxiv-" (format-time-string 
> "%Y-%m-%d.org")) "arXiv.org")
>   byte-code("\306   \"\307\n\"\310\311
> \"\211\312+\211,\203]
> 
> When I hardcode a string instead of (concat ...) everything is
> ok. The subject is also not in format-time-string, it is exactly in
> concat. The type returned by concat is the stringp, so the situation
> is very strange. I also tried to use org-feed-alist, and local
> variable instead of calling concat, nothing helps.

The quote in front of ("arxiv"

>  '("arxiv"

"quotes" the following list, i.e. Emacs does not evaluate the Lisp
expressions inside the list but processes it as pure data. 

To calculate the file name each time you call `org-feed-update' either
leave out the quotes like:

(org-feed-update (list "arxiv" "http://export.arxiv.org/rss/astro-ph"; (concat … 
)))

-or-

Use backquotes:

http://www.gnu.org/s/emacs/manual/html_node/elisp/Backquote.html

(org-feed-update
 `("arxiv"
   "http://export.arxiv.org/rss/astro-ph";
   ,(concat "~/org/arxiv-" (format-time-string "%Y-%m-%d.org"))
   "arXiv.org"
  )
)

The ` means: The following structure is data except the parts with the
backquote ,.

Best,
  -- David
-- 
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... address@hidden
Email..... address@hidden

Attachment: pgpdwE0IvNH_A.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]