unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Regarding smerge upper/lower; needs NEWS
@ 2017-03-21 14:01 Kaushal Modi
  2017-03-24 19:46 ` Glenn Morris
  0 siblings, 1 reply; 32+ messages in thread
From: Kaushal Modi @ 2017-03-21 14:01 UTC (permalink / raw)
  To: Glenn Morris, Emacs developers

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

Hi Glenn,

I really appreciate the changes in this commit
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=bdfee01a6567b9f08f82bc84d1196e6cb62587ca

smerge-upper is much clearer than smerge-merge; and the same for
smerge-lower vs smerge-other.

Though, I was surprised to see that this change was not mentioned in NEWS
in the master branch.

Can you please add that?

Thanks.
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 736 bytes --]

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

* Re: Regarding smerge upper/lower; needs NEWS
  2017-03-21 14:01 Regarding smerge upper/lower; needs NEWS Kaushal Modi
@ 2017-03-24 19:46 ` Glenn Morris
  2017-04-07 18:06   ` Richard Copley
  0 siblings, 1 reply; 32+ messages in thread
From: Glenn Morris @ 2017-03-24 19:46 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Emacs developers

Kaushal Modi wrote:

> http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=bdfee01a6567b9f08f82bc84d1196e6cb62587ca
[...]
> Though, I was surprised to see that this change was not mentioned in NEWS
> in the master branch.
>
> Can you please add that?

I don't find it (renaming with aliases to the old names) NEWSworthy,
but if you want to add an entry, it's totally fine by me.



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

* Re: Regarding smerge upper/lower; needs NEWS
  2017-03-24 19:46 ` Glenn Morris
@ 2017-04-07 18:06   ` Richard Copley
  2017-04-07 19:09     ` Noam Postavsky
  0 siblings, 1 reply; 32+ messages in thread
From: Richard Copley @ 2017-04-07 18:06 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Emacs developers, Kaushal Modi

On 24 March 2017 at 19:46, Glenn Morris <rgm@gnu.org> wrote:
> Kaushal Modi wrote:
>
>> http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=bdfee01a6567b9f08f82bc84d1196e6cb62587ca
> [...]
>> Though, I was surprised to see that this change was not mentioned in NEWS
>> in the master branch.
>>
>> Can you please add that?
>
> I don't find it (renaming with aliases to the old names) NEWSworthy,
> but if you want to add an entry, it's totally fine by me.

I've had plenty of time to think about this and I still don't get
it. Why are we calling the left window UPPER and the right window
LOWER? In the lower pane (the conflicted file for resolution)
they are called "variant A" and "variant B". Shouldn't we call
them that too, so that we know which one is which?



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

* Re: Regarding smerge upper/lower; needs NEWS
  2017-04-07 18:06   ` Richard Copley
@ 2017-04-07 19:09     ` Noam Postavsky
  2017-04-07 19:23       ` Richard Copley
  0 siblings, 1 reply; 32+ messages in thread
From: Noam Postavsky @ 2017-04-07 19:09 UTC (permalink / raw)
  To: Richard Copley; +Cc: Glenn Morris, Kaushal Modi, Emacs developers

On Fri, Apr 7, 2017 at 2:06 PM, Richard Copley <rcopley@gmail.com> wrote:

>>> http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=bdfee01a6567b9f08f82bc84d1196e6cb62587ca
>
> I've had plenty of time to think about this and I still don't get
> it. Why are we calling the left window UPPER and the right window
> LOWER? In the lower pane (the conflicted file for resolution)
> they are called "variant A" and "variant B". Shouldn't we call
> them that too, so that we know which one is which?
>

You seem to be talking about ediff or emerge, but this thread is about
smerge which operates in a single buffer, no windows involved.



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

* Re: Regarding smerge upper/lower; needs NEWS
  2017-04-07 19:09     ` Noam Postavsky
@ 2017-04-07 19:23       ` Richard Copley
  2017-04-07 19:24         ` Richard Copley
  0 siblings, 1 reply; 32+ messages in thread
From: Richard Copley @ 2017-04-07 19:23 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Glenn Morris, Kaushal Modi, Emacs developers

On 7 April 2017 at 20:09, Noam Postavsky <npostavs@users.sourceforge.net> wrote:
> On Fri, Apr 7, 2017 at 2:06 PM, Richard Copley <rcopley@gmail.com> wrote:
>
>>>> http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=bdfee01a6567b9f08f82bc84d1196e6cb62587ca
>>
>> I've had plenty of time to think about this and I still don't get
>> it. Why are we calling the left window UPPER and the right window
>> LOWER? In the lower pane (the conflicted file for resolution)
>> they are called "variant A" and "variant B". Shouldn't we call
>> them that too, so that we know which one is which?
>>
>
> You seem to be talking about ediff or emerge, but this thread is about
> smerge which operates in a single buffer, no windows involved.

Thanks, I knew I must have been missing something. IMO making
smerge weird is a disadvantage of this change.



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

