emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* novice - inline src ?
@ 2010-11-03  2:34 Adam
  2010-11-03  3:23 ` Juan Pechiar
  0 siblings, 1 reply; 4+ messages in thread
From: Adam @ 2010-11-03  2:34 UTC (permalink / raw)
  To: Emacs-orgmode

Am a novice, and just trying my first src emacs lisp.   
Can a results output be included in the middle of a line of text ? 

I've looked through section 14 of the manual. Perhaps the entire 
line must be "concat"ed into the one composite line needed. 

See the "quick brown fox" example below, with src result plonked 
in the middle. 

Also,  is there a switch on setting to avoid the 
"Evaluate this Lisp code on your system?  (yes or no)"
questions being asked at export - to always answer yes to this ? 


* test

#+begin_src emacs-lisp :exports results
  (format-time-string "%a %e %b %Y ")
#+end_src

#+begin_src emacs-lisp :exports none
(defun pt ()
  (format-time-string "%a %e %b %Y "))
#+end_src

The quick brown fox jumps 
#+begin_src emacs-lisp :exports results
  (pt)
#+end_src
over the lazy dog.

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

* Re: novice - inline src ?
  2010-11-03  2:34 novice - inline src ? Adam
@ 2010-11-03  3:23 ` Juan Pechiar
  2010-11-03  4:47   ` Adam
  0 siblings, 1 reply; 4+ messages in thread
From: Juan Pechiar @ 2010-11-03  3:23 UTC (permalink / raw)
  To: Adam; +Cc: Emacs-orgmode

On Wed, Nov 03, 2010 at 03:34:58PM +1300, Adam wrote:
> Am a novice, and just trying my first src emacs lisp.
> Can a results output be included in the middle of a line of text ?

Hi,

Yo can include inline code blocks thus:

The date today is src_emacs-lisp{(format-time-string "%a %e %b %Y ")}.

The complete format is:

  src_lang[optional header arguments]{code body}

Check the following message on the mailing list:

    Date: Tue, 03 Aug 2010 11:44:14 -0600                                                                                              From: Eric Schulte <schulte.eric@gmail.com>                                                                                        Subject: Re: [Orgmode] Babel - display results in an overlay?

> Also,  is there a switch on setting to avoid the
> "Evaluate this Lisp code on your system?  (yes or no)"
> questions being asked at export - to always answer yes to this ?

Customize the following variable to nil:

    org-confirm-babel-evaluate

Regards,
.j.

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

* Re: novice - inline src ?
  2010-11-03  3:23 ` Juan Pechiar
@ 2010-11-03  4:47   ` Adam
  2010-11-03  9:48     ` Adam
  0 siblings, 1 reply; 4+ messages in thread
From: Adam @ 2010-11-03  4:47 UTC (permalink / raw)
  To: Emacs-orgmode

On Wednesday 03 November 2010 04:23 pm, you wrote:
> On Wed, Nov 03, 2010 at 03:34:58PM +1300, Adam wrote:
> > Am a novice, and just trying my first src emacs lisp.
> > Can a results output be included in the middle of a line of text ?
>
> Hi,
>
> Yo can include inline code blocks thus:
>
> The date today is src_emacs-lisp{(format-time-string "%a %e %b %Y ")}.
>
> The complete format is:
>
>   src_lang[optional header arguments]{code body}
>
> Check the following message on the mailing list:
>
>     Date: Tue, 03 Aug 2010 11:44:14 -0600                                  
>                                                            From: Eric
> Schulte <schulte.eric@gmail.com>                                           
>                                             Subject: Re: [Orgmode] Babel -
> display results in an overlay?
>
> > Also,  is there a switch on setting to avoid the
> > "Evaluate this Lisp code on your system?  (yes or no)"
> > questions being asked at export - to always answer yes to this ?
>
> Customize the following variable to nil:
>
>     org-confirm-babel-evaluate
>
> Regards,
> .j.

Great. Thank you. 

However in the example I gave, copied below,  when I set 
"org-confirm-babel-evaluate"  to nil,  I get the error message  
"Symbol's function definition is void:  pt "

If  "org-confirm-babel-evaluate" is t   I get the normal confirm dialogue. 

Am using  Org-mode version  7.01h    GNU Emacs 23.1.1




* test

#+begin_src emacs-lisp :exports results
  (format-time-string "%a %e %b %Y ")
#+end_src

#+begin_src emacs-lisp :exports none
(defun pt ()
  (format-time-string "%a %e %b %Y "))
#+end_src

The quick brown fox jumps 
#+begin_src emacs-lisp :exports results
  (pt)
#+end_src
over the lazy dog.

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

* Re: novice - inline src ?
  2010-11-03  4:47   ` Adam
@ 2010-11-03  9:48     ` Adam
  0 siblings, 0 replies; 4+ messages in thread
From: Adam @ 2010-11-03  9:48 UTC (permalink / raw)
  To: emacs-orgmode


And all working as expected now.    Thanks again. 

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

end of thread, other threads:[~2010-11-03  9:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-03  2:34 novice - inline src ? Adam
2010-11-03  3:23 ` Juan Pechiar
2010-11-03  4:47   ` Adam
2010-11-03  9:48     ` Adam

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