Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: =?utf-8?Q?R=C3=A9mi_Vanicat?= <vanicat <at> debian.org>
Subject: Re: [WORG] How to ediff folded Org files?
Newsgroups: gmane.emacs.orgmode
Date: Thursday 1st August 2013 15:09:19 UTC (over 4 years ago)
Ratish Punnoose  writes:

> Thorsten Jolitz  gmail.com> writes:
>

[...]

> #+BEGIN_SRC emacs-lisp
>   ;; diff hooks for org mode
>   (add-hook 'ediff-select-hook 'f-ediff-org-unfold-tree-element)
>   (add-hook 'ediff-unselect-hook 'f-ediff-org-fold-tree)
>   ;; Check for org mode and existence of buffer
>   (defun f-ediff-org-showhide(buf command &rest cmdargs)
>     "If buffer exists and is orgmode then execute command"
>     (if buf
>         (if (eq (buffer-local-value 'major-mode (get-buffer buf))
'org-mode)
>             (save-excursion (set-buffer buf) (apply command cmdargs)))
>       )
>     )
>     
>   (defun f-ediff-org-unfold-tree-element ()
>     "Unfold tree at diff location"
>     (f-ediff-org-showhide ediff-buffer-A 'org-reveal)  
>     (f-ediff-org-showhide ediff-buffer-B 'org-reveal)  
>     (f-ediff-org-showhide ediff-buffer-C 'org-reveal)  
>     )
>   ;;
>   (defun f-ediff-org-fold-tree ()
>     "Fold tree back to top level"
>     (f-ediff-org-showhide ediff-buffer-A 'hide-sublevels 1)  
>     (f-ediff-org-showhide ediff-buffer-B 'hide-sublevels 1)  
>     (f-ediff-org-showhide ediff-buffer-C 'hide-sublevels 1)  
>     )
> #+END_SRC

Thanks for sharing.

Adding this to org-mode (at least in contrib, or worg) would be really
cool.
-- 
RĂ©mi Vanicat
 
CD: 3ms