From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: outshine.el howto? Date: Wed, 26 Mar 2014 15:30:35 +0100 Message-ID: <87ppl93ud0.fsf@gmail.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1395844197 30459 80.91.229.3 (26 Mar 2014 14:29:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Mar 2014 14:29:57 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 26 15:30:06 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WSoqA-0008U0-LA for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Mar 2014 15:30:02 +0100 Original-Received: from localhost ([::1]:48365 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSoqA-0005w0-7b for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Mar 2014 10:30:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSopp-0005LT-DV for help-gnu-emacs@gnu.org; Wed, 26 Mar 2014 10:29:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSopi-0001yj-3Q for help-gnu-emacs@gnu.org; Wed, 26 Mar 2014 10:29:41 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:58468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSoph-0001yW-TZ for help-gnu-emacs@gnu.org; Wed, 26 Mar 2014 10:29:34 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WSopf-0007wW-8V for help-gnu-emacs@gnu.org; Wed, 26 Mar 2014 15:29:31 +0100 Original-Received: from g231234195.adsl.alicedsl.de ([92.231.234.195]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 26 Mar 2014 15:29:31 +0100 Original-Received: from tjolitz by g231234195.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 26 Mar 2014 15:29:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 122 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: g231234195.adsl.alicedsl.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:tcEtabewqBuw+UXm3vB/ON0mGMM= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96767 Archived-At: > Neal Becker 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