emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [NEW] navi-mode for org files
@ 2013-04-04 13:49 Thorsten Jolitz
  2013-04-08  2:12 ` Charles Berry
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Thorsten Jolitz @ 2013-04-04 13:49 UTC (permalink / raw)
  To: emacs-orgmode


Hi List, 

I made navi-mode (=> super-fast buffer navigation, visibility-cycling,
structure-editing, and much more, with one-key commands in an associated
read-only *Navi* buffer) work with Org-mode buffers too. 

The basic things work, but there are still keyword-searches and
keybindings to define. 

To check it out and get an idea what its all about, do the following:

1. Download these files to a place where Emacs can find them and do 'M-x
load-file' on navi-mode.el

,---------------------------------------------------------
| https://github.com/tj64/navi/blob/master/navi-mode.el
| https://github.com/tj64/outorg/blob/master/outorg.el
| https://github.com/tj64/outshine/blob/master/outshine.el
`---------------------------------------------------------

2. Download Bernt Hansen's amazing Org-tutorial and switch to its
Org-mode buffer (we use it as example Org-mode buffer)

,----------------------------------
| http://doc.norang.ca/org-mode.org
`----------------------------------

3. Type 'M-s n' (or 'M-x navi-search-and-switch')

4. do 'M-x menu-bar-mode' if menus are disabled for your Emacs and have
a look at the "navi" menu

5. Play around in the *Navi:<<original-buffer-name>>* buffer:

- use 'n' and 'p' to move down and up on the 1st-level headers shown
- use '1' '2' and '3' to switch between visible header levels
- use 'SPC' and 'DEL' to move page-up and page-down
- use <backtab> to cycle visibility of whole original-buffer
- use <tab> to cycle visibility of subtree at point 
- use 'd' to display subtree at point in original-buffer
- use 'o' to switch to subtree at point in original-buffer
- use 'M-s M-s' to switch back to *Navi* buffer
- use 'b' to show all src-block headlines (and 'd' and 'o' on them)
- use 'C-1 b', 'C-2 b' and 'C-3 b' to show the source blocks embedded in
the headlines (level 1 to 3)
- use 'E' to make the *Navi* buffer editable (changes are applied
immediately to the original buffer (great in combination with
- keyboard-macros)
- type C-c C-c to make *Navi* buffer read-only again

(6. Want more?
- check the 'navi-menu' for more commands
- type 'h' to see the (customizable) user-defined keyword-searches and
their keybindings
- read the comment sections of the three libraries 'outshine', 'outorg'
and 'navi-mode' or the README-files on Github
- read the Worg article:
http://orgmode.org/worg/org-tutorials/org-outside-org.html)

,------------------------------------------------------------------------
| PS 
| 
| Please note that all this is available for your source code buffers
| too (e.g. in Emacs Lisp) when you structure them the 'outshine' way. 
| 
| Use outorg.el, outshine.el or navi-mode.el as example files to see what
| I mean (read comment-section of outshine.el for installation tips). 
| 
| Do 'M-s n' on one of them to open a *Navi* buffer. Try the the
| commands from list item (5) above and don't forget to checkout command
| 'e' - it is extremely useful since it opens the subtree at point (or,
| with prefix, the whole Emacs Lisp buffer) in a temporary Org-mode edit
| buffer.
`------------------------------------------------------------------------

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [NEW] navi-mode for org files
  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 19:31 ` Thorsten Jolitz
  2013-04-09  2:16 ` Charles Berry
  2 siblings, 1 reply; 10+ messages in thread
From: Charles Berry @ 2013-04-08  2:12 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Jolitz <tjolitz <at> gmail.com> writes:

> 
> 
> Hi List, 
> 
> I made navi-mode (=> super-fast buffer navigation, visibility-cycling,
> structure-editing, and much more, with one-key commands in an associated
> read-only *Navi* buffer) work with Org-mode buffers too. 
> 
> The basic things work, but there are still keyword-searches and
> keybindings to define. 
> 

Thorsten,

Thanks. This is really helpful.

Some comments:

Maybe you have this on your TODO list, but some things do not work as 
I would expect.

In the *Navi:myfile.org* buffer, 1,2,3, Z, N, W are all good.

C-1 N also good.

But C-1 Z, C-2 W don't quite work.

