all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] trunk r114523: * progmodes/octave.el (inferior-octave-mode): Call
       [not found] <E1VS73s-0003ZU-3o@vcs.savannah.gnu.org>
@ 2013-10-04 17:53 ` Stefan Monnier
  2013-10-05  2:43   ` Leo Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2013-10-04 17:53 UTC (permalink / raw)
  To: Leo Liu; +Cc: emacs-devel

> +	* progmodes/octave.el (inferior-octave-mode): Call
> +	compilation-forget-errors.

This call doesn't seem very useful: at that point in time, there aren't
any errors parsed yet anyway.

The need for compilation-forget-errors is because in a comint-buffer,
you can have error "foo:3:Syntax error" appear many times following
different commands loading different versions of "foo" (e.g. because it
was edited in the mean time).  So you need to call
compilation-forget-errors whenever you know that the underlying process
will look at "files that have been modified".  It's often difficult to
know "the right place" where it should be called, but typically
<foo>-send-region, and related functions are good spots.


        Stefan



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

* Re: [Emacs-diffs] trunk r114523: * progmodes/octave.el (inferior-octave-mode): Call
  2013-10-04 17:53 ` [Emacs-diffs] trunk r114523: * progmodes/octave.el (inferior-octave-mode): Call Stefan Monnier
@ 2013-10-05  2:43   ` Leo Liu
  2013-10-05 18:39     ` Stefan Monnier
  2013-10-05 18:41     ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: Leo Liu @ 2013-10-05  2:43 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 2013-10-05 01:53 +0800, Stefan Monnier wrote:
> This call doesn't seem very useful: at that point in time, there aren't
> any errors parsed yet anyway.

The intention of the change I made is to make C-x ` go to the errors by
latest run-octave instead of past run-octave, i.e. one can M-x
run-octave multiple times in the same buffer. Is this useful?

> The need for compilation-forget-errors is because in a comint-buffer,
> you can have error "foo:3:Syntax error" appear many times following
> different commands loading different versions of "foo" (e.g. because it
> was edited in the mean time).  So you need to call
> compilation-forget-errors whenever you know that the underlying process
> will look at "files that have been modified".  It's often difficult to
> know "the right place" where it should be called, but typically
> <foo>-send-region, and related functions are good spots.

I am not entirely sure but I have put in a call to
compilation-forget-errors in octave-send-region just like
prolog-old-process-file for example. Hope this makes sense.

Leo



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

* Re: [Emacs-diffs] trunk r114523: * progmodes/octave.el (inferior-octave-mode): Call
  2013-10-05  2:43   ` Leo Liu
@ 2013-10-05 18:39     ` Stefan Monnier
  2013-10-05 18:41     ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2013-10-05 18:39 UTC (permalink / raw)
  To: Leo Liu; +Cc: emacs-devel

>> This call doesn't seem very useful: at that point in time, there aren't
>> any errors parsed yet anyway.
> The intention of the change I made is to make C-x ` go to the errors by
> latest run-octave instead of past run-octave, i.e. one can M-x
> run-octave multiple times in the same buffer. Is this useful?

Could be, indeed.  I can't remember enough the details of compile.el's
behavior to know if this call is needed for that, or even if
it's sufficient.  But at least the intention is definitely right.

> I am not entirely sure but I have put in a call to
> compilation-forget-errors in octave-send-region just like
> prolog-old-process-file for example. Hope this makes sense.

Good, thanks.


        Stefan



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

* Re: [Emacs-diffs] trunk r114523: * progmodes/octave.el (inferior-octave-mode): Call
  2013-10-05  2:43   ` Leo Liu
  2013-10-05 18:39     ` Stefan Monnier
@ 2013-10-05 18:41     ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2013-10-05 18:41 UTC (permalink / raw)
  To: Leo Liu; +Cc: emacs-devel

> I am not entirely sure but I have put in a call to
> compilation-forget-errors in octave-send-region just like
> prolog-old-process-file for example. Hope this makes sense.

BTW, another option, IIRC is to do it whenever a command is sent to the
underlying process (i.e. in comint-input-filter-functions).


        Stefan



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

end of thread, other threads:[~2013-10-05 18:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1VS73s-0003ZU-3o@vcs.savannah.gnu.org>
2013-10-04 17:53 ` [Emacs-diffs] trunk r114523: * progmodes/octave.el (inferior-octave-mode): Call Stefan Monnier
2013-10-05  2:43   ` Leo Liu
2013-10-05 18:39     ` Stefan Monnier
2013-10-05 18:41     ` 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.