emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [WORG] How to ediff folded Org files?


From: Michael Brand
Subject: Re: [O] [WORG] How to ediff folded Org files?
Date: Sun, 7 Apr 2013 00:24:22 +0200

Hi Thorsten

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 "!".

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

Michael



reply via email to

[Prev in Thread] Current Thread [Next in Thread]