From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [NEW] navi-mode for org files
Date: Tue, 09 Apr 2013 00:19:37 +0200 [thread overview]
Message-ID: <87d2u4u0li.fsf@gmail.com> (raw)
In-Reply-To: loom.20130408T225637-369@post.gmane.org
Charles Berry <ccberry@ucsd.edu> 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 <at> ...
>> > 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 <at> ...
>> `----------------------------------------------------------------
>>
>> 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 <mouse-2> 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 <mouse-2> 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
next prev parent reply other threads:[~2013-04-08 22:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 13:49 [NEW] navi-mode for org files Thorsten Jolitz
2013-04-08 2:12 ` Charles Berry
2013-04-08 19:27 ` Thorsten Jolitz
2013-04-08 21:41 ` Charles Berry
2013-04-08 22:19 ` Thorsten Jolitz [this message]
2013-04-09 1:47 ` Charles Berry
2013-04-09 7:58 ` Thorsten Jolitz
2013-04-08 19:31 ` Thorsten Jolitz
2013-04-09 2:16 ` Charles Berry
2013-04-09 7:52 ` Thorsten Jolitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d2u4u0li.fsf@gmail.com \
--to=tjolitz@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).