emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Orgmode 9.09 and export of source blocks
@ 2017-06-30  3:29 cedric simon
  2017-06-30  4:46 ` Kaushal Modi
  0 siblings, 1 reply; 3+ messages in thread
From: cedric simon @ 2017-06-30  3:29 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi everyone,

I work with org mode for writing all my documentation and use source code
blocks extensively.
I don't know if I found a bug or something, but I encounter a strange
behavior with SQL source blocks.
Despite the settings I apply, they are always evaluated if I have ":exports
both" set.

I opened a discussion on reddit here:
https://www.reddit.com/r/emacs/comments/6k5t1h/orgmode_909_and_export_of_source_blocks/
if you want to see some input I already received.

This could be dangerous because in my documentation file, I have some
source blocks that delete records.
Since I don't have ":exports both" on them, they are not evaluated during
export.

I made a reproducible document, it's on gist, if you have time please have
a look:
https://gist.github.com/simonced/2a4ee29ed779a563b9fb7a9d8dcc83cf

Thank you for your time, any help will be appreciated.
Ask me any other details if you need, I'll do my best to answer quickly.


Cedric Simon

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

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

* Re: Orgmode 9.09 and export of source blocks
  2017-06-30  3:29 Orgmode 9.09 and export of source blocks cedric simon
@ 2017-06-30  4:46 ` Kaushal Modi
  2017-07-01  1:45   ` cedric simon
  0 siblings, 1 reply; 3+ messages in thread
From: Kaushal Modi @ 2017-06-30  4:46 UTC (permalink / raw)
  To: cedric simon, emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1405 bytes --]

On Thu, Jun 29, 2017 at 11:30 PM cedric simon <simonced@gmail.com> wrote:

> Hi everyone,
>
> I work with org mode for writing all my documentation and use source code
> blocks extensively.
> I don't know if I found a bug or something, but I encounter a strange
> behavior with SQL source blocks.
> Despite the settings I apply, they are always evaluated if I have
> ":exports both" set.
>
> I made a reproducible document, it's on gist, if you have time please have
> a look:
> https://gist.github.com/simonced/2a4ee29ed779a563b9fb7a9d8dcc83cf
>

From what I understand, the values you set in "#+PROPERTY: header-args" is
not inherited further down once you use a ":header-args:" property drawer
(even when org-use-property-inheritance is set to t).

I made up an elaborate example and have put it up here[1], that explains
when the header-args values set in #+PROPERTY or PROPERTY drawer are
effective.

In addition, using the org-eldoc package[2] (in Org contrib) helps a lot in
seeing the effective header-args values for a given source block. Just put
the cursor on the BEGIN_SRC line and you will see it all :)

Example:

[image: image.png]


[1]:
https://gist.githubusercontent.com/kaushalmodi/4be9fb4e460adb197a6a23ffc3557665/raw/4fcc33641ed33141dc6e205fc2435f06ddeef4e6/header-arg-prop-inheritance.org
[2]: http://orgmode.org/cgit.cgi/org-mode.git/log/contrib/lisp/org-eldoc.el
-- 

Kaushal Modi

[-- Attachment #1.2: Type: text/html, Size: 2460 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 136579 bytes --]

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

* Re: Orgmode 9.09 and export of source blocks
  2017-06-30  4:46 ` Kaushal Modi
@ 2017-07-01  1:45   ` cedric simon
  0 siblings, 0 replies; 3+ messages in thread
From: cedric simon @ 2017-07-01  1:45 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1980 bytes --]

Hi,

thank you very much for your explanations about properties inheritances, I
didn't know much about them.

So I managed to solve my problem buy using a property drawer
~header-args:sql:~ so it doesn't override my ~#+PROPERTY~ that I set
globally.

I'll give some tries with org-eldoc, seems an interresting package I didn't
know about.

Thank you very much again for your help!

2017-06-30 13:46 GMT+09:00 Kaushal Modi <kaushal.modi@gmail.com>:

> On Thu, Jun 29, 2017 at 11:30 PM cedric simon <simonced@gmail.com> wrote:
>
>> Hi everyone,
>>
>> I work with org mode for writing all my documentation and use source code
>> blocks extensively.
>> I don't know if I found a bug or something, but I encounter a strange
>> behavior with SQL source blocks.
>> Despite the settings I apply, they are always evaluated if I have
>> ":exports both" set.
>>
>> I made a reproducible document, it's on gist, if you have time please
>> have a look:
>> https://gist.github.com/simonced/2a4ee29ed779a563b9fb7a9d8dcc83cf
>>
>
> From what I understand, the values you set in "#+PROPERTY: header-args" is
> not inherited further down once you use a ":header-args:" property drawer
> (even when org-use-property-inheritance is set to t).
>
> I made up an elaborate example and have put it up here[1], that explains
> when the header-args values set in #+PROPERTY or PROPERTY drawer are
> effective.
>
> In addition, using the org-eldoc package[2] (in Org contrib) helps a lot
> in seeing the effective header-args values for a given source block. Just
> put the cursor on the BEGIN_SRC line and you will see it all :)
>
> Example:
>
> [image: image.png]
>
>
> [1]: https://gist.githubusercontent.com/kaushalmodi/
> 4be9fb4e460adb197a6a23ffc3557665/raw/4fcc33641ed33141dc6e205fc2435f
> 06ddeef4e6/header-arg-prop-inheritance.org
> [2]: http://orgmode.org/cgit.cgi/org-mode.git/log/contrib/
> lisp/org-eldoc.el
> --
>
> Kaushal Modi
>



-- 
Cedric Simon <http://www.google.com/profiles/simonced>

[-- Attachment #1.2: Type: text/html, Size: 3731 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 136579 bytes --]

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

end of thread, other threads:[~2017-07-01  1:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30  3:29 Orgmode 9.09 and export of source blocks cedric simon
2017-06-30  4:46 ` Kaushal Modi
2017-07-01  1:45   ` cedric simon

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