From mboxrd@z Thu Jan 1 00:00:00 1970 From: iemacs@gmail.com Subject: Re: Resolving conflicts with ediff and folding Date: Mon, 04 May 2015 06:23:07 +0000 Message-ID: References: <20150420232308.GB26502@chitra.no-ip.org> <86wq0wfv0x.fsf@example.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1137f90a72d43105153b98aa Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yp9mZ-0008KT-V0 for emacs-orgmode@gnu.org; Mon, 04 May 2015 02:23:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yp9mY-0006KU-J6 for emacs-orgmode@gnu.org; Mon, 04 May 2015 02:23:11 -0400 Received: from mail-pd0-x22c.google.com ([2607:f8b0:400e:c02::22c]:33978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yp9mY-0006KP-6o for emacs-orgmode@gnu.org; Mon, 04 May 2015 02:23:10 -0400 Received: by pdbqa5 with SMTP id qa5so154692565pdb.1 for ; Sun, 03 May 2015 23:23:08 -0700 (PDT) In-Reply-To: <86wq0wfv0x.fsf@example.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastien Vauban , "J. David Boyd" Cc: emacs-orgmode@gnu.org --001a1137f90a72d43105153b98aa Content-Type: text/plain; charset=UTF-8 I have the following lisp code can do the trick: (add-hook 'ediff-quit-hook (lambda () (cond ((eq major-mode 'org-mode) (visible-mode 0))))) -- Tian Qiu On Tue, Apr 28, 2015 at 5:43 PM Sebastien Vauban wrote: > J. David Boyd wrote: > > "Charles C. Berry" writes: > >> On Tue, 21 Apr 2015, Suvayu Ali wrote: > >>> > >>> Something that has been bugging me for many years now, everytime > >>> I resolve conflicts in Org files with ediff, it's a pain. All the > >>> buffers keep folding the outlines, hiding the conflicts. I keep > >>> going to the buffers manually (which can be somewhat of a pain in > >>> a text terminal), and unfolding them manually. But of course the > >>> PROPERTY drawers, LOGBOOKs, and other DRAWERs are still folded! > >>> > >>> And then after I have jumped through hoops, and resolved the > >>> conflicts, I realise I could have just switched to text-mode before > >>> invoking ediff! > >>> > >>> Is there a way where I don't have to remember to switch the major > >>> mode before invoking ediff[1]? Or maybe an ediff experience where > >>> the buffers are forced to unhide text. I guess it should be > >>> possible to just temporarily remove all overlays or invisible > >>> properties. > >>> > >>> Any thoughts, ideas? > >> > >> Did you see this thread: > >> http://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg00400.html > >> ?? > > > > That't what I was going to say. I added that to my setup long ago, > > and it has been working fine since then. I don't ediff all that > > often, but when I do it certainly helps. > > The only (tiny) problem is that the `truncate-lines' and `visible-mode' > settings stay in the buffer after the Ediff session -- while one would > love to get back to the original settings of the buffer.c > > Best regards, > Seb > > -- > Sebastien Vauban > > --001a1137f90a72d43105153b98aa Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I have the following lisp code can do the trick:

(add-hook 'ediff-quit-hook
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 (lambda ()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 (cond ((eq major-mode 'org-mode)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(visible-mode 0)))))
--
Tian Qiu

On = Tue, Apr 28, 2015 at 5:43 PM Sebastien Vauban <sva-news@mygooglest.com> wrote:
J. David Boyd wrote:
> "Charles C. Berry" <ccberry@ucsd.edu> writes:
>> On Tue, 21 Apr 2015, Suvayu Ali wrote:
>>>
>>> Something that has been bugging me for many years now, everyti= me
>>> I resolve conflicts in Org files with ediff, it's a pain.= =C2=A0 All the
>>> buffers keep folding the outlines, hiding the conflicts.=C2=A0= I keep
>>> going to the buffers manually (which can be somewhat of a pain= in
>>> a text terminal), and unfolding them manually.=C2=A0 But of co= urse the
>>> PROPERTY drawers, LOGBOOKs, and other DRAWERs are still folded= !
>>>
>>> And then after I have jumped through hoops, and resolved the >>> conflicts, I realise I could have just switched to text-mode b= efore
>>> invoking ediff!
>>>
>>> Is there a way where I don't have to remember to switch th= e major
>>> mode before invoking ediff[1]?=C2=A0 Or maybe an ediff experie= nce where
>>> the buffers are forced to unhide text.=C2=A0 I guess it should= be
>>> possible to just temporarily remove all overlays or invisible<= br> >>> properties.
>>>
>>> Any thoughts, ideas?
>>
>> Did you see this thread:
>> http://lists.gnu.org/archive/html/emacs-o= rgmode/2013-04/msg00400.html
>> ??
>
> That't what I was going to say.=C2=A0 I added that to my setup lon= g ago,
> and it has been working fine since then.=C2=A0 I don't ediff all t= hat
> often, but when I do it certainly helps.

The only (tiny) problem is that the `truncate-lines' and `visible-mode&= #39;
settings stay in the buffer after the Ediff session -- while one would
love to get back to the original settings of the buffer.c

Best regards,
=C2=A0 Seb

--
Sebastien Vauban

--001a1137f90a72d43105153b98aa--