From: Thorsten Jolitz <tjolitz@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: outshine.el howto?
Date: Wed, 26 Mar 2014 15:30:35 +0100 [thread overview]
Message-ID: <87ppl93ud0.fsf@gmail.com> (raw)
In-Reply-To: lgs724$5v6$1@ger.gmane.org
> Neal Becker <ndbecker2@gmail.com> writes:
Hi,
> I just tried playing with outshine.el to edit python code. I'm not
> having any
> luck. Can't seem to figure out how to put in headings and have outshine
> actually work. Maybe I have some version problems?
>
> emacs: 24.3.1
> outshine: 1.0
> python-mode.el: 5.2.0
>
> in .emacs:
> (require 'outshine)
> (add-hook 'outline-minor-mode-hook 'outshine-hook-function)
looks alright so far. You should probably set one of these two prefix
keys for outline-minor-mode in your .emacs (must be done before
outline-mode is loaded). See this part of the outshine.el comment
header:
,----------------------------------------------------------------------
| ;; If you want a different prefix key for outline-minor-mode, insert
| first:
|
| ;; # #+begin_src emacs-lisp
| ;; # (defvar outline-minor-mode-prefix "\C-c")
| ;; # #+end_src
|
| ;; or
|
| ;; # #+begin_src emacs-lisp
| ;; # (defvar outline-minor-mode-prefix "\M-#")
| ;; # #+end_src
|
| ;; or whatever. The prefix can only be changed before outline (minor)
| ;; mode is loaded.
`----------------------------------------------------------------------
Then the keybindings should work as described in the docs, otherwise you
have to deal with the quite uncomfortable default prefix for
outline-minor-mode (C-c @).
> I can start with a .py file. M-x outline-minor-mode.
>
> Now typing
>
> * this is a header
>
> and then using comment-region on it:
>
> ## * this is a header
>
> appears to be recognized as header (blue font).
as it should ...
> But on menu, outshine demote/promote etc are grayed out, no matter where
> I put my cursor (in header, at beginning of line, end of line, middle of
> line...)
I hardly ever use the menu, and I only use the console right now, but
for me F10 (`menu-bar-open') and 'O' ('outshine') shows this
,--------------------------------------------------------------------------
| Possible completions are:
| ---Cycle Subtree ---Demote Heading
| ---Hide More ---Move Heading Down
| ---Move Heading Up ---Promote Heading
| ---Show More c==>Cycle Buffer C-M-i
| e==>Edit As Org M-# M-# i==>Insert Heading
| m==>Mark Subtree M-# @ n==>Next Visible Heading M-# K
| p==>Previous Visible Heading M-# I s==>Show All M-# C-a
| u==>Up Heading M-# M-u
`--------------------------------------------------------------------------
when point is not on a headline, and this
,---------------------------------------------------------------------------
| Possible completions are:
| 0==>Mark Subtree M-# @ C==>Cycle Buffer C-M-i
| M==>Move Heading Down P==>Previous Visible Heading M-# I
| S==>Show All M-# C-a c==>Cycle Subtree
| d==>Demote Heading M-# C-> e==>Edit As Org M-# M-#
| h==>Hide More i==>Insert Heading
| m==>Move Heading Up n==>Next Visible Heading M-# K
| p==>Promote Heading M-# C-< s==>Show More
| u==>Up Heading M-# M-u
`---------------------------------------------------------------------------
when point is on a headline
it seems the conditional binding of keys with the macro
`outshine-define-key-with-fallback' does not play well with the
menu, because the principal keybindings for the core functions (based
on TAB and arrow-keys) are not shown.
But introducing this marco was done on user request, since outshine is a
minor-mode and users did not want their valuable TAB and arrow-key
bindings hijacked by outshine except in special situations (with point
on a headline).
Unfortunately I'm not sure about the cure of this disease. Its kind of
a trade-off: conditional keybindings solve conflicts with
major-modes - but then cause new problems like this one.
But the main question is: does the functionality work? Is it only a
keybinding/menu problem, or is it a more fundamental problem? For me, in
e.g. picolisp-mode, the menu actually works (I don't use Python though).
Did you try to call a few outline/outshine commands with
,-----------------
| M-x outshine-...
`-----------------
instead of via keybindings? Did that work?
--
cheers,
Thorsten
prev parent reply other threads:[~2014-03-26 14:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 15:24 outshine.el howto? Neal Becker
2014-03-26 14:30 ` Thorsten Jolitz [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ppl93ud0.fsf@gmail.com \
--to=tjolitz@gmail.com \
--cc=help-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.