emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rainer M Krug <Rainer@krugs.de>
To: emacs-orgmode@gnu.org
Subject: [FIXED] Re: [BUG] in org-babel-get-src-block-info when certain :header-args are set
Date: Tue, 10 Feb 2015 14:36:45 +0100	[thread overview]
Message-ID: <m2386d3n2q.fsf_-_@krugs.de> (raw)
In-Reply-To: <m2h9uu2byq.fsf@krugs.de> (Rainer M. Krug's message of "Tue, 10 Feb 2015 13:22:05 +0100")

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

Update:

The problem occurs whenever a property value is a number.

so

,----
| #+PROPERTY: header-args  :tangle-mode 292
`----

also produces the error.

Fix included in other patch.

Rainer


Rainer M Krug <Rainer@krugs.de> writes:

> Rasmus <rasmus@gmx.us> writes:
>
>> Rainer M Krug <Rainer@krugs.de> writes:
>>
>>> #+PROPERTY: header-args  :tangle-mode (identity #o444)
>>>
>>> * Initial plottings
>>> #+begin_src R
>>> plot(1)
>>> #+end_src
>>>
>>> When calling org-babel-view-src-block-info (C-c C-v C-i) on the code
>>> block above, I get the error below.
>>>
>>> I don't have the slightest clue what this means or how it can be fixed,
>>> but it caused by the call to (identity #o444).
>>
>> Is #o444 significant to you?
>
> Well - it is more or less straight out of the org manual:
>
> ,----
> | 14.8.2.24 `:tangle-mode'
> | ........................
> | 
> | The `tangle-mode' header argument controls the permission set on tangled
> | files.  The value of this header argument will be passed to
> | `set-file-modes'.  For example, to set a tangled file as read only use
> | `:tangle-mode (identity #o444)', or to set a tangled file as executable
> | use `:tangle-mode (identity #o755)'.  Blocks with `shebang' (*Note
> | shebang::) header arguments will automatically be made executable unless
> | the `tangle-mode' header argument is also used.  The behavior is
> | undefined if multiple code blocks with different values for the
> | `tangle-mode' header argument are tangled to the same file.
> | 
> `----
>
> I don't know if I could use anything else. 
>
>>
>> I guess you could use, or maybe a lambda that combines #o444 whatever it
>> means with your src.  I have no clue what #o444 means or :tangle-mode and
>> I never heard of org-babel-view-src-block-info so take it with a grain of
>> salt.
>
> org-babel-view-src-block-info : Bound to C-c C-v C-i by default (?).
>
> ,----
> | Display information on the current source block.
> | This includes header arguments, language and name, and is largely
> | a window into the `org-babel-get-src-block-info' function.
> `----
>
> Very useful as I have found out recently.
>
>>
>> #+PROPERTY: header-args  :tangle-mode (lambda (src) (identity src))
>>
>> * Initial plottings
>> #+begin_src R
>>   plot(1)
>> #+end_src
>>
>> Or
>>
>> #+PROPERTY: header-args  :tangle-mode identity src
>>
>> * Initial plottings
>> #+begin_src R
>>   plot(1)
>> #+end_src

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

      reply	other threads:[~2015-02-10 13:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 11:10 [BUG] in org-babel-get-src-block-info when certain :header-args are set Rainer M Krug
2015-02-10 11:33 ` Rasmus
2015-02-10 12:22   ` Rainer M Krug
2015-02-10 13:36     ` Rainer M Krug [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2386d3n2q.fsf_-_@krugs.de \
    --to=rainer@krugs.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).