From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: navi-search-and-switch fails Date: Mon, 01 Sep 2014 20:13:29 +0200 Message-ID: <877g1n43au.fsf@gmail.com> References: <87ha0svf2o.fsf@gmail.com> <87bnqz45va.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 ([2001:4830:134:3::10]:34050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOW6x-0003H8-FZ for emacs-orgmode@gnu.org; Mon, 01 Sep 2014 14:13:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOW6p-0002ej-OT for emacs-orgmode@gnu.org; Mon, 01 Sep 2014 14:13:51 -0400 Received: from plane.gmane.org ([80.91.229.3]:35982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOW6p-0002ef-HI for emacs-orgmode@gnu.org; Mon, 01 Sep 2014 14:13:43 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XOW6o-0003yB-1M for emacs-orgmode@gnu.org; Mon, 01 Sep 2014 20:13:42 +0200 Received: from e178063228.adsl.alicedsl.de ([85.178.63.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Sep 2014 20:13:42 +0200 Received: from tjolitz by e178063228.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Sep 2014 20:13:42 +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 Alan Schmitt writes: > On 2014-09-01 19:18, Thorsten Jolitz writes: > >> Does outshine work with that buffer (without navi-mode)? > > I guess not … How can I test it? > >> Are the headlines fontified like Org headlines? > > No. > >> Can you cycle visibility? > > Using TAB does nothing. > >> Can you call 'M-x outorg-edit-as-org' on a subtree? > > No, I get a backtrace: > > Debugger entered--Lisp error: (error "before first heading") > signal(error ("before first heading")) > error("before first heading") > outline-back-to-heading(INVISIBLE-OK) > outorg-copy-and-convert() > outorg-edit-as-org(nil) > call-interactively(outorg-edit-as-org record nil) > >> What does C-h v outline-regexp return? > > outline-regexp is a variable defined in `outline.el'. > Its value is ";;[;]\\{1,8\\} " > Original value was "[*\f]+" > Local in buffer untitled; global value is "[*\f]+" Wrong regexp for the example file, these are old-school headers, the example file has outshine (=org-style headers). So the outshine-hook-function wasn't really called on that buffer (again) to find out it has outshine headers. >> I suspect the problem is in your outshine installation. Does it work >> otherwise for you? > > I don't use it otherwise, so I don't know. I tried 'M-x > outorg-edit-as-org' on this message and it works. > >> What happens if you call M-x outline-minor-mode again in that example >> buffer? > > It works! I have to call it twice (once to disable it, and once to > enable it again), but then TAB and navi work as expected (no > fontification, though). Good! This whole thing is related to loading libraries and calling hooks, and its quite hard to tell whats going on there inside emacs sometimes. When I have all the hooks set in my init file, so that opening an elisp file calls outline-minor-mode-hook, and loading outline-minor-mode calls outshine-hook-function, then things just work. But putting an active fundamental-mode tmp-buffer with elisp code in emacs-lisp-mode sometimes doesn't activate outshine right away, and I have to call M-x emacs-lisp-mode again. Calling M-x nuke-and-eval on an outshine buffer is not a good idea either, probably because of the buffer-local-vars set. And currently I'm working with latex/auctex again and added a few (actually really nice) convenience functions to tj-outshine and tj-navi branches to make outshine work with latex-mode too, and it works well, only that latex-mode seems to re-fontify the buffer frequently so the outshine fontification is lost and I have to call M-x latex-mode again to make it reappear, whats a bit annoying ... > So for some reason emacs-lisp-mode sets up outline-mode, but the later > does not seem to load outshine automatically. I think thats really an internal emacs thing, because ,---- | C-h v outline-minor-mode-hook `---- will probably show you this: ,---- | outline-minor-mode-hook's value is (outshine-hook-function) `---- -- cheers, Thorsten