* [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
@ 2013-07-02 4:07 feng shu
2013-07-02 16:54 ` Nicolas Goaziou
0 siblings, 1 reply; 11+ messages in thread
From: feng shu @ 2013-07-02 4:07 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #1.2: Type: text/html, Size: 26 bytes --]
[-- Attachment #2: 0001-Let-make-be-an-option-to-org-latex-pdf-process.patch --]
[-- Type: application/octet-stream, Size: 1454 bytes --]
From 63eba2e491a0c410b3841cbad2dd1a9f80416bca Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu@gmail.com>
Date: Tue, 2 Jul 2013 11:52:10 +0800
Subject: [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
* ox-latex.el (org-latex-pdf-process): let =`make'= be a
preconfigured choice and change the wording of the docstring.
TINYCHANGE
---
lisp/ox-latex.el | 7 +++++--
1 个文件被修改,插入 5 行(+),删除 2 行(-)
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 09928a4..1708108 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -788,8 +788,9 @@ then `texi2dvi' is the superior choice as it automates the LaTeX
build process by calling the \"correct\" combinations of
auxiliary programs. Org does offer `texi2dvi' as one of the
customize options. Alternatively, `rubber' and `latexmk' also
-provide similar functionality. The latter supports `biber' out
-of the box.
+provide similar functionality. The latter supports `biber' out
+of the box. If you prefer to use make command, you can create
+Makefile and use `make' option.
Alternatively, this may be a Lisp function that does the
processing, so you could use this to apply the machinery of
@@ -829,6 +830,8 @@ file name as its single argument."
("rubber -d --into %o %f"))
(const :tag "latexmk"
("latexmk -g -pdf %f"))
+ (const :tag "make"
+ ("make"))
(function)))
(defcustom org-latex-logfiles-extensions
--
1.7.10.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
2013-07-02 4:07 [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'= feng shu
@ 2013-07-02 16:54 ` Nicolas Goaziou
2013-07-02 17:18 ` Jambunathan K
2013-07-02 23:09 ` feng shu
0 siblings, 2 replies; 11+ messages in thread
From: Nicolas Goaziou @ 2013-07-02 16:54 UTC (permalink / raw)
To: feng shu; +Cc: emacs-orgmode
Hello,
feng shu <tumashu@gmail.com> writes:
> From 63eba2e491a0c410b3841cbad2dd1a9f80416bca Mon Sep 17 00:00:00 2001
> From: Feng Shu <tumashu@gmail.com>
> Date: Tue, 2 Jul 2013 11:52:10 +0800
> Subject: [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
>
> * ox-latex.el (org-latex-pdf-process): let =`make'= be a
> preconfigured choice and change the wording of the docstring.
I don't mind applying it, but shouldn't it as simple to provide
a function that will call "make" instead?
It's impossible to provide every solution in the wild for that. Is this
one really necessary: it doesn't have complicated arguments.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
2013-07-02 16:54 ` Nicolas Goaziou
@ 2013-07-02 17:18 ` Jambunathan K
2013-07-02 17:21 ` Nicolas Goaziou
2013-07-02 23:09 ` feng shu
1 sibling, 1 reply; 11+ messages in thread
From: Jambunathan K @ 2013-07-02 17:18 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: feng shu, emacs-orgmode
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> Hello,
>
> feng shu <tumashu@gmail.com> writes:
>
>> From 63eba2e491a0c410b3841cbad2dd1a9f80416bca Mon Sep 17 00:00:00 2001
>> From: Feng Shu <tumashu@gmail.com>
>> Date: Tue, 2 Jul 2013 11:52:10 +0800
>> Subject: [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
>>
>> * ox-latex.el (org-latex-pdf-process): let =`make'= be a
>> preconfigured choice and change the wording of the docstring.
>
> I don't mind applying it, but shouldn't it as simple to provide
> a function that will call "make" instead?
>
> It's impossible to provide every solution in the wild for that. Is this
> one really necessary: it doesn't have complicated arguments.
Can (other ...) be used here? See (info "(elisp) Composite Types")
>
>
> Regards,
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
2013-07-02 17:18 ` Jambunathan K
@ 2013-07-02 17:21 ` Nicolas Goaziou
2013-07-02 17:48 ` Jambunathan K
0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2013-07-02 17:21 UTC (permalink / raw)
To: Jambunathan K; +Cc: feng shu, emacs-orgmode
Hello,
Jambunathan K <kjambunathan@gmail.com> writes:
> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>
>> Hello,
>>
>> feng shu <tumashu@gmail.com> writes:
>>
>>> From 63eba2e491a0c410b3841cbad2dd1a9f80416bca Mon Sep 17 00:00:00 2001
>>> From: Feng Shu <tumashu@gmail.com>
>>> Date: Tue, 2 Jul 2013 11:52:10 +0800
>>> Subject: [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
>>>
>>> * ox-latex.el (org-latex-pdf-process): let =`make'= be a
>>> preconfigured choice and change the wording of the docstring.
>>
>> I don't mind applying it, but shouldn't it as simple to provide
>> a function that will call "make" instead?
>>
>> It's impossible to provide every solution in the wild for that. Is this
>> one really necessary: it doesn't have complicated arguments.
>
> Can (other ...) be used here? See (info "(elisp) Composite Types")
AFAIU, `other' means "whatever your answer is, always do the same",
which is not what we want.
If you want "give whatever you want and we'll use it", it should be
a `string' type. But can't `function', which is already implemented, do
the same anyway?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
2013-07-02 17:21 ` Nicolas Goaziou
@ 2013-07-02 17:48 ` Jambunathan K
0 siblings, 0 replies; 11+ messages in thread
From: Jambunathan K @ 2013-07-02 17:48 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: feng shu, emacs-orgmode
> AFAIU, `other' means "whatever your answer is, always do the same",
> which is not what we want.
>
> If you want "give whatever you want and we'll use it", it should be
> a `string' type. But can't `function', which is already implemented, do
> the same anyway?
Well the OP can change the default value - the "Shell command sequence"
- to make. I see no need for a change.
So `other' is like const. May be it's a `restricted-sexp'.
> Regards,
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
2013-07-02 16:54 ` Nicolas Goaziou
2013-07-02 17:18 ` Jambunathan K
@ 2013-07-02 23:09 ` feng shu
2013-07-02 23:51 ` Suvayu Ali
1 sibling, 1 reply; 11+ messages in thread
From: feng shu @ 2013-07-02 23:09 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 966 bytes --]
Customize `org-latex-pdf-process isn't very convenient.
Is it possible add a feature like: #+LATEX_PDF_PROCESS: latexmk
or add #OPTIONS: ;latex_pdf_process latexmk
Feng
On Wed, Jul 3, 2013 at 12:54 AM, Nicolas Goaziou <n.goaziou@gmail.com>wrote:
> Hello,
>
> feng shu <tumashu@gmail.com> writes:
>
> > From 63eba2e491a0c410b3841cbad2dd1a9f80416bca Mon Sep 17 00:00:00 2001
> > From: Feng Shu <tumashu@gmail.com>
> > Date: Tue, 2 Jul 2013 11:52:10 +0800
> > Subject: [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
> >
> > * ox-latex.el (org-latex-pdf-process): let =`make'= be a
> > preconfigured choice and change the wording of the docstring.
>
> I don't mind applying it, but shouldn't it as simple to provide
> a function that will call "make" instead?
>
> It's impossible to provide every solution in the wild for that. Is this
> one really necessary: it doesn't have complicated arguments.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>
[-- Attachment #2: Type: text/html, Size: 1924 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
2013-07-02 23:09 ` feng shu
@ 2013-07-02 23:51 ` Suvayu Ali
2013-07-03 6:22 ` Feng Shu
2013-07-03 8:12 ` Bastien
0 siblings, 2 replies; 11+ messages in thread
From: Suvayu Ali @ 2013-07-02 23:51 UTC (permalink / raw)
To: emacs-orgmode
On Wed, Jul 03, 2013 at 07:09:35AM +0800, feng shu wrote:
> Customize `org-latex-pdf-process isn't very convenient.
> Is it possible add a feature like: #+LATEX_PDF_PROCESS: latexmk
> or add #OPTIONS: ;latex_pdf_process latexmk
If you don't mind my chiming in, the standard way to customise Emacs
behaviour (across all modes, not just Org) is through
customize-variable. Org cannot keep on introducing new keywords just
because of convenience.
In any case, this is also a security risk. This starts an external
process. Allowing something like this means one can run an arbitrary
command just by exporting a file. I do not think that is wise at all.
Exactly for this reason we have org-confirm-babel-evaluate defaulting to
t.
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
2013-07-02 23:51 ` Suvayu Ali
@ 2013-07-03 6:22 ` Feng Shu
2013-07-03 8:31 ` Suvayu Ali
2013-07-03 8:12 ` Bastien
1 sibling, 1 reply; 11+ messages in thread
From: Feng Shu @ 2013-07-03 6:22 UTC (permalink / raw)
To: emacs-orgmode
Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> On Wed, Jul 03, 2013 at 07:09:35AM +0800, feng shu wrote:
>> Customize `org-latex-pdf-process isn't very convenient.
>> Is it possible add a feature like: #+LATEX_PDF_PROCESS: latexmk
>> or add #OPTIONS: ;latex_pdf_process latexmk
>
> If you don't mind my chiming in, the standard way to customise Emacs
> behaviour (across all modes, not just Org) is through
> customize-variable. Org cannot keep on introducing new keywords just
> because of convenience.
I don't think so, Convenience is very important in most situation. we can
introduce new keywords just for convenience! #+LATEX_CLASS is a good example,
If we don't want convencience. we can just customize `org-latex-default-class
The core is that how many org-mode users or potential users
can benefit from this keyword!
we can export pdf with latex by using many different schemes and we can export pdf
with libreoffice. So adding a keyword which let users choose a pdf export scheme
for current file is not a bad idea.
>
> In any case, this is also a security risk. This starts an external
> process. Allowing something like this means one can run an arbitrary
> command just by exporting a file. I do not think that is wise at all.
> Exactly for this reason we have org-confirm-babel-evaluate defaulting to
> t.
If we only let user select scheme predefined in org-latex-pdf-process, I don't
think security is a problem. If a user adding a dangerous command in
'org-latex-pdf-process, he should know what he is doing. It's his choose.
--
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
2013-07-02 23:51 ` Suvayu Ali
2013-07-03 6:22 ` Feng Shu
@ 2013-07-03 8:12 ` Bastien
1 sibling, 0 replies; 11+ messages in thread
From: Bastien @ 2013-07-03 8:12 UTC (permalink / raw)
To: Suvayu Ali; +Cc: emacs-orgmode
Hi,
Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> If you don't mind my chiming in, the standard way to customise Emacs
> behaviour (across all modes, not just Org) is through
> customize-variable. Org cannot keep on introducing new keywords just
> because of convenience.
>
> In any case, this is also a security risk. This starts an external
> process. Allowing something like this means one can run an arbitrary
> command just by exporting a file. I do not think that is wise at all.
> Exactly for this reason we have org-confirm-babel-evaluate defaulting to
> t.
I tend to agree. Also, the user can setup `org-latex-pdf-process' as
a local variables, which are less error-prone when it comes to security.
--
Bastien
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
2013-07-03 6:22 ` Feng Shu
@ 2013-07-03 8:31 ` Suvayu Ali
2013-07-03 14:01 ` Feng Shu
0 siblings, 1 reply; 11+ messages in thread
From: Suvayu Ali @ 2013-07-03 8:31 UTC (permalink / raw)
To: emacs-orgmode
On Wed, Jul 03, 2013 at 02:22:40PM +0800, Feng Shu wrote:
> Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
>
> > On Wed, Jul 03, 2013 at 07:09:35AM +0800, feng shu wrote:
> >> Customize `org-latex-pdf-process isn't very convenient.
> >> Is it possible add a feature like: #+LATEX_PDF_PROCESS: latexmk
> >> or add #OPTIONS: ;latex_pdf_process latexmk
> >
> > If you don't mind my chiming in, the standard way to customise Emacs
> > behaviour (across all modes, not just Org) is through
> > customize-variable. Org cannot keep on introducing new keywords just
> > because of convenience.
>
> I don't think so, Convenience is very important in most situation. we can
> introduce new keywords just for convenience! #+LATEX_CLASS is a good example,
> If we don't want convencience. we can just customize `org-latex-default-class
There is a big difference between the two variables. Consider this:
org-latex-classes depends per document (most likely you wand different
documents for different things, hence maybe you also want different
classes), however you want to choose your LaTeX backend once (at most it
varies from project to project). But again, if you use one build system
for a project you are most likely using the same build system in other
projects too. The only difference I can see is when you have something
like make for projects, but simply LaTeX for a simple document/notes.
In that case, I would say Bastien's suggestion to use file local
variables is best suited. At one point I used something like this
headline at the end of few Org files:
* COMMENT local setup :ARCHIVE:
# Local Variables:
# org-latex-to-pdf-process: ("xelatex -interaction nonstopmode -output-directory %o %f" "xelatex -interaction nonstopmode -output-directory %o %f" "xelatex -interaction nonstopmode -output-directory %o %f")
# End:
Hope this helps,
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'=.
2013-07-03 8:31 ` Suvayu Ali
@ 2013-07-03 14:01 ` Feng Shu
0 siblings, 0 replies; 11+ messages in thread
From: Feng Shu @ 2013-07-03 14:01 UTC (permalink / raw)
To: emacs-orgmode
Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> On Wed, Jul 03, 2013 at 02:22:40PM +0800, Feng Shu wrote:
>> Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
>>
>> > On Wed, Jul 03, 2013 at 07:09:35AM +0800, feng shu wrote:
>> >> Customize `org-latex-pdf-process isn't very convenient.
>> >> Is it possible add a feature like: #+LATEX_PDF_PROCESS: latexmk
>> >> or add #OPTIONS: ;latex_pdf_process latexmk
>> >
>> > If you don't mind my chiming in, the standard way to customise Emacs
>> > behaviour (across all modes, not just Org) is through
>> > customize-variable. Org cannot keep on introducing new keywords just
>> > because of convenience.
>>
>> I don't think so, Convenience is very important in most situation. we can
>> introduce new keywords just for convenience! #+LATEX_CLASS is a good example,
>> If we don't want convencience. we can just customize `org-latex-default-class
>
> There is a big difference between the two variables. Consider this:
> org-latex-classes depends per document (most likely you wand different
> documents for different things, hence maybe you also want different
> classes), however you want to choose your LaTeX backend once (at most it
> varies from project to project). But again, if you use one build system
> for a project you are most likely using the same build system in other
> projects too. The only difference I can see is when you have something
> like make for projects, but simply LaTeX for a simple document/notes.
> In that case, I would say Bastien's suggestion to use file local
> variables is best suited. At one point I used something like this
> headline at the end of few Org files:
>
> * COMMENT local setup :ARCHIVE:
>
> # Local Variables:
> # org-latex-to-pdf-process: ("xelatex -interaction nonstopmode
> -output-directory %o %f" "xelatex -interaction nonstopmode
> -output-directory %o %f" "xelatex -interaction nonstopmode
> -output-directory %o %f")
> # End:
Powerful Tips, I like! Maybe it should be include into org document.
>
> Hope this helps,
--
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-07-03 14:01 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-02 4:07 [PATCH] Let =`make'= be an option to =`org-latex-pdf-process'= feng shu
2013-07-02 16:54 ` Nicolas Goaziou
2013-07-02 17:18 ` Jambunathan K
2013-07-02 17:21 ` Nicolas Goaziou
2013-07-02 17:48 ` Jambunathan K
2013-07-02 23:09 ` feng shu
2013-07-02 23:51 ` Suvayu Ali
2013-07-03 6:22 ` Feng Shu
2013-07-03 8:31 ` Suvayu Ali
2013-07-03 14:01 ` Feng Shu
2013-07-03 8:12 ` Bastien
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).