all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* problem with tex-start-options-string
@ 2003-08-29 16:26 Matthias Meulien
  2003-08-29 17:45 ` Kevin Rodgers
  2003-08-29 17:45 ` Kevin Rodgers
  0 siblings, 2 replies; 3+ messages in thread
From: Matthias Meulien @ 2003-08-29 16:26 UTC (permalink / raw)


Hi,

Recent (La)TeX versions provides a command line option `-src' to
insert source specials to perform inverse search: A mouse click in the
xdvi window can open an editor with the corresponding place in the
source file.

So I want the `tex-file' command to use the following syntax:

,----
| [matthias@clarinde ~/TeX]$ latex -src-specials -interaction=nonstop FILE
| This is TeXk, Version 3.14159 (Web2C 7.4.5)
|  Source specials enabled.
| LaTeX2e <2001/06/01>
| Babel <v3.7h> and hyphenation patterns for american, french, german, 
| ngerman, basque, italian, portuges, russian, spanish, nohyphenation, 
| loaded.
| ...
`----

I have set `tex-start-options-string' to the string "-src-specials
-interaction=nonstop". But it is passed to (from `tex-start-tex')
`shell-quote-argument' resulting in the following error:

,----
| [matthias@clarinde ~/TeX]$ latex -src-specials\ -interaction\=nonstopmode FILE
| latex: unrecognized option `-src-specials -interaction=nonstopmode'
| Try `latex --help' for more information.
`----

Note the two backslash. How should I do ? Today I use the following
(in appropriate hooks):

(setq tex-start-options-string nil)
(setq tex-run-command "tex -src-specials -interaction=nonstopmode")
(setq latex-run-command "latex -src-specials -interaction=nonstopmode")


Ugly isn't it ? Don't you think `tex-start-options-string' should be
a list ?

Thanks for your attention.
-- 
Matthias

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

* Re: problem with tex-start-options-string
  2003-08-29 16:26 problem with tex-start-options-string Matthias Meulien
  2003-08-29 17:45 ` Kevin Rodgers
@ 2003-08-29 17:45 ` Kevin Rodgers
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2003-08-29 17:45 UTC (permalink / raw)


[Followup-To: gnu.emacs.bug]

Matthias Meulien wrote:

> Recent (La)TeX versions provides a command line option `-src' to
> insert source specials to perform inverse search: A mouse click in the
> xdvi window can open an editor with the corresponding place in the
> source file.
> 
> So I want the `tex-file' command to use the following syntax:
> 
> ,----
> | [matthias@clarinde ~/TeX]$ latex -src-specials -interaction=nonstop FILE
> | This is TeXk, Version 3.14159 (Web2C 7.4.5)
> |  Source specials enabled.
> | LaTeX2e <2001/06/01>
> | Babel <v3.7h> and hyphenation patterns for american, french, german, 
> | ngerman, basque, italian, portuges, russian, spanish, nohyphenation, 
> | loaded.
> | ...
> `----
> 
> I have set `tex-start-options-string' to the string "-src-specials
> -interaction=nonstop". But it is passed to (from `tex-start-tex')
> `shell-quote-argument' resulting in the following error:
> 
> ,----
> | [matthias@clarinde ~/TeX]$ latex -src-specials\ -interaction\=nonstopmode FILE
> | latex: unrecognized option `-src-specials -interaction=nonstopmode'
> | Try `latex --help' for more information.
> `----
> 
> Note the two backslash. How should I do ? Today I use the following
> (in appropriate hooks):
> 
> (setq tex-start-options-string nil)
> (setq tex-run-command "tex -src-specials -interaction=nonstopmode")
> (setq latex-run-command "latex -src-specials -interaction=nonstopmode")
> 
> 
> Ugly isn't it ? Don't you think `tex-start-options-string' should be
> a list ?


Yes.  Here's a patch that does so and renames it `tex-start-options':


*** emacs-21.3/lisp/textmodes/tex-mode.el	Sun Mar  3 18:38:27 2002
--- emacs-21.3/lisp/textmodes/tex-mode.el	Fri Aug 29 11:20:21 2003
***************
*** 120,133 ****
     :group 'tex-run)

   ;;;###autoload