* Re: Regarding smerge upper/lower; needs NEWS
  2017-04-07 19:23       ` Richard Copley
@ 2017-04-07 19:24         ` Richard Copley
  2017-04-07 19:53           ` Richard Copley
  0 siblings, 1 reply; 32+ messages in thread
From: Richard Copley @ 2017-04-07 19:24 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Glenn Morris, Kaushal Modi, Emacs developers

On 7 April 2017 at 20:23, Richard Copley <rcopley@gmail.com> wrote:
> On 7 April 2017 at 20:09, Noam Postavsky <npostavs@users.sourceforge.net> wrote:
>> On Fri, Apr 7, 2017 at 2:06 PM, Richard Copley <rcopley@gmail.com> wrote:
>>
>>>>> http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=bdfee01a6567b9f08f82bc84d1196e6cb62587ca
>>>
>>> I've had plenty of time to think about this and I still don't get
>>> it. Why are we calling the left window UPPER and the right window
>>> LOWER? In the lower pane (the conflicted file for resolution)
>>> they are called "variant A" and "variant B". Shouldn't we call
>>> them that too, so that we know which one is which?
>>>
>>
>> You seem to be talking about ediff or emerge, but this thread is about
>> smerge which operates in a single buffer, no windows involved.
>
> Thanks, I knew I must have been missing something. IMO making
> smerge weird is a disadvantage of this change.

Sorry. Let's say I meant emerge.



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

* Re: Regarding smerge upper/lower; needs NEWS
  2017-04-07 19:24         ` Richard Copley
@ 2017-04-07 19:53           ` Richard Copley
  2017-04-13  0:49             ` Noam Postavsky
  0 siblings, 1 reply; 32+ messages in thread
From: Richard Copley @ 2017-04-07 19:53 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Glenn Morris, Kaushal Modi, Emacs developers

On 7 April 2017 at 20:24, Richard Copley <rcopley@gmail.com> wrote:
> On 7 April 2017 at 20:23, Richard Copley <rcopley@gmail.com> wrote:
>> On 7 April 2017 at 20:09, Noam Postavsky <npostavs@users.sourceforge.net> wrote:
>>> On Fri, Apr 7, 2017 at 2:06 PM, Richard Copley <rcopley@gmail.com> wrote:
>>>
>>>>>> http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=bdfee01a6567b9f08f82bc84d1196e6cb62587ca
>>>>
>>>> I've had plenty of time to think about this and I still don't get
>>>> it. Why are we calling the left window UPPER and the right window
>>>> LOWER? In the lower pane (the conflicted file for resolution)
>>>> they are called "variant A" and "variant B". Shouldn't we call
>>>> them that too, so that we know which one is which?
>>>>
>>>
>>> You seem to be talking about ediff or emerge, but this thread is about
>>> smerge which operates in a single buffer, no windows involved.
>>
>> Thanks, I knew I must have been missing something. IMO making
>> smerge weird is a disadvantage of this change.
>
> Sorry. Let's say I meant emerge.

Sorry again, I didn't mean to be mysterious. Think of me as just a
stupid user. (I am just a stupid user.)

Here's what happens, but please be sympathetic, because I haven't
taken the trouble to create an artificial merge conflict in order to
create an exact recipe. This is from memory and some of the details
are very likely wrong.

I attempt an SVN merge which fails and leaves the file conflicted.

I visit the resulting file, containing conflict markers, in Emacs.

The buffer's in SMerge mode or something (I guess because of
magic-mode-alist but I didn't debug to check).

Think: now I want to use Ediff (Ediff is why I use Emacs). How?

C-h m

Seems like it's something totally weird and impossible to remember.
([C-x ^ e]? I really don't remember, I'd have to check.)
OK, yuck! But let's try it.

Bang! UPPER on the left and LOWER on the right, with something else
entirely underneath.

It's not exactly difficult to deal with, but it's distracting.



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

* Re: Regarding smerge upper/lower; needs NEWS
  2017-04-07 19:53           ` Richard Copley
@ 2017-04-13  0:49             ` Noam Postavsky
  2017-04-13 18:32               ` Stefan Monnier
  0 siblings, 1 reply; 32+ messages in thread
From: Noam Postavsky @ 2017-04-13  0:49 UTC (permalink / raw)
  To: Richard Copley; +Cc: Glenn Morris, Kaushal Modi, Emacs developers

On Fri, Apr 7, 2017 at 3:53 PM, Richard Copley <rcopley@gmail.com> wrote:
>
> Sorry again, I didn't mean to be mysterious. Think of me as just a
> stupid user. (I am just a stupid user.)
>
> Here's what happens, but please be sympathetic, because I haven't
> taken the trouble to create an artificial merge conflict in order to
> create an exact recipe. This is from memory and some of the details
> are very likely wrong.
>
> I attempt an SVN merge which fails and leaves the file conflicted.
>
> I visit the resulting file, containing conflict markers, in Emacs.
>
> The buffer's in SMerge mode or something (I guess because of
> magic-mode-alist but I didn't debug to check).
>
> Think: now I want to use Ediff (Ediff is why I use Emacs). How?
>
> C-h m
>
> Seems like it's something totally weird and impossible to remember.
> ([C-x ^ e]? I really don't remember, I'd have to check.)
> OK, yuck! But let's try it.
>
> Bang! UPPER on the left and LOWER on the right, with something else
> entirely underneath.
>
> It's not exactly difficult to deal with, but it's distracting.

Ah, I think I get it now. Does this help:

--- i/lisp/vc/smerge-mode.el
+++ w/lisp/vc/smerge-mode.el
@@ -1247,12 +1247,12 @@ smerge-ediff
      (upper (generate-new-buffer
         (or name-upper
                     (concat "*" filename " "
-                            (smerge--get-marker smerge-begin-re "UPPER")
+                            (smerge--get-marker smerge-begin-re "A")
                             "*"))))
      (lower (generate-new-buffer
          (or name-lower
                      (concat "*" filename " "
-                             (smerge--get-marker smerge-end-re "LOWER")
+                             (smerge--get-marker smerge-end-re "B")
                              "*"))))
      base)
     (with-current-buffer upper



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

* Re: Regarding smerge upper/lower; needs NEWS
  2017-04-13  0:49             ` Noam Postavsky