I think the part of the regexp that represents the 'Z' or 'W' search needs
to be wrapped in \( ... \) as the parts beyond  

  \(^\* \|^[ ^I]*#\+name:[ ^I]*

do not match.

===

I find myself doing "1 n n r 2 r Z w 2 n r Z" to look at successive pieces 
of a buffer.

Is there a slicker way to do stuff like this?

===

[snip]

 ,------------------------------------------------------------------------
> | PS 
> | 
> | Please note that all this is available for your source code buffers
> | too (e.g. in Emacs Lisp) when you structure them the 'outshine' way. 
> | 
> | Use outorg.el, outshine.el or navi-mode.el as example files to see what
> | I mean (read comment-section of outshine.el for installation tips). 
> | 
> | Do 'M-s n' on one of them to open a *Navi* buffer. Try the the
> | commands from list item (5) above and don't forget to checkout command
> | 'e' - it is extremely useful since it opens the subtree at point (or,
> | with prefix, the whole Emacs Lisp buffer) in a temporary Org-mode edit
> | buffer.
> `------------------------------------------------------------------------
> 

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

Best,

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [NEW] navi-mode for org files
  2013-04-08  2:12 ` Charles Berry
@ 2013-04-08 19:27   ` Thorsten Jolitz
  2013-04-08 21:41     ` Charles Berry
  0 siblings, 1 reply; 10+ messages in thread
From: Thorsten Jolitz @ 2013-04-08 19:27 UTC (permalink / raw)
  To: emacs-orgmode

Charles Berry <ccberry@ucsd.edu> writes:

> Thorsten Jolitz <tjolitz <at> gmail.com> writes:

>> I made navi-mode (=> super-fast buffer navigation, visibility-cycling,
>> structure-editing, and much more, with one-key commands in an associated
>> read-only *Navi* buffer) work with Org-mode buffers too. 

> Some comments:
>
> Maybe you have this on your TODO list, but some things do not work as 
> I would expect.
>
> In the *Navi:myfile.org* buffer, 1,2,3, Z, N, W are all good.
>
> C-1 N also good.
>
> But C-1 Z, C-2 W don't quite work.

> I think the part of the regexp that represents the 'Z' or 'W' search needs
> to be wrapped in \( ... \) as the parts beyond  
>
>   \(^\* \|^[ ^I]*#\+name:[ ^I]*
>
> do not match.

yes, you are right, I noticed that too, its even captured in my new
youtube screencast ;)

But I'm not sure why it doesn't work. Z searches for results with names,
i.e. lines like this:

     ,--------------------------------
     | 87:#+name: org-mode-doc-version
     | 93:#+name: org-mode-version
     `--------------------------------

the complicated regexp is simply copied from the Org-mode sources. Z
alone matches alright and finds the 2 named results in Bernt Hansen's
Org tutorial.

C-2 Z then makes a regexp alternative, combining this keyword search
with a simple regexp that matches headlines up to level 2 (^\*\*? ).

The strange thing is that making this regexp alternative works in all
other cases (for org and elisp), and it looks alright in this case too:

,---------------------------------------------------------------------------
| "\(^\*\*? \|^[
| ^I]*#\+\(name\|results\|tblname\)\(\[\(<\([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}
| ?[^^M^J>]*?\)> \)?\([[:alnum:]]+\)\]\)?\:[ ^I]*\([^
| ()^L^I^J^M^K]+\)\((\(.*\))\)\)"
`---------------------------------------------------------------------------

I followed your suggestion and added parenthesis, but to no avial. This
only matches the headline too, not the named results:

,---------------------------------------------------------------------------
| "\(^\*\*? \|\(^[
| ^I]*#\+\(name\|results\|tblname\)\(\[\(<\([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}
| ?[^^M^J>]*?\)> \)?\([[:alnum:]]+\)\]\)?\:[ ^I]*\([^
| ()^L^I^J^M^K]+\)\((\(.*\))\)\)\)"
`---------------------------------------------------------------------------

Any hints from the regexp experts why the above doesn't work, but the
following much simpler regexp alternative (C-2 N) does work an matches
the exact same two lines?

,-------------------------------------
| "\(^\*\*? \|^[ ^I]*#\+name:[ ^I]*\)"
`-------------------------------------

