From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: [WORG] How to ediff folded Org files? Date: Thu, 19 Dec 2013 20:00:19 +0100 Message-ID: References: <87y5cwrnw9.fsf@gmail.com> <516083A6.9090305@ihm.name> <87k3ofwdka.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vtipc-0006Qy-Pe for emacs-orgmode@gnu.org; Thu, 19 Dec 2013 14:00:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vtipb-0007V3-CO for emacs-orgmode@gnu.org; Thu, 19 Dec 2013 14:00:24 -0500 Received: from mail-la0-x229.google.com ([2a00:1450:4010:c03::229]:36248) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vtipb-0007Uj-4s for emacs-orgmode@gnu.org; Thu, 19 Dec 2013 14:00:23 -0500 Received: by mail-la0-f41.google.com with SMTP id eo20so678102lab.0 for ; Thu, 19 Dec 2013 11:00:20 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode Hi all An update for this thread from April: On Sun, Apr 7, 2013 at 12:24 AM, Michael Brand wrote: > #+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 () [...] > #+END_SRC To get the "=>" in narrowed columns of aligned tables out of the way I changed f-org-vis-mod-maximum in the meantime: #+BEGIN_SRC emacs-lisp (defun f-org-vis-mod-maximum () "Org visibility: Modify settings to show maximum. Useful for e. g. `ediff-prepare-buffer-hook' in Org buffer." (interactive) (cond ((eq major-mode 'org-mode) (setq truncate-lines nil) (visible-mode 1) ;; Get the "=>" in narrowed columns of aligned tables out of the way. ;; - It is important to also remove the text property "invisible" for ;; the case that the Visible mode is turned off after the removed "=>" ;; does not indicate invisible content anymore. ;; - Negative site effect to put up with: When the Visible mode is ;; turned off again it will show some parts that were invisible before (with-silent-modifications (remove-text-properties (point-min) (point-max) (list 'invisible 'dummy-prop-or-val ; e. g. truncated table field 'display 'dummy-prop-or-val)))) ; e. g. the "=>" in a table (t (message "ERR: not in Org mode") (ding)))) #+END_SRC Michael