emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] in org-babel-get-src-block-info when certain :header-args are set
@ 2015-02-10 11:10 Rainer M Krug
  2015-02-10 11:33 ` Rasmus
  0 siblings, 1 reply; 4+ messages in thread
From: Rainer M Krug @ 2015-02-10 11:10 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi


--8<---------------cut here---------------start------------->8---
#+PROPERTY: header-args  :tangle-mode (identity #o444)

* Initial plottings
#+begin_src R
plot(1)
#+end_src
--8<---------------cut here---------------end--------------->8---

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

,----
| Debugger entered--Lisp error: (wrong-type-argument sequencep 292)
|   #[(it) "\bG\301V\207" [it 0] 2](292)
|   org-babel-view-src-block-info()
|   call-interactively(org-babel-view-src-block-info nil nil)
|   command-execute(org-babel-view-src-block-info)
| Debugger entered--Lisp error: (wrong-type-argument sequencep 292)
|   #[(it) "\bG\301V\207" [it 0] 2](292)
|   org-babel-view-src-block-info()
|   call-interactively(org-babel-view-src-block-info nil nil)
|   command-execute(org-babel-view-src-block-info)
`----

,----
| Org-mode version 8.3beta (release_8.3beta-798-g528b90 @/Users/rainerkrug/.emacs.d/org-mode/lisp/)
| GNU Emacs 24.4.1 (x86_64-apple-darwin14.0.0, Carbon Version 157 AppKit 1343.16) of 2015-02-02 on Rainers-MacBook-Pro-4.local
`----

reproduced without configuration.

Cheers,

Rainer


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

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

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

* Re: [BUG] in org-babel-get-src-block-info when certain :header-args are set
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Rasmus @ 2015-02-10 11:33 UTC (permalink / raw)
  To: emacs-orgmode

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?

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.

#+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


-- 
. . . The proofs are technical in nature and provides no real
understanding

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

* Re: [BUG] in org-babel-get-src-block-info when certain :header-args are set
  2015-02-10 11:33 ` Rasmus
@ 2015-02-10 12:22   ` Rainer M Krug
  2015-02-10 13:36     ` [FIXED] " Rainer M Krug
  0 siblings, 1 reply; 4+ messages in thread
From: Rainer M Krug @ 2015-02-10 12:22 UTC (permalink / raw)
  Cc: emacs-orgmode

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

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 --]

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

* [FIXED] Re: [BUG] in org-babel-get-src-block-info when certain :header-args are set
  2015-02-10 12:22   ` Rainer M Krug
@ 2015-02-10 13:36     ` Rainer M Krug
  0 siblings, 0 replies; 4+ messages in thread
From: Rainer M Krug @ 2015-02-10 13:36 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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 --]

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

end of thread, other threads:[~2015-02-10 13:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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     ` [FIXED] " Rainer M Krug

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