From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Including files, line numbers and codeline references Date: Thu, 8 Jan 2009 12:15:33 +0100 Message-ID: <5C213F1D-AFD7-45A8-8681-CDD6EF372E19@uva.nl> References: Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: multipart/mixed; boundary="===============0785302938==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LKsrU-00049F-8R for emacs-orgmode@gnu.org; Thu, 08 Jan 2009 06:15:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LKsrS-00048s-T2 for emacs-orgmode@gnu.org; Thu, 08 Jan 2009 06:15:39 -0500 Received: from [199.232.76.173] (port=43611 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKsrS-00048p-Mj for emacs-orgmode@gnu.org; Thu, 08 Jan 2009 06:15:38 -0500 Received: from ug-out-1314.google.com ([66.249.92.175]:33369) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LKsrS-00059C-5B for emacs-orgmode@gnu.org; Thu, 08 Jan 2009 06:15:38 -0500 Received: by ug-out-1314.google.com with SMTP id 36so2360639uga.17 for ; Thu, 08 Jan 2009 03:15:37 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Manish Cc: "emacs-orgmode@gnu.org" --===============0785302938== Content-Type: multipart/alternative; boundary=Apple-Mail-7--296937290 --Apple-Mail-7--296937290 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi Manish, On Jan 8, 2009, at 9:35 AM, Manish wrote: > There are multiple but related issues and requests in the mail below. > Wasn't sure so haven't split into separate emails. Please excuse me > if this is not correct form. > > On Mon, Jan 5, 2009 at 6:02 PM, Carsten Dominik wrote: >> >> I have just uploaded 6.17a which revamps the codeline references >> stuff, >> in the following way: >> >> 1. The default label now looks like (ref:name) >> >> 2. The default format is defined in org-coderef-label-format, >> with the default value "(ref:%s)". >> > > This is very nice. > >> 3. You can change the format for each individual snippet with the - >> l switch: >> >> #+BEGIN_SRC pascal -n -r -l "((%s))" > > Is it possible to use this line numbering facility for files included > in by "#+INCLUDE" mechanism (sec. 12.1 of manual?) Yes, you can now just add the switched to the end of the INCLUDE line. >> >> 4. Links to the labels have also changed, they are now >> >> [[(name)]] or [[(name)][in line (name)]] >> >> instead of >> >> [[((name))]] or [[((name))][in line ((name))]] >> >> i.e. only single parenthesis around the label name. > > I added a (ref:string) after a comment mark in the original file being > included and created a link like shown above. The highlighting works > fine but the link does not reflect the line number of the text (didn't > also expect to work until lines were numbered.) This should now work > Surprisingly, publish (HTML) attempt also tries to create some .tex > files, not sure why. > > ,----[ *Messages* ] > | Publishing file d:/home/zms/gehc.git/gdoc/dg.org > | Exporting... > | OVERVIEW > | CONTENTS...done > | Creating LaTeX image 1 > | Creating LaTeX image 2 > | Creating LaTeX image 3 > | Failed to create dvi file from d:/home/zms/tmp/orgtex34725Zc.tex > | Creating LaTeX image 4 > | Failed to create dvi file from d:/home/zms/tmp/orgtex3472Gki.tex > | Creating LaTeX image 5 > | Failed to create dvi file from d:/home/zms/tmp/orgtex3472Tuo.tex > | Creating LaTeX image 6 > | Failed to create dvi file from d:/home/zms/tmp/orgtex3472g4u.tex > | Creating LaTeX image 7 > | Failed to create dvi file from d:/home/zms/tmp/orgtex3472tC1.tex > | Exporting... [2 times] > | Saving file d:/home/zms/gehc.git/gdoc_pub/dg.html... > | Wrote d:/home/zms/gehc.git/gdoc_pub/dg.html > | Exporting... done > `---- I guess you have some math snippets in the file, and (setq org-export-with-LaTeX-fragments t) ?? Then all these snippets will be processed though LaTeX to create images for inclusion into the HTML file. > Also, I was trying the example from documentation with: > > #+INCLUDE "~/.emacs" src emacs-lisp I cannot reproduce it, I guess you have something like "END_HTML" in your .emacs file? Try to make a minimal example. - Carsten --Apple-Mail-7--296937290 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Manish,

On = Jan 8, 2009, at 9:35 AM, Manish wrote:

There = are multiple but related issues and requests in the mail = below.
Wasn't sure so haven't split into separate emails. =  Please excuse me
if this is not correct form.

 On = Mon, Jan 5, 2009 at 6:02 PM, Carsten Dominik wrote:

I have just = uploaded 6.17a which revamps the codeline references = stuff,
in the following = way:

1. The default = label now looks like   (ref:name)

2. The default = format is defined in = org-coderef-label-format,
= with the default value "(ref:%s)".


This is very nice.

3. You can change the format for each individual snippet = with the -l switch:

=  #+BEGIN_SRC pascal -n -r -l "((%s))"

Is it = possible to use this line numbering facility for files included
in by = "#+INCLUDE" mechanism (sec. 12.1 of = manual?)

Yes, you can now just add = the switched to the end of the INCLUDE = line.


4. Links to the = labels have also changed, they are now

=   [[(name)]] or [[(name)][in line = (name)]]

instead = of

  [[((name))]] or [[((name))][in line = ((name))]]

i.e. only = single parenthesis around the label name.

I added a = (ref:string) after a comment mark in the original file being
included = and created a link like shown above.  The highlighting = works
fine but the link does not reflect the line number of the text = (didn't
also expect to work until lines were = numbered.)

This should now = work

Surprisingly, = publish (HTML) attempt also tries to create some .tex
files, not sure = why.

,----[ *Messages* ]
| Publishing file = d:/home/zms/gehc.git/gdoc/dg.org
| Exporting...
| OVERVIEW
| = CONTENTS...done
| Creating LaTeX image 1
| Creating LaTeX image = 2
| Creating LaTeX image 3
| Failed to create dvi file from = d:/home/zms/tmp/orgtex34725Zc.tex
| Creating LaTeX image 4
| = Failed to create dvi file from d:/home/zms/tmp/orgtex3472Gki.tex
| = Creating LaTeX image 5
| Failed to create dvi file from = d:/home/zms/tmp/orgtex3472Tuo.tex
| Creating LaTeX image 6
| = Failed to create dvi file from d:/home/zms/tmp/orgtex3472g4u.tex
| = Creating LaTeX image 7
| Failed to create dvi file from = d:/home/zms/tmp/orgtex3472tC1.tex
| Exporting... [2 times]
| = Saving file d:/home/zms/gehc.git/gdoc_pub/dg.html...
| Wrote = d:/home/zms/gehc.git/gdoc_pub/dg.html
| Exporting... = done
`----

I guess you have some = math snippets in the file, and

 


??  Then all these snippets will be processed though LaTeX = to create images for inclusion into the HTML = file.

Also, I = was trying the example from documentation with:

#+INCLUDE = "~/.emacs" src emacs-lisp

I cannot = reproduce it, I guess you have something
like "END_HTML" in = your .emacs file?  Try to make a minimal = example.

- = Carsten

= --Apple-Mail-7--296937290-- --===============0785302938== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0785302938==--