! (defcustom tex-start-options-string "\\nonstopmode\\input"
!   "*TeX options to use when running TeX.
! These precede the input file name. If nil, TeX runs without option.
! See the documentation of `tex-command'."
!   :type '(radio (const :tag "Interactive \(nil\)" nil)
   		(const :tag "Nonstop \(\"\\nonstopmode\\input\"\)"
! 		       "\\nonstopmode\\input")
! 		(string :tag "String at your choice"))
     :group 'tex-run
     :version "20.4")

--- 120,134 ----
     :group 'tex-run)

   ;;;###autoload
! (defcustom tex-start-options '("\\nonstopmode\\input")
!   "*List of strings to pass as TeX options to `tex-command'.
! These precede the input file name. If nil, run TeX without any options."
!   :type '(radio (const :tag "Interactive \(\)"
!                        ())
   		(const :tag "Nonstop \(\"\\nonstopmode\\input\"\)"
! 		       ("\\nonstopmode\\input"))
! 		(repeat :tag "Other \(\"-option\" ...\)"
!                         (string :tag "Option")))
     :group 'tex-run
     :version "20.4")

***************
*** 238,244 ****
   (defvar tex-command nil
     "*Command to run TeX.
   If this string contains an asterisk \(`*'\), that is replaced by the file name\;
! otherwise the \(shell-quoted\) value of `tex-start-options-string' and
   the file name are added at the end, with blanks as separators.

   In TeX, LaTeX, and SliTeX Mode this variable becomes buffer local.
--- 239,245 ----
   (defvar tex-command nil
     "*Command to run TeX.
   If this string contains an asterisk \(`*'\), that is replaced by the file name\;
! otherwise the \(shell-quoted\) elements of `tex-start-options' and
   the file name are added at the end, with blanks as separators.

   In TeX, LaTeX, and SliTeX Mode this variable becomes buffer local.
***************
*** 1447,1455 ****
   		      (comint-quote-filename file)
   		      (substring command (1+ star)))
               (concat command " "
! 		    (if (< 0 (length tex-start-options-string))
! 	 
	(concat
! 	 
	 (shell-quote-argument tex-start-options-string) " "))
   		    (comint-quote-filename file)))))
       (tex-send-tex-command compile-command dir)))

--- 1448,1454 ----
   		      (comint-quote-filename file)
   		      (substring command (1+ star)))
               (concat command " "
!                     (mapconcat 'shell-quote-argument tex-start-options " ")
   		    (comint-quote-filename file)))))
       (tex-send-tex-command compile-command dir)))


