From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: latex listings number-lines problems with new exporter Date: Tue, 05 Mar 2013 12:18:36 +0100 Message-ID: <87mwuit7qr.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCptS-0001qA-TM for emacs-orgmode@gnu.org; Tue, 05 Mar 2013 06:18:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCptR-0001I0-Db for emacs-orgmode@gnu.org; Tue, 05 Mar 2013 06:18:50 -0500 Received: from mail-we0-x22e.google.com ([2a00:1450:400c:c03::22e]:40967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCptR-0001Hp-6l for emacs-orgmode@gnu.org; Tue, 05 Mar 2013 06:18:49 -0500 Received: by mail-we0-f174.google.com with SMTP id r6so5936832wey.19 for ; Tue, 05 Mar 2013 03:18:48 -0800 (PST) In-Reply-To: (Thomas Alexander Gerds's message of "Tue, 05 Mar 2013 10:59:18 +0100") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Thomas Alexander Gerds Cc: emacs-orgmode@gnu.org Hello, Thomas Alexander Gerds writes: > using org-mode "7.9.3f" and the new exporter I was desperately trying to > get line numbers back for exported R code blocks using the latex listing > package. first I tried > > (setq org-latex-listings-options > '(("basicstyle" "\\small") > ("numbers" "left"))) > > which gives > > ,---- > | \lstset{basicstyle=\small,numbers=left,language=R,numbers=none} > `---- > > that this is possible seems sub-optimal :) Thanks. This should be fixed in master. If user provides "numbers" option, "+n" and "-n" switches will be ignored from src-block. > some debugging led me via org-latex-src-block to > org-element-src-block-parser which indicated adding a switch "-n" behind > to the scr-block: > > ,---- > | #+BEGIN_SRC R -n :results output raw :exports both :session *R* :cache yes > > > this works and has a new feature (switch +n) which allows numbering to > be continued in subsequent blocks. > > Now, I would like to set numbers on globally or buffer-local for all > blocks. But is it possible to set a switch globally? I think parameters > can still be set with an appropriate #+PROPERTY: statement!? This isn't possible. But, as noted previously, you can activate numbering globally by adding ("numbers" "left") association to `org-latex-listings-options'. > whatever the answer, it would be nice if this feature was mentioned in > the help string of org-latex-listing-options. I don't seed the need for that. "+n" and "-n" switches are already documented in the manual, and are not "listings" specific. They are not even LaTeX specific. Anyway, if you think it's still important, I will accept a patch for it (along with one modifying `org-latex-minted-options' accordingly). Regards, -- Nicolas Goaziou