[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] problem with load-after-eval
From: |
Stefan Huchler |
Subject: |
[O] problem with load-after-eval |
Date: |
Mon, 16 May 2016 08:11:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
I did try to change following code in in the org.el file,
inside the org-cycle-internal-local function.
So that instead of having 3 tab expansions it only shows the next level
of expansion.
I am not 100% shure thats the perfect solution but it seemed to work:
;; THAT IS THE ORIGINAL CODE OF THE TWO LINES I CHANGED:
;; (unless (org-before-first-heading-p)
;; (run-hook-with-args 'org-pre-cycle-hook 'subtree))
(unless (org-before-first-heading-p)
(run-hook-with-args 'org-pre-cycle-hook 'folded))
the problem is, I wanted not to modify the systemwide org.el file, so I
thought, either redefine the whole modified function with defun, or add a
eval-after-load call around it, so that it gets overridden when org gets
loaded.
But both does not work, defining it straight had no effect I think, and the
eval-after-load raised an error when I tried to use this function in a
org-file (with tab).
It didnt find the outline-show-children function that gets called in
that function. It gets defined in org-compat, requiring that before that
block did not fix it, too.
I looked at devadvise, if thats maybe the solution but its a very
complex construct and the docu is very bad no easy examples.
But in general it should work with one of the two other solutions I
tried.
But somehow it seems to be not in the same scope as the original
function.
hope somebody can say me what I am doing wrong. Must be something pretty
simple, but I dont find the solution.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [O] problem with load-after-eval,
Stefan Huchler <=