From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Olive Newsgroups: gmane.emacs.bugs Subject: The correct patch Date: Tue, 29 Mar 2005 22:53:22 +0200 Message-ID: <4249C042.70708@versateladsl.be> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010500060102010308080305" X-Trace: sea.gmane.org 1112129646 10834 80.91.229.2 (29 Mar 2005 20:54:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 29 Mar 2005 20:54:06 +0000 (UTC) Cc: karl@freefriends.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 29 22:54:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DGNiB-0008LP-8n for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Mar 2005 22:53:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGNyW-0007Tz-Rk for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Mar 2005 16:10:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DGNyM-0007TS-BO for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2005 16:10:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DGNyI-0007S1-TN for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2005 16:10:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGNyI-0007Rr-Oy for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2005 16:09:58 -0500 Original-Received: from [212.53.5.81] (helo=postbus01.versateladsl.be) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1DGNiF-0003M6-Mx for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2005 15:53:24 -0500 Original-Received: (qmail 22404 invoked by uid 10); 29 Mar 2005 20:53:16 -0000 Original-Received: (vexira-qq 22371-63909273 invoked from network) 29 Mar 2005 22:53:15 +0200 Original-Received: from unknown (HELO [192.168.1.2]) ([82.174.174.163]) (envelope-sender ) by postbus01.versateladsl.be (qmail-ldap-1.03) with SMTP for < >; 29 Mar 2005 20:53:15 -0000 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 X-Accept-Language: en-us, en Original-To: bug-gnu-emacs@gnu.org X-AntiVirus: checked by Vexira MailArmor (version: 2.0.1.16; VAE: 6.29.0.7; VDF: 6.29.0.152; host: bdell002) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:11009 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:11009 This is a multi-part message in MIME format. --------------010500060102010308080305 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 --------------010500060102010308080305 Content-Type: text/x-patch; name="tex-mode.el.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tex-mode.el.patch" *** 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) --------------010500060102010308080305 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bug-gnu-emacs mailing list Bug-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs --------------010500060102010308080305--