emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bug] [babel] repeated exports w/ inline src blocks yield different results
@ 2013-11-24  4:18 Charles Berry
  2013-11-27  2:27 ` Yasushi SHOJI
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Berry @ 2013-11-24  4:18 UTC (permalink / raw)
  To: emacs-orgmode


Consider this code:

,----
| * test
| 
| #+NAME: block2
| #+BEGIN_SRC emacs-lisp :exports both
|     (setf not-yet-bound-a t )
| #+END_SRC
| 
| src_emacs-lisp{(+ 1 1)}
| 
| end of buffer
| 
`----
 
Upon export via 

 C-c C-e C-b t A y y 

 yields:
,----
| 1 test
| ======
| 
|   ,----
|   | (setf not-yet-bound-a t )
|   `----
| 
|   ,----
|   | t
|   `----
| 
|   `2'
| 
|   end of buffer
| 
`----

just as one would hope.

But trying it again, 

 C-c C-e C-b t A y y 

gives
,----
| 1 test
| ======
| 
|   ,----
|   | (setf not-yet-bound-a t )
|   `----
|   #+END_SRC
| 
|   ,----
|   | t
|   `----
| 
|   `2'
| 
|   end of buffer
| 
`----

and you see the extra '#+END_SRC' line.

And if you keep repeating those keystrokes, the second result again appears.

However, sometimes a minor change and then an erasure (perhaps 'a a C-x u')
followed by the export keystrokes yields the correct result.

There are some other forms of misbehavior: if  I change the header arg
in the src block to  ":exports results", then the first export is correct,
but the second export skips execution of the src block and writes the code
in the export as if ':exports code' had been given. 

But again 'a a C-x u' seems to clear whatever condition causes the 
misbehavior.

Remove the "src_emacs-lisp{...}" and clear with 'a a C-x u' and
everything works fine again through multiple exports. I tagged the 
subject line '[babel]' because of that.


Chuck

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

* Re: [bug] [babel] repeated exports w/ inline src blocks yield different results
  2013-11-24  4:18 [bug] [babel] repeated exports w/ inline src blocks yield different results Charles Berry
@ 2013-11-27  2:27 ` Yasushi SHOJI
  2013-11-28 21:31   ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Yasushi SHOJI @ 2013-11-27  2:27 UTC (permalink / raw)
  To: emacs-orgmode

At Sun, 24 Nov 2013 04:18:38 +0000 (UTC),
Charles Berry wrote:
[...]
> and you see the extra '#+END_SRC' line.
> 
> And if you keep repeating those keystrokes, the second result again appears.
> 
> However, sometimes a minor change and then an erasure (perhaps 'a a C-x u')
> followed by the export keystrokes yields the correct result.

It seems like a cache issue.  `org-element-cache-reset' before exporting
corrects the result on my system.

still learning how the cache works...
-- 
            yashi

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

* Re: [bug] [babel] repeated exports w/ inline src blocks yield different results
  2013-11-27  2:27 ` Yasushi SHOJI
@ 2013-11-28 21:31   ` Nicolas Goaziou
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Goaziou @ 2013-11-28 21:31 UTC (permalink / raw)
  To: Yasushi SHOJI; +Cc: emacs-orgmode

Hello,

Yasushi SHOJI <yashi@atmark-techno.com> writes:

> At Sun, 24 Nov 2013 04:18:38 +0000 (UTC),
> Charles Berry wrote:
> [...]
>> and you see the extra '#+END_SRC' line.
>> 
>> And if you keep repeating those keystrokes, the second result again appears.
>> 
>> However, sometimes a minor change and then an erasure (perhaps 'a a C-x u')
>> followed by the export keystrokes yields the correct result.
>
> It seems like a cache issue.  `org-element-cache-reset' before exporting
> corrects the result on my system.
>
> still learning how the cache works...

The problem should be fixed in master. Thank you for the report.


Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2013-11-28 21:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-24  4:18 [bug] [babel] repeated exports w/ inline src blocks yield different results Charles Berry
2013-11-27  2:27 ` Yasushi SHOJI
2013-11-28 21:31   ` Nicolas Goaziou

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