all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6060: 24.0.50; Process filters can no longer kill buffers
@ 2010-04-28 14:08 Helmut Eller
  2010-04-29 14:31 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Helmut Eller @ 2010-04-28 14:08 UTC (permalink / raw)
  To: 6060

When GNU Emacs 24.0.50.7 (i686-pc-linux-gnu, GTK+ Version 2.12.12) of
2010-04-28 executes code like this:

(defun filter-test ()
  (let* ((proc (start-process 
                "test" nil "/bin/bash" "-c" 
                "for i in 1 2 3 4 ; do echo $i ; sleep 1 ; done"))
         (buffer (generate-new-buffer "test-buffer"))
         (filter (lambda (proc str)
                   (message "filter: %S" str)
                   (kill-buffer buffer))))
    (set-process-filter proc filter)
    (unwind-protect
        (with-current-buffer buffer
          (while (buffer-live-p buffer)
            (accept-process-output proc)))
      (kill-process proc))))

Emacs signals this error:  (error "Selecting deleted buffer")

This used to work in earlier versions of Emacs.
The problem was most likely introduced by:

2010-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>

	* process.c (exec_sentinel): Preserve current-buffer.

	* process.c (read_process_output): Move the save-current-buffer to
	apply to both the filter and the non-filter branches.







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

end of thread, other threads:[~2010-04-29 22:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-28 14:08 bug#6060: 24.0.50; Process filters can no longer kill buffers Helmut Eller
2010-04-29 14:31 ` Stefan Monnier
2010-04-29 16:00   ` Helmut Eller
2010-04-29 22:52     ` Stefan Monnier

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.