,---------------------------------------------------------------------------------
| 132 matches for "\(^\*\*? \|^[ ^I]*#\+name:[ ^I]*\)" in buffer: bernt-hansen.org
|      18:* How To Use This Document
|      50:* License
|      82:* Change History - What's new
|      87:#+name: org-mode-doc-version
|      93:#+name: org-mode-version
`---------------------------------------------------------------------------------

> ===
>
> I find myself doing "1 n n r 2 r Z w 2 n r Z" to look at successive pieces 
> of a buffer.
>
> Is there a slicker way to do stuff like this?

actually ["r 3" do stuff "2 w"] and ["r 4" do stuff "3 w"] is something
I do frequently, but since 'r' and 'w' are directly below '1 2 3 4' I
find it easy and fast to type.

Alternatively, you could start with e.g. 4 (shows headlines up to level
4) or directly C-4 Z, use SPC and DEL and 'n' and 'p' to go to the
relevant headline, and narrow with 'r'.

>  ,------------------------------------------------------------------------
>> | PS 
>> | 
>> | Please note that all this is available for your source code buffers
>> | too (e.g. in Emacs Lisp) when you structure them the 'outshine' way. 
>> | 
>> | Use outorg.el, outshine.el or navi-mode.el as example files to see what
>> | I mean (read comment-section of outshine.el for installation tips). 
>> | 
>> | Do 'M-s n' on one of them to open a *Navi* buffer. Try the the
>> | commands from list item (5) above and don't forget to checkout command
>> | 'e' - it is extremely useful since it opens the subtree at point (or,
>> | with prefix, the whole Emacs Lisp buffer) in a temporary Org-mode edit
>> | buffer.
>> `------------------------------------------------------------------------
>
> 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?

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [NEW] navi-mode for org files
  2013-04-04 13:49 [NEW] navi-mode for org files Thorsten Jolitz
  2013-04-08  2:12 ` Charles Berry
@ 2013-04-08 19:31 ` Thorsten Jolitz
  2013-04-09  2:16 ` Charles Berry
  2 siblings, 0 replies; 10+ messages in thread
From: Thorsten Jolitz @ 2013-04-08 19:31 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Jolitz <tjolitz@gmail.com> writes:

> I made navi-mode (=> super-fast buffer navigation, visibility-cycling,
> structure-editing, and much more, with one-key commands in an associated
> read-only *Navi* buffer) work with Org-mode buffers too. 

There is a screencast on youtube now showing the use of navi-mode in an
Org-mode buffer:

,-------------------------------------------
| http://www.youtube.com/watch?v=II-xYw5VGFM
`-------------------------------------------

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [NEW] navi-mode for org files
  2013-04-08 19:27   ` Thorsten Jolitz
@ 2013-04-08 21:41     ` Charles Berry
  2013-04-08 22:19       ` Thorsten Jolitz
  0 siblings, 1 reply; 10+ messages in thread
From: Charles Berry @ 2013-04-08 21:41 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Jolitz <tjolitz <at> gmail.com> writes:

> 
> Charles Berry <ccberry <at> ucsd.edu> writes:
> 
> > Thorsten Jolitz <tjolitz <at> gmail.com> writes:
> 

[deleted]


`------------------------------------------------------------------------
> >
> > 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



HTH,

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [NEW] navi-mode for org files
  2013-04-08 21:41     ` Charles Berry
@ 2013-04-08 22:19       ` Thorsten Jolitz
  2013-04-09  1:47         ` Charles Berry
  0 siblings, 1 reply; 10+ messages in thread
From: Thorsten Jolitz @ 2013-04-08 22:19 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [NEW] navi-mode for org files
  2013-04-08 22:19       ` Thorsten Jolitz
@ 2013-04-09  1:47         ` Charles Berry
  2013-04-09  7:58           ` Thorsten Jolitz
  0 siblings, 1 reply; 10+ messages in thread
From: Charles Berry @ 2013-04-09  1:47 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Jolitz <tjolitz <at> gmail.com> writes:

> 
> Charles Berry <ccberry <at> 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)
> >> >
> >> >

SOLVED!

The clue was: 

,----
| (add-hook HOOK FUNCTION &optional APPEND LOCAL)
| 
| Add to the value of HOOK the function FUNCTION.
|
|[...]
| 
| HOOK should be a symbol, and FUNCTION may be any valid function.  If
| HOOK is void, it is first set to nil.  If HOOK's value is a single
| function, it is changed to a list of functions.
`----

So how can this not work?

Well, with point on the character just before "outline-minor...",

C-u C-x = 

tells me that I was *not* looking at an apostrophe!!!

,----
|              position: 2519 of 66947 (4%), column: 17
|             character: ‘ (displayed as ‘) (codepoint 8216, #o20030,
|[snip] 
| Character code properties: customize what to show
|   name: LEFT SINGLE QUOTATION MARK
|   old-name: SINGLE TURNED COMMA QUOTATION MARK
|   general-category: Pi (Punctuation, Initial quote)
|   decomposition: (8216) ('‘')
`----

So, add-hook was trying to reference a variable called

     "‘outline-minor-mode-hook"

If I replace the "left single quotation marks" in that line with 
"apostrophes", outline-minor-mode seems to work.

:-)

Maybe a similar edit of the source would protect others like me who 
copy and paste what they see rather than typing it in longhand.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [NEW] navi-mode for org files
  2013-04-04 13:49 [NEW] navi-mode for org files Thorsten Jolitz
  2013-04-08  2:12 ` Charles Berry
  2013-04-08 19:31 ` Thorsten Jolitz
