unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* smerge-mode is fantastic, but it annoys me
@ 2015-03-03  1:47 Daniel Colascione
  2015-03-03 12:49 ` Nicolas Richard
  2015-03-03 14:53 ` Barry Warsaw
  0 siblings, 2 replies; 10+ messages in thread
From: Daniel Colascione @ 2015-03-03  1:47 UTC (permalink / raw)
  To: Emacs developers

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

smerge-mode is handy for resolving conflicts, but it's annoying that
after resolving them all, smerge turns itself off, and C-c ^ n starts
inserting stray "n" characters in the buffer. Can we just leave smerge
on after resolving conflicts?


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: smerge-mode is fantastic, but it annoys me
  2015-03-03  1:47 smerge-mode is fantastic, but it annoys me Daniel Colascione
@ 2015-03-03 12:49 ` Nicolas Richard
  2015-03-03 16:43   ` Stefan Monnier
  2015-03-03 14:53 ` Barry Warsaw
  1 sibling, 1 reply; 10+ messages in thread
From: Nicolas Richard @ 2015-03-03 12:49 UTC (permalink / raw)
  To: Daniel Colascione; +Cc: Emacs developers

Daniel Colascione <dancol@dancol.org> writes:

> smerge-mode is handy for resolving conflicts, but it's annoying that
> after resolving them all, smerge turns itself off, and C-c ^ n starts
> inserting stray "n" characters in the buffer. Can we just leave smerge
> on after resolving conflicts?

It seems you should set smerge-auto-leave to nil. Are you saying it
should be the default ? I would agree because the automated turn-off is
a bit surprising. Or it should maybe be documented in the docstring of
smerge-mode itself.

-- 
Nicolas Richard



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

* Re: smerge-mode is fantastic, but it annoys me
  2015-03-03  1:47 smerge-mode is fantastic, but it annoys me Daniel Colascione
  2015-03-03 12:49 ` Nicolas Richard
@ 2015-03-03 14:53 ` Barry Warsaw
  2015-03-03 18:10   ` Stefan Monnier
  1 sibling, 1 reply; 10+ messages in thread
From: Barry Warsaw @ 2015-03-03 14:53 UTC (permalink / raw)
  To: emacs-devel

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

On Mar 02, 2015, at 05:47 PM, Daniel Colascione wrote:

>smerge-mode is handy for resolving conflicts, but it's annoying that
>after resolving them all, smerge turns itself off, and C-c ^ n starts
>inserting stray "n" characters in the buffer. Can we just leave smerge
>on after resolving conflicts?

Me too!  I didn't know about smerge-auto-leave, so I'm giving that a try
(thanks Nicolas!).  Now to generate some conflicts...

Cheers,
-Barry

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: smerge-mode is fantastic, but it annoys me
  2015-03-03 12:49 ` Nicolas Richard
@ 2015-03-03 16:43   ` Stefan Monnier
  2015-03-04 12:43     ` Nicolas Richard
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2015-03-03 16:43 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: Daniel Colascione, Emacs developers

> It seems you should set smerge-auto-leave to nil. Are you saying it
> should be the default ? I would agree because the automated turn-off is
> a bit surprising. Or it should maybe be documented in the docstring of
> smerge-mode itself.

I don't have a strong opinion on this.  I defaulted it to t because
I personally like this feature (I look at the mode line to know
if there are conflicts left, and I use an smerge-prefix that is mildly
annoying for "normal" editing, so turning it off early helps me avoid
key conflicts).


        Stefan



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

* Re: smerge-mode is fantastic, but it annoys me
  2015-03-03 14:53 ` Barry Warsaw
@ 2015-03-03 18:10   ` Stefan Monnier
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2015-03-03 18:10 UTC (permalink / raw)
  To: Barry Warsaw; +Cc: emacs-devel

> Me too!  I didn't know about smerge-auto-leave, so I'm giving that a try
> (thanks Nicolas!).  Now to generate some conflicts...

C-SPC ... C-SPC ... M-x smerge-makeup-conflict


        Stefan



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

* Re: smerge-mode is fantastic, but it annoys me
  2015-03-03 16:43   ` Stefan Monnier
@ 2015-03-04 12:43     ` Nicolas Richard
  2015-03-04 12:56       ` Ivan Shmakov
  0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Richard @ 2015-03-04 12:43 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Daniel Colascione, Emacs developers

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

Le 03/03/2015 17:43, Stefan Monnier a écrit :
>> It seems you should set smerge-auto-leave to nil. Are you saying it
>> should be the default ? I would agree because the automated turn-off is
>> a bit surprising. Or it should maybe be documented in the docstring of
>> smerge-mode itself.
> 
> I don't have a strong opinion on this.  I defaulted it to t because
> I personally like this feature (I look at the mode line to know
> if there are conflicts left, and I use an smerge-prefix that is mildly
> annoying for "normal" editing, so turning it off early helps me avoid
> key conflicts).

I think documenting is necessary and sufficient ; I attach a suggestion.

Nicolas.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-vc-smerge-mode.el-smerge-mode-Document-smerge-a.patch --]
[-- Type: text/x-patch; name="0001-lisp-vc-smerge-mode.el-smerge-mode-Document-smerge-a.patch", Size: 1375 bytes --]

