emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Exporting inline code sections
@ 2012-08-13 20:37 Ken Williams
  0 siblings, 0 replies; 9+ messages in thread
From: Ken Williams @ 2012-08-13 20:37 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

Hi,

I noticed that exporting a document to HTML when "exports" is set to "both" gives an error.  Here's an example document:

---------------------
#+TITLE: Example Doc
#+PROPERTY: exports both

The result is src_R{3+4} =[1] 7=.
---------------------

The stack trace looks like this:

---------------------
Debugger entered--Lisp error: (void-function nil)
  nil("%flags")
  replace-regexp-in-string("%flags" nil "#+BEGIN_SRC R%flags\n3+4\n#+END_SRC" t t)
  org-fill-template("#+BEGIN_SRC %lang%flags\n%body\n#+END_SRC" (("lang" . "R") ("flags") ("body" . "3+4")))
  org-babel-exp-code(("R" "3+4" ((:comments . "") (:shebang . "") (:cache . "") (:padline . "") (:noweb . "") (:tangle . "") (:exports . "both") (:results . "replace") (:session . "none"))))
  org-babel-exp-do-export(("R" "3+4" ((:comments . "") (:shebang . "") (:cache . "") (:padline . "") (:noweb . "") (:tangle . "") (:exports . "both") (:results . "replace") (:session . "none"))) inline)
  org-babel-exp-inline-src-blocks(1 83)
  #[(pair) "\b\211\x19A@)\n
