emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] ox-latex.el: add out-of-the-box fontification for makefile source block
@ 2014-07-09  7:38 Rainer M Krug
  2014-07-16 12:56 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Rainer M Krug @ 2014-07-09  7:38 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 778 bytes --]

THis patch adds out-of-the-box fontification of makefile source code
blocks when using the package listings. As the makefile code blocks are
named =makefile= and the name of the language definition in the package
=listings= is m=make= the value (makefile "make") is added to the
variable org-latex-listings-langs.

Patch attached.

Cheers,

Rainer

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

PGP: 0x0F52F982

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-Add-makefile-to-org-latex-listings-langs.patch --]
[-- Type: text/x-patch, Size: 1134 bytes --]

From 1896502218f0e646ff3e6ca4b8fe7a3a93d11ba3 Mon Sep 17 00:00:00 2001
From: "Rainer M. Krug" <R.M.Krug@gmail.com>
Date: Wed, 9 Jul 2014 09:31:42 +0200
Subject: [PATCH] Add makefile to org-latex-listings-langs

Enable out-of-the-box syntax fontification of makefile source blocks
when using LaTeX package `liatings'

* lisp/ox-latex.el (org-latex-listings-langs): add `(makefile "make")'
  to the default value of the variable org-latex-listings-langs.
---
 lisp/ox-latex.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index b6dd311..80ca341 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -778,7 +778,8 @@ into previewing problems, please consult
     (shell-script "bash")
     (gnuplot "Gnuplot")
     (ocaml "Caml") (caml "Caml")
-    (sql "SQL") (sqlite "sql"))
+    (sql "SQL") (sqlite "sql")
+    (makefile "make"))
   "Alist mapping languages to their listing language counterpart.
 The key is a symbol, the major mode symbol without the \"-mode\".
 The value is the string that should be inserted as the language
-- 
2.0.1


[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ox-latex.el: add out-of-the-box fontification for makefile source block
  2014-07-09  7:38 [PATCH] ox-latex.el: add out-of-the-box fontification for makefile source block Rainer M Krug
@ 2014-07-16 12:56 ` Nicolas Goaziou
  2014-07-22  9:44   ` Rainer M Krug
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2014-07-16 12:56 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: emacs-orgmode

Hello,

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

> THis patch adds out-of-the-box fontification of makefile source code
> blocks when using the package listings. As the makefile code blocks are
> named =makefile= and the name of the language definition in the package
> =listings= is m=make= the value (makefile "make") is added to the
> variable org-latex-listings-langs.

Thank you for the patch. Since you modify the default value of
a defcustom, could you also add :version and :package-version keywords
to the variable? See `org-latex-known-warnings' for an example.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ox-latex.el: add out-of-the-box fontification for makefile source block
  2014-07-16 12:56 ` Nicolas Goaziou
@ 2014-07-22  9:44   ` Rainer M Krug
  2014-07-27 14:21     ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Rainer M Krug @ 2014-07-22  9:44 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Rainer M Krug <Rainer@krugs.de> writes:
>
>> THis patch adds out-of-the-box fontification of makefile source code
>> blocks when using the package listings. As the makefile code blocks are
>> named =makefile= and the name of the language definition in the package
>> =listings= is m=make= the value (makefile "make") is added to the
>> variable org-latex-listings-langs.
>
> Thank you for the patch. Since you modify the default value of
> a defcustom, could you also add :version and :package-version keywords
> to the variable? See `org-latex-known-warnings' for an example.

Will do so but only next week.

Thanks,

Rainer

>
>
> Regards,

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

PGP: 0x0F52F982

[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ox-latex.el: add out-of-the-box fontification for makefile source block
  2014-07-22  9:44   ` Rainer M Krug
@ 2014-07-27 14:21     ` Bastien
  2014-08-14 10:52       ` Rainer M Krug
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2014-07-27 14:21 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: emacs-orgmode

Hi Rainer,

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

> Will do so but only next week.

I applied the patch with the slight enhancement suggested by Nicolas.

I hope you don't mind me applying instead of you, it's just that I'm
in the flow now.

Thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ox-latex.el: add out-of-the-box fontification for makefile source block
  2014-07-27 14:21     ` Bastien
@ 2014-08-14 10:52       ` Rainer M Krug
  0 siblings, 0 replies; 5+ messages in thread
From: Rainer M Krug @ 2014-08-14 10:52 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 532 bytes --]

Thanks a lot Bastien - this got lost in some data chaos my side (small safe with backup drive inside was stolen.)


Cheers, 




Rainer
—
Sent from Mailbox on iPhone

On Mon, Jul 28, 2014 at 7:24 PM, Bastien <bzg@gnu.org> wrote:

> Hi Rainer,
> Rainer M Krug <Rainer@krugs.de> writes:
>> Will do so but only next week.
> I applied the patch with the slight enhancement suggested by Nicolas.
> I hope you don't mind me applying instead of you, it's just that I'm
> in the flow now.
> Thanks!
> -- 
>  Bastien

[-- Attachment #2: Type: text/html, Size: 1005 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-14 10:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-09  7:38 [PATCH] ox-latex.el: add out-of-the-box fontification for makefile source block Rainer M Krug
2014-07-16 12:56 ` Nicolas Goaziou
2014-07-22  9:44   ` Rainer M Krug
2014-07-27 14:21     ` Bastien
2014-08-14 10:52       ` Rainer M Krug

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).