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: Rasmus
Subject: Re: Questioning the new behavior of `open-line'.
Date: Thu, 12 Nov 2015 15:16:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Hi Artur,

Artur Malabarba <address@hidden> writes:

> On 12 Nov 2015 11:08 am, "Rasmus" <address@hidden> wrote:
>> You may say that this is an example of separate bug, but to the extend
>> that
>> misbehaviors exists, it’s very useful to
>> have dumb behavior available.
>
> I do agree. Would C-M-o or C-j C-b suffice in these situations?

Probably it.  C-M-o is slightly different, but perhaps it’s just a
question of getting used to it.  Truth be told, I was unaware of
split-line before this thread.


>> Here’s an example of d3.js.  I may want to
>> insert a new attribute before the width, without affecting the current
>> indentation.  I’d then use C-o.
>>
>>     var svg = div.append("svg")
>>                  .attr("width", box_plot.w)
>>                  .attr("height", box_plot.h);
>
> I'm sorry, I didn't understand. Could you explain (1) what you have before
> typing C-o, (2) the location of the cursor, (3) what you want to see after
> hitting C-o?

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.

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);


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,
Rasmus

-- 
⠠⠵



reply via email to

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