From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Lupton Subject: Bug: Extra spaces in babel #+call arguments [7.9.3d (release_7.9.3d-823-gd06fa4 @ /usr/share/emacs/24.2/site-lisp/org/) Date: Wed, 30 Jan 2013 12:05:09 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8ff1c7148a222004d48053dd Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0WQ2-000120-70 for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 07:05:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0WPy-0000Ic-Hl for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 07:05:34 -0500 Received: from mail-oa0-f52.google.com ([209.85.219.52]:43985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0WPy-0000IO-9D for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 07:05:30 -0500 Received: by mail-oa0-f52.google.com with SMTP id k14so1539104oag.39 for ; Wed, 30 Jan 2013 04:05:29 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --e89a8ff1c7148a222004d48053dd Content-Type: text/plain; charset=ISO-8859-1 Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. ------------------------------------------------------------------------ I am using org-babel to include the latest version of externally-generated images in my org-mode file, which works well. But there is a problem with using "#+CALL:" to include a link to the image: if the argument to #+CALL includes parentheses, extra spaces are added. Please see the examples below, run with "emacs -Q". (set up sh execution) #+begin_src lisp (org-babel-do-load-languages 'org-babel-load-languages '((sh . t))) #+end_src The following block works as expected when run with =C-c C-c=: the link is just the passed filename plus ".txt". #+name: test #+begin_src sh :var filename="test james (fred)" :results file echo "$filename.txt" #+end_src #+RESULTS: test [[file:test james (fred).txt]] But using call adds an extra space when there are parentheses in the argument: #+call: test(filename="test") :results file #+RESULTS: test(filename="test"):results file [[file:test.txt]] #+call: test(filename="test (foo)") :results file #+RESULTS: test(filename="test (foo)") :results file [[file:test (foo) .txt]] This last line shows the bug. As a separate question, is it possible to get ":results file" as the default from the original block so it doesn't have to be repeated in each #+CALL ? Thanks, Rick Emacs : GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-10-07 on americium, modified by Debian Package: Org-mode version 7.9.3d (release_7.9.3d-823-gd06fa4 @ /usr/share/emacs/24.2/site-lisp/org/) current state: ============== (setq org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-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-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-confirm-shell-link-function 'yes-or-no-p org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-after-todo-state-change-hook '(org-clock-out-if-current) 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-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-hide-inline-tasks org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-export-first-hook '(org-beamer-initialize-open-trackers) org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-babel-load-languages '((sh . t)) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-descriptive-links nil ) --e89a8ff1c7148a222004d48053dd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Remember to cover the basics, that is, what you expec= ted to happen and
what in fact did happen.=A0 You don't know how to = make a good report?=A0 See

=A0=A0=A0=A0 http://orgmode.org/manual/Feedback.html#Fe= edback

Your bug report will be posted to the Org-mode mailing list.
-------= -----------------------------------------------------------------

I = am using org-babel to include the latest version of
externally-generated= images in my org-mode file, which works well. But
there is a problem with using "#+CALL:" to include a link to the = image:
if the argument to #+CALL includes parentheses, extra spaces are<= br>added. Please see the examples below, run with "emacs -Q".

