From unknown Sun Aug 17 09:09:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#10564 <10564@debbugs.gnu.org> To: bug#10564 <10564@debbugs.gnu.org> Subject: Status: 24.0.92; octave-kill-process kills octave process without warning user Reply-To: bug#10564 <10564@debbugs.gnu.org> Date: Sun, 17 Aug 2025 16:09:20 +0000 retitle 10564 24.0.92; octave-kill-process kills octave process without war= ning user reassign 10564 emacs submitter 10564 Phillip Garland severity 10564 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 20 02:55:13 2012 Received: (at submit) by debbugs.gnu.org; 20 Jan 2012 07:55:13 +0000 Received: from localhost ([127.0.0.1]:36066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ro9JY-0005s7-3q for submit@debbugs.gnu.org; Fri, 20 Jan 2012 02:55:13 -0500 Received: from eggs.gnu.org ([140.186.70.92]:39917) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ro6kT-0001Ig-O0 for submit@debbugs.gnu.org; Fri, 20 Jan 2012 00:10:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ro6jF-0005l4-6M for submit@debbugs.gnu.org; Fri, 20 Jan 2012 00:09:34 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:45981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ro6jF-0005l0-3U for submit@debbugs.gnu.org; Fri, 20 Jan 2012 00:09:33 -0500 Received: from eggs.gnu.org ([140.186.70.92]:53749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ro6jD-0001DL-NU for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2012 00:09:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ro6jB-0005kl-PS for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2012 00:09:31 -0500 Received: from mail-gy0-f169.google.com ([209.85.160.169]:49492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ro6jB-0005kh-Lv for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2012 00:09:29 -0500 Received: by ghrr14 with SMTP id r14so97537ghr.0 for ; Thu, 19 Jan 2012 21:09:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type; bh=9SANpRUMrIjgNvixBD/ujMjCRx6ZN1YXTf+utGeEKCU=; b=i4GJuiOEQ1vckUDLrDYwA2Wd1TPWv7nwv0A6ex4sLgd6mj2VGYZeWseSVEBPCvm1Y7 mMxCWZbIn/tOb8y2F079FYHbBVDJcnc5lSoWZAoPVDh1McpssehkMZfJ1dycq2SXTU/x Twu/MJ+hRch9A4SOnynitcGUecrnNtBcgHkuI= Received: by 10.236.182.8 with SMTP id n8mr42727541yhm.26.1327036168599; Thu, 19 Jan 2012 21:09:28 -0800 (PST) Received: from cradle (c-76-28-156-90.hsd1.wa.comcast.net. [76.28.156.90]) by mx.google.com with ESMTPS id j16sm5009099anm.9.2012.01.19.21.09.26 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 Jan 2012 21:09:27 -0800 (PST) From: Phillip Garland To: bug-gnu-emacs@gnu.org Subject: 24.0.92; octave-kill-process kills octave process without warning user Date: Thu, 19 Jan 2012 21:09:07 -0800 Message-ID: <878vl32c5o.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 20 Jan 2012 02:55:11 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) I recently started using octave and discovered a frustrating problem with octave mode. It's too easy to accidently kill the inferior octave process. C-c C-i l executes a line of octave code from an octave buffer C-c C-i k kills the inferior octave process (octave-kill-process) Sometimes, when I want to execute a line of code, my finger slipped, hitting the 'k' key instead of the 'l' key, and the octave process is immediately killed, losing the results of my computations. Right now, octave-kill-process kills the octave process without double-checking with the user. It does ask if you really want to kill the inferior octave buffer, but at that point, the process has already been killed. Right now octave-kill-buffer is defined like this: (defun octave-kill-process () "Kill inferior Octave process and its buffer." (interactive) (if inferior-octave-process (progn (process-send-string inferior-octave-process "quit;\n") (accept-process-output inferior-octave-process))) (if inferior-octave-buffer (kill-buffer inferior-octave-buffer))) There seems to me to be at least three ways to solve this problem. octave-kill-process could just call kill-buffer and have kill-buffer kill the octave process: (defun octave-kill-process () "Kill inferior Octave process and its buffer." (interactive) (if inferior-octave-buffer (kill-buffer inferior-octave-buffer))) The disadvantage of this is that there is no way to kill the process but retain the inferior octave buffer (if you wanted to keep a record of your octave session). Alternatively, octave kill-process could first query the user about killing the process, then if they kill the process, query them about killing the inferior octave buffer: (defun octave-kill-process () "Kill inferior Octave process and its buffer." (interactive) (if (and inferior-octave-process (yes-or-no-p (format "Really kill the running Octave process? "))) (progn (process-send-string inferior-octave-process "quit;\n") (accept-process-output inferior-octave-process) (if inferior-octave-buffer (kill-buffer inferior-octave-buffer))))) It's a little annoying to be queried twice, first to kill the process, second to kill the buffer, when killing both is probably the common case, but this seems like the least worst solution to me. Finally, octave-kill-buffer could just kill the inferior octave process and leave the inferior octave buffer around for the user to clean up: (defun octave-kill-process () "Kill inferior Octave process" (interactive) (if (and inferior-octave-process (yes-or-no-p (format "Really kill the running Octave process? "))) (progn (process-send-string inferior-octave-process "quit;\n") (accept-process-output inferior-octave-process)))) Thanks! ~Phillip In GNU Emacs 24.0.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.8) of 2012-01-17 on cradle Windowing system distributor `The X.Org Foundation', version 11.0.11102902 configured using `configure '--prefix=/usr/local'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x r e p o r t - e m a c s - b u g Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader emacsbug time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 21 21:07:49 2013 Received: (at 10564-done) by debbugs.gnu.org; 22 Nov 2013 02:07:49 +0000 Received: from localhost ([127.0.0.1]:37615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vjg9s-00010h-Lz for submit@debbugs.gnu.org; Thu, 21 Nov 2013 21:07:48 -0500 Received: from mail-pb0-f43.google.com ([209.85.160.43]:42137) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vjg9q-00010S-2V for 10564-done@debbugs.gnu.org; Thu, 21 Nov 2013 21:07:46 -0500 Received: by mail-pb0-f43.google.com with SMTP id rq2so613261pbb.2 for <10564-done@debbugs.gnu.org>; Thu, 21 Nov 2013 18:07:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=X+fjIIXWskYZjnxqxKlqhtq1VjNNG4Szpx2lKWdBaGY=; b=ijX+1nkkHALuftIEGHTPxpWsRGG0Y7kim15aT0M8Y0QW6O75VCwmA+lGIJoZs/OXiy H17SKuST3csbLa+F5lR2rKHHzzGZGw6RXWkN7YKBnpOzR6+vU38AmTyvhPTpNoH3Kc2T M3wWycovBH0NOokSHOFhcA8nVVq1oSCLUUlMgJgJGc0ajHcKWacNVzv4fU46QW1cfccE +yq95a/jg0RsOdUBLMsp4r+azIIPtNXQEH8PDtRt638uW/HNgKXOspDmoYLkSt3Pt/XT kN8JVwgbNfOHd4JqS+pYLwpHMmwPKJVif7F+hAJK6/mC5d4wCqTlAUaSaPejItjsqSs6 b6iA== X-Received: by 10.68.196.193 with SMTP id io1mr9261976pbc.46.1385086059932; Thu, 21 Nov 2013 18:07:39 -0800 (PST) Received: from localhost ([123.119.86.125]) by mx.google.com with ESMTPSA id bp5sm49234503pbb.18.2013.11.21.18.07.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Nov 2013 18:07:39 -0800 (PST) From: Leo Liu To: Phillip Garland Subject: Re: bug#10564: 24.0.92; octave-kill-process kills octave process without warning user References: <878vl32c5o.fsf@gmail.com> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAG1BMVEUAAAA9Cgm3Hx1WWFWA gn+WmJWsrqv4+vcCAwCRl2MkAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAYoA AAGKATOXMFgAAAAHdElNRQfXAQwDNR+ZJmElAAABIklEQVQoz22SPW+DQAyGWUq65qasd9PNUSX4 AZHK2C1rJy5jpDS4IwRVup9dn7GNafpKIPPgzztXFSujqq1eM2n8h22oMkvxI/i9C97kRfMRUN55 dS3BrsAwBXUtMLAO4lryh8kTjOxKpQNniNxAgZOEe4bZwsDTFhKdqZRLNII4OQNHhEuq/RMkm6Cj TnnEA/fk0BorcYn5qA3oaeAxbaBOLrX+9G48NZ2Fzc2tzDM8Q+tMypEOqYHh8mAWaaK3U/cDMOT5 aMZMABgPXc7zPMs1A8DXO756GFJ/4fMEq47hTsAdn5avoxZ4ywl0c2w4Flu2Ybeyb3S+EqxX2DYA H8veJGEDTnHnrXvRaPyt+2kSfK6rfBZ2tUtfP/mR+pR6sX8BUZ/cDV7tvkoAAAAASUVORK5CYII= Date: Fri, 22 Nov 2013 10:07:34 +0800 In-Reply-To: <878vl32c5o.fsf@gmail.com> (Phillip Garland's message of "Thu, 19 Jan 2012 21:09:07 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 10564-done Cc: 10564-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Fixed in 24.4 On 2012-01-20 13:09 +0800, Phillip Garland wrote: > I recently started using octave and discovered a frustrating problem > with octave mode. It's too easy to accidently kill the inferior octave > process. Hi Phillip, Just noticed this bug report. Should be fixed in emacs trunk and will show up in Emacs 24.4. Sorry for the long delay. Leo From unknown Sun Aug 17 09:09:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 20 Dec 2013 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator