Commit 80a426c2 authored by Karoly Lorentey's avatar Karoly Lorentey

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
parent 92071250
......@@ -687,8 +687,8 @@ The following commands are accepted by the client:
;; -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 @@ The following commands are accepted by the client:
(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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment