From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function Date: Wed, 27 Feb 2013 11:11:30 +0100 Message-ID: References: <87liaam7dh.fsf@gmail.com> <87hakym6il.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1361959935 26054 80.91.229.3 (27 Feb 2013 10:12:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Feb 2013 10:12:15 +0000 (UTC) Cc: 13831@debbugs.gnu.org To: Thierry Volpiatto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 27 11:12:38 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UAe05-00047R-UO for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Feb 2013 11:12:38 +0100 Original-Received: from localhost ([::1]:49968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAdzk-0004vx-NN for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Feb 2013 05:12:16 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAdzi-0004vg-2O for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2013 05:12:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAdzg-0000RH-RD for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2013 05:12:13 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAdzg-0000RB-NS for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2013 05:12:12 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UAe1S-0007fA-5s for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2013 05:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Schwab Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Feb 2013 10:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13831 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 13831-submit@debbugs.gnu.org id=B13831.136196000829410 (code B ref 13831); Wed, 27 Feb 2013 10:14:02 +0000 Original-Received: (at 13831) by debbugs.gnu.org; 27 Feb 2013 10:13:28 +0000 Original-Received: from localhost ([127.0.0.1]:52641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UAe0t-0007eI-Ap for submit@debbugs.gnu.org; Wed, 27 Feb 2013 05:13:27 -0500 Original-Received: from mail-out.m-online.net ([212.18.0.10]:39221) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UAe0q-0007eA-6W for 13831@debbugs.gnu.org; Wed, 27 Feb 2013 05:13:25 -0500 Original-Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3ZGCNP2v9Pz3hhk5; Wed, 27 Feb 2013 11:11:33 +0100 (CET) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3ZGCNP0cD9zbbnZ; Wed, 27 Feb 2013 11:11:33 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id fRqi744-dU-8; Wed, 27 Feb 2013 11:11:30 +0100 (CET) X-Auth-Info: a21mJsw3O0m6NMg8PHUoGk2p96OWn6tpzOMglCFNGVA= Original-Received: from hawking.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 27 Feb 2013 11:11:30 +0100 (CET) X-Yow: .. I want a COLOR T.V. and a VIBRATING BED!!! In-Reply-To: <87hakym6il.fsf@gmail.com> (Thierry Volpiatto's message of "Wed, 27 Feb 2013 10:48:50 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.93 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:71899 Archived-At: Thierry Volpiatto 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=C3=AAt=C3=A9 error: (void-variable Process) > @@ -369,6 +377,31 @@ This variable is only used if the variable > (goto-char (point-min))) > (display-buffer buffer-name)) > =20 > +(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-arg= s) > + #'(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. --=20 Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED= 5 "And now for something completely different."