(set up sh execution)
#+begin_src lisp
(org-babel= -do-load-languages
=A0'org-babel-load-languages
=A0'((sh . t)= ))
#+end_src

The following block works as expected when run with = =3DC-c C-c=3D: the link is just the passed filename plus ".txt".<= br>
#+name: test
#+begin_src sh :var filename=3D"test james (fred)&= quot; :results file
echo "$filename.txt"
#+end_src

#= +RESULTS: test
[[file:test james (fred).txt]]

But using call adds= an extra space when there are parentheses in the argument:

#+call: test(filename=3D"test") :results file

#+RESULT= S: test(filename=3D"test"):results file
[[file:test.txt]]
<= br>#+call: test(filename=3D"test (foo)") :results file

#+R= ESULTS: test(filename=3D"test (foo)") :results file
[[file:test (foo) .txt]]

This last line shows the bug.
As a separate question, is it possible to get ":result= s file" as the default from the original block so it doesn't have = to be repeated in each #+CALL ?

Thanks,
Rick

Emacs=A0 : GNU Emacs 24.2.1 (x86_64-p= c-linux-gnu, GTK+ Version 2.24.10)
=A0of 2012-10-07 on americium, modifi= ed by Debian
Package: Org-mode version 7.9.3d (release_7.9.3d-823-gd06fa= 4 @ /usr/share/emacs/24.2/site-lisp/org/)

current state:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(setq=A0org-export-preprocess-before-selecting-backend-code-hook '(org-bea= mer-select-beamer-code)
=A0org-tab-first-hook '(org-hide-block-toggl= e-maybe
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0=A0=A0 org-src-native-tab-command-m= aybe
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0=A0=A0 org-babel-hide-result-toggle-maybe
= =A0=A0=A0 =A0=A0=A0 =A0=A0=A0=A0=A0 org-babel-header-arg-expand)
=A0org-= speed-command-hook '(org-speed-command-default-hook
=A0=A0=A0 =A0=A0= =A0 =A0=A0=A0 =A0 org-babel-speed-command-hook)
=A0org-occur-hook '(= org-first-headline-recenter)
=A0org-metaup-hook '(org-babel-load-in-session-maybe)
=A0org-export-= preprocess-before-normalizing-links-hook '(org-remove-file-link-modifie= rs)
=A0org-confirm-shell-link-function 'yes-or-no-p
=A0org-export= -latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0=A0=A0=A0 org-beamer-auto-fragile-fr= ames
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0=A0=A0=A0 org-beamer-place-d= efault-actions-for-lists)
=A0org-export-latex-after-initial-vars-hook &#= 39;(org-beamer-after-initial-vars)
=A0org-after-todo-state-change-hook &= #39;(org-clock-out-if-current)
=A0org-src-mode-hook '(org-src-babel-configure-edit-buffer
=A0=A0=A0= =A0=A0=A0 =A0=A0=A0=A0 org-src-mode-configure-edit-buffer)
=A0org-agend= a-before-write-hook '(org-agenda-add-entry-text)
=A0org-babel-pre-ta= ngle-hook '(save-buffer)
=A0org-mode-hook '(#[nil "\300\301\302\303\304$\207"
=A0= =A0=A0 =A0=A0=A0 =A0=A0 [org-add-hook change-major-mode-hook org-show-block= -all
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 append local]
=A0=A0=A0 =A0=A0=A0 = =A0=A0 5]
=A0=A0=A0 =A0=A0=A0 =A0#[nil "\300\301\302\303\304$\207&q= uot;
=A0=A0=A0 =A0=A0=A0 =A0=A0 [org-add-hook change-major-mode-hook
=A0=A0= =A0 =A0=A0=A0 =A0=A0=A0 org-babel-show-result-all append local]
=A0=A0= =A0 =A0=A0=A0 =A0=A0 5]
=A0=A0=A0 =A0=A0=A0 =A0org-babel-result-hide-spe= c org-babel-hide-all-hashes)
=A0org-ctrl-c-ctrl-c-hook '(org-babel-h= ash-at-point
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0 org-babel-execute-safely-maybe)
=A0org= -cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers=A0=A0=A0 =A0=A0=A0 =A0 org-cycle-hide-inline-tasks org-cycle-show-empty-= lines
=A0=A0=A0 =A0=A0=A0 =A0 org-optimize-window-after-visibility-chang= e)
=A0org-export-latex-format-toc-function 'org-export-latex-format-toc-de= fault
=A0org-export-first-hook '(org-beamer-initialize-open-trackers= )
=A0org-confirm-elisp-link-function 'yes-or-no-p
=A0org-metadown= -hook '(org-babel-pop-to-session-maybe)
=A0org-babel-load-languages '((sh . t))
=A0org-clock-out-hook '(= org-clock-remove-empty-clock-drawer)
=A0org-descriptive-links nil
=A0= )

--e89a8ff1c7148a222004d48053dd--