diff options
| author | Karoly Lorentey | 2005-09-11 02:39:03 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-09-11 02:39:03 +0000 |
| commit | 80a426c230d6a7945fce6bf7d2699d2be01069a6 (patch) | |
| tree | 0c04a48252b7e92b3f0fdde66d6e12eb5ac04ca5 /lisp | |
| parent | 92071250fabab9d4daa7c6cf0bd7d7c36f73ea41 (diff) | |
| download | emacs-80a426c230d6a7945fce6bf7d2699d2be01069a6.tar.gz emacs-80a426c230d6a7945fce6bf7d2699d2be01069a6.zip | |
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
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/server.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/server.el b/lisp/server.el index 27596c317df..cae3ceaa5dd 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -687,8 +687,8 @@ The following commands are accepted by the client: | |||
| 687 | 687 | ||
| 688 | ;; -position LINE: Go to the given line in the next file. | 688 | ;; -position LINE: Go to the given line in the next file. |
| 689 | ((and (equal "-position" arg) (string-match "\\(\\+[0-9]+\\) " request)) | 689 | ((and (equal "-position" arg) (string-match "\\(\\+[0-9]+\\) " request)) |
| 690 | (setq request (substring request (match-end 0)) | 690 | (setq lineno (string-to-number (substring (match-string 1 request) 1)) |
| 691 | lineno (string-to-number (substring (match-string 1 request) 1)))) | 691 | request (substring request (match-end 0)))) |
| 692 | 692 | ||
| 693 | ;; -position LINE:COLUMN: Set point to the given position in the next file. | 693 | ;; -position LINE:COLUMN: Set point to the given position in the next file. |
| 694 | ((and (equal "-position" arg) (string-match "\\+\\([0-9]+\\):\\([0-9]+\\) " request)) | 694 | ((and (equal "-position" arg) (string-match "\\+\\([0-9]+\\):\\([0-9]+\\) " request)) |
| @@ -703,7 +703,8 @@ The following commands are accepted by the client: | |||
| 703 | (if coding-system | 703 | (if coding-system |
| 704 | (setq file (decode-coding-string file coding-system))) | 704 | (setq file (decode-coding-string file coding-system))) |
| 705 | (setq file (command-line-normalize-file-name file)) | 705 | (setq file (command-line-normalize-file-name file)) |
| 706 | (push (list file lineno columnno) files)) | 706 | (push (list file lineno columnno) files) |
| 707 | (server-log (format "New file: %s (%d:%d)" file lineno columnno) proc)) | ||
| 707 | (setq lineno 1 | 708 | (setq lineno 1 |
| 708 | columnno 0)) | 709 | columnno 0)) |
| 709 | 710 | ||