all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Olive <olive.lin@versateladsl.be>
Cc: karl@freefriends.org
Subject: The correct patch
Date: Tue, 29 Mar 2005 22:53:22 +0200	[thread overview]
Message-ID: <4249C042.70708@versateladsl.be> (raw)

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

I submited a patch to correct the fact that the standard tex-mode fails 
for files containing special characters. I submited here the correct (I 
hope) patch (I have forget a few things in the last patch). I have also 
correct a bug which prevent tex-region to work.

In this patch I have replaced the call to "comint-quote-argument" with 
"shell-quote-argument" which I think is much better.

Note that some implementation of tex fails for files containing special 
characters (TeTeX for instance); in this case nothing can be done in emacs.

This patch is (I think) of some importance for user of MS-Windows due to 
the spaces present in "Documents and Settings") (I have not tested in 
under Windows myself; I much prefer GNU/Linux).

I am currenctly implementating forward and inverse search with the 
standard TeX mode. This is not in this patch (since it does not correct 
a bug) but if someone is interested, just mail me (and please don't tell 
me to use auctex).

Olive

[-- Attachment #2: tex-mode.el.patch --]
[-- Type: text/x-patch, Size: 2590 bytes --]

*** tex-mode.el.orig	2005-03-29 22:17:07.000000000 +0200
--- tex-mode.el	2005-03-29 22:23:30.000000000 +0200
***************
*** 781,787 ****
    (setq tex-command latex-run-command)
    (setq tex-start-of-header "\\\\document\\(style\\|class\\)")
    (setq tex-end-of-header "\\\\begin\\s-*{document}")
!   (setq tex-trailer "\\end\\s-*{document}\n")
    ;; A line containing just $$ is treated as a paragraph separator.
    ;; A line starting with $$ starts a paragraph,
    ;; but does not separate paragraphs if it has more stuff on it.
--- 781,787 ----
    (setq tex-command latex-run-command)
    (setq tex-start-of-header "\\\\document\\(style\\|class\\)")
    (setq tex-end-of-header "\\\\begin\\s-*{document}")
!   (setq tex-trailer "\\end{document}\n")
    ;; A line containing just $$ is treated as a paragraph separator.
    ;; A line starting with $$ starts a paragraph,
    ;; but does not separate paragraphs if it has more stuff on it.
***************
*** 1352,1359 ****
  	    (concat
  	     (if file
  		 (if star (concat (substring cmd 0 star)
! 				  file (substring cmd (1+ star)))
! 		   (concat cmd " " file))
  	       cmd)
  	     (if background "&" ""))))
        ;; Switch to buffer before checking for subproc output in it.
--- 1352,1359 ----
  	    (concat
  	     (if file
  		 (if star (concat (substring cmd 0 star)
! 				  (shell-quote-argument file) (substring cmd (1+ star)))
! 		   (concat cmd " " (shell-quote-argument file)))
  	       cmd)
  	     (if background "&" ""))))
        ;; Switch to buffer before checking for subproc output in it.
***************
*** 1444,1456 ****
           (compile-command
            (if star
  	      (concat (substring command 0 star)
! 		      (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)))
  
  (defun tex-send-tex-command (cmd &optional dir)
--- 1444,1456 ----
           (compile-command
            (if star
  	      (concat (substring command 0 star)
! 		      (shell-quote-argument file)
  		      (substring command (1+ star)))
              (concat command " "
  		    (if (< 0 (length tex-start-options-string))
  			(concat
  			 (shell-quote-argument tex-start-options-string) " "))
! 		    (shell-quote-argument file)))))
      (tex-send-tex-command compile-command dir)))
  
  (defun tex-send-tex-command (cmd &optional dir)

[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs

             reply	other threads:[~2005-03-29 20:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-29 20:53 Olive [this message]
2005-03-29 22:14 ` The correct patch Karl Berry
  -- strict thread matches above, loose matches on Subject: below --
2005-03-29 22:36 Olive

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4249C042.70708@versateladsl.be \
    --to=olive.lin@versateladsl.be \
    --cc=karl@freefriends.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.