\"\207" [pair x start end] 4]((src org-babel-exp-inline-src-blocks))
  mapcar(#[(pair) "\b\211\x19A@)\n
\"\207" [pair x start end] 4] ((lob org-babel-exp-lob-one-liners) (src org-babel-exp-inline-src-blocks)))
  interblock(1 83)
  byte-code("\306\307\211\211\211\211\211\211\211\211\211\211\x18\x19\x1a^[\x1c\x1d\x1e+\x1e,\x1e-\x1e.\x1e/\x1e0\310\311!\211\x1e1\205)
---------------------

I'm still at version 7.8.03, apologies if this has been addressed in a later version already.


--
Ken Williams, Senior Research Scientist
WindLogics
http://windlogics.com



CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you.

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

* Re: Exporting inline code sections
@ 2012-08-13 21:30 Ken Williams
  2012-08-13 21:55 ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Ken Williams @ 2012-08-13 21:30 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org



> -----Original Message-----
> From: Ken Williams
> Sent: Monday, August 13, 2012 3:37 PM
>
> I'm still at version 7.8.03, apologies if this has been addressed in a later
> version already.

FWIW, I just downloaded 7.8.11 and confirmed that the problem still exists there.

I wonder if the inline-code code could use a little love in general.  Another thing that would be nice to accomplish with it is to be able to control the markup - right now it forces =code= markers around the output, but it might be nice to let the result flow more naturally in whatever paragraph it's part of.  That would be great for stuff like report writing, where statistics calculated dynamically could be put into the report text.

 -Ken

CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you.

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

* Re: Exporting inline code sections
  2012-08-13 21:30 Ken Williams
@ 2012-08-13 21:55 ` Bastien
  2012-08-13 22:04   ` Ken Williams
  2012-08-14 13:52   ` Ken Williams
  0 siblings, 2 replies; 9+ messages in thread
From: Bastien @ 2012-08-13 21:55 UTC (permalink / raw)
  To: Ken Williams; +Cc: emacs-orgmode@gnu.org

Hi Ken,

Ken Williams <Ken.Williams@windlogics.com> writes:

> FWIW, I just downloaded 7.8.11 and confirmed that the problem still
> exists there.

Now fixed in git, thanks.

> I wonder if the inline-code code could use a little love in general.
> Another thing that would be nice to accomplish with it is to be able to
> control the markup - right now it forces =code= markers around the output,
> but it might be nice to let the result flow more naturally in whatever
> paragraph it's part of.  That would be great for stuff like report writing,
> where statistics calculated dynamically could be put into the report
> text.

Yes.  Patch welcome!

-- 
 Bastien

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

* Re: Exporting inline code sections
  2012-08-13 21:55 ` Bastien
@ 2012-08-13 22:04   ` Ken Williams
  2012-08-13 23:34     ` Nick Dokos
  2012-08-14 13:52   ` Ken Williams
  1 sibling, 1 reply; 9+ messages in thread
From: Ken Williams @ 2012-08-13 22:04 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode@gnu.org



> -----Original Message-----
> From: Bastien Guerry [mailto:bastienguerry@googlemail.com]
> Sent: Monday, August 13, 2012 4:56 PM
>
> Now fixed in git, thanks.

Such service! =)

>
> Yes.  Patch welcome!

I'll have a shot at it.  I'm very bad at elisp though.

The other thing I just noticed was that every time I edit a table.el table with C-c ', two more spaces get inserted to the left of the table when it's reinserted into the org buffer.  I tried to find where in the code that's happening (probably in org-edit-src-exit?) but I couldn't quite see it.

 -Ken

CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you.

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

* Re: Exporting inline code sections
  2012-08-13 22:04   ` Ken Williams
@ 2012-08-13 23:34     ` Nick Dokos
  2012-08-14 15:01       ` Ken Williams
  0 siblings, 1 reply; 9+ messages in thread
From: Nick Dokos @ 2012-08-13 23:34 UTC (permalink / raw)
  To: Ken Williams; +Cc: Bastien, emacs-orgmode@gnu.org

Ken Williams <Ken.Williams@windlogics.com> wrote:


> The other thing I just noticed was that every time I edit a table.el
> table with C-c ', two more spaces get inserted to the left of the
> table when it's reinserted into the org buffer.  I tried to find where
> in the code that's happening (probably in org-edit-src-exit?) but I

Yes. 

> couldn't quite see it.

C-h v org-src-preserve-indentation RET

Nick

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

* Re: Exporting inline code sections
  2012-08-13 21:55 ` Bastien
  2012-08-13 22:04   ` Ken Williams
@ 2012-08-14 13:52   ` Ken Williams
  1 sibling, 0 replies; 9+ messages in thread
From: Ken Williams @ 2012-08-14 13:52 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode@gnu.org



> -----Original Message-----
> From: Bastien Guerry [mailto:bastienguerry@googlemail.com]
> Sent: Monday, August 13, 2012 4:56 PM
> Ken Williams <Ken.Williams@windlogics.com> writes:
>
> > FWIW, I just downloaded 7.8.11 and confirmed that the problem still
> > exists there.
>
> Now fixed in git, thanks.
>

Just tested it, works great, thanks.

 -Ken

CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you.

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

* Re: Exporting inline code sections
  2012-08-13 23:34     ` Nick Dokos
@ 2012-08-14 15:01       ` Ken Williams
  2012-08-14 15:20         ` Nick Dokos
  0 siblings, 1 reply; 9+ messages in thread
From: Ken Williams @ 2012-08-14 15:01 UTC (permalink / raw)
  To: nicholas.dokos@hp.com; +Cc: Bastien, emacs-orgmode@gnu.org



> -----Original Message-----
> From: nicholas.dokos@hp.com [mailto:nicholas.dokos@hp.com]
> Sent: Monday, August 13, 2012 6:34 PM
>
> Ken Williams <Ken.Williams@windlogics.com> wrote:
>
> > The other thing I just noticed was that every time I edit a table.el
> > table with C-c ', two more spaces get inserted to the left of the
> > table when it's reinserted into the org buffer.  I tried to find where
> > in the code that's happening (probably in org-edit-src-exit?) but I
>
> Yes.
>
> > couldn't quite see it.
>
> C-h v org-src-preserve-indentation RET

Okay, I was stepping through org-edit-src-exit with the emacs debugger, getting my bearings - but now for the life of me I can't get the debugger to trigger when entering that function anymore.  I do `M-x debug-on-entry org-edit-src-exit`, then put my point in a table.el table and hit `C-c '`, then hit `C-c '` again to exit the editing buffer, and no debugging happens.  Can someone think of why that might be?

Otherwise I have to try to simulate emacs in my head to see what this code is doing, and that's not going to be pretty. =)

 -Ken

CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you.

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

* Re: Exporting inline code sections
  2012-08-14 15:01       ` Ken Williams
@ 2012-08-14 15:20         ` Nick Dokos
  2012-08-14 15:25           ` Ken Williams
  0 siblings, 1 reply; 9+ messages in thread
From: Nick Dokos @ 2012-08-14 15:20 UTC (permalink / raw)
  To: Ken Williams; +Cc: Bastien, emacs-orgmode@gnu.org

Ken Williams <Ken.Williams@windlogics.com> wrote:

> > C-h v org-src-preserve-indentation RET
> 
> Okay, I was stepping through org-edit-src-exit with the emacs debugger, get=
> ting my bearings - but now for the life of me I can't get the debugger to t=
> rigger when entering that function anymore.  I do `M-x debug-on-entry org-e=
> dit-src-exit`, then put my point in a table.el table and hit `C-c '`, then =
> hit `C-c '` again to exit the editing buffer, and no debugging happens.  Ca=
> n someone think of why that might be?
> 

You might want to try edebug instead of the standard debugger, but the
following steps might help in any case (with appropriate translations).

I have had such problems and I try the following steps (in increasing
order of desperation):

o quitting out of any existing debug sessions and/or error backtraces
  and try again.

o M-x top-level and try again.

o reload the file (uncompiled) and redo the M-x edebug-defun - btw,
  there are convenient shorthands: C-M-x to reevaluate the defun and turn
  off edebug and C-u C-M-x to enable edebug on the defun. Then try again.

o restart emacs and try again.

o reboot the machine and try again :-)

Nick

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

* Re: Exporting inline code sections
  2012-08-14 15:20         ` Nick Dokos
@ 2012-08-14 15:25           ` Ken Williams
  0 siblings, 0 replies; 9+ messages in thread
From: Ken Williams @ 2012-08-14 15:25 UTC (permalink / raw)
  To: nicholas.dokos@hp.com; +Cc: emacs-orgmode@gnu.org



> -----Original Message-----
> From: nicholas.dokos@hp.com [mailto:nicholas.dokos@hp.com]
> Sent: Tuesday, August 14, 2012 10:20 AM
>
> You might want to try edebug instead of the standard debugger,

MUCH better, thanks!

 -Ken


CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you.

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

end of thread, other threads:[~2012-08-14 15:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-13 20:37 Exporting inline code sections Ken Williams
  -- strict thread matches above, loose matches on Subject: below --
2012-08-13 21:30 Ken Williams
2012-08-13 21:55 ` Bastien
2012-08-13 22:04   ` Ken Williams
2012-08-13 23:34     ` Nick Dokos
2012-08-14 15:01       ` Ken Williams
2012-08-14 15:20         ` Nick Dokos
2012-08-14 15:25           ` Ken Williams
2012-08-14 13:52   ` Ken Williams

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