unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] emacs-26 ec02c73: Update process filter example (Bug#35044)
       [not found] ` <20190501005255.2DF9B2042B@vcs0.savannah.gnu.org>
@ 2019-05-01  2:54   ` Stefan Monnier
  2019-05-01 11:08     ` Noam Postavsky
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2019-05-01  2:54 UTC (permalink / raw)
  To: emacs-devel; +Cc: Noam Postavsky

>     * doc/lispref/processes.texi (Filter Functions): Use
>     insert-before-markers in the "ordinary" filter example, like
>     internal-default-process-filter does.

In my experience, insert-before-markers is a source of problems down the
road, so I'd recommend not to encourage its use by showing it in example
code where it's not strictly needed.


        Stefan



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

* Re: [Emacs-diffs] emacs-26 ec02c73: Update process filter example (Bug#35044)
  2019-05-01  2:54   ` [Emacs-diffs] emacs-26 ec02c73: Update process filter example (Bug#35044) Stefan Monnier
@ 2019-05-01 11:08     ` Noam Postavsky
  2019-05-03 22:47       ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Noam Postavsky @ 2019-05-01 11:08 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs developers

On Tue, 30 Apr 2019 at 22:54, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
> >     * doc/lispref/processes.texi (Filter Functions): Use
> >     insert-before-markers in the "ordinary" filter example, like
> >     internal-default-process-filter does.
>
> In my experience, insert-before-markers is a source of problems down the
> road, so I'd recommend not to encourage its use by showing it in example
> code where it's not strictly needed.

But it's an example about "mimicking the actions of the default
filter" which does currently use insert-before-markers.



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

* Re: [Emacs-diffs] emacs-26 ec02c73: Update process filter example (Bug#35044)
  2019-05-01 11:08     ` Noam Postavsky
@ 2019-05-03 22:47       ` Stefan Monnier
  2019-05-04  1:33         ` Noam Postavsky
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2019-05-03 22:47 UTC (permalink / raw)
  To: emacs-devel

>> >     * doc/lispref/processes.texi (Filter Functions): Use
>> >     insert-before-markers in the "ordinary" filter example, like
>> >     internal-default-process-filter does.
>>
>> In my experience, insert-before-markers is a source of problems down the
>> road, so I'd recommend not to encourage its use by showing it in example
>> code where it's not strictly needed.
>
> But it's an example about "mimicking the actions of the default
> filter" which does currently use insert-before-markers.

But do we really want to mimic that undesirable part of the behavior?


        Stefan




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

* Re: [Emacs-diffs] emacs-26 ec02c73: Update process filter example (Bug#35044)
  2019-05-03 22:47       ` Stefan Monnier
@ 2019-05-04  1:33         ` Noam Postavsky
  2019-05-04 13:22           ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Noam Postavsky @ 2019-05-04  1:33 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs developers

On Fri, 3 May 2019 at 18:50, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
> >> >     * doc/lispref/processes.texi (Filter Functions): Use
> >> >     insert-before-markers in the "ordinary" filter example, like
> >> >     internal-default-process-filter does.
> >>
> >> In my experience, insert-before-markers is a source of problems down the
> >> road, so I'd recommend not to encourage its use by showing it in example
> >> code where it's not strictly needed.
> >
> > But it's an example about "mimicking the actions of the default
> > filter" which does currently use insert-before-markers.
>
> But do we really want to mimic that undesirable part of the behavior?

If it's undesirable, then we should stop doing it in the default
filter. But since we are currently doing it in the default filter,
what kind of problems is that leading to (I'm not aware of any)?



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

* Re: [Emacs-diffs] emacs-26 ec02c73: Update process filter example (Bug#35044)
  2019-05-04  1:33         ` Noam Postavsky
@ 2019-05-04 13:22           ` Stefan Monnier
  2019-05-07 10:44             ` Noam Postavsky
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2019-05-04 13:22 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Emacs developers

> If it's undesirable, then we should stop doing it in the default filter.

I don't think it's worth changing long-standing behavior, no.
But showing it as an example that people may then follow is
another issue.

> But since we are currently doing it in the default filter,
> what kind of problems is that leading to (I'm not aware of any)?

The problem is that it's blunt because it applies equally to all
markers/overlays.  It's almost always the case that it's much better to
use `insert` and rely on your markers's insertion-type to control
the behavior.


        Stefan



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

* Re: [Emacs-diffs] emacs-26 ec02c73: Update process filter example (Bug#35044)
  2019-05-04 13:22           ` Stefan Monnier
@ 2019-05-07 10:44             ` Noam Postavsky
  2019-05-07 12:43               ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Noam Postavsky @ 2019-05-07 10:44 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs developers

On Sat, 4 May 2019 at 09:22, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
> > If it's undesirable, then we should stop doing it in the default filter.
>
> I don't think it's worth changing long-standing behavior, no.
> But showing it as an example that people may then follow is
> another issue.
>
> > But since we are currently doing it in the default filter,
> > what kind of problems is that leading to (I'm not aware of any)?
>
> The problem is that it's blunt because it applies equally to all
> markers/overlays.  It's almost always the case that it's much better to
> use `insert` and rely on your markers's insertion-type to control
> the behavior.

I just don't see how we can say it's almost always much better to use
`insert', and then use `insert-before-markers' by default.
"Do as we say, not as we do".



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

* Re: [Emacs-diffs] emacs-26 ec02c73: Update process filter example (Bug#35044)
  2019-05-07 10:44             ` Noam Postavsky
@ 2019-05-07 12:43               ` Stefan Monnier
  2019-05-10  1:33                 ` Noam Postavsky
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2019-05-07 12:43 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Emacs developers

> I just don't see how we can say it's almost always much better to use
> `insert', and then use `insert-before-markers' by default.

Very easy: historical accident (and the lack of
window-point-insertion-type before Emacs-23).

> "Do as we say, not as we do".

More like: "don't do the same mistake we did".


        Stefan



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

* Re: [Emacs-diffs] emacs-26 ec02c73: Update process filter example (Bug#35044)
  2019-05-07 12:43               ` Stefan Monnier
@ 2019-05-10  1:33                 ` Noam Postavsky
  2019-05-10 13:17                   ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Noam Postavsky @ 2019-05-10  1:33 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs developers

On Tue, 7 May 2019 at 08:43, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
> > I just don't see how we can say it's almost always much better to use
> > `insert', and then use `insert-before-markers' by default.
>
> Very easy: historical accident (and the lack of
> window-point-insertion-type before Emacs-23).
>
> > "Do as we say, not as we do".
>
> More like: "don't do the same mistake we did".

I guess I can live with that, though I kind of still have the urge to
change it and see what breaks...

Anyone else have opinions on this?



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

* Re: [Emacs-diffs] emacs-26 ec02c73: Update process filter example (Bug#35044)
  2019-05-10  1:33                 ` Noam Postavsky
@ 2019-05-10 13:17                   ` Stefan Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2019-05-10 13:17 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Emacs developers

> I guess I can live with that, though I kind of still have the urge to
> change it and see what breaks...

I'm all for it,


        Stefan



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

end of thread, other threads:[~2019-05-10 13:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20190501005253.12791.10999@vcs0.savannah.gnu.org>
     [not found] ` <20190501005255.2DF9B2042B@vcs0.savannah.gnu.org>
2019-05-01  2:54   ` [Emacs-diffs] emacs-26 ec02c73: Update process filter example (Bug#35044) Stefan Monnier
2019-05-01 11:08     ` Noam Postavsky
2019-05-03 22:47       ` Stefan Monnier
2019-05-04  1:33         ` Noam Postavsky
2019-05-04 13:22           ` Stefan Monnier
2019-05-07 10:44             ` Noam Postavsky
2019-05-07 12:43               ` Stefan Monnier
2019-05-10  1:33                 ` Noam Postavsky
2019-05-10 13:17                   ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).