[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [WORG] How to ediff folded Org files?
From: |
Michael Brand |
Subject: |
Re: [O] [WORG] How to ediff folded Org files? |
Date: |
Thu, 19 Dec 2013 20:00:19 +0100 |
Hi all
An update for this thread from April:
On Sun, Apr 7, 2013 at 12:24 AM, Michael Brand
<address@hidden> 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [O] [WORG] How to ediff folded Org files?,
Michael Brand <=