From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#23936: 25.1.50; shell-command shell-command-on-region doc fix Date: Mon, 11 Jul 2016 01:41:20 +0900 (JST) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: ger.gmane.org 1468168941 8067 80.91.229.3 (10 Jul 2016 16:42:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Jul 2016 16:42:21 +0000 (UTC) To: 23936@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 10 18:42:12 2016 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 1bMHo3-0003Oa-Pi for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jul 2016 18:42:12 +0200 Original-Received: from localhost ([::1]:55910 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMHo2-0003VX-VZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jul 2016 12:42:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMHnv-0003Ur-HD for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 12:42:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMHnu-0004k0-GR for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 12:42:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMHnu-0004jv-D6 for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 12:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bMHnu-0006YH-5z for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 12:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Jul 2016 16:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23936 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146816889725142 (code B ref -1); Sun, 10 Jul 2016 16:42:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Jul 2016 16:41:37 +0000 Original-Received: from localhost ([127.0.0.1]:45391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMHnV-0006XS-5W for submit@debbugs.gnu.org; Sun, 10 Jul 2016 12:41:37 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMHnT-0006XE-FN for submit@debbugs.gnu.org; Sun, 10 Jul 2016 12:41:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMHnN-0004fn-9T for submit@debbugs.gnu.org; Sun, 10 Jul 2016 12:41:30 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:58236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMHnN-0004ff-6H for submit@debbugs.gnu.org; Sun, 10 Jul 2016 12:41:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMHnK-0003TB-Qa for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 12:41:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMHnI-0004fR-ME for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 12:41:25 -0400 Original-Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:34662) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMHnI-0004fD-F9 for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 12:41:24 -0400 Original-Received: by mail-pf0-x244.google.com with SMTP id g202so1226095pfb.1 for ; Sun, 10 Jul 2016 09:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:subject:message-id:user-agent:mime-version; bh=nMXkMneiwVsFjlP4Z2b44gn9I7fGZbPQQB5qbEY5TsY=; b=B/aMf7LH91sREej3b9I72hmIcqDzOOfQBJYZ3nHzj4qx3LvMWU4VLSojtrMYzO3QEV P1ATKyNh4Lvhc8pB8BV93HdClQmNU4MP6BIPqspGqB7x/wrdmkQ3yzq6g53SatpVusM+ s9QmSt2gbzjpcF+Tw9Xir+Mtc/YuxhmjkD7sM7r3fnybqWDPCv7wj8OvTkFMMc5+jsBw B1su+fRnZkmSAIfVfnXwHlsVQ6ZwHIcpblzsKRwDYJ6oBIdRpXRLRk+hPlOMlumNgAlx xHdz3cPUjcEHG9qLrJ7YaiGBlIBVcnZKmeYAIE5NxLpER8V476nzKCt7hlRymuVhwMLL IqTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:subject:message-id:user-agent :mime-version; bh=nMXkMneiwVsFjlP4Z2b44gn9I7fGZbPQQB5qbEY5TsY=; b=V22x48/d8DT+sEYvbPNbCO4kDeMDUm564huKGuOY6Y521ecJ1T6DAb/cgjCdwVEnUb 2MqzyhLg2c6laHxL8Sd25YpK1qFpZHvLQOFKAnBJCrLemitPQ5FXTfCa9cp4rf33/DhC dzleaSb2LNW6RHed9io1GXFiogceTmL0B2PfSh3PM/faGgH7mp1ryA4zF2LRCGhapWrh W9/rPWrq1dqqZ14ji+RR45PBQgWeK/Q2X6Mv4PbkOTurNIR88og0GQyBycpR8mhf5lvI fSzjnR3Cj/xcQeflYqkkSq5Y+0cwXZqrIL+EL2cPlEDtcikLg+wIrcmnAxOhG55rg/Gy vtKg== X-Gm-Message-State: ALyK8tJLB8yGOS8pmlFM9ZNBEY8WKc1BuG9hrtx6GBDFY5mSM7enohqBkCOH+KxJQ4KneQ== X-Received: by 10.98.113.74 with SMTP id m71mr27854653pfc.6.1468168883376; Sun, 10 Jul 2016 09:41:23 -0700 (PDT) Original-Received: from calancha-pc ([240f:6e:c00e:1:6875:2e94:598b:96cb]) by smtp.gmail.com with ESMTPSA id h77sm2782990pfj.86.2016.07.10.09.41.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Jul 2016 09:41:22 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc User-Agent: Alpine 2.20 (DEB 67 2015-01-07) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:120773 Archived-At: Doc strings don't specify correctly when the buffer is erased, in what buffer position the output is inserted or when the mark is set. emacs -Q ;; Evaluate following two forms (progn (switch-to-buffer (get-buffer-create "*out*")) (insert (format "1 2\n\n\n\nfoo\n")) ; point is at 12 (shell-command-on-region 1 4 "printf 'bar\n'" t)) ; point is at 5 (progn (switch-to-buffer (get-buffer-create "*out*")) (shell-command "date" t)) ; buffer is not erased ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From 90915fdad69939886a3a1dcc377453b2e98b2089 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Mon, 11 Jul 2016 01:33:22 +0900 Subject: [PATCH] * lisp/simple.el (shell-command, shell-command-on-region): Fix doc strings --- lisp/simple.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index ba026af..cb8c0ce 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3235,11 +3235,11 @@ shell-command The optional second argument OUTPUT-BUFFER, if non-nil, says to put the output in some other buffer. -If OUTPUT-BUFFER is a buffer or buffer name, put the output there. -If OUTPUT-BUFFER is not a buffer and not nil, -insert output in current buffer. (This cannot be done asynchronously.) -In either case, the buffer is first erased, and the output is -inserted after point (leaving mark after it). +If OUTPUT-BUFFER is a buffer or buffer name, erase that buffer +and insert the output there after point. +If OUTPUT-BUFFER is not a buffer and not nil, insert the output +in current buffer after point leaving mark after it. +(This cannot be done asynchronously). If the command terminates without error, but generates output, and you did not specify \"insert it in the current buffer\", @@ -3504,10 +3504,10 @@ shell-command-on-region Optional fourth arg OUTPUT-BUFFER specifies where to put the command's output. If the value is a buffer or buffer name, -put the output there. If the value is nil, use the buffer -`*Shell Command Output*'. Any other value, excluding nil, -means to insert the output in the current buffer. In either case, -the output is inserted after point (leaving mark after it). +erase that buffer and insert the output there. +If the value is nil, use the buffer `*Shell Command Output*'. +Any other value, excluding nil, means to insert the output +in the current buffer after START. Optional fifth arg REPLACE, if non-nil, means to insert the output in place of text from START to END, putting point and mark -- 2.8.1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 25.1.50.5 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6) of 2016-07-10 built on calancha-pc Repository revision: 04a7977f700fc46cf29d5a41bc7dcffef71044c6