changeset 83368:0d0962d43546

Fix `emacsclient +12 file' behaviour. (Reported by Han Boetes.) * lisp/server.el (server-process-filter): In `-position LINE' handler, don't ruin the request string until the line number is extracted. Log opened files. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-408
author Karoly Lorentey <lorentey@elte.hu>
date Sun, 11 Sep 2005 02:39:03 +0000
parents 2b5fb28780be
children d2e0850b17f2
files lisp/server.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/server.el	Sat Sep 10 23:51:08 2005 +0000
+++ b/lisp/server.el	Sun Sep 11 02:39:03 2005 +0000
@@ -687,8 +687,8 @@
 
 		 ;; -position LINE:  Go to the given line in the next file.
 		 ((and (equal "-position" arg) (string-match "\\(\\+[0-9]+\\) " request))
-		  (setq request (substring request (match-end 0))
-			lineno (string-to-number (substring (match-string 1 request) 1))))
+		  (setq lineno (string-to-number (substring (match-string 1 request) 1))
+			request (substring request (match-end 0))))
 
 		 ;; -position LINE:COLUMN:  Set point to the given position in the next file.
 		 ((and (equal "-position" arg) (string-match "\\+\\([0-9]+\\):\\([0-9]+\\) " request))
@@ -703,7 +703,8 @@
 		    (if coding-system
 			(setq file (decode-coding-string file coding-system)))
 		    (setq file (command-line-normalize-file-name file))
-		    (push (list file lineno columnno) files))
+		    (push (list file lineno columnno) files)
+		    (server-log (format "New file: %s (%d:%d)" file lineno columnno) proc))
 		  (setq lineno 1
 			columnno 0))