From unknown Sun Jun 22 00:52:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#31236: [PATCH] Fix pre- and post-command-hook errors in term.el Resent-From: Karl Otness Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Apr 2018 05:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 31236 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 31236@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.152437561228430 (code B ref -1); Sun, 22 Apr 2018 05:41:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Apr 2018 05:40:12 +0000 Received: from localhost ([127.0.0.1]:35342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fA7jQ-0007OS-1V for submit@debbugs.gnu.org; Sun, 22 Apr 2018 01:40:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fA5tS-0004ZW-Ga for submit@debbugs.gnu.org; Sat, 21 Apr 2018 23:42:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fA5tM-0008Bw-By for submit@debbugs.gnu.org; Sat, 21 Apr 2018 23:42:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53478) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fA5tM-0008Bq-7V for submit@debbugs.gnu.org; Sat, 21 Apr 2018 23:42:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fA5tK-00041U-Tp for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2018 23:42:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fA5tH-00086j-12 for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2018 23:42:18 -0400 Received: from mail-it0-x235.google.com ([2607:f8b0:4001:c0b::235]:34085) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fA5tG-00085g-Q7 for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2018 23:42:14 -0400 Received: by mail-it0-x235.google.com with SMTP id t192-v6so6366968itc.1 for ; Sat, 21 Apr 2018 20:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karlotness-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=IObXfdbI+9ehAnkIdteO48ZJGwNT2cMrEY7yVNstJpE=; b=YDcOyOIF1otIG/jP7tIGgVLo6+OZ2O6NIVlAyWcWcu/bqXc/hf6vB8l0+03SGv8cX6 bVS8A3d8UtgXKekbCIeEUTMjoIOigmyYC82HsubIiEh0hEDyOr3cxhpvCNsRv9UR3fwK mQmhHZ9Z/+mBkgM0xDzWcqbtU02is81i9h6Bx7x66CJUGwpgbEy15Np8gQ2D7XXNkuCX /KJhKLEJmaT5Xi8qUSbLEi0HpiKHIHmDlQJ2Ixu+G+MkSO3WUwO44QQSsgAsNStZRq02 gvz5hvf7BJa9BUT8RkbsiS46X4oJI5SOBbL1DSB+E0F/NABVryuRtQfZaj3xygPJgD57 vXKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=IObXfdbI+9ehAnkIdteO48ZJGwNT2cMrEY7yVNstJpE=; b=Q7G/r4BIMNsOfbFIAsVd2VO8tkg4WwzpOltGOrNrfNKR9xNYLxa4Yw6XFAIoB7veBs mUd+MkqfUNoybG80ytQY+YXXK/h7juvLpnEXNzt9wJMY8aCdhe3NQIn9J7uIsOTEPuo4 sxwUtFTx37gs7lkoClf+U67FMCZKbXR//6nfIznRvyogsejtTHrd/ak6jXyLNLrY+qxo J99UKERy8XdmFbKUAK33MRdDdo32m+cv+7QZ6SaJSY8TcipAO8HQ592KaclUKqig6dTp st4VjBTJsAX6rTT21UfTmNu1/YOWInWA2cyfmI/aYz7VSjHhQthAdtNq/s6EbbUGGRaK VCBA== X-Gm-Message-State: ALQs6tDrlybyXJ4L7LoZ+Y2qnTHVboOK4+rAZnbbyiNIcS7ujlrSGfrP +4Y2ls0CwsI4VOGqTV8DHa1P774iGRw= X-Google-Smtp-Source: AB8JxZo4BUPSeZLumXUthrBSZfNUZg6ZgoIlvEX6Zkt/4XMgPhdOTDYxwlTuxgYK39xYg603lF7faQ== X-Received: by 2002:a24:3d01:: with SMTP id n1-v6mr9010130itn.134.1524368533598; Sat, 21 Apr 2018 20:42:13 -0700 (PDT) Received: from mail-io0-f171.google.com (mail-io0-f171.google.com. [209.85.223.171]) by smtp.gmail.com with ESMTPSA id q5-v6sm1725234iof.5.2018.04.21.20.42.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Apr 2018 20:42:12 -0700 (PDT) Received: by mail-io0-f171.google.com with SMTP id t123-v6so14698330iof.7 for ; Sat, 21 Apr 2018 20:42:12 -0700 (PDT) X-Received: by 2002:a6b:35d0:: with SMTP id k77-v6mr16171232ioo.42.1524368532425; Sat, 21 Apr 2018 20:42:12 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:d592:0:0:0:0:0 with HTTP; Sat, 21 Apr 2018 20:41:51 -0700 (PDT) From: Karl Otness Date: Sat, 21 Apr 2018 23:41:51 -0400 X-Gmail-Original-Message-ID: Message-ID: Content-Type: multipart/mixed; boundary="000000000000e1f3d5056a67b44e" 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.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Mailman-Approved-At: Sun, 22 Apr 2018 01:40:11 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -6.0 (------) --000000000000e1f3d5056a67b44e Content-Type: text/plain; charset="UTF-8" As far as I can tell there isn't an existing bug report for this issue. It is very minor but I have attached a fix. This affects Emacs 26.1-rc1 `term' and `ansi-term'. In char mode term installs functions in both pre- and post-command-hooks. After the process exits both of these hooks produce errors and then are removed by Emacs after printing a message. Both of these hooks are re-installed when entering char mode and removing them if they are not present will do nothing. To produce this change, I took the remove-hook lines used when entering line mode and placed them in `term-handle-exit'. To reproduce the issue in 26.1, M-x term, exit the running process and execute any command (i.e. move point). In *Messages* there should be the following lines: Error in pre-command-hook (term-set-goto-process-mark): (wrong-type-argument processp nil) Error in post-command-hook (term-goto-process-mark-maybe): (wrong-type-argument processp nil) The error seems to come up from `process-mark'. After this change, these errors no longer appear as the hooks are removed. I have attached a patch which applies this change to current master. Thank you, Karl --000000000000e1f3d5056a67b44e Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Fix-pre-and-post-command-hook-errors-in-term.el.patch" Content-Disposition: attachment; filename="0001-Fix-pre-and-post-command-hook-errors-in-term.el.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_jga9g8tc0 RnJvbSBlOTg4OTE0NTA1YTY5NGIwMGVhZmY2MGNhMjI2NDAwZDk5OGMxOWFhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBLYXJsIE90bmVzcyA8a2FybEBrYXJsb3RuZXNzLmNvbT4KRGF0 ZTogU2F0LCAyMSBBcHIgMjAxOCAyMzowMToxMSAtMDQwMApTdWJqZWN0OiBbUEFUQ0hdIEZpeCBw cmUtIGFuZCBwb3N0LWNvbW1hbmQtaG9vayBlcnJvcnMgaW4gdGVybS5lbAoKQmVmb3JlIHRoaXMg cGF0Y2gsIGFmdGVyIHRoZSB0ZXJtaW5hbCBwcm9jZXNzIGRpZXMgdGhlIGNvbW1hbmQgaG9va3MK YWRkZWQgaW4gdGVybS1tb2RlJ3MgY2hhciBtb2RlIHdvdWxkIHByb2R1Y2UgZXJyb3JzLiBUaGlz IGZpeCByZW1vdmVzCnRoZXNlIGhvb2tzIHdoZW4gdGhlIHByb2Nlc3MgZGllcy4KLS0tCiBsaXNw L3Rlcm0uZWwgfCAzICsrKwogMSBmaWxlIGNoYW5nZWQsIDMgaW5zZXJ0aW9ucygrKQoKZGlmZiAt LWdpdCBhL2xpc3AvdGVybS5lbCBiL2xpc3AvdGVybS5lbAppbmRleCBjZmIzOWMzNGU1Li4wMTdi MDIyMWVjIDEwMDY0NAotLS0gYS9saXNwL3Rlcm0uZWwKKysrIGIvbGlzcC90ZXJtLmVsCkBAIC0x NDU2LDYgKzE0NTYsOSBAQCB0ZXJtLWhhbmRsZS1leGl0CiAgIChsZXQgKChidWZmZXItcmVhZC1v bmx5IG5pbCkKIAkob21heCAocG9pbnQtbWF4KSkKIAkob3BvaW50IChwb2ludCkpKQorICAgIDs7 IFJlbW92ZSBob29rcyB0byBhdm9pZCBlcnJvcnMgZHVlIHRvIGRlYWQgcHJvY2Vzcy4KKyAgICAo cmVtb3ZlLWhvb2sgJ3ByZS1jb21tYW5kLWhvb2sgIyd0ZXJtLXNldC1nb3RvLXByb2Nlc3MtbWFy ayB0KQorICAgIChyZW1vdmUtaG9vayAncG9zdC1jb21tYW5kLWhvb2sgIyd0ZXJtLWdvdG8tcHJv Y2Vzcy1tYXJrLW1heWJlIHQpCiAgICAgOzsgUmVjb3JkIHdoZXJlIHdlIHB1dCB0aGUgbWVzc2Fn ZSwgc28gd2UgY2FuIGlnbm9yZSBpdAogICAgIDs7IGxhdGVyIG9uLgogICAgIChnb3RvLWNoYXIg b21heCkKLS0gCjIuMTcuMAoK --000000000000e1f3d5056a67b44e-- From unknown Sun Jun 22 00:52:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#31236: [PATCH] Fix pre- and post-command-hook errors in term.el Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Apr 2018 11:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31236 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Karl Otness Cc: bug-gnu-emacs , 31236@debbugs.gnu.org Received: via spool by 31236-submit@debbugs.gnu.org id=B31236.15243977245043 (code B ref 31236); Sun, 22 Apr 2018 11:49:02 +0000 Received: (at 31236) by debbugs.gnu.org; 22 Apr 2018 11:48:44 +0000 Received: from localhost ([127.0.0.1]:35466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fADU3-0001JG-OT for submit@debbugs.gnu.org; Sun, 22 Apr 2018 07:48:43 -0400 Received: from smtp-2.orcon.net.nz ([60.234.4.43]:33470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fADU1-0001J8-Sg for 31236@debbugs.gnu.org; Sun, 22 Apr 2018 07:48:42 -0400 Received: from [10.253.37.70] (port=35304 helo=webmail.orcon.net.nz) by smtp-2.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1fADTy-0001k7-VM; Sun, 22 Apr 2018 23:48:39 +1200 Received: from [150.107.175.173] via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Sun, 22 Apr 2018 23:48:38 +1200 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 22 Apr 2018 23:48:38 +1200 From: Phil Sainty In-Reply-To: References: Message-ID: <2d991a6252dce5fd911a26e6a994a666@webmail.orcon.net.nz> X-Sender: psainty@orcon.net.nz User-Agent: Orcon Webmail X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Bug and proposed fix confirmed and tested here. This was an oversight on my part from #24837. The suggested patch seems sensible to me. If others agree, I think this should be committed to the emacs-26 branch. -Phil On 2018-04-22 15:41, Karl Otness wrote: > As far as I can tell there isn't an existing bug report for this > issue. It is very minor but I have attached a fix. This affects Emacs > 26.1-rc1 `term' and `ansi-term'. In char mode term installs functions > in both pre- and post-command-hooks. After the process exits both of > these hooks produce errors and then are removed by Emacs after > printing a message. > > Both of these hooks are re-installed when entering char mode and > removing them if they are not present will do nothing. To produce this > change, I took the remove-hook lines used when entering line mode and > placed them in `term-handle-exit'. > > To reproduce the issue in 26.1, M-x term, exit the running process and > execute any command (i.e. move point). In *Messages* there should be > the following lines: > > Error in pre-command-hook (term-set-goto-process-mark): > (wrong-type-argument processp nil) > Error in post-command-hook (term-goto-process-mark-maybe): > (wrong-type-argument processp nil) > > The error seems to come up from `process-mark'. After this change, > these errors no longer appear as the hooks are removed. I have > attached a patch which applies this change to current master. > > Thank you, > Karl From unknown Sun Jun 22 00:52:07 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Karl Otness Subject: bug#31236: closed (Re: bug#31236: [PATCH] Fix pre- and post-command-hook errors in term.el) Message-ID: References: <83wowzw4l9.fsf@gnu.org> X-Gnu-PR-Message: they-closed 31236 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 31236@debbugs.gnu.org Date: Sun, 22 Apr 2018 17:10:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1524417002-1287-1" This is a multi-part message in MIME format... ------------=_1524417002-1287-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #31236: [PATCH] Fix pre- and post-command-hook errors in term.el which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 31236@debbugs.gnu.org. --=20 31236: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D31236 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1524417002-1287-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 31236-done) by debbugs.gnu.org; 22 Apr 2018 17:09:46 +0000 Received: from localhost ([127.0.0.1]:35979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fAIUj-0000KE-QM for submit@debbugs.gnu.org; Sun, 22 Apr 2018 13:09:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fAIUi-0000K2-7n for 31236-done@debbugs.gnu.org; Sun, 22 Apr 2018 13:09:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAIUY-0000O1-Cn for 31236-done@debbugs.gnu.org; Sun, 22 Apr 2018 13:09:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAIUY-0000Nv-9H; Sun, 22 Apr 2018 13:09:34 -0400 Received: from [176.228.60.248] (port=3897 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fAIUX-0000Cw-L8; Sun, 22 Apr 2018 13:09:34 -0400 Date: Sun, 22 Apr 2018 20:09:22 +0300 Message-Id: <83wowzw4l9.fsf@gnu.org> From: Eli Zaretskii To: Phil Sainty In-reply-to: <2d991a6252dce5fd911a26e6a994a666@webmail.orcon.net.nz> (message from Phil Sainty on Sun, 22 Apr 2018 23:48:38 +1200) Subject: Re: bug#31236: [PATCH] Fix pre- and post-command-hook errors in term.el References: <2d991a6252dce5fd911a26e6a994a666@webmail.orcon.net.nz> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 31236-done Cc: 31236-done@debbugs.gnu.org, karl@karlotness.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > Date: Sun, 22 Apr 2018 23:48:38 +1200 > From: Phil Sainty > Cc: bug-gnu-emacs , > 31236@debbugs.gnu.org > > Bug and proposed fix confirmed and tested here. > > This was an oversight on my part from #24837. > > The suggested patch seems sensible to me. If others agree, I think > this should be committed to the emacs-26 branch. Pushed, thanks. Karl, in the future please include a commit log message according to the instructions in CONTRIBUTE. (I fixed that for you this time.) ------------=_1524417002-1287-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 22 Apr 2018 05:40:12 +0000 Received: from localhost ([127.0.0.1]:35342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fA7jQ-0007OS-1V for submit@debbugs.gnu.org; Sun, 22 Apr 2018 01:40:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fA5tS-0004ZW-Ga for submit@debbugs.gnu.org; Sat, 21 Apr 2018 23:42:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fA5tM-0008Bw-By for submit@debbugs.gnu.org; Sat, 21 Apr 2018 23:42:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53478) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fA5tM-0008Bq-7V for submit@debbugs.gnu.org; Sat, 21 Apr 2018 23:42:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fA5tK-00041U-Tp for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2018 23:42:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fA5tH-00086j-12 for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2018 23:42:18 -0400 Received: from mail-it0-x235.google.com ([2607:f8b0:4001:c0b::235]:34085) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fA5tG-00085g-Q7 for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2018 23:42:14 -0400 Received: by mail-it0-x235.google.com with SMTP id t192-v6so6366968itc.1 for ; Sat, 21 Apr 2018 20:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karlotness-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=IObXfdbI+9ehAnkIdteO48ZJGwNT2cMrEY7yVNstJpE=; b=YDcOyOIF1otIG/jP7tIGgVLo6+OZ2O6NIVlAyWcWcu/bqXc/hf6vB8l0+03SGv8cX6 bVS8A3d8UtgXKekbCIeEUTMjoIOigmyYC82HsubIiEh0hEDyOr3cxhpvCNsRv9UR3fwK mQmhHZ9Z/+mBkgM0xDzWcqbtU02is81i9h6Bx7x66CJUGwpgbEy15Np8gQ2D7XXNkuCX /KJhKLEJmaT5Xi8qUSbLEi0HpiKHIHmDlQJ2Ixu+G+MkSO3WUwO44QQSsgAsNStZRq02 gvz5hvf7BJa9BUT8RkbsiS46X4oJI5SOBbL1DSB+E0F/NABVryuRtQfZaj3xygPJgD57 vXKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=IObXfdbI+9ehAnkIdteO48ZJGwNT2cMrEY7yVNstJpE=; b=Q7G/r4BIMNsOfbFIAsVd2VO8tkg4WwzpOltGOrNrfNKR9xNYLxa4Yw6XFAIoB7veBs mUd+MkqfUNoybG80ytQY+YXXK/h7juvLpnEXNzt9wJMY8aCdhe3NQIn9J7uIsOTEPuo4 sxwUtFTx37gs7lkoClf+U67FMCZKbXR//6nfIznRvyogsejtTHrd/ak6jXyLNLrY+qxo J99UKERy8XdmFbKUAK33MRdDdo32m+cv+7QZ6SaJSY8TcipAO8HQ592KaclUKqig6dTp st4VjBTJsAX6rTT21UfTmNu1/YOWInWA2cyfmI/aYz7VSjHhQthAdtNq/s6EbbUGGRaK VCBA== X-Gm-Message-State: ALQs6tDrlybyXJ4L7LoZ+Y2qnTHVboOK4+rAZnbbyiNIcS7ujlrSGfrP +4Y2ls0CwsI4VOGqTV8DHa1P774iGRw= X-Google-Smtp-Source: AB8JxZo4BUPSeZLumXUthrBSZfNUZg6ZgoIlvEX6Zkt/4XMgPhdOTDYxwlTuxgYK39xYg603lF7faQ== X-Received: by 2002:a24:3d01:: with SMTP id n1-v6mr9010130itn.134.1524368533598; Sat, 21 Apr 2018 20:42:13 -0700 (PDT) Received: from mail-io0-f171.google.com (mail-io0-f171.google.com. [209.85.223.171]) by smtp.gmail.com with ESMTPSA id q5-v6sm1725234iof.5.2018.04.21.20.42.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Apr 2018 20:42:12 -0700 (PDT) Received: by mail-io0-f171.google.com with SMTP id t123-v6so14698330iof.7 for ; Sat, 21 Apr 2018 20:42:12 -0700 (PDT) X-Received: by 2002:a6b:35d0:: with SMTP id k77-v6mr16171232ioo.42.1524368532425; Sat, 21 Apr 2018 20:42:12 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:d592:0:0:0:0:0 with HTTP; Sat, 21 Apr 2018 20:41:51 -0700 (PDT) From: Karl Otness Date: Sat, 21 Apr 2018 23:41:51 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: [PATCH] Fix pre- and post-command-hook errors in term.el To: bug-gnu-emacs@gnu.org Content-Type: multipart/mixed; boundary="000000000000e1f3d5056a67b44e" 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.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 22 Apr 2018 01:40:11 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -6.0 (------) --000000000000e1f3d5056a67b44e Content-Type: text/plain; charset="UTF-8" As far as I can tell there isn't an existing bug report for this issue. It is very minor but I have attached a fix. This affects Emacs 26.1-rc1 `term' and `ansi-term'. In char mode term installs functions in both pre- and post-command-hooks. After the process exits both of these hooks produce errors and then are removed by Emacs after printing a message. Both of these hooks are re-installed when entering char mode and removing them if they are not present will do nothing. To produce this change, I took the remove-hook lines used when entering line mode and placed them in `term-handle-exit'. To reproduce the issue in 26.1, M-x term, exit the running process and execute any command (i.e. move point). In *Messages* there should be the following lines: Error in pre-command-hook (term-set-goto-process-mark): (wrong-type-argument processp nil) Error in post-command-hook (term-goto-process-mark-maybe): (wrong-type-argument processp nil) The error seems to come up from `process-mark'. After this change, these errors no longer appear as the hooks are removed. I have attached a patch which applies this change to current master. Thank you, Karl --000000000000e1f3d5056a67b44e Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Fix-pre-and-post-command-hook-errors-in-term.el.patch" Content-Disposition: attachment; filename="0001-Fix-pre-and-post-command-hook-errors-in-term.el.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_jga9g8tc0 RnJvbSBlOTg4OTE0NTA1YTY5NGIwMGVhZmY2MGNhMjI2NDAwZDk5OGMxOWFhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBLYXJsIE90bmVzcyA8a2FybEBrYXJsb3RuZXNzLmNvbT4KRGF0 ZTogU2F0LCAyMSBBcHIgMjAxOCAyMzowMToxMSAtMDQwMApTdWJqZWN0OiBbUEFUQ0hdIEZpeCBw cmUtIGFuZCBwb3N0LWNvbW1hbmQtaG9vayBlcnJvcnMgaW4gdGVybS5lbAoKQmVmb3JlIHRoaXMg cGF0Y2gsIGFmdGVyIHRoZSB0ZXJtaW5hbCBwcm9jZXNzIGRpZXMgdGhlIGNvbW1hbmQgaG9va3MK YWRkZWQgaW4gdGVybS1tb2RlJ3MgY2hhciBtb2RlIHdvdWxkIHByb2R1Y2UgZXJyb3JzLiBUaGlz IGZpeCByZW1vdmVzCnRoZXNlIGhvb2tzIHdoZW4gdGhlIHByb2Nlc3MgZGllcy4KLS0tCiBsaXNw L3Rlcm0uZWwgfCAzICsrKwogMSBmaWxlIGNoYW5nZWQsIDMgaW5zZXJ0aW9ucygrKQoKZGlmZiAt LWdpdCBhL2xpc3AvdGVybS5lbCBiL2xpc3AvdGVybS5lbAppbmRleCBjZmIzOWMzNGU1Li4wMTdi MDIyMWVjIDEwMDY0NAotLS0gYS9saXNwL3Rlcm0uZWwKKysrIGIvbGlzcC90ZXJtLmVsCkBAIC0x NDU2LDYgKzE0NTYsOSBAQCB0ZXJtLWhhbmRsZS1leGl0CiAgIChsZXQgKChidWZmZXItcmVhZC1v bmx5IG5pbCkKIAkob21heCAocG9pbnQtbWF4KSkKIAkob3BvaW50IChwb2ludCkpKQorICAgIDs7 IFJlbW92ZSBob29rcyB0byBhdm9pZCBlcnJvcnMgZHVlIHRvIGRlYWQgcHJvY2Vzcy4KKyAgICAo cmVtb3ZlLWhvb2sgJ3ByZS1jb21tYW5kLWhvb2sgIyd0ZXJtLXNldC1nb3RvLXByb2Nlc3MtbWFy ayB0KQorICAgIChyZW1vdmUtaG9vayAncG9zdC1jb21tYW5kLWhvb2sgIyd0ZXJtLWdvdG8tcHJv Y2Vzcy1tYXJrLW1heWJlIHQpCiAgICAgOzsgUmVjb3JkIHdoZXJlIHdlIHB1dCB0aGUgbWVzc2Fn ZSwgc28gd2UgY2FuIGlnbm9yZSBpdAogICAgIDs7IGxhdGVyIG9uLgogICAgIChnb3RvLWNoYXIg b21heCkKLS0gCjIuMTcuMAoK --000000000000e1f3d5056a67b44e-- ------------=_1524417002-1287-1-- From unknown Sun Jun 22 00:52:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#31236: [PATCH] Fix pre- and post-command-hook errors in term.el Resent-From: Karl Otness Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Apr 2018 18:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31236 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: Phil Sainty , 31236-done@debbugs.gnu.org Received: via spool by 31236-done@debbugs.gnu.org id=D31236.152442332710925 (code D ref 31236); Sun, 22 Apr 2018 18:56:01 +0000 Received: (at 31236-done) by debbugs.gnu.org; 22 Apr 2018 18:55:27 +0000 Received: from localhost ([127.0.0.1]:36127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fAK91-0002q9-Bf for submit@debbugs.gnu.org; Sun, 22 Apr 2018 14:55:27 -0400 Received: from mail-io0-f176.google.com ([209.85.223.176]:36671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fAK90-0002pw-AO for 31236-done@debbugs.gnu.org; Sun, 22 Apr 2018 14:55:26 -0400 Received: by mail-io0-f176.google.com with SMTP id c26-v6so15975314iob.3 for <31236-done@debbugs.gnu.org>; Sun, 22 Apr 2018 11:55:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karlotness-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CRpOSDiT4IttCsxjm3ZzBcF+i2B6foPYMXkFdWEKeno=; b=W5a6ap5ya6SC43AwZA9tqPZkl0S7n2JjhDmCtXVJ8b/rwVv+CT3rEyiyILI6MvCOKg pYptAzBd7ivcqDuA4Mr2FjiVdGrr0q63HJEK6sQgj0DNncRsz3Yl717IM7Bx/WPdm4ew u//deFaiqLY7yCtvltjb5ef1b8D/DUQs7cngmLVfHfreZI3pXM641eD6n+FhVfAKSFwK bhwAn16gOH4uWAgOXYmX7ih6qKOc1InNA0Ju+0J/4vwbY/CuhmFn7tPqJghmHViz6BCD icrRT017bflcPOvMato8dxNln7MtcWNyOKeKEAQ8y8z3cL9CFHH0pnEA6FR6RKEUaGtx A9ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CRpOSDiT4IttCsxjm3ZzBcF+i2B6foPYMXkFdWEKeno=; b=bJxSNVRt6ZUgTKyWV/zfAUu/08AG2XlK6GeVaqIPFEI6e88dkR8NP2wKDZmYOT3rPV pOvxr275IJ4cLXNmFgMGcHPVhAJZJMRecNsOeSkVWAxDh4mupR+C8C52GnrHv5jm/HsA 8+Z/6Lac339BUj3mmz30SIyYQ1iumGy86plSXp/Bksq3bWxnS9Xl95ZDWcNba5ImNOEf 7tUYrzv4Wfxfe7UXHQlifmuPeLlRTc4m1nilht77Wjl7xuM2dD4O94XuWkKctjPN7ahN BKHSm5M6PsEHXQ0i0aOcsMDreULt4JHt/qavQNtpC7SwhEt/AIck3e5qR+Ete1Vm564o EpIA== X-Gm-Message-State: ALQs6tCMWHYGd1dA1TQ+fnmddm799C82qZ4eGZ8gge6VhvszZSV45nu2 zDO+PUr1gAXj+YZwSQ3MOOCL2lYWyX0= X-Google-Smtp-Source: AIpwx49+yxwWtzTXse45rCytLWme2nbAUKl390AXlbWXTbNNGCU6DLhXKkGTIb+MW18iDzadw8LD+g== X-Received: by 2002:a6b:3e8b:: with SMTP id l133-v6mr18689842ioa.65.1524423320496; Sun, 22 Apr 2018 11:55:20 -0700 (PDT) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com. [209.85.223.174]) by smtp.gmail.com with ESMTPSA id f126-v6sm3241308itc.28.2018.04.22.11.55.19 for <31236-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Apr 2018 11:55:20 -0700 (PDT) Received: by mail-io0-f174.google.com with SMTP id r22-v6so6903639ioc.12 for <31236-done@debbugs.gnu.org>; Sun, 22 Apr 2018 11:55:19 -0700 (PDT) X-Received: by 2002:a6b:5911:: with SMTP id n17-v6mr18866574iob.249.1524423319802; Sun, 22 Apr 2018 11:55:19 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:d592:0:0:0:0:0 with HTTP; Sun, 22 Apr 2018 11:54:59 -0700 (PDT) In-Reply-To: <83wowzw4l9.fsf@gnu.org> References: <2d991a6252dce5fd911a26e6a994a666@webmail.orcon.net.nz> <83wowzw4l9.fsf@gnu.org> From: Karl Otness Date: Sun, 22 Apr 2018 14:54:59 -0400 X-Gmail-Original-Message-ID: Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Will do, my mistake. Thank you for fixing it up. Karl On Sun, Apr 22, 2018 at 1:09 PM, Eli Zaretskii wrote: >> Date: Sun, 22 Apr 2018 23:48:38 +1200 >> From: Phil Sainty >> Cc: bug-gnu-emacs , >> 31236@debbugs.gnu.org >> >> Bug and proposed fix confirmed and tested here. >> >> This was an oversight on my part from #24837. >> >> The suggested patch seems sensible to me. If others agree, I think >> this should be committed to the emacs-26 branch. > > Pushed, thanks. > > Karl, in the future please include a commit log message according to > the instructions in CONTRIBUTE. (I fixed that for you this time.)