From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: navi-search-and-switch fails Date: Sun, 31 Aug 2014 17:44:47 +0200 Message-ID: <87ha0svf2o.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XO7JU-00020K-Ju for emacs-orgmode@gnu.org; Sun, 31 Aug 2014 11:45:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XO7JO-0001UV-F2 for emacs-orgmode@gnu.org; Sun, 31 Aug 2014 11:45:08 -0400 Received: from plane.gmane.org ([80.91.229.3]:45908) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XO7JO-0001Tf-9p for emacs-orgmode@gnu.org; Sun, 31 Aug 2014 11:45:02 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XO7JM-0006SO-VN for emacs-orgmode@gnu.org; Sun, 31 Aug 2014 17:45:00 +0200 Received: from g231105226.adsl.alicedsl.de ([92.231.105.226]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 31 Aug 2014 17:45:00 +0200 Received: from tjolitz by g231105226.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 31 Aug 2014 17:45:00 +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: > (Thorsten asked me to repost this from github.) > > When calling navi-search-and-switch interactively, I get the following > backtrace: But when 'navi-search-and-switch' would have a bug, one could not use navi-mode at all ... and I use it all the time. > Debugger entered--Lisp error: (wrong-type-argument stringp nil) > navi-rename-buffer() > navi-search-and-switch() > call-interactively(navi-search-and-switch record nil) > command-execute(navi-search-and-switch record) > > The problem seems to be with this code in navi-rename-buffer > > #+begin_src emacs-lisp > (with-current-buffer > (if (eq major-mode 'occur-mode) (current-buffer) (get-buffer "*Occur*")) > #+end_src > > > As there is no "*Occur*" buffer, and the current buffer is in > emacs-lisp-mode, =(if (eq major-mode 'occur-mode) (current-buffer) > (get-buffer "*Occur*"))= returns nil and with-current-buffer fails. > >> Is the source-file an outshine-file? >> Did you call outline-minor-mode on it, with outshine activated >> (i.e. with outshine-hook-function added to outline-minor-mode-hook)? > > I think it is. Here is my current configuration: > > #+begin_src emacs-lisp > (add-hook 'message-mode-hook 'outline-minor-mode) > (add-hook 'emacs-lisp-mode-hook 'outline-minor-mode) > (require 'outshine) > (add-hook 'outline-minor-mode-hook 'outshine-hook-function) > (require 'navi-mode) > #+end_src > > and I see "Outl" in the list of minor modes. looks good so far. 1. Can you try 'navi-search-and-switch' on an org-mode buffer, with -> (eq major-mode 'org-mode), e.g. ,---- | * ORG SCRATCH | ** 2nd Level | #+BEGIN_SRC emacs-lisp :cache no | (+ 2 2) | #+END_SRC `---- *Navi* buffer should pop-up, typing 2 should show both headlines. 2. Is there anything special about the outshine file you used? Is it structured with outshine headers? is it emacs-lisp-mode? old-school or org-style headers? -- cheers, Thorsten