From 702515a2955aef59bf2cda5f0611bbfb78a5cec0 Mon Sep 17 00:00:00 2001
From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Date: Wed, 4 Mar 2015 09:52:11 +0100
Subject: [PATCH] * lisp/vc/smerge-mode.el (smerge-mode): Document
 `smerge-auto-leave'.

---
 lisp/ChangeLog         | 3 +++
 lisp/vc/smerge-mode.el | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5c04663..b68bce1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,6 @@
+2015-03-04  Nicolas Richard  <theonewiththeevillook@yahoo.fr>
+
+	* vc/smerge-mode.el (smerge-mode): Document `smerge-auto-leave'.
 2015-03-04  Rüdiger Sonderfeld  <ruediger@c-plusplus.net>
 
 	* net/eww.el (eww-search-prefix, eww-open-file, eww-search-words)
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el
index 9f9224c..0d78201 100644
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -1335,6 +1335,10 @@ (define-minor-mode smerge-mode
 With a prefix argument ARG, enable the mode if ARG is positive,
 and disable it otherwise.  If called from Lisp, enable the mode
 if ARG is omitted or nil.
+
+The mode will turn itself off after the last conflict was
+resolved.  You can customize `smerge-auto-leave' to control this
+behaviour.
 \\{smerge-mode-map}"
   :group 'smerge :lighter " SMerge"
   (when (and (boundp 'font-lock-mode) font-lock-mode)
-- 
2.1.4


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

* Re: smerge-mode is fantastic, but it annoys me
  2015-03-04 12:43     ` Nicolas Richard
@ 2015-03-04 12:56       ` Ivan Shmakov
  2015-03-04 14:15         ` Nicolas Richard
  0 siblings, 1 reply; 10+ messages in thread
From: Ivan Shmakov @ 2015-03-04 12:56 UTC (permalink / raw)
  To: Emacs developers

>>>>> Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:

[…]

 > --- a/lisp/vc/smerge-mode.el
 > +++ b/lisp/vc/smerge-mode.el
 > @@ -1335,6 +1335,10 @@ define-minor-mode smerge-mode
 >  With a prefix argument ARG, enable the mode if ARG is positive,
 >  and disable it otherwise.  If called from Lisp, enable the mode
 >  if ARG is omitted or nil.
 > +
 > +The mode will turn itself off after the last conflict was

	s/was/is/.

 > +resolved.  You can customize `smerge-auto-leave' to control this
 > +behaviour.

	s/behaviour/behavior/.

	But perhaps we should shorten this down to something like “… if
	`smerge-auto-leave' is non-nil”?  There still would be
	“customize” in the variable’s own help, /and/ that would be a
	(conventional) link.

-- 
FSF associate member #7257  np. Play Your Part — Flotsam and Jetsam 230E 334A



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

* Re: smerge-mode is fantastic, but it annoys me
  2015-03-04 12:56       ` Ivan Shmakov
@ 2015-03-04 14:15         ` Nicolas Richard
  2015-03-04 16:33           ` John Yates
  0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Richard @ 2015-03-04 14:15 UTC (permalink / raw)
  To: Emacs developers

Ivan Shmakov <ivan@siamics.net> writes:
> 	But perhaps we should shorten this down to something like “… if
> 	`smerge-auto-leave' is non-nil”?  There still would be
> 	“customize” in the variable’s own help, /and/ that would be a
> 	(conventional) link.

Ok thanks. What about this ?

The mode will turn itself off after the last conflict is
resolved, if the variable `smerge-auto-leave' is non-nil.

(I added the word "variable" to avoid linking to the function.)

-- 
Nicolas Richard



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

* Re: smerge-mode is fantastic, but it annoys me
  2015-03-04 14:15         ` Nicolas Richard
@ 2015-03-04 16:33           ` John Yates
  2015-03-06  4:24             ` Nicolas Richard
  0 siblings, 1 reply; 10+ messages in thread
From: John Yates @ 2015-03-04 16:33 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: Emacs developers

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

On Wed, Mar 4, 2015 at 9:15 AM, Nicolas Richard <
theonewiththeevillook@yahoo.fr> wrote:

> The mode will turn itself off after the last conflict is
> resolved, if the variable `smerge-auto-leave' is non-nil.
>

I find it clearer to list pre-conditions first and then causes before
effects:

If `smerge-auto-leave' is non-nil then as soon as the last conflict is
resolved smerge-mode turns itself off.

/john

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

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

* Re: smerge-mode is fantastic, but it annoys me
  2015-03-04 16:33           ` John Yates
@ 2015-03-06  4:24             ` Nicolas Richard
  0 siblings, 0 replies; 10+ messages in thread
From: Nicolas Richard @ 2015-03-06  4:24 UTC (permalink / raw)
  To: John Yates; +Cc: Nicolas Richard, Emacs developers

John Yates <john@yates-sheets.org> writes:
> On Wed, Mar 4, 2015 at 9:15 AM, Nicolas Richard
> <theonewiththeevillook@yahoo.fr> wrote:
>
>
>     The mode will turn itself off after the last conflict is
>     resolved, if the variable `smerge-auto-leave' is non-nil.
>
>
> I find it clearer to list pre-conditions first and then causes before
> effects:

That also crossed my mind, but when I re-read it, I thought that the
effect is more important than the condition (because the effect is what
happens by default, and is surprising wrt how other modes behave).

-- 
Nicolas



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

end of thread, other threads:[~2015-03-06  4:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03  1:47 smerge-mode is fantastic, but it annoys me Daniel Colascione
2015-03-03 12:49 ` Nicolas Richard
2015-03-03 16:43   ` Stefan Monnier
2015-03-04 12:43     ` Nicolas Richard
2015-03-04 12:56       ` Ivan Shmakov
2015-03-04 14:15         ` Nicolas Richard
2015-03-04 16:33           ` John Yates
2015-03-06  4:24             ` Nicolas Richard
2015-03-03 14:53 ` Barry Warsaw
2015-03-03 18:10   ` 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).