unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39067: shell-command-dont-erase-buffer strange behaviour
@ 2020-01-10  5:34 Madhu
  2020-01-11  9:25 ` Eli Zaretskii
  2020-01-20 10:04 ` Mattias Engdegård
  0 siblings, 2 replies; 14+ messages in thread
From: Madhu @ 2020-01-10  5:34 UTC (permalink / raw)
  To: 39067

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)





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-02-01 13:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-10  5:34 bug#39067: shell-command-dont-erase-buffer strange behaviour Madhu
2020-01-11  9:25 ` 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

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).