contrib/lisp/ox-rss.el (org-rss-headline): Fix permalink concatenation
* ox-rss.el (org-rss-headline): Fix permalink concatenation. (org-rss-headline, org-rss-build-channel-info): Use the property :input-file from the info channel instead of `buffer-file-name'. Thanks to Nicolas for suggesting the latter fix.
This commit is contained in:
parent
c31ad79326
commit
1ea4c31eea
|
@ -235,6 +235,7 @@ communication channel."
|
||||||
(hl-number (org-export-get-headline-number headline info))
|
(hl-number (org-export-get-headline-number headline info))
|
||||||
(hl-home (file-name-as-directory (plist-get info :html-link-home)))
|
(hl-home (file-name-as-directory (plist-get info :html-link-home)))
|
||||||
(hl-pdir (plist-get info :publishing-directory))
|
(hl-pdir (plist-get info :publishing-directory))
|
||||||
|
(hl-perm (org-element-property :RSS_PERMALINK headline))
|
||||||
(anchor
|
(anchor
|
||||||
(org-export-solidify-link-text
|
(org-export-solidify-link-text
|
||||||
(or (org-element-property :CUSTOM_ID headline)
|
(or (org-element-property :CUSTOM_ID headline)
|
||||||
|
@ -250,14 +251,12 @@ communication channel."
|
||||||
(error "Missing PUBDATE property"))))))
|
(error "Missing PUBDATE property"))))))
|
||||||
(title (org-element-property :raw-value headline))
|
(title (org-element-property :raw-value headline))
|
||||||
(publink
|
(publink
|
||||||
(or (concat
|
(or (and hl-perm (concat (or hl-home hl-pdir) hl-perm))
|
||||||
(or hl-home hl-pdir)
|
|
||||||
(org-element-property :RSS_PERMALINK headline))
|
|
||||||
(concat
|
(concat
|
||||||
(or hl-home hl-pdir)
|
(or hl-home hl-pdir)
|
||||||
(file-name-nondirectory
|
(file-name-nondirectory
|
||||||
(file-name-sans-extension
|
(file-name-sans-extension
|
||||||
(buffer-file-name))) "." htmlext "#" anchor)))
|
(plist-get info :input-file))) "." htmlext "#" anchor)))
|
||||||
(guid (if org-rss-use-entry-url-as-guid
|
(guid (if org-rss-use-entry-url-as-guid
|
||||||
publink
|
publink
|
||||||
(org-rss-plain-text
|
(org-rss-plain-text
|
||||||
|
@ -326,10 +325,11 @@ as a communication channel."
|
||||||
(blogurl (or (plist-get info :html-link-home)
|
(blogurl (or (plist-get info :html-link-home)
|
||||||
(plist-get info :publishing-directory)))
|
(plist-get info :publishing-directory)))
|
||||||
(image (url-encode-url (plist-get info :rss-image-url)))
|
(image (url-encode-url (plist-get info :rss-image-url)))
|
||||||
|
(ifile (plist-get info :input-file))
|
||||||
(publink
|
(publink
|
||||||
(concat (file-name-as-directory blogurl)
|
(concat (file-name-as-directory blogurl)
|
||||||
(file-name-nondirectory
|
(file-name-nondirectory
|
||||||
(file-name-sans-extension (buffer-file-name)))
|
(file-name-sans-extension ifile))
|
||||||
"." rssext)))
|
"." rssext)))
|
||||||
(format
|
(format
|
||||||
"\n<title>%s</title>
|
"\n<title>%s</title>
|
||||||
|
|
Loading…
Reference in New Issue