@ 2017-04-13 18:32               ` Stefan Monnier
  2017-04-13 19:03                 ` Noam Postavsky
       [not found]                 ` <CY1PR03MB2251867FBF42034CF55007ADF0020@CY1PR03MB2251.namprd03.prod.outlook.com>
  0 siblings, 2 replies; 32+ messages in thread
From: Stefan Monnier @ 2017-04-13 18:32 UTC (permalink / raw)
  To: emacs-devel

> @@ -1247,12 +1247,12 @@ smerge-ediff
>       (upper (generate-new-buffer
>          (or name-upper
>                      (concat "*" filename " "
> -                            (smerge--get-marker smerge-begin-re "UPPER")
> +                            (smerge--get-marker smerge-begin-re "A")
>                              "*"))))
>       (lower (generate-new-buffer
>           (or name-lower
>                       (concat "*" filename " "
> -                             (smerge--get-marker smerge-end-re "LOWER")
> +                             (smerge--get-marker smerge-end-re "B")
>                               "*"))))
>       base)
>      (with-current-buffer upper


Let's not forget that smerge works not only for 2-part conflicts but
also for 3-part conflicts (which I think are immensely more valuable),
where the middle one is the "ancestor".  Currently, the names are
"upper/base/lower", which I find tolerable, but I'm not sure "a/base/b"
is good enough.


        Stefan




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

* Re: Regarding smerge upper/lower; needs NEWS
  2017-04-13 18:32               ` Stefan Monnier
@ 2017-04-13 19:03                 ` Noam Postavsky
       [not found]                 ` <CY1PR03MB2251867FBF42034CF55007ADF0020@CY1PR03MB2251.namprd03.prod.outlook.com>
  1 sibling, 0 replies; 32+ messages in thread
From: Noam Postavsky @ 2017-04-13 19:03 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]

