[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [WORG] How to ediff folded Org files?
From: |
Thorsten Jolitz |
Subject: |
Re: [O] [WORG] How to ediff folded Org files? |
Date: |
Sun, 07 Apr 2013 00:40:32 +0200 |
User-agent: |
Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) |
Michael Brand <address@hidden> writes:
Hi Michael,
> On Sat, Apr 6, 2013 at 11:32 PM, Thorsten Jolitz <address@hidden> wrote:
>> the problem is, if I call e (ediff) from Magit and want to merge (e.g.)
>> my branch with the master branch, I don't really have access to both
>> versions - only to the version from the checked out branch.
>>
>> ediff then gives me both versions in an ediff session (folded), but if I
>> try to change major-mode to fundamental I break the ediff session.
>
> You should be able to refresh the ediff session with "!".
I'll try that ...
> But instead of the above I use this for ediff generally, it persists
> in Org mode:
>
> #+BEGIN_SRC emacs-lisp
> (add-hook 'ediff-prepare-buffer-hook 'f-ediff-prepare-buffer-hook-setup)
> (defun f-ediff-prepare-buffer-hook-setup ()
> ;; specific modes
> (cond ((eq major-mode 'org-mode)
> (f-org-vis-mod-maximum))
> ;; room for more modes
> )
> ;; all modes
> (setq truncate-lines nil))
> (defun f-org-vis-mod-maximum ()
> "Visibility: Show the most possible."
> (cond
> ((eq major-mode 'org-mode)
> (visible-mode 1) ; default 0
> (setq truncate-lines nil) ; no `org-startup-truncated' in hook
> (setq org-hide-leading-stars t)) ; default nil
> (t
> (message "ERR: not in Org mode")
> (ding))))
> #+END_SRC
very useful, thanks, I already put this into my .emacs.
--
cheers,
Thorsten