Michael Brand <michael.ch.br...@gmail.com> 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