all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Madhu <madhu@cs.unm.edu>
To: 39067@debbugs.gnu.org
Subject: bug#39067: shell-command-dont-erase-buffer strange behaviour
Date: Fri, 10 Jan 2020 05:34:18 +0000	[thread overview]
Message-ID: <xfezhevkh7p.fsf@cs.unm.edu> (raw)

C-h v shell-command-dont-erase-buffer
C-h f shell-command

Cut to the chase with the test case:

(let ((shell-command-dont-erase-buffer 'beg-last-out))
  (with-current-buffer (get-buffer-create "OUT")
    (erase-buffer)
    (shell-command "/bin/echo FOO" t)
    (shell-command "/bin/echo FOO" t)))

The result (as expected) is a buffer named OUT with 2 lines FOO.
The same result is expected with the following code:

(let ((shell-command-dont-erase-buffer 'beg-last-out))
  (with-current-buffer (get-buffer-create "OUT")
    (erase-buffer)
    (shell-command "/bin/echo FOO" "OUT")
    (shell-command "/bin/echo FOO" "OUT")))

However in this case (and in some other cases) shell-command erases the
"OUT" buffer despite a non-NIL binding of
shell-command-dont-erase-buffer

(at least since emacs 25.2)





             reply	other threads:[~2020-01-10  5:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10  5:34 Madhu [this message]
2020-01-11  9:25 ` bug#39067: shell-command-dont-erase-buffer strange behaviour Eli Zaretskii
2020-01-11  9:57   ` Michael Albinus
2020-01-13 20:22   ` Tino Calancha
2020-01-14  8:49     ` Michael Albinus
2020-01-19 10:19       ` Tino Calancha
2020-01-19 18:05         ` Glenn Morris
2020-01-19 20:55           ` Tino Calancha
2020-01-20  3:25             ` Eli Zaretskii
2020-01-20 13:20               ` Tino Calancha
2020-02-01 13:36       ` Michael Albinus
2020-01-20 10:04 ` Mattias Engdegård
2020-01-20 13:21   ` Tino Calancha
2020-01-20 13:30     ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xfezhevkh7p.fsf@cs.unm.edu \
    --to=madhu@cs.unm.edu \
    --cc=39067@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.