emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: D M German <dmg@turingmachine.org>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: question about org-coderef-label-format and HTML export
Date: Wed, 07 Dec 2016 01:13:36 -0800	[thread overview]
Message-ID: <87zik8yudb.fsf@mn.cs.uvic.ca> (raw)
In-Reply-To: 87r35kiqkx.fsf@nicolasgoaziou.fr

 Nicolas Goaziou twisted the bytes to say:


 Nicolas> Hello,
 Nicolas> dmg <dmg@turingmachine.org> writes:

 >> I was playing with org-coderef-label-format to reference lines of code
 >> in blocks.
 >> 
 >> I created a small example that overrides the default value:
 >> 
 >> #+BEGIN_SRC C++ :main no :flags -std=c++14 -Wall --pedantic -Werror
 >> :results output :exports both -r -l "//(ref:%s)" +n

 Nicolas> Switches are to be located before Babel parameters:

  #+begin_src C++ -r -l "//(ref:%s)" +n :main no ..

Thank you, Nicolas, I appreciate your response. It almost works now.

I think I found a bug. It works in some cases but not in others:

the following code properly defines the references abc and bfc. But it
does not define the one for (ref:jump). Here is a link to the exported
HTML file:

http://turingmachine.org/~dmg/temp/ref-test.html
http://turingmachine.org/~dmg/temp/ref-test.org

#+BEGIN_SRC C++ -r -l "//(ref:%s)" +n :main no :results output :exports both 
#include <iostream>
int main()
{ //(ref:abc)
   std::cout << "Hello world" << std::endl;
   std::cout << "Hello world 2" << std::endl;
   //(ref:jump)
   return 0; //(ref:bcf)
}
#+END_SRC


 Nicolas> Regards,

thank you again,

--daniel


 Nicolas> -- 
 Nicolas> Nicolas Goaziou

--
Daniel M. German                  "Computer Science is no more
                                   about computers than astronomy
   Edsger Dijkstra  ->             is about telescopes"
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

 

  reply	other threads:[~2016-12-07  9:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-05 19:55 question about org-coderef-label-format and HTML export dmg
2016-12-06 23:29 ` Nicolas Goaziou
2016-12-07  9:13   ` D M German [this message]
2016-12-07 22:15     ` Nicolas Goaziou

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=87zik8yudb.fsf@mn.cs.uvic.ca \
    --to=dmg@turingmachine.org \
    --cc=emacs-orgmode@gnu.org \
    /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).