On Thu, Apr 13, 2017 at 2:32 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> @@ -1247,12 +1247,12 @@ smerge-ediff
>>       (upper (generate-new-buffer
>>          (or name-upper
>>                      (concat "*" filename " "
>> -                            (smerge--get-marker smerge-begin-re "UPPER")
>> +                            (smerge--get-marker smerge-begin-re "A")
>>                              "*"))))
>>       (lower (generate-new-buffer
>>           (or name-lower
>>                       (concat "*" filename " "
>> -                             (smerge--get-marker smerge-end-re "LOWER")
>> +                             (smerge--get-marker smerge-end-re "B")
>>                               "*"))))
>>       base)
>>      (with-current-buffer upper
>
>
> Let's not forget that smerge works not only for 2-part conflicts but
> also for 3-part conflicts (which I think are immensely more valuable),
> where the middle one is the "ancestor".  Currently, the names are
> "upper/base/lower", which I find tolerable, but I'm not sure "a/base/b"
> is good enough.
>

I'm not sure if we're talking about the same thing. The above only
affects ediff buffer names created from smerge-ediff (C-c ^ E).
Screenshots attached. All for the same contrived conflict created
using the attached 'mk-conflict.sh', the 3way ones are from setting
merge.conflictstyle = diff3 in my git config.

[-- Attachment #2: current-master-2way-smerge-ediff.png --]
[-- Type: image/png, Size: 18824 bytes --]

[-- Attachment #3: current-master-3way-smerge-ediff.png --]
[-- Type: image/png, Size: 25513 bytes --]

[-- Attachment #4: with-AB-patch-2way-smerge-ediff.png --]
[-- Type: image/png, Size: 18055 bytes --]

[-- Attachment #5: with-AB-patch-3way-smerge-ediff.png --]
[-- Type: image/png, Size: 23094 bytes --]

[-- Attachment #6: mk-conflict.sh --]
[-- Type: application/x-sh, Size: 939 bytes --]

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

* RE: Regarding smerge upper/lower; needs NEWS
       [not found]                 ` <CY1PR03MB2251867FBF42034CF55007ADF0020@CY1PR03MB2251.namprd03.prod.outlook.com>
@ 2017-04-13 19:34                   ` Stephan Mueller
  2018-03-15 14:37                     ` Richard Copley
  0 siblings, 1 reply; 32+ messages in thread
From: Stephan Mueller @ 2017-04-13 19:34 UTC (permalink / raw)
  To: emacs-devel@gnu.org

Ack, I write gibberish for no good reason.  Please ignore me.  Sorry for the noise.

stephan();

-----Original Message-----
From: Stephan Mueller 
Sent: Thursday, April 13, 2017 11:56 AM
To: emacs-devel@gnu.org
Subject: RE: Regarding smerge upper/lower; needs NEWS

Stefan wrote:

" Let's not forget that smerge works not only for 2-part conflicts but
" also for 3-part conflicts (which I think are immensely more valuable),

Agreed on the higher value of handling 3-part conflicts.

" Currently, the names are
" "upper/base/lower", which I find tolerable, but I'm not sure "a/base/b"
" is good enough.

I'm not sure the name 'upper' adds anything if it's displayed in the upper
pane, which suggests to me that 'a' is no worse.   (And if 'upper' is displayed
anywhere else, it's causing confusion.

stephan();




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

* Re: Regarding smerge upper/lower; needs NEWS
  2017-04-13 19:34                   ` Stephan Mueller
@ 2018-03-15 14:37                     ` Richard Copley
  2018-03-15 15:04                       ` Stefan Monnier
                                         ` (2 more replies)
  0 siblings, 3 replies; 32+ messages in thread
From: Richard Copley @ 2018-03-15 14:37 UTC (permalink / raw)
  To: Glenn Morris, Kaushal Modi
  Cc: Stephan.Mueller, Noam Postavsky, Stefan Monnier,
	emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1344 bytes --]

On 13 April 2017 at 20:34, Stephan Mueller <Stephan.Mueller@microsoft.com>
wrote:

> Ack, I write gibberish for no good reason.  Please ignore me.  Sorry for
> the noise.
>
> stephan();
>
> -----Original Message-----
> From: Stephan Mueller
> Sent: Thursday, April 13, 2017 11:56 AM
> To: emacs-devel@gnu.org
> Subject: RE: Regarding smerge upper/lower; needs NEWS
>
> Stefan wrote:
>
> " Let's not forget that smerge works not only for 2-part conflicts but
> " also for 3-part conflicts (which I think are immensely more valuable),
>
> Agreed on the higher value of handling 3-part conflicts.
>
> " Currently, the names are
> " "upper/base/lower", which I find tolerable, but I'm not sure "a/base/b"
> " is good enough.
>
> I'm not sure the name 'upper' adds anything if it's displayed in the upper
> pane, which suggests to me that 'a' is no worse.   (And if 'upper' is
> displayed
> anywhere else, it's causing confusion.
>
> stephan();
>
>
>
Glenn, Kaushal,

"A" and "B" are the names diff3 uses for the conflict markers.
"A" and "B" are the names used in the documentation.
"UPPER" and "LOWER" are useless since they don't match up with anything
else (the conflict markers and the documentation).
"UPPER" and "LOWER" are confusing since they are often shown on the left
and right respectively.

Why is this change good? What am I missing?

[-- Attachment #2: Type: text/html, Size: 2204 bytes --]

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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 14:37                     ` Richard Copley
@ 2018-03-15 15:04                       ` Stefan Monnier
  2018-03-15 15:30                         ` Richard Copley
  2018-03-15 15:30                       ` Kaushal Modi
  2018-03-15 16:45                       ` Glenn Morris
  2 siblings, 1 reply; 32+ messages in thread
From: Stefan Monnier @ 2018-03-15 15:04 UTC (permalink / raw)
  To: Richard Copley
  Cc: Glenn Morris, emacs-devel@gnu.org, Stephan.Mueller,
	Noam Postavsky, Kaushal Modi

> "A" and "B" are the names diff3 uses for the conflict markers.
> "A" and "B" are the names used in the documentation.
> "UPPER" and "LOWER" are useless since they don't match up with anything
> else (the conflict markers and the documentation).

They match up with the location of the corresponding chunk of text, tho.

> "UPPER" and "LOWER" are confusing since they are often shown on the left
> and right respectively.

In SMerge? In which circumstance would it be the case?


        Stefan



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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 14:37                     ` Richard Copley
  2018-03-15 15:04                       ` Stefan Monnier
@ 2018-03-15 15:30                       ` Kaushal Modi
  2018-03-15 15:37                         ` Richard Copley
  2018-03-15 16:45                       ` Glenn Morris
  2 siblings, 1 reply; 32+ messages in thread
From: Kaushal Modi @ 2018-03-15 15:30 UTC (permalink / raw)
  To: Richard Copley
  Cc: Glenn Morris, Noam Postavsky, Stephan.Mueller, Stefan Monnier,
	emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]

On Thu, Mar 15, 2018 at 10:38 AM Richard Copley <rcopley@gmail.com> wrote:

> "A" and "B" are the names diff3 uses for the conflict markers.
>

I would find that very confusing in Smerge.


> "A" and "B" are the names used in the documentation.
>

Which documentation? If Smerge documentation, then it should be fixed to
update to the convention of upper/lower?


> "UPPER" and "LOWER" are useless since they don't match up with anything
> else (the conflict markers and the documentation).
>

I have never found that convention confusing.. We are strictly speaking of
the use of upper/lower in Smerge.


> "UPPER" and "LOWER" are confusing since they are often shown on the left
> and right respectively.
>

Hmm, the conflicts don't show up left/right for me.. How are you using
Smerge?


> Why is this change good? What am I missing?
>

Well, it worked great for me. FYI, I am just an Smerge user (not
contributor), and this was a welcome change for my use case.. never done
conflict merging using Smerge using left/right orientation as you suggest.
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 2479 bytes --]

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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 15:04                       ` Stefan Monnier
@ 2018-03-15 15:30                         ` Richard Copley
  2018-03-15 15:43                           ` Stefan Monnier
  0 siblings, 1 reply; 32+ messages in thread
From: Richard Copley @ 2018-03-15 15:30 UTC (permalink / raw)
  To: Stefan Monnier
  Cc: Glenn Morris, emacs-devel@gnu.org, Stephan.Mueller,
	Noam Postavsky, Kaushal Modi

[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]

On 15 March 2018 at 15:04, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > "A" and "B" are the names diff3 uses for the conflict markers.
> > "A" and "B" are the names used in the documentation.
> > "UPPER" and "LOWER" are useless since they don't match up with anything
> > else (the conflict markers and the documentation).
>
> They match up with the location of the corresponding chunk of text, tho.
>
> > "UPPER" and "LOWER" are confusing since they are often shown on the left
> > and right respectively.
>
> In SMerge? In which circumstance would it be the case?
>
>
>         Stefan
>

In "smerge-ediff", I think.

Suppose
  git checkout xxx
  git merge master
leaves merge conflicts.
Visit a conflicted file and type C-c ^ E.

If merge.conflictstyle=diff3 I get (for example):

top-left: "*main.cpp UPPER=HEAD*"
top-right: "*main.cpp LOWER=master*"
bottom-left: "*ediff-merge*"
bottom-right: "*main.cpp BASE=merged common ancestors*"

Or with git's default (no merge.conflictstyle configured):

top-left: "*main.cpp UPPER=HEAD*"
top-right: "*main.cpp LOWER=master*"
bottom: "*ediff-merge*"

And in the "*ediff-merge*" buffer, the conflict markers are "<<<<<<<
variant A" and ">>>>>>> variant B".

[-- Attachment #2: Type: text/html, Size: 2622 bytes --]

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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 15:30                       ` Kaushal Modi
@ 2018-03-15 15:37                         ` Richard Copley
  2018-03-15 15:39                           ` Kaushal Modi
  0 siblings, 1 reply; 32+ messages in thread
From: Richard Copley @ 2018-03-15 15:37 UTC (permalink / raw)
  To: Kaushal Modi
  Cc: Glenn Morris, Noam Postavsky, Stephan.Mueller, Stefan Monnier,
	emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]

On 15 March 2018 at 15:30, Kaushal Modi <kaushal.modi@gmail.com> wrote:

> On Thu, Mar 15, 2018 at 10:38 AM Richard Copley <rcopley@gmail.com> wrote:
>
>> "A" and "B" are the names diff3 uses for the conflict markers.
>>
>
> I would find that very confusing in Smerge.
>
>
>> "A" and "B" are the names used in the documentation.
>>
>
> Which documentation? If Smerge documentation, then it should be fixed to
> update to the convention of upper/lower?
>

Yes, the smerge documentation, and no, because UPPER and LOWER are wrong,
in some use cases.


>
>
>> "UPPER" and "LOWER" are useless since they don't match up with anything
>> else (the conflict markers and the documentation).
>>
>
> I have never found that convention confusing.. We are strictly speaking of
> the use of upper/lower in Smerge.
>

I'm not sure what you mean. We're talking about the same change. Perhaps
its effects are wider than you think.


> "UPPER" and "LOWER" are confusing since they are often shown on the left
>> and right respectively.
>>
>
> Hmm, the conflicts don't show up left/right for me.. How are you using
> Smerge?
>

Please see my reply to Stefan.
How are you using it?


>
>
>> Why is this change good? What am I missing?
>>
>
> Well, it worked great for me. FYI, I am just an Smerge user (not
> contributor), and this was a welcome change for my use case.. never done
> conflict merging using Smerge using left/right orientation as you suggest.
> --
>
> Kaushal Modi
>

[-- Attachment #2: Type: text/html, Size: 3974 bytes --]

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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 15:37                         ` Richard Copley
@ 2018-03-15 15:39                           ` Kaushal Modi
  0 siblings, 0 replies; 32+ messages in thread
From: Kaushal Modi @ 2018-03-15 15:39 UTC (permalink / raw)
  To: Richard Copley
  Cc: Glenn Morris, Noam Postavsky, Stephan.Mueller, Stefan Monnier,
	emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

On Thu, Mar 15, 2018 at 11:37 AM Richard Copley <rcopley@gmail.com> wrote:

>
> Please see my reply to Stefan.
> How are you using it?
>

Thanks. I read your reply to Stefan. I use Smerge only as Smerge, and Ediff
as Ediff.. I have never tried smerge-ediff. So your points seem valid.

As for the Smerge-only use case (mine), the upper/lower naming makes
perfect sense.
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 865 bytes --]

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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 15:30                         ` Richard Copley
@ 2018-03-15 15:43                           ` Stefan Monnier
  2018-03-15 16:09                             ` Richard Copley
  0 siblings, 1 reply; 32+ messages in thread
From: Stefan Monnier @ 2018-03-15 15:43 UTC (permalink / raw)
  To: Richard Copley
  Cc: Glenn Morris, emacs-devel@gnu.org, Stephan.Mueller,
	Noam Postavsky, Kaushal Modi

> In "smerge-ediff", I think.

smerge-ediff is a command which basically *leaves* SMerge (the whole
purpose of SMerge is to do the conflict resolution directly in the one
buffer rather than going through Ediff, which is a fine tool but too
heavyweight for my taste in 99% of the cases (tho I really appreciate it
for that remaining 1%)).

Also the upper/lower (or any other nomenclature SMerge uses) only
affects the name of the generated buffers: Ediff labels will simply
always be A/B with corresponding key-bindings and the upper/lower
terminology of SMerge just disappears.

So I guess what you're saying is that we should improve the consistency
in the naming used by SMerge and Ediff.  That's a good point.
And indeed upper/lower doesn't work for Ediff.


        Stefan



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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 15:43                           ` Stefan Monnier
@ 2018-03-15 16:09                             ` Richard Copley
  0 siblings, 0 replies; 32+ messages in thread
From: Richard Copley @ 2018-03-15 16:09 UTC (permalink / raw)
  To: Stefan Monnier
  Cc: Glenn Morris, emacs-devel@gnu.org, Stephan.Mueller,
	Noam Postavsky, Kaushal Modi

[-- Attachment #1: Type: text/plain, Size: 1134 bytes --]

On 15 March 2018 at 15:43, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > In "smerge-ediff", I think.
>
> smerge-ediff is a command which basically *leaves* SMerge (the whole
> purpose of SMerge is to do the conflict resolution directly in the one
> buffer rather than going through Ediff, which is a fine tool but too
> heavyweight for my taste in 99% of the cases (tho I really appreciate it
> for that remaining 1%)).
>
> Also the upper/lower (or any other nomenclature SMerge uses) only
> affects the name of the generated buffers: Ediff labels will simply
> always be A/B with corresponding key-bindings and the upper/lower
> terminology of SMerge just disappears.
>
> So I guess what you're saying is that we should improve the consistency
> in the naming used by SMerge and Ediff.  That's a good point.
> And indeed upper/lower doesn't work for Ediff.
>
>
>         Stefan
>

Thanks Stefan and Kaushal.
I'll revert the change locally for now.
I don't use Smerge itself (perhaps I should learn), so I suppose it's
natural that I don't understand why UPPER and LOWER are such good labels
that it's important to keep them.

[-- Attachment #2: Type: text/html, Size: 1725 bytes --]

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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 14:37                     ` Richard Copley
  2018-03-15 15:04                       ` Stefan Monnier
  2018-03-15 15:30                       ` Kaushal Modi
@ 2018-03-15 16:45                       ` Glenn Morris
  2018-03-15 17:00                         ` Eli Zaretskii
  2018-03-15 17:14                         ` Richard Copley
  2 siblings, 2 replies; 32+ messages in thread
From: Glenn Morris @ 2018-03-15 16:45 UTC (permalink / raw)
  To: Richard Copley
  Cc: Noam Postavsky, emacs-devel@gnu.org, Stephan.Mueller,
	Stefan Monnier, Kaushal Modi

Richard Copley wrote:

> Why is this change good? What am I missing?

https://debbugs.gnu.org/20878

It would have helped to cite the last time you raised this issue, where
a patch for your usage was suggested.

http://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00349.html



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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 16:45                       ` Glenn Morris
@ 2018-03-15 17:00                         ` Eli Zaretskii
  2018-03-15 17:06                           ` Óscar Fuentes
  2018-03-15 17:14                         ` Richard Copley
  1 sibling, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2018-03-15 17:00 UTC (permalink / raw)
  To: Glenn Morris
  Cc: Stephan.Mueller, npostavs, emacs-devel, rcopley, monnier,
	kaushal.modi

> From: Glenn Morris <rgm@gnu.org>
> Date: Thu, 15 Mar 2018 12:45:46 -0400
> Cc: Noam Postavsky <npostavs@users.sourceforge.net>,
> 	"emacs-devel@gnu.org" <emacs-devel@gnu.org>, Stephan.Mueller@microsoft.com,
> 	Stefan Monnier <monnier@iro.umontreal.ca>,
> 	Kaushal Modi <kaushal.modi@gmail.com>
> 
> Richard Copley wrote:
> 
> > Why is this change good? What am I missing?
> 
> https://debbugs.gnu.org/20878

FWIW, upper/lower sounds wrong to me: it has no mnemonic significance.



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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 17:00                         ` Eli Zaretskii
@ 2018-03-15 17:06                           ` Óscar Fuentes
  2018-03-15 17:15                             ` Eli Zaretskii
  0 siblings, 1 reply; 32+ messages in thread
From: Óscar Fuentes @ 2018-03-15 17:06 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> FWIW, upper/lower sounds wrong to me: it has no mnemonic significance.

It has, if you are looking at the buffer with Smerge active.

Before it was smerge-keep-mine, smerge-keep-other... which confused me
again and again. With smerge-keep-upper, smerge-keep-lower there is no
problem.




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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 16:45                       ` Glenn Morris
  2018-03-15 17:00                         ` Eli Zaretskii
@ 2018-03-15 17:14                         ` Richard Copley
  2018-03-15 18:54                           ` Stefan Monnier
  2018-03-15 20:10                           ` Richard Copley
  1 sibling, 2 replies; 32+ messages in thread
From: Richard Copley @ 2018-03-15 17:14 UTC (permalink / raw)
  To: Glenn Morris
  Cc: Noam Postavsky, emacs-devel@gnu.org, Stephan.Mueller,
	Stefan Monnier, Kaushal Modi

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

On 15 March 2018 at 16:45, Glenn Morris <rgm@gnu.org> wrote:

> Richard Copley wrote:
>
> > Why is this change good? What am I missing?
>
> https://debbugs.gnu.org/20878
>
>
Thanks. If we were using labels such as "Yours/Theirs" previously, I can see
why "Upper/Lower" are better.


> It would have helped to cite the last time you raised this issue, where
> a patch for your usage was suggested.
>
> http://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00349.html


Yes, sorry about that. My message today was meant to be a reply to that
very thread. Not sure what went wrong.
And sorry I missed Noam's question.
I will try the patch.

[-- Attachment #2: Type: text/html, Size: 1473 bytes --]

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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 17:06                           ` Óscar Fuentes
@ 2018-03-15 17:15                             ` Eli Zaretskii
  2018-03-15 18:15                               ` Stefan Monnier
  0 siblings, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2018-03-15 17:15 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: emacs-devel

> From: Óscar Fuentes <ofv@wanadoo.es>
> Date: Thu, 15 Mar 2018 18:06:43 +0100
> 
> With smerge-keep-upper, smerge-keep-lower there is no problem.

Neither would there be a problem with keep-pink and keep-green, but
does that make them good names?



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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 17:15                             ` Eli Zaretskii
@ 2018-03-15 18:15                               ` Stefan Monnier
  2018-03-15 18:45                                 ` Drew Adams
  0 siblings, 1 reply; 32+ messages in thread
From: Stefan Monnier @ 2018-03-15 18:15 UTC (permalink / raw)
  To: emacs-devel

>> With smerge-keep-upper, smerge-keep-lower there is no problem.
> Neither would there be a problem with keep-pink and keep-green, but
> does that make them good names?

There's no guarantee that the faces will be pink&green in all cases,
whereas AFAIK we only support right-to-left but not bottom-to-top yet,
so the various chunks will always be laid out correctly w.r.t
"upper/lower".


        Stefan




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

* RE: Regarding smerge upper/lower; needs NEWS
  2018-03-15 18:15                               ` Stefan Monnier
@ 2018-03-15 18:45                                 ` Drew Adams
  2018-03-15 19:05                                   ` Stefan Monnier
  0 siblings, 1 reply; 32+ messages in thread
From: Drew Adams @ 2018-03-15 18:45 UTC (permalink / raw)
  To: Stefan Monnier, emacs-devel

> There's no guarantee that the faces will be pink&green in all cases,
> whereas AFAIK we only support right-to-left but not bottom-to-top yet,
> so the various chunks will always be laid out correctly w.r.t
> "upper/lower".

Not following this thread, but if the windows/buffers are
labeled, as is done in Ediff ("A", "B") then there is no
ambiguity, regardless of how or where they might be
displayed.

If they are not labeled, maybe consider labeling them.
It sounds silly to try to guess meaningfully descriptive
adjectives based on presumed location or appearance, to
refer to them.  Just give them simple names, like Ediff does.



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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 17:14                         ` Richard Copley
@ 2018-03-15 18:54                           ` Stefan Monnier
  2018-03-15 20:10                           ` Richard Copley
  1 sibling, 0 replies; 32+ messages in thread
From: Stefan Monnier @ 2018-03-15 18:54 UTC (permalink / raw)
  To: Richard Copley
  Cc: Glenn Morris, emacs-devel@gnu.org, Stephan.Mueller,
	Noam Postavsky, Kaushal Modi

> Thanks.  If we were using labels such as "Yours/Theirs" previously, I can see
> why "Upper/Lower" are better.

I plead guilty to the "mine/other" terminology used previously.
To my defense, this actually worked well in the context of CVS and at
that time CVS was pretty much the only real game in town.

While its flaws are visible in many other VCSes, in the context of
Git (where you often end up having to merge in the "other direction"
than the one you intended) "mine/other" *really* made no sense more
often than not.


        Stefan



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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 18:45                                 ` Drew Adams
@ 2018-03-15 19:05                                   ` Stefan Monnier
  2018-03-15 19:44                                     ` Drew Adams
  0 siblings, 1 reply; 32+ messages in thread
From: Stefan Monnier @ 2018-03-15 19:05 UTC (permalink / raw)
  To: emacs-devel

> Not following this thread,

Obviously.

> but if the windows/buffers are labeled, as is done in Ediff ("A", "B")
> then there is no ambiguity, regardless of how or where they might
> be displayed.

Check the subject: it says "smerge".  That's a minor mode which operates
100% within a buffer (any buffer), so there's no labeling of buffer or
window involved.


        Stefan




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

* RE: Regarding smerge upper/lower; needs NEWS
  2018-03-15 19:05                                   ` Stefan Monnier
@ 2018-03-15 19:44                                     ` Drew Adams
  0 siblings, 0 replies; 32+ messages in thread
From: Drew Adams @ 2018-03-15 19:44 UTC (permalink / raw)
  To: Stefan Monnier, emacs-devel

> > but if the windows/buffers are labeled, as is done in Ediff ("A", "B")
> > then there is no ambiguity, regardless of how or where they might
> > be displayed.
> 
> Check the subject: it says "smerge".  That's a minor mode which operates
> 100% within a buffer (any buffer), so there's no labeling of buffer or
> window involved.

If you don't have some visible object to label then
use the label of the existing visible thing you have.

E.g., if the only visible distinction is the use of
different faces then use the face names.

Users can at least use `C-u C-x =' to see what those are,
if the names are not clear.  (But if the names are not
clear then maybe a renaming is in order.)



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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 17:14                         ` Richard Copley
  2018-03-15 18:54                           ` Stefan Monnier
@ 2018-03-15 20:10                           ` Richard Copley
  2018-03-16  2:20                             ` Noam Postavsky
  1 sibling, 1 reply; 32+ messages in thread
From: Richard Copley @ 2018-03-15 20:10 UTC (permalink / raw)
  To: Glenn Morris
  Cc: Noam Postavsky, emacs-devel@gnu.org, Stephan.Mueller,
	Stefan Monnier, Kaushal Modi

[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]

On 15 March 2018 at 17:14, Richard Copley <rcopley@gmail.com> wrote:

>
>
> On 15 March 2018 at 16:45, Glenn Morris <rgm@gnu.org> wrote:
>
>> Richard Copley wrote:
>>
>> > Why is this change good? What am I missing?
>>
>> https://debbugs.gnu.org/20878
>>
>>
> Thanks. If we were using labels such as "Yours/Theirs" previously, I can
> see
> why "Upper/Lower" are better.
>
>
>> It would have helped to cite the last time you raised this issue, where
>> a patch for your usage was suggested.
>>
>> http://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00349.html
>
>
> Yes, sorry about that. My message today was meant to be a reply to that
> very thread. Not sure what went wrong.
> And sorry I missed Noam's question.
> I will try the patch.
>

With that patch, smerge-ediff creates buffers with "A" and "B" in their
names rather than "UPPER" and "LOWER", which is what I want.
I still don't know how to use smerge itself, so I don't know what if
anything is displayed differently in smerge with the patch.

Thanks Noam, thanks Glenn.

[-- Attachment #2: Type: text/html, Size: 2209 bytes --]

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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-15 20:10                           ` Richard Copley
@ 2018-03-16  2:20                             ` Noam Postavsky
  2018-03-16 12:23                               ` Stefan Monnier
  0 siblings, 1 reply; 32+ messages in thread
From: Noam Postavsky @ 2018-03-16  2:20 UTC (permalink / raw)
  To: Richard Copley
  Cc: Glenn Morris, emacs-devel@gnu.org, Stephan.Mueller,
	Stefan Monnier, Kaushal Modi

On 15 March 2018 at 16:10, Richard Copley <rcopley@gmail.com> wrote:

>>> It would have helped to cite the last time you raised this issue, where
>>> a patch for your usage was suggested.
>>>
>>> http://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00349.html
>>
>>
>> Yes, sorry about that. My message today was meant to be a reply to that
>> very thread. Not sure what went wrong.

Nothing went wrong, I think, but not everyone has the thread in their
inboxes (e.g., if they were not subscribed at the time, or if it was
deleted), so giving a little context can be helpful (the particular
message you quoted in your reply was not especially relevant).

> With that patch, smerge-ediff creates buffers with "A" and "B" in their
> names rather than "UPPER" and "LOWER", which is what I want.
> I still don't know how to use smerge itself, so I don't know what if
> anything is displayed differently in smerge with the patch.

Certainly the intent is to affect nothing else; the patch only changes
smerge-ediff.



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

* Re: Regarding smerge upper/lower; needs NEWS
  2018-03-16  2:20                             ` Noam Postavsky
@ 2018-03-16 12:23                               ` Stefan Monnier
  0 siblings, 0 replies; 32+ messages in thread
From: Stefan Monnier @ 2018-03-16 12:23 UTC (permalink / raw)
  To: emacs-devel

>> With that patch, smerge-ediff creates buffers with "A" and "B" in their
>> names rather than "UPPER" and "LOWER", which is what I want.
>> I still don't know how to use smerge itself, so I don't know what if
>> anything is displayed differently in smerge with the patch.
> Certainly the intent is to affect nothing else; the patch only changes
> smerge-ediff.

In Richard's use-case this patch makes a lot of sense.  But I'm not sure
it's a good idea in general: for users who generally use SMerge and only
occasionally use `smerge-ediff` keeping the UPPER/LOWER in the buffer
names is a good way to clarify which of Ediff's A/B corresponds to which
of SMerge's UPPER/LOWER.

Another option would be to use the names often present on the "<<<<<<<
NAME1" and ">>>>>>> NAME2" lines: this would be especially valuable
given that those names are otherwise lost when we convert from "one file
with context markers" to "several files without context markers".


        Stefan




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

end of thread, other threads:[~2018-03-16 12:23 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-21 14:01 Regarding smerge upper/lower; needs NEWS Kaushal Modi
2017-03-24 19:46 ` Glenn Morris
2017-04-07 18:06   ` Richard Copley
2017-04-07 19:09     ` Noam Postavsky
2017-04-07 19:23       ` Richard Copley
2017-04-07 19:24         ` Richard Copley
2017-04-07 19:53           ` Richard Copley
2017-04-13  0:49             ` Noam Postavsky
2017-04-13 18:32               ` Stefan Monnier
2017-04-13 19:03                 ` Noam Postavsky
     [not found]                 ` <CY1PR03MB2251867FBF42034CF55007ADF0020@CY1PR03MB2251.namprd03.prod.outlook.com>
2017-04-13 19:34                   ` Stephan Mueller
2018-03-15 14:37                     ` Richard Copley
2018-03-15 15:04                       ` Stefan Monnier
2018-03-15 15:30                         ` Richard Copley
2018-03-15 15:43                           ` Stefan Monnier
2018-03-15 16:09                             ` Richard Copley
2018-03-15 15:30                       ` Kaushal Modi
2018-03-15 15:37                         ` Richard Copley
2018-03-15 15:39                           ` Kaushal Modi
2018-03-15 16:45                       ` Glenn Morris
2018-03-15 17:00                         ` Eli Zaretskii
2018-03-15 17:06                           ` Óscar Fuentes
2018-03-15 17:15                             ` Eli Zaretskii
2018-03-15 18:15                               ` Stefan Monnier
2018-03-15 18:45                                 ` Drew Adams
2018-03-15 19:05                                   ` Stefan Monnier
2018-03-15 19:44                                     ` Drew Adams
2018-03-15 17:14                         ` Richard Copley
2018-03-15 18:54                           ` Stefan Monnier
2018-03-15 20:10                           ` Richard Copley
2018-03-16  2:20                             ` Noam Postavsky
2018-03-16 12:23                               ` 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).