emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Issue with commit 6062f9e in ox-publish
@ 2014-03-25  7:57 steckerhalter
  2014-03-25  9:08 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: steckerhalter @ 2014-03-25  7:57 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]

This change:

@@ -1169,5 +1168,10 @@ the file including them will be republished as well."
- (while (re-search-forward
- "^#\\+INCLUDE:[ \t]+\"\\([^\t\n\r\"]*\\)\"[ \t]*.*$" nil t)
-  (let* ((included-file (expand-file-name (match-string 1))))
-    (add-to-list 'included-files-ctime
- (org-publish-cache-ctime-of-src included-file) t))))
+ (while (re-search-forward "^[ \t]*#\\+INCLUDE:" nil t)
+  (let* ((element (org-element-at-point))
+ (included-file
+  (and (eq (org-element-type element) 'keyword)
+       (org-string-nw-p (org-element-property :value element)))))
+    (when included-file
+      (add-to-list 'included-files-ctime
+   (org-publish-cache-ctime-of-src
+    (expand-file-name included-file))
+   t)))))

causes an error for me:

org-publish-cache-ctime-of-src: No such file:
"/home/user/org-mode-blog/posts/"../elisp/org-mode-blog-setup.el" src
emacs-lisp"

When I revert the commit I do not get an error.

Probably it's just that it does not strip the "src emacs-lisp" part now?

cheers
steckerhalter

[-- Attachment #2: Type: text/html, Size: 2188 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Issue with commit 6062f9e in ox-publish
  2014-03-25  7:57 Issue with commit 6062f9e in ox-publish steckerhalter
@ 2014-03-25  9:08 ` Nicolas Goaziou
  2014-03-25 14:56   ` steckerhalter
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2014-03-25  9:08 UTC (permalink / raw)
  To: steckerhalter; +Cc: emacs-orgmode

Hello,

steckerhalter <org-mode@postmomentum.ch> writes:

> This change:
>
> @@ -1169,5 +1168,10 @@ the file including them will be republished as well."
> - (while (re-search-forward
> - "^#\\+INCLUDE:[ \t]+\"\\([^\t\n\r\"]*\\)\"[ \t]*.*$" nil t)
> -  (let* ((included-file (expand-file-name (match-string 1))))
> -    (add-to-list 'included-files-ctime
> - (org-publish-cache-ctime-of-src included-file) t))))
> + (while (re-search-forward "^[ \t]*#\\+INCLUDE:" nil t)
> +  (let* ((element (org-element-at-point))
> + (included-file
> +  (and (eq (org-element-type element) 'keyword)
> +       (org-string-nw-p (org-element-property :value element)))))
> +    (when included-file
> +      (add-to-list 'included-files-ctime
> +   (org-publish-cache-ctime-of-src
> +    (expand-file-name included-file))
> +   t)))))
>
> causes an error for me:
>
> org-publish-cache-ctime-of-src: No such file:
> "/home/user/org-mode-blog/posts/"../elisp/org-mode-blog-setup.el" src
> emacs-lisp"
>
> When I revert the commit I do not get an error.
>
> Probably it's just that it does not strip the "src emacs-lisp" part
> now?

Good catch. This should be fixed. Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Issue with commit 6062f9e in ox-publish
  2014-03-25  9:08 ` Nicolas Goaziou
@ 2014-03-25 14:56   ` steckerhalter
  2014-03-25 15:09     ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: steckerhalter @ 2014-03-25 14:56 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 921 bytes --]

Hi Nicolas

On Tue, Mar 25, 2014 at 10:08 AM, Nicolas Goaziou <n.goaziou@gmail.com>wrote:


> Good catch. This should be fixed. Thank you for reporting it.
>
>
I still get an error:

Debugger entered--Lisp error: (args-out-of-range #<buffer
org-mode-blog/posts/blogging-with-org-mode.org> 0 33)
  match-string(1)

I think you need to provide the original string to match-string, so either
"let" it or like so:

@@ -1171,7 +1171,7 @@ the file including them will be republished as well."
   (and (eq (org-element-type element) 'keyword)
        (string-match "^\\(\".+?\"\\|\\S-+\\)"
      (org-element-property :value element))
-       (org-remove-double-quotes (match-string 1)))))
+       (org-remove-double-quotes (match-string 1 (org-element-property
:value element))))))
     (when included-file
       (add-to-list 'included-files-ctime
    (org-publish-cache-ctime-of-src

with this change it works for me

cheers

[-- Attachment #2: Type: text/html, Size: 2025 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Issue with commit 6062f9e in ox-publish
  2014-03-25 14:56   ` steckerhalter
@ 2014-03-25 15:09     ` Nicolas Goaziou
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2014-03-25 15:09 UTC (permalink / raw)
  To: steckerhalter; +Cc: emacs-orgmode

steckerhalter <org-mode@postmomentum.ch> writes:

> I still get an error:
>
> Debugger entered--Lisp error: (args-out-of-range #<buffer
> org-mode-blog/posts/blogging-with-org-mode.org> 0 33)
>   match-string(1)
>
> I think you need to provide the original string to match-string, so either
> "let" it or like so:
>
> @@ -1171,7 +1171,7 @@ the file including them will be republished as well."
>    (and (eq (org-element-type element) 'keyword)
>         (string-match "^\\(\".+?\"\\|\\S-+\\)"
>       (org-element-property :value element))
> -       (org-remove-double-quotes (match-string 1)))))
> +       (org-remove-double-quotes (match-string 1 (org-element-property
> :value element))))))
>      (when included-file
>        (add-to-list 'included-files-ctime
>     (org-publish-cache-ctime-of-src
>
> with this change it works for me

Doh. This should be fixed... hopefully. Thank you again.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-25 15:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-25  7:57 Issue with commit 6062f9e in ox-publish steckerhalter
2014-03-25  9:08 ` Nicolas Goaziou
2014-03-25 14:56   ` steckerhalter
2014-03-25 15:09     ` Nicolas Goaziou

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).