[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [WORG] How to ediff folded Org files?
From: |
Christian Egli |
Subject: |
Re: [O] [WORG] How to ediff folded Org files? |
Date: |
Tue, 09 Apr 2013 09:29:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Michael Brand <address@hidden> writes:
> 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
I condensed this to the following since I don't use truncate-lines and
org-hide-leading-stars
;; ediff for org-mode files
(add-hook 'ediff-prepare-buffer-hook
(lambda ()
(cond ((eq major-mode 'org-mode)
(visible-mode 1)))))
But now the problem now is that the visible-mode persists even when I
quit ediff. I tried to find a hook which lets me undo the visible-mode
but I couldn't find an obvious one. There is ediff-quit-hook but this is
done in the ediff-control-buffer.
Maybe after all it might be better to use ediff-select-hook and
ediff-unselect-hook.
Thanks
Christian
--
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland