* Bug: org-babel-tangle-publish fails in copy-file step [8.3.1 (release_8.3.1-241-gea7ac0 @ /home/arunisaac/.emacs.d/org-mode/lisp/)]
@ 2015-09-18 14:30 Arun I
2015-09-18 21:14 ` Arun I
2015-10-03 3:27 ` Kyle Meyer
0 siblings, 2 replies; 7+ messages in thread
From: Arun I @ 2015-09-18 14:30 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 3187 bytes --]
When publishing files using org-babel-tangle-publish, if the :tangle
header argument is given to a source block, and if org-babel-tangle-publish
is called from a directory other than the directory in which the source
file (that is, the file being tangled) exists, then org-babel-tangle-publish
fails in the copy-file step.
This happens because org-babel-tangle returns the file name (that is,
the basename only) mentioned in the :tangle header argument, and
org-babel-tangle-publish tries to copy that unqualified basename
instead of the absolute path to the file.
My emacs configuration follows. I used the minimal configuration given in
the Feedback section of the org mode manual. The backtrace for the error is
also attached.
Thanks,
Arun Isaac.
Emacs : GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2)
of 2015-04-20 on bitzer.hoetzel.info
Package: Org-mode version 8.3.1 (release_8.3.1-241-gea7ac0 @ /home/arunisaac/.emacs.d/org-mode/lisp/)
current state:
==============
(setq
org-tab-first-hook '(org-hide-block-toggle-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
org-occur-hook '(org-first-headline-recenter)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-html-format-drawer-function '(lambda (name contents) contents)
org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function
org-confirm-shell-link-function 'yes-or-no-p
org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
org-latex-format-headline-function 'org-latex-format-headline-default-function
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-latex-format-drawer-function '(lambda (name contents) contents)
org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-babel-pre-tangle-hook '(save-buffer)
org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5]
#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
org-archive-hook '(org-attach-archive-delete-maybe)
org-ascii-format-drawer-function '(lambda (name contents width) contents)
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
org-confirm-elisp-link-function 'yes-or-no-p
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-html-format-headline-function 'org-html-format-headline-default-function
org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-publish-project-alist '(("basic" :base-directory "~/.emacs.d/org-tangle-bug/base" :base-extension "org" :publishing-directory
"~/.emacs.d/org-tangle-bug/pub" :publishing-function org-babel-tangle-publish)
)
)
[-- Attachment #1.2: backtrace --]
[-- Type: text/plain, Size: 4093 bytes --]
Debugger entered--Lisp error: (file-error "Opening input file" "no such file or directory" "/home/arunisaac/.emacs.d/org-tangle-bug/source.c")
copy-file("source.c" "/home/arunisaac/.emacs.d/org-tangle-bug/pub/" t)
#[(el) "\302\b \303#\207" [el pub-dir copy-file t] 4]("source.c")
mapc(#[(el) "\302\b \303#\207" [el pub-dir copy-file t] 4] ("source.c"))
org-babel-tangle-publish((:base-directory "~/.emacs.d/org-tangle-bug/base" :base-extension "org" :publishing-directory "~/.emacs.d/org-tangle-bug/pub" :publishing-function org-babel-tangle-publish) "/home/arunisaac/.emacs.d/org-tangle-bug/base/source.org" "/home/arunisaac/.emacs.d/org-tangle-bug/pub/")
org-publish-file("/home/arunisaac/.emacs.d/org-tangle-bug/base/source.org" ("basic" :base-directory "~/.emacs.d/org-tangle-bug/base" :base-extension "org" :publishing-directory "~/.emacs.d/org-tangle-bug/pub" :publishing-function org-babel-tangle-publish) t)
#[(project) "\306\b@!\210\bA\x19\307 \310\"\x1a\307 \311\"^[\307 \312\"\206\x1a\0\313\x1c\307 \314\"\206#\0\315\x1d\307 \316\"\206-\0\x0e\x1f\x1e\x1f\307 \317\"\2068\0\x0e \x1e \307 \320\"\x1e\x17\307 \321\"\x1e\x1d\322\b\n\"\x1e!\323\324\307 \325\"\"\x1e\"\x0e\x17\203^\0\326\327!\210\v\203g\0\r\b\f\"\210\x0e!\330\x1e#\211\x1e$\203\216\0\x0e$@\211\x16#\x0e\"\232\204\205\0\331\x0e#\b\332#\210\x0e$A\211\x16$\204r\0*\307 \333\"\203\245\0\334\b\307 \325\"\"\210\331\x0e\"\b\332#\210\x0e\x1d\203\256\0\326\335!\210\336 .\v\207" [project project-plist exclude-regexp sitemap-p sitemap-filename sitemap-function org-publish-initialize-cache plist-get :exclude :auto-sitemap :sitemap-filename "sitemap.org" :sitemap-function org-publish-org-sitemap :sitemap-date-format :sitemap-file-entry-format :preparation-function :completion-function org-publish-get-base-files expand-file-name "theindex.org" :base-directory run-hooks preparation-function nil org-publish-file t :makeindex org-publish-index-generate-theindex completion-function org-publish-write-cache-file org-publish-sitemap-date-format org-publish-sitemap-file-entry-format files theindex file --dolist-tail--] 6](("basic" :base-directory "~/.emacs.d/org-tangle-bug/base" :base-extension "org" :publishing-directory "~/.emacs.d/org-tangle-bug/pub" :publishing-function org-babel-tangle-publish))
mapc(#[(project) "\306\b@!\210\bA\x19\307 \310\"\x1a\307 \311\"^[\307 \312\"\206\x1a\0\313\x1c\307 \314\"\206#\0\315\x1d\307 \316\"\206-\0\x0e\x1f\x1e\x1f\307 \317\"\2068\0\x0e \x1e \307 \320\"\x1e\x17\307 \321\"\x1e\x1d\322\b\n\"\x1e!\323\324\307 \325\"\"\x1e\"\x0e\x17\203^\0\326\327!\210\v\203g\0\r\b\f\"\210\x0e!\330\x1e#\211\x1e$\203\216\0\x0e$@\211\x16#\x0e\"\232\204\205\0\331\x0e#\b\332#\210\x0e$A\211\x16$\204r\0*\307 \333\"\203\245\0\334\b\307 \325\"\"\210\331\x0e\"\b\332#\210\x0e\x1d\203\256\0\326\335!\210\336 .\v\207" [project project-plist exclude-regexp sitemap-p sitemap-filename sitemap-function org-publish-initialize-cache plist-get :exclude :auto-sitemap :sitemap-filename "sitemap.org" :sitemap-function org-publish-org-sitemap :sitemap-date-format :sitemap-file-entry-format :preparation-function :completion-function org-publish-get-base-files expand-file-name "theindex.org" :base-directory run-hooks preparation-function nil org-publish-file t :makeindex org-publish-index-generate-theindex completion-function org-publish-write-cache-file org-publish-sitemap-date-format org-publish-sitemap-file-entry-format files theindex file --dolist-tail--] 6] (("basic" :base-directory "~/.emacs.d/org-tangle-bug/base" :base-extension "org" :publishing-directory "~/.emacs.d/org-tangle-bug/pub" :publishing-function org-babel-tangle-publish)))
org-publish-projects((("basic" :base-directory "~/.emacs.d/org-tangle-bug/base" :base-extension "org" :publishing-directory "~/.emacs.d/org-tangle-bug/pub" :publishing-function org-babel-tangle-publish)))
org-publish-project(("basic" :base-directory "~/.emacs.d/org-tangle-bug/base" :base-extension "org" :publishing-directory "~/.emacs.d/org-tangle-bug/pub" :publishing-function org-babel-tangle-publish) nil)
call-interactively(org-publish-project record nil)
command-execute(org-publish-project record)
execute-extended-command(nil "org-publish-project")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: org-babel-tangle-publish fails in copy-file step [8.3.1 (release_8.3.1-241-gea7ac0 @ /home/arunisaac/.emacs.d/org-mode/lisp/)]
2015-09-18 14:30 Bug: org-babel-tangle-publish fails in copy-file step [8.3.1 (release_8.3.1-241-gea7ac0 @ /home/arunisaac/.emacs.d/org-mode/lisp/)] Arun I
@ 2015-09-18 21:14 ` Arun I
2015-10-03 3:27 ` Kyle Meyer
1 sibling, 0 replies; 7+ messages in thread
From: Arun I @ 2015-09-18 21:14 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 336 bytes --]
Just in case, I have also attached a tarball with org files and emacs
source code to reproduce the error.
Just extract the tarball, and run
emacs -Q -l minimal-org.el
in the extracted folder. If the load file paths and org file paths are
set correctly as mentioned in minimal-org.el, the org-babel-tangle-publish
bug should show up.
[-- Attachment #1.2: org-tangle-bug.tar.gz --]
[-- Type: application/octet-stream, Size: 597 bytes --]
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: org-babel-tangle-publish fails in copy-file step [8.3.1 (release_8.3.1-241-gea7ac0 @ /home/arunisaac/.emacs.d/org-mode/lisp/)]
2015-09-18 14:30 Bug: org-babel-tangle-publish fails in copy-file step [8.3.1 (release_8.3.1-241-gea7ac0 @ /home/arunisaac/.emacs.d/org-mode/lisp/)] Arun I
2015-09-18 21:14 ` Arun I
@ 2015-10-03 3:27 ` Kyle Meyer
2015-10-03 9:02 ` Arun I
1 sibling, 1 reply; 7+ messages in thread
From: Kyle Meyer @ 2015-10-03 3:27 UTC (permalink / raw)
To: Arun I; +Cc: emacs-orgmode
Arun I <theroarofthedragon@gmail.com> writes:
> When publishing files using org-babel-tangle-publish, if the :tangle
> header argument is given to a source block, and if org-babel-tangle-publish
> is called from a directory other than the directory in which the source
> file (that is, the file being tangled) exists, then org-babel-tangle-publish
> fails in the copy-file step.
Thanks for the detailed report and reproducible example, and sorry for
the late reply. Fixed in 36233d976d.
--
Kyle
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: org-babel-tangle-publish fails in copy-file step [8.3.1 (release_8.3.1-241-gea7ac0 @ /home/arunisaac/.emacs.d/org-mode/lisp/)]
2015-10-03 3:27 ` Kyle Meyer
@ 2015-10-03 9:02 ` Arun I
2015-10-03 17:09 ` Kyle Meyer
0 siblings, 1 reply; 7+ messages in thread
From: Arun I @ 2015-10-03 9:02 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 669 bytes --]
> Thanks for the detailed report and reproducible example, and sorry for
> the late reply. Fixed in 36233d976d.
That works! Thanks.
But, a new bug seems to have been introduced or was already there.
When the publishing directory does not already exist (in my case,
~/.emacs.d/org-tangle-bug/pub), I get
(file-error "Opening output file" "is a directory"
"~/.emacs.d/org-tangle-bug/pub/")
If I'm correct, org-babel-tangle-publish should create the publishing
directory if it does not already exist.
Just like earlier, I have attached a tarball with org files and emacs
lisp code to reproduce the bug. Just extract the tarball, and run
emacs -Q -l minimal-org.el
[-- Attachment #1.2: org-tangle-bug.tar.gz --]
[-- Type: application/octet-stream, Size: 607 bytes --]
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: org-babel-tangle-publish fails in copy-file step [8.3.1 (release_8.3.1-241-gea7ac0 @ /home/arunisaac/.emacs.d/org-mode/lisp/)]
2015-10-03 9:02 ` Arun I
@ 2015-10-03 17:09 ` Kyle Meyer
2015-10-03 22:13 ` Kyle Meyer
0 siblings, 1 reply; 7+ messages in thread
From: Kyle Meyer @ 2015-10-03 17:09 UTC (permalink / raw)
To: Arun I; +Cc: emacs-orgmode
Arun I <theroarofthedragon@gmail.com> writes:
>> Thanks for the detailed report and reproducible example, and sorry for
>> the late reply. Fixed in 36233d976d.
>
> That works! Thanks.
>
> But, a new bug seems to have been introduced or was already there.
>
> When the publishing directory does not already exist (in my case,
> ~/.emacs.d/org-tangle-bug/pub), I get
>
> (file-error "Opening output file" "is a directory"
> "~/.emacs.d/org-tangle-bug/pub/")
>
> If I'm correct, org-babel-tangle-publish should create the publishing
> directory if it does not already exist.
Hmm ... I don't see how that could have been introduced by 36233d976d,
but I agree that the directory should be created if needed. I'll have a
look later today.
Thanks.
--
Kyle
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: org-babel-tangle-publish fails in copy-file step [8.3.1 (release_8.3.1-241-gea7ac0 @ /home/arunisaac/.emacs.d/org-mode/lisp/)]
2015-10-03 17:09 ` Kyle Meyer
@ 2015-10-03 22:13 ` Kyle Meyer
2015-10-03 23:17 ` Arun Isaac
0 siblings, 1 reply; 7+ messages in thread
From: Kyle Meyer @ 2015-10-03 22:13 UTC (permalink / raw)
To: Arun I; +Cc: emacs-orgmode
Kyle Meyer <kyle@kyleam.com> writes:
> Arun I <theroarofthedragon@gmail.com> writes:
>
>>> Thanks for the detailed report and reproducible example, and sorry for
>>> the late reply. Fixed in 36233d976d.
>>
>> That works! Thanks.
>>
>> But, a new bug seems to have been introduced or was already there.
>>
>> When the publishing directory does not already exist (in my case,
>> ~/.emacs.d/org-tangle-bug/pub), I get
>>
>> (file-error "Opening output file" "is a directory"
>> "~/.emacs.d/org-tangle-bug/pub/")
>>
>> If I'm correct, org-babel-tangle-publish should create the publishing
>> directory if it does not already exist.
>
> Hmm ... I don't see how that could have been introduced by 36233d976d,
> but I agree that the directory should be created if needed. I'll have a
> look later today.
Fixed in 2c349cc65.
--
Kyle
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: org-babel-tangle-publish fails in copy-file step [8.3.1 (release_8.3.1-241-gea7ac0 @ /home/arunisaac/.emacs.d/org-mode/lisp/)]
2015-10-03 22:13 ` Kyle Meyer
@ 2015-10-03 23:17 ` Arun Isaac
0 siblings, 0 replies; 7+ messages in thread
From: Arun Isaac @ 2015-10-03 23:17 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 110 bytes --]
Kyle Meyer <kyle@kyleam.com> writes:
> Fixed in 2c349cc65.
Everything works as expected now. Thanks a lot!
[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-10-03 23:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-18 14:30 Bug: org-babel-tangle-publish fails in copy-file step [8.3.1 (release_8.3.1-241-gea7ac0 @ /home/arunisaac/.emacs.d/org-mode/lisp/)] Arun I
2015-09-18 21:14 ` Arun I
2015-10-03 3:27 ` Kyle Meyer
2015-10-03 9:02 ` Arun I
2015-10-03 17:09 ` Kyle Meyer
2015-10-03 22:13 ` Kyle Meyer
2015-10-03 23:17 ` Arun Isaac
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).