unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* patch for smerge buglet
@ 2008-05-05  0:08 Tom Tromey
  2008-05-05  6:16 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2008-05-05  0:08 UTC (permalink / raw)
  To: emacs-devel

In a vc-dir buffer I used "f" to open a ChangeLog file that had a
conflict.  As often happens with ChangeLog, the conflict was on the
very first line of the file.  To my surprise, the file was visited
with point at EOF.

This patch to smerge-mode fixed the problem for me.

Tom

2008-05-05  Tom Tromey  <tromey@redhat.com>

        * smerge-mode.el (smerge-start-session): Don't call smerge-next if
        looking at conflict marker.

*** smerge-mode.el.~1.66.~	2008-04-17 13:32:08.000000000 -0600
--- smerge-mode.el	2008-05-04 18:06:19.000000000 -0600
***************
*** 1227,1233 ****
  If no conflict maker is found, turn off `smerge-mode'."
    (smerge-mode 1)
    (condition-case nil
!       (smerge-next)
      (error (smerge-auto-leave))))
  
  (provide 'smerge-mode)
--- 1227,1234 ----
  If no conflict maker is found, turn off `smerge-mode'."
    (smerge-mode 1)
    (condition-case nil
!       (unless (looking-at smerge-begin-re)
! 	(smerge-next))
      (error (smerge-auto-leave))))
  
  (provide 'smerge-mode)




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

* Re: patch for smerge buglet
  2008-05-05  0:08 patch for smerge buglet Tom Tromey
@ 2008-05-05  6:16 ` Stefan Monnier
  2008-05-05 11:11   ` David Kastrup
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2008-05-05  6:16 UTC (permalink / raw)
  To: tromey; +Cc: emacs-devel

> In a vc-dir buffer I used "f" to open a ChangeLog file that had a
> conflict.  As often happens with ChangeLog, the conflict was on the
> very first line of the file.  To my surprise, the file was visited
> with point at EOF.

> This patch to smerge-mode fixed the problem for me.

Thanks, installed,


        Stefan




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

* Re: patch for smerge buglet
  2008-05-05  6:16 ` Stefan Monnier
@ 2008-05-05 11:11   ` David Kastrup
  2008-05-05 18:04     ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: David Kastrup @ 2008-05-05 11:11 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: tromey, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> In a vc-dir buffer I used "f" to open a ChangeLog file that had a
>> conflict.  As often happens with ChangeLog, the conflict was on the
>> very first line of the file.  To my surprise, the file was visited
>> with point at EOF.
>
>> This patch to smerge-mode fixed the problem for me.
>
> Thanks, installed,

The git conflict markers are sometimes left in the file.  Do you use git
yourself, or should I send an example when this happens the next time?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




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

* Re: patch for smerge buglet
  2008-05-05 11:11   ` David Kastrup
@ 2008-05-05 18:04     ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2008-05-05 18:04 UTC (permalink / raw)
  To: David Kastrup; +Cc: tromey, emacs-devel

>>> In a vc-dir buffer I used "f" to open a ChangeLog file that had a
>>> conflict.  As often happens with ChangeLog, the conflict was on the
>>> very first line of the file.  To my surprise, the file was visited
>>> with point at EOF.
>> 
>>> This patch to smerge-mode fixed the problem for me.
>> 
>> Thanks, installed,

> The git conflict markers are sometimes left in the file.  Do you use git
> yourself, or should I send an example when this happens the next time?

I don't know what you mean by "left in the file" or what it has to do
with smerge-mode.  If Git does not use the standard diff3 markers, then
it would be much more valuable to change Git than to adapt smerge-mode
to it.


        Stefan




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

end of thread, other threads:[~2008-05-05 18:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-05  0:08 patch for smerge buglet Tom Tromey
2008-05-05  6:16 ` Stefan Monnier
2008-05-05 11:11   ` David Kastrup
2008-05-05 18:04     ` 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).