emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: chris.m.malone@gmail.com
To: Eric Schulte <schulte.eric@gmail.com>,
	Chris Malone <chris.m.malone@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Re: Two questions about using a =#+begin_src emacs-lisp= block
Date: Tue, 22 Feb 2011 18:23:24 +0000	[thread overview]
Message-ID: <bcaec53f398b7249a9049ce31304@google.com> (raw)
In-Reply-To: <87d3mkc5br.fsf@gmail.com>


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

On Feb 22, 2011 1:06pm, Eric Schulte <schulte.eric@gmail.com> wrote:
> Chris Malone chris.m.malone@gmail.com> writes:



> > Ok, this is still perplexing me, as I have a new version from git and I

> > still get the error. The following is complete list (sorry for the long

> > email!) of what I have done:

> >

> > * Get a fresh copy of =org-mode= from git and byte-compile:

> >

> > #+begin_src: sh

> > cd ~/install/org-mode

> > mkdir new_git_clone

> > cd new_git_clone

> > git clone git://orgmode.org/org-mode.git

> > cd org-mode; make &> make.out

> > ln -s ~/install/org-mode/new_git_clone/org-mode  
> ~/install/org-mode/current

> > #+end_src

> >



> if you are worried that you don't have the correct version of Org-mode

> installed you can check the output of the `org-version' function. Mine

> reads



> "Org-mode version 7.4 (release_7.4.510.g1e35)"



RIght - I was worried that I had possibly changed a lisp file that could be  
causing the error, so I wanted a fresh copy.

> >

> > During the =make= process, I noticed quite a few warnings. An example is

> > below (for a complete copy of =make.out=, see

> > http://astro.sunysb.edu/cmalone/nolink/make.out

> [...]

> > Are such warnings normal?

> >



> yes, these are normal compiler warnings which are generally cleaned up

> before releases but shouldn't have any negative impact on the behavior

> of Org-mode



Ok, good to know.


> >

> > * Make sure my =.emacs= file is pointing to the correct location

> > Here is a copy of the =org-mode=-relevant sections of my =.emacs= file:

> >

> [...]

> >

> > * Attempt an export of the =org-mode= file found here:

> > http://astro.sunysb.edu/cmalone/nolink/python_class_lstings.org

> >



> One thing to note here, is that for your emacs-lisp block to work on

> export, you need to change this



> #+begin_src emacs-lisp :exports both

> (buffer-file-name)

> #+end_src



> to this



> #+begin_src emacs-lisp :var file-name=(buffer-file-name) :exports both

> file-name

> #+end_src



> because only header arguments are guaranteed to be evaluated in the

> original org-mode buffer during export.



Again, thanks for pointing this out earlier. I hadn't changed it for the  
example, because the error was not associated with whether or not the  
actual =emacs-lisp= code returned anything meaningful.



> That said I was able to export your example file (without the change

> above) to html. When exporting to latex I ran into an issue, the

> problem here is that the LaTeX exporter *requires* at least one

> headline. It explicitly export the pre-first-headline and

> post-first-headline portions of the Org-mode buffer separately. When

> there is no headline, and the buffer contains code blocks, then they are

> exported *twice*, which causes the error you mentioned, because after

> the first pass of the code-block export, the results in the file are not

> valid for another pass of the exporter.



> If you place a "* " before the "Let's start this..." line, then the

> errors should disappear.



> Hope this helps.



> Best -- Eric

That fixed it! Sorry for the trouble for something that seems so minor!  
Thanks again.

Chris

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

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2011-02-22 18:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-20 22:08 Two questions about using a =#+begin_src emacs-lisp= block Chris Malone
2011-02-21 17:17 ` Eric Schulte
2011-02-21 18:31   ` Chris Malone
2011-02-21 19:48     ` Eric Schulte
2011-02-22 15:06       ` Chris Malone
2011-02-22 16:54         ` Eric Schulte
2011-02-22 16:57         ` Chris Malone
2011-02-22 18:06           ` Eric Schulte
2011-02-22 18:23             ` chris.m.malone [this message]
2011-02-22 18:45             ` Achim Gratz
2011-02-21 22:19   ` Dan Davison
2011-02-21 22:34     ` Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bcaec53f398b7249a9049ce31304@google.com \
    --to=chris.m.malone@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).