Org-mode mailing list
 help / color / Atom feed
From: "Rémi Vanicat" <vanicat@debian.org>
To: emacs-orgmode@gnu.org
Subject: Re: [WORG] How to ediff folded Org files?
Date: Thu, 01 Aug 2013 17:09:19 +0200
Message-ID: <87wqo5fnxc.dlv@debian.org> (raw)
In-Reply-To: <loom.20130801T011342-572@post.gmane.org>

Ratish Punnoose <ratish@gmail.com> writes:

> Thorsten Jolitz <tjolitz <at> 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

  parent reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-06  9:47 Thorsten Jolitz
2013-04-06 20:20 ` Marc-Oliver Ihm
2013-04-06 21:32   ` Thorsten Jolitz
2013-04-06 22:24     ` Michael Brand
2013-04-06 22:40       ` Thorsten Jolitz
2013-04-06 23:01       ` Bill White
2013-04-09  7:29       ` Christian Egli
2013-12-19 19:00       ` Michael Brand
2013-07-31 23:19 ` Ratish Punnoose
2013-08-01 14:44   ` Thorsten Jolitz
2013-08-01 15:09   ` Rémi Vanicat [this message]
2013-08-02 12:22     ` Suvayu Ali

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://orgmode.org

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wqo5fnxc.dlv@debian.org \
    --to=vanicat@debian.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Org-mode mailing list

Archives are clonable:
	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git