[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer functio
From: |
Andreas Schwab |
Subject: |
bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function |
Date: |
Wed, 27 Feb 2013 11:11:30 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.93 (gnu/linux) |
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el
> index 28fd5c6..3a20add 100644
> --- a/lisp/net/net-utils.el
> +++ b/lisp/net/net-utils.el
> @@ -1,3 +1,5 @@
> +
> +Process nil processus arrĂȘtĂ©
error: (void-variable Process)
> @@ -369,6 +377,31 @@ This variable is only used if the variable
> (goto-char (point-min)))
> (display-buffer buffer-name))
>
> +(defun net-utils-revert-function (&optional ignore-auto noconfirm)
> + (message "Reverting `%s'..." (buffer-name))
> + (let ((inhibit-read-only t))
> + (erase-buffer)
> + (set-process-filter
> + (apply 'start-process (format "%s" net-utils-program-name)
^^^^^^^^^^^^
That's a no-op.
> + (buffer-name) net-utils-program-name net-utils-program-args)
> + #'(lambda (process output-string)
> + (let ((filtered-string output-string))
> + (set-buffer (process-buffer process))
> + (let ((inhibit-read-only t))
> + (while (string-match "\r" filtered-string)
> + (setq filtered-string
> + (replace-match "" nil nil filtered-string)))
> + (save-excursion
> + ;; Insert the text, moving the process-marker.
> + (goto-char (process-mark process))
> + (insert filtered-string)
> + (set-marker (process-mark process) (point)))))))
> + (set-process-sentinel
> + (get-process net-utils-program-name)
There is no guarantee that a process with this name exists.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function, Thierry Volpiatto, 2013/02/27
- bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function, Thierry Volpiatto, 2013/02/27
- bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function,
Andreas Schwab <=
- bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function, Stefan Monnier, 2013/02/27
- bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function, Thierry Volpiatto, 2013/02/27
- bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function, Stefan Monnier, 2013/02/27
- bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function, Thierry Volpiatto, 2013/02/27
- bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function, Stefan Monnier, 2013/02/27
- bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function, Thierry Volpiatto, 2013/02/28
- bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function, Stefan Monnier, 2013/02/28