From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#13831: 24.3.50; [PATCH] net-utils-mode have no revert-buffer function Date: Fri, 01 Mar 2013 16:22:20 +0100 Organization: Emacs Helm Message-ID: <87ip5b16xf.fsf@gmail.com> References: <87liaam7dh.fsf@gmail.com> <87hakym6il.fsf@gmail.com> <87d2vmm3nh.fsf@gmail.com> <871uc1ese2.fsf@gmail.com> <87k3ptbtoj.fsf@gmail.com> <877gltm05y.fsf@gmail.com> <87vc9cgr2i.fsf@gmail.com> <87zjyny54l.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1362151394 26392 80.91.229.3 (1 Mar 2013 15:23:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Mar 2013 15:23:14 +0000 (UTC) Cc: 13831@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 01 16:23:37 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 1UBRo7-0000PW-Ub for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Mar 2013 16:23:36 +0100 Original-Received: from localhost ([::1]:40857 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBRnm-0006Uf-K0 for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Mar 2013 10:23:14 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBRnc-0006IX-Mm for bug-gnu-emacs@gnu.org; Fri, 01 Mar 2013 10:23:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UBRnY-0007Wx-AM for bug-gnu-emacs@gnu.org; Fri, 01 Mar 2013 10:23:04 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBRnY-0007Wt-5y for bug-gnu-emacs@gnu.org; Fri, 01 Mar 2013 10:23:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UBRpW-0002sh-2X for bug-gnu-emacs@gnu.org; Fri, 01 Mar 2013 10:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Thierry Volpiatto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Mar 2013 15:25: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.136215147411042 (code B ref 13831); Fri, 01 Mar 2013 15:25:02 +0000 Original-Received: (at 13831) by debbugs.gnu.org; 1 Mar 2013 15:24:34 +0000 Original-Received: from localhost ([127.0.0.1]:58265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UBRp3-0002s2-VN for submit@debbugs.gnu.org; Fri, 01 Mar 2013 10:24:34 -0500 Original-Received: from mail-wi0-f172.google.com ([209.85.212.172]:51238) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UBRp2-0002rw-KR for 13831@debbugs.gnu.org; Fri, 01 Mar 2013 10:24:33 -0500 Original-Received: by mail-wi0-f172.google.com with SMTP id ez12so9216542wid.17 for <13831@debbugs.gnu.org>; Fri, 01 Mar 2013 07:22:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:organization:references:date :in-reply-to:message-id:user-agent:mime-version:content-type; bh=s6F+vJoYeO0jGqY8EQuR8hJyC4iCestunNwpGXCcX34=; b=CPgKtmeeR9LIFJJFQUKdH1MkmKv0pIrBmb92nusosxLE+MkOk459dFFsRmK6eFCUCG ZCZkTG/KqerIU091AV8sXCu4wuzr8GCwYmv9N93TQ1LHTYFGnG04OhIfVHJkJnS5Et7F utVhwvU4y2/7kJMeeqcyEuU2Oh1S6R0Jx/YIRObmpsEMihyFXOQ/ZDSjnj74DlL55uyR iDjPNZBx1Y4aNIglZirB51jbcjBeNWt887lJRddO3qUDhR22rVQQ+hinYZAoc2zbK02Z 8c7nXkg9PvYqj5CuLEyyXY9DVdbtYpTB9mQJZENFLsANvT5DCaHN1dxeUnLZ4VhV0Rwn lrMA== X-Received: by 10.194.88.138 with SMTP id bg10mr18366602wjb.13.1362151349572; Fri, 01 Mar 2013 07:22:29 -0800 (PST) Original-Received: from dell-14z (lbe83-2-78-243-104-167.fbx.proxad.net. [78.243.104.167]) by mx.google.com with ESMTPS id n10sm22747469wia.0.2013.03.01.07.22.27 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 01 Mar 2013 07:22:28 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Fri, 01 Mar 2013 09:29:23 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (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:71985 Archived-At: Stefan Monnier writes: >> Here your patch modified, I have simplified >> `net-utils-remove-ctrl-m-filter'. > > Actually, my patch is already in the trunk. Could you make the patch > relative to trunk's version? Ok, this allow reverting from somewhere else (e.g ibuffer, helm): diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el index cc28bab..5e27c0e 100644 --- a/lisp/net/net-utils.el +++ b/lisp/net/net-utils.el @@ -358,7 +358,7 @@ This variable is only used if the variable ;; Todo: This data could be saved in a bookmark. (defvar net-utils--revert-cmd nil) -(defun net-utils-run-simple (buffer program-name args) +(defun net-utils-run-simple (buffer program-name args &optional nodisplay) "Run a network utility for diagnostic output only." (with-current-buffer (if (stringp buffer) (get-buffer-create buffer) buffer) (let ((proc (get-buffer-process (current-buffer)))) @@ -369,13 +369,14 @@ This variable is only used if the variable (erase-buffer)) (net-utils-mode) (setq-local net-utils--revert-cmd - `(net-utils-run-simple ,(current-buffer) ,program-name ,args)) + `(net-utils-run-simple ,(current-buffer) + ,program-name ,args 'nodisplay)) (set-process-filter (apply 'start-process program-name (current-buffer) program-name args) 'net-utils-remove-ctrl-m-filter) (goto-char (point-min)) - (display-buffer (current-buffer)))) + (unless nodisplay (display-buffer (current-buffer))))) (defun net-utils--revert-function (&optional ignore-auto noconfirm) (message "Reverting `%s'..." (buffer-name)) -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997