*** emacs-21.3/lisp/textmodes/texinfo.el	Mon Jul 16 06:23:00 2001
--- emacs-21.3/lisp/textmodes/texinfo.el	Fri Aug 29 11:00:10 2003
***************
*** 955,963 ****
     (interactive)
     (require 'tex-mode)
     (let ((tex-command texinfo-texi2dvi-command)
! 	;; Disable tex-start-options-string.  texi2dvi would not
   	;; understand anything specified here.
! 	(tex-start-options-string ""))
       (tex-buffer)))

   (defun texinfo-texindex ()
--- 955,963 ----
     (interactive)
     (require 'tex-mode)
     (let ((tex-command texinfo-texi2dvi-command)
! 	;; Disable tex-start-options.  texi2dvi would not
   	;; understand anything specified here.
! 	(tex-start-options '()))
       (tex-buffer)))

   (defun texinfo-texindex ()

-- 
Kevin Rodgers

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

* Re: problem with tex-start-options-string
  2003-08-29 16:26 problem with tex-start-options-string Matthias Meulien
@ 2003-08-29 17:45 ` Kevin Rodgers
  2003-08-29 17:45 ` Kevin Rodgers
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2003-08-29 17:45 UTC (permalink / raw)


[Followup-To: gnu.emacs.bug]

Matthias Meulien wrote:

> Recent (La)TeX versions provides a command line option `-src' to
> insert source specials to perform inverse search: A mouse click in the
> xdvi window can open an editor with the corresponding place in the
> source file.
> 
> So I want the `tex-file' command to use the following syntax:
> 
> ,----
> | [matthias@clarinde ~/TeX]$ latex -src-specials -interaction=nonstop FILE
> | This is TeXk, Version 3.14159 (Web2C 7.4.5)
> |  Source specials enabled.
> | LaTeX2e <2001/06/01>
> | Babel <v3.7h> and hyphenation patterns for american, french, german, 
> | ngerman, basque, italian, portuges, russian, spanish, nohyphenation, 
> | loaded.
> | ...
> `----
> 
> I have set `tex-start-options-string' to the string "-src-specials
> -interaction=nonstop". But it is passed to (from `tex-start-tex')
> `shell-quote-argument' resulting in the following error:
> 
> ,----
> | [matthias@clarinde ~/TeX]$ latex -src-specials\ -interaction\=nonstopmode FILE
> | latex: unrecognized option `-src-specials -interaction=nonstopmode'
> | Try `latex --help' for more information.
> `----
> 
> Note the two backslash. How should I do ? Today I use the following
> (in appropriate hooks):
> 
> (setq tex-start-options-string nil)
> (setq tex-run-command "tex -src-specials -interaction=nonstopmode")
> (setq latex-run-command "latex -src-specials -interaction=nonstopmode")
> 
> 
> Ugly isn't it ? Don't you think `tex-start-options-string' should be
> a list ?


Yes.  Here's a patch that does so and renames it `tex-start-options':


*** emacs-21.3/lisp/textmodes/tex-mode.el	Sun Mar  3 18:38:27 2002
--- emacs-21.3/lisp/textmodes/tex-mode.el	Fri Aug 29 11:20:21 2003
***************
*** 120,133 ****
     :group 'tex-run)

   ;;;###autoload
! (defcustom tex-start-options-string "\\nonstopmode\\input"
!   "*TeX options to use when running TeX.
! These precede the input file name. If nil, TeX runs without option.
! See the documentation of `tex-command'."
!   :type '(radio (const :tag "Interactive \(nil\)" nil)
   		(const :tag "Nonstop \(\"\\nonstopmode\\input\"\)"
! 		       "\\nonstopmode\\input")
! 		(string :tag "String at your choice"))
     :group 'tex-run
     :version "20.4")

--- 120,134 ----
     :group 'tex-run)

   ;;;###autoload
! (defcustom tex-start-options '("\\nonstopmode\\input")
!   "*List of strings to pass as TeX options to `tex-command'.
! These precede the input file name. If nil, run TeX without any options."
!   :type '(radio (const :tag "Interactive \(\)"
!                        ())
   		(const :tag "Nonstop \(\"\\nonstopmode\\input\"\)"
! 		       ("\\nonstopmode\\input"))
! 		(repeat :tag "Other \(\"-option\" ...\)"
!                         (string :tag "Option")))
     :group 'tex-run
     :version "20.4")

***************
*** 238,244 ****
   (defvar tex-command nil
     "*Command to run TeX.
   If this string contains an asterisk \(`*'\), that is replaced by the file name\;
! otherwise the \(shell-quoted\) value of `tex-start-options-string' and
   the file name are added at the end, with blanks as separators.

   In TeX, LaTeX, and SliTeX Mode this variable becomes buffer local.
--- 239,245 ----
   (defvar tex-command nil
     "*Command to run TeX.
   If this string contains an asterisk \(`*'\), that is replaced by the file name\;
! otherwise the \(shell-quoted\) elements of `tex-start-options' and
   the file name are added at the end, with blanks as separators.

   In TeX, LaTeX, and SliTeX Mode this variable becomes buffer local.
***************
*** 1447,1455 ****
   		      (comint-quote-filename file)
   		      (substring command (1+ star)))
               (concat command " "
! 		    (if (< 0 (length tex-start-options-string))
! 	 
	(concat
! 	 
	 (shell-quote-argument tex-start-options-string) " "))
   		    (comint-quote-filename file)))))
       (tex-send-tex-command compile-command dir)))

--- 1448,1454 ----
   		      (comint-quote-filename file)
   		      (substring command (1+ star)))
               (concat command " "
!                     (mapconcat 'shell-quote-argument tex-start-options " ")
   		    (comint-quote-filename file)))))
       (tex-send-tex-command compile-command dir)))


*** emacs-21.3/lisp/textmodes/texinfo.el	Mon Jul 16 06:23:00 2001
--- emacs-21.3/lisp/textmodes/texinfo.el	Fri Aug 29 11:00:10 2003
***************
*** 955,963 ****
     (interactive)
     (require 'tex-mode)
     (let ((tex-command texinfo-texi2dvi-command)
! 	;; Disable tex-start-options-string.  texi2dvi would not
   	;; understand anything specified here.
! 	(tex-start-options-string ""))
       (tex-buffer)))

   (defun texinfo-texindex ()
--- 955,963 ----
     (interactive)
     (require 'tex-mode)
     (let ((tex-command texinfo-texi2dvi-command)
! 	;; Disable tex-start-options.  texi2dvi would not
   	;; understand anything specified here.
! 	(tex-start-options '()))
       (tex-buffer)))

   (defun texinfo-texindex ()

-- 
Kevin Rodgers

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

end of thread, other threads:[~2003-08-29 17:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-29 16:26 problem with tex-start-options-string Matthias Meulien
2003-08-29 17:45 ` Kevin Rodgers
2003-08-29 17:45 ` Kevin Rodgers

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.