From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Huchler Subject: problem with load-after-eval Date: Mon, 16 May 2016 08:11:25 +0200 Message-ID: <8760ue5y7m.fsf@jupiter.lan> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2McQ-0007DZ-9o for emacs-orgmode@gnu.org; Mon, 16 May 2016 13:47:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2McM-000768-GF for emacs-orgmode@gnu.org; Mon, 16 May 2016 13:47:49 -0400 Received: from plane.gmane.org ([80.91.229.3]:36498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2McM-00075l-9r for emacs-orgmode@gnu.org; Mon, 16 May 2016 13:47:46 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b2Bkb-0001o5-Mo for emacs-orgmode@gnu.org; Mon, 16 May 2016 08:11:33 +0200 Received: from hsi-kbw-149-172-254-41.hsi13.kabel-badenwuerttemberg.de ([149.172.254.41]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 May 2016 08:11:33 +0200 Received: from stefan.huchler by hsi-kbw-149-172-254-41.hsi13.kabel-badenwuerttemberg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 May 2016 08:11:33 +0200 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" To: emacs-orgmode@gnu.org 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.