From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: [NEW] navi-mode for org files Date: Tue, 09 Apr 2013 00:19:37 +0200 Message-ID: <87d2u4u0li.fsf@gmail.com> References: <878v4y9ziu.fsf@gmail.com> <877gkcvn4a.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:32839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPKPu-0008Nk-0D for emacs-orgmode@gnu.org; Mon, 08 Apr 2013 18:20:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPKPo-0003y0-W9 for emacs-orgmode@gnu.org; Mon, 08 Apr 2013 18:19:57 -0400 Received: from plane.gmane.org ([80.91.229.3]:39251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPKPo-0003xh-Lz for emacs-orgmode@gnu.org; Mon, 08 Apr 2013 18:19:52 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UPKPh-0006QO-B3 for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 00:19:45 +0200 Received: from g231225015.adsl.alicedsl.de ([92.231.225.15]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Apr 2013 00:19:45 +0200 Received: from tjolitz by g231225015.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Apr 2013 00:19:45 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Charles Berry writes: > `------------------------------------------------------------------------ >> > >> > I cannot seem to get this to work. If I try to execute >> > >> > ;; # #+begin_src emacs-lisp >> > ;; # (require 'outshine) >> > ;; # (add-hook ‘outline-minor-mode-hook ‘outshine-hook-function) >> > ;; # #+end_src >> > >> > the add-hook returns >> > >> > Debugger entered--Lisp error: (void-variable ‘outline-minor-mode-hook) >> > >> > >> > I am running >> > >> > Org-mode version 8.0-pre (release_8.0-pre-276-g3d3465 ... >> > GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of >> > 2013-03-12 on bob.porkrind.org >> >> Looks as if outshine is loaded before outline? But since outshine >> requires outline, 'outline-minor-mode-hook' should be loaded when the >> hook function is added. >> It works here, I'm running: >> >> ,---------------------------------------------------------------- >> | GNU Emacs Version: >> | (24.3.1 24 3 gnu/linux hostname x86_64-unknown-linux-gnu x nil) >> | Org-mode version 8.0-pre (release_8.0-pre-199-g2746c7 ... >> `---------------------------------------------------------------- >> >> could you try 'M-x toggle-debug-on-error', execute the above, and send >> the backtrace? >> > > This is what I get: > > > Debugger entered--Lisp error: (void-variable ‘outline-minor-mode-hook) > (add-hook ‘outline-minor-mode-hook ‘outshine-hook-function) > eval((add-hook ‘outline-minor-mode-hook ‘outshine-hook-function) nil) > eval-last-sexp-1(nil) > eval-last-sexp(nil) > call-interactively(eval-last-sexp nil nil) > > > FWIW, C-h v outline- TAB gives: > > > Click on a completion to select it. > In this buffer, type RET to select the completion near point. > > Possible completions are: > outline-blank-line outline-cycle-emulate-tab > outline-font-lock-faces outline-font-lock-keywords > outline-heading-alist outline-heading-end-regexp > outline-isearch-open-invisible-function outline-level > outline-minor-mode outline-minor-mode-map > outline-minor-mode-menu-bar-map outline-minor-mode-prefix > outline-mode-abbrev-table outline-mode-hook > outline-mode-map outline-mode-menu-bar-map > outline-mode-prefix-map outline-mode-syntax-table > outline-promotion-headings outline-regexp > outline-structedit-modifiers outline-view-change-hook strange, I get: ,------------------------------------------------------------------------------ | Click on a completion to select it. | In this buffer, type RET to select the completion near point. | | Possible completions are: | outline-blank-line outline-cycle-emulate-tab (option) | outline-font-lock-faces outline-font-lock-keywords | outline-heading-alist outline-heading-end-regexp (option) | outline-isearch-open-invisible-function outline-level | outline-minor-mode outline-minor-mode-hook | outline-minor-mode-map outline-minor-mode-menu-bar-map | outline-minor-mode-prefix (option) outline-mode-abbrev-table | outline-mode-hook outline-mode-map | outline-mode-menu-bar-map outline-mode-prefix-map | outline-mode-syntax-table outline-promotion-headings | outline-regexp (option) outline-structedit-modifiers (option) | outline-view-change-hook `------------------------------------------------------------------------------ and with C-h v outline-minor-mode-hook: ,----------------------------------------------------------- | outline-minor-mode-hook's value is (outshine-hook-function | (lambda nil | (require 'outline-mode-easy-bindings))) `----------------------------------------------------------- doesn't say where it is defined, I think its implicitly defined by macro 'define-minor-mode' in outline.el. When you do ,---------------------------------------------- | M-: (find-file (locate-library "outline.el")) `---------------------------------------------- do you have this starting from line 356? (outline.el doesn't seem to have a version variable, unfortunately) ,------------------------------------------------------------------------------ | ;;;###autoload | (define-minor-mode outline-minor-mode | "Toggle Outline minor mode. | With a prefix argument ARG, enable Outline minor mode if ARG is | positive, and disable it otherwise. If called from Lisp, enable | the mode if ARG is omitted or nil. | | See the command `outline-mode' for more information on this mode." | nil " Outl" (list (cons [menu-bar] outline-minor-mode-menu-bar-map) | (cons outline-minor-mode-prefix outline-mode-prefix-map)) | :group 'outlines | (if outline-minor-mode | (progn | ;; Turn off this mode if we change major modes. | (add-hook 'change-major-mode-hook | (lambda () (outline-minor-mode -1)) | nil t) | (set (make-local-variable 'line-move-ignore-invisible) t) | ;; Cause use of ellipses for invisible text. | (add-to-invisibility-spec '(outline . t))) | (setq line-move-ignore-invisible nil) | ;; Cause use of ellipses for invisible text. | (remove-from-invisibility-spec '(outline . t)) | ;; When turning off outline mode, get rid of any outline hiding. | (show-all))) `------------------------------------------------------------------------------ -- cheers, Thorsten