emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questioning the new behavior of `open-line'.


From: Artur Malabarba
Subject: Re: Questioning the new behavior of `open-line'.
Date: Thu, 12 Nov 2015 16:09:42 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Rasmus <address@hidden> writes:

> In any case, to address you question.
>
> Picture 1; ’|’ is the cursor.
>
>       var svg = div.append("svg")
>       |            .attr("width", box_plot.w) 
>                    .attr("height", box_plot.h);
>
>       M-o result before
>
>       var svg = div.append("svg")
>       |
>                    .attr("width", box_plot.w) 
>                    .attr("height", box_plot.h);
>
>       Now,
>
>       var svg = div.append("svg")
>
>           .attr("width", box_plot.w)
>                    .attr("height", box_plot.h);

Thank you, Rasmus, that's very helpful.
Indeed, what I plan to do now is revert to the old behaviour on col 0,
which should address this case as well as other cases mentioned here.
Regardless of anything else, I agree this is the right thing to do on
col 0.

> When wanting to push something down from within the line, results are poor
> before and after patch
>
> Picture 2; ’|’ is the cursor
>
>     var svg = div.append("svg")|.classed("myclass", true)
>                  .attr("width", box_plot.w)
>                  .attr("height", box_plot.h);
>
>     Before,
>
>     var svg = div.append("svg")|
>     .classed("myclass", true)
>                  .attr("width", box_plot.w)
>                  .attr("height", box_plot.h);
>
>
>     Now,
>
>     var svg = div.append("svg")|
>         .classed("myclass", true)
>                  .attr("width", box_plot.w)
>                  .attr("height", box_plot.h);

Thanks for this clarification too.

“C-o at the middle of the line” is what my patch was meant to address
(the above effect was an accident). In this situation, if the
indentation engine works correctly, the old behaviour is something I
don’t think would ever be useful. That’s what motivated the change.

When the indentation engine does not work correctly, then my patch
doesn’t make things better, but I guess it doesn’t make them worse
either.

> I realize that I would probably be mostly OK if special behavior is
> adopted when point is a column zero.  I’m still not sure that M-o warrants
> such complexity, but I don’t feel too strongly about it.

The complexity here is very manageable, and the function isn’t long.
Besides, it’s a very frequently used command. It’s worth investing and
extra 4 or 5 lines to make it more natural.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]