all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Phil Sainty <psainty@orcon.net.nz>
To: Karl Otness <karl@karlotness.com>
Cc: bug-gnu-emacs
	<bug-gnu-emacs-bounces+psainty=orcon.net.nz@gnu.org>,
	31236@debbugs.gnu.org
Subject: bug#31236: [PATCH] Fix pre- and post-command-hook errors in term.el
Date: Sun, 22 Apr 2018 23:48:38 +1200	[thread overview]
Message-ID: <2d991a6252dce5fd911a26e6a994a666@webmail.orcon.net.nz> (raw)
In-Reply-To: <CAGk_8XJVp7jW5cbvSBmFSTQFX+0FFeyS2xepikWQ6CPbqTLPew@mail.gmail.com>

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






  reply	other threads:[~2018-04-22 11:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-22  3:41 bug#31236: [PATCH] Fix pre- and post-command-hook errors in term.el Karl Otness
2018-04-22 11:48 ` Phil Sainty [this message]
2018-04-22 17:09   ` Eli Zaretskii
2018-04-22 18:54     ` Karl Otness

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=2d991a6252dce5fd911a26e6a994a666@webmail.orcon.net.nz \
    --to=psainty@orcon.net.nz \
    --cc=31236@debbugs.gnu.org \
    --cc=bug-gnu-emacs-bounces+psainty=orcon.net.nz@gnu.org \
    --cc=karl@karlotness.com \
    /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.