@ 2013-04-09  2:16 ` Charles Berry
  2013-04-09  7:52   ` Thorsten Jolitz
  2 siblings, 1 reply; 10+ messages in thread
From: Charles Berry @ 2013-04-09  2:16 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Jolitz <tjolitz <at> gmail.com> writes:

> 
> 
> Hi List, 
> 
> I made navi-mode (=> super-fast buffer navigation, visibility-cycling,
> structure-editing, and much more, with one-key commands in an associated
> read-only *Navi* buffer) work with Org-mode buffers too. 
> 
>

[deleted]

> 
> (6. Want more?
> - check the 'navi-menu' for more commands
> - type 'h' to see the (customizable) user-defined keyword-searches and
> their keybindings

'h' in the *Navi:myfile.org* buffer returns an error.

underline-line-with is not found. I could not find it by rgrep'ing or 
Googling.

Commenting it out of navi-show-help results in display of the keybindings.

HTH,

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [NEW] navi-mode for org files
  2013-04-09  2:16 ` Charles Berry
@ 2013-04-09  7:52   ` Thorsten Jolitz
  0 siblings, 0 replies; 10+ messages in thread
From: Thorsten Jolitz @ 2013-04-09  7:52 UTC (permalink / raw)
  To: emacs-orgmode

Charles Berry <ccberry@ucsd.edu> writes:

>> (6. Want more?
>> - check the 'navi-menu' for more commands
>> - type 'h' to see the (customizable) user-defined keyword-searches and
>> their keybindings
>
> 'h' in the *Navi:myfile.org* buffer returns an error.
>
> underline-line-with is not found. I could not find it by rgrep'ing or 
> Googling.
>
> Commenting it out of navi-show-help results in display of the keybindings.

Yes, thanks a lot for the observation. I installed the
`basic-edit-toolkit.el'
(http://www.emacswiki.org/emacs/basic-edit-toolkit.el) long ago and
forget about it.

,-------------------------------------------------------
| underline-line-with is an interactive Lisp function in
| `basic-edit-toolkit.el'.
| 
| (underline-line-with CHAR)
`-------------------------------------------------------

I added 'navi-underline-line-with' to navi-mode.el and pushed the new
version to github, let me if there are still problems.

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [NEW] navi-mode for org files
  2013-04-09  1:47         ` Charles Berry
@ 2013-04-09  7:58           ` Thorsten Jolitz
  0 siblings, 0 replies; 10+ messages in thread
From: Thorsten Jolitz @ 2013-04-09  7:58 UTC (permalink / raw)
  To: emacs-orgmode

Charles Berry <ccberry@ucsd.edu> writes:

> Thorsten Jolitz <tjolitz <at> gmail.com> writes:
>
>> 
>> Charles Berry <ccberry <at> 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)
>> >> >
>> >> >
>
> SOLVED!
>
> The clue was: 
>
> ,----
> | (add-hook HOOK FUNCTION &optional APPEND LOCAL)
> | 
> | Add to the value of HOOK the function FUNCTION.
> |
> |[...]
> | 
> | HOOK should be a symbol, and FUNCTION may be any valid function.  If
> | HOOK is void, it is first set to nil.  If HOOK's value is a single
> | function, it is changed to a list of functions.
> `----
>
> So how can this not work?
>
> Well, with point on the character just before "outline-minor...",
>
> C-u C-x = 
>
> tells me that I was *not* looking at an apostrophe!!!
>
> ,----
> |              position: 2519 of 66947 (4%), column: 17
> |             character: ‘ (displayed as ‘) (codepoint 8216, #o20030,
> |[snip] 
> | Character code properties: customize what to show
> |   name: LEFT SINGLE QUOTATION MARK
> |   old-name: SINGLE TURNED COMMA QUOTATION MARK
> |   general-category: Pi (Punctuation, Initial quote)
> |   decomposition: (8216) ('‘')
> `----
>
> So, add-hook was trying to reference a variable called
>
>      "‘outline-minor-mode-hook"
>
> If I replace the "left single quotation marks" in that line with 
> "apostrophes", outline-minor-mode seems to work.
>
> :-)
>
> Maybe a similar edit of the source would protect others like me who 
> copy and paste what they see rather than typing it in longhand.

Thanks for finding this strange bug! I don't even have LEFT SINGLE
QUOTATION MARK on my keyboard and wasn't aware of its existance, so this
must be a bug caused by 'copy&paste' or so. No idea where this comes
from. 

Actually, for me it wasn't even a bug since it only appereared in the
comment-sections (and thus in the README files) of the libraries, not in
the code (in my dot emacs)  itself. 

I fixed that and pushed new versions on Github. Sorry for the hassle. 

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-04-09  7:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

Code repositories for project(s) associated with this 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).