From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: SOLVED: source code block language 'makefile' and listings package Date: Fri, 11 Jul 2014 10:53:22 +0200 Message-ID: <59E4A136-6432-4358-8EEA-1EE3AEF42E61@gmail.com> References: <87fvicaura.fsf@gmail.com> Mime-Version: 1.0 (1.0) Content-Type: multipart/alternative; boundary=Apple-Mail-11BEAED4-D23B-4891-B460-F918C31C2B18 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5WaH-0007uQ-AJ for emacs-orgmode@gnu.org; Fri, 11 Jul 2014 04:53:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5WaB-0005AT-7e for emacs-orgmode@gnu.org; Fri, 11 Jul 2014 04:53:37 -0400 Received: from mail-wg0-x230.google.com ([2a00:1450:400c:c00::230]:47516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5WaA-0005A3-TT for emacs-orgmode@gnu.org; Fri, 11 Jul 2014 04:53:31 -0400 Received: by mail-wg0-f48.google.com with SMTP id x13so731695wgg.19 for ; Fri, 11 Jul 2014 01:53:28 -0700 (PDT) In-Reply-To: <87fvicaura.fsf@gmail.com> 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: Nick Dokos Cc: "emacs-orgmode@gnu.org" --Apple-Mail-11BEAED4-D23B-4891-B460-F918C31C2B18 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Envoy=C3=A9 de mon iPhone > Le 8 juil. 2014 =C3=A0 14:40, Nick Dokos a =C3=A9crit := >=20 > Rainer M Krug writes: >=20 >> Much simpler then that: I simply changed the variable >> org-latex-listings-langs to include makefile: >>=20 >> ,---- >> | (setq org-latex-listings-langs=20 >> | '((emacs-lisp "Lisp")=20 >> | (lisp "Lisp") > ... =20 >> | (sql "SQL") >> | (sqlite "sql") >> | (makefile "make"))) >> `---- >>=20 >> Works perfectly. >>=20 >> Now if I just could figure out on how I can simply *add* the makefile to >> the list without defining it completely new.. >=20 > Two methods: >=20 > this one is pretty much generic lisp: >=20 > --8<---------------cut here---------------start------------->8--- > (setq org-latex-listings-langs > (append org-latex-listings-langs '((makefile "make")))) > --8<---------------cut here---------------end--------------->8--- >=20 > A slightly simpler, more idiomatic emacs-lisp way: >=20 > --8<---------------cut here---------------start------------->8--- > (add-to-list 'org-latex-listings-langs '(makefile "make")) > --8<---------------cut here---------------end--------------->8--- >=20 Thanks - learned something more.=20 Cheers, Rainer=20 > --=20 > Nick >=20 >=20 --Apple-Mail-11BEAED4-D23B-4891-B460-F918C31C2B18 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable


Envoy=C3=A9 de mon iPhone

Le 8 juil. 2014 =C3=A0 14:40, Nick Dokos <ndokos@gmail.com> a =C3=A9crit :

Rainer M Krug <Rainer@krugs.de> writes:

Much simpler then that: I simply changed the varia= ble
org-latex-listing= s-langs to include makefile:

,----=
| (setq org-latex-listings-= langs
|   =     '((emacs-lisp "Lisp")
|         = (lisp "Lisp")
...     &nbs= p;       
|         (sql "SQL")
|    &nbs= p;    (sqlite "sql")
|         (makefi= le "make")))
`----

Works perfectly.

Now if I just could figure out on how I can simply *add* the makefi= le to
the list withou= t defining it completely new..


Two methods:=

this one is pretty much generic lisp:
<= span>
--8<---------------cut here---------------start----= --------->8---
(setq org-latex-listings-langs
<= span>      (append org-latex-listings-langs '((make= file "make"))))
--8<---------------cut here--------------= -end--------------->8---

A slightly simp= ler, more idiomatic emacs-lisp way:

--8<= ---------------cut here---------------start------------->8---
<= span>(add-to-list 'org-latex-listings-langs '(makefile "make"))
--8<---------------cut here---------------end--------------->8---<= /span>


Thanks - learne= d something more. 

Cheers,

Rainer 

<= blockquote type=3D"cite">
--
Nick


= --Apple-Mail-11BEAED4-D23B-4891-B460-F918C31C2B18--