From mboxrd@z Thu Jan 1 00:00:00 1970 From: D M German Subject: Re: question about org-coderef-label-format and HTML export Date: Wed, 07 Dec 2016 01:13:36 -0800 Message-ID: <87zik8yudb.fsf@mn.cs.uvic.ca> References: <87r35kiqkx.fsf@nicolasgoaziou.fr> Reply-To: dmg@turingmachine.org Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEYJh-0001MT-UU for emacs-orgmode@gnu.org; Wed, 07 Dec 2016 04:15:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEYJY-000401-Su for emacs-orgmode@gnu.org; Wed, 07 Dec 2016 04:15:05 -0500 Received: from mail-pg0-f43.google.com ([74.125.83.43]:33156) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cEYJY-0003rf-Mh for emacs-orgmode@gnu.org; Wed, 07 Dec 2016 04:15:00 -0500 Received: by mail-pg0-f43.google.com with SMTP id 3so160050371pgd.0 for ; Wed, 07 Dec 2016 01:14:39 -0800 (PST) Received: from iodine (S01061cabc0a516f3.gv.shawcable.net. [24.69.64.88]) by smtp.gmail.com with ESMTPSA id p79sm40766721pfj.51.2016.12.07.01.13.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Dec 2016 01:13:37 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode Nicolas Goaziou twisted the bytes to say: Nicolas> Hello, Nicolas> dmg 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 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 .