From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: Thorsten Jolitz <tjolitz@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: navi-search-and-switch fails
Date: Mon, 01 Sep 2014 18:50:02 +0200 [thread overview]
Message-ID: <m2k35nuvyd.fsf@top-wifi.irisa.fr> (raw)
In-Reply-To: <87ha0svf2o.fsf@gmail.com> (Thorsten Jolitz's message of "Sun, 31 Aug 2014 17:44:47 +0200")
[-- Attachment #1: Type: text/plain, Size: 1931 bytes --]
On 2014-08-31 17:44, Thorsten Jolitz <tjolitz@gmail.com> writes:
> Alan Schmitt <alan.schmitt@polytechnique.org> 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.
Yes, I imagine the problem comes from an interaction with something
else, but the code below does not seem to deal with the case where there
is no occur buffer.
>> 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.
> 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.
Yes, it works with an org file.
> 2. Is there anything special about the outshine file you used?
It's an emacs-lisp file.
> Is it structured with outshine headers? is it emacs-lisp-mode?
> old-school or org-style headers?
Here is a simple example that fails for me:
;; * ORG SCRATCH
;; ** 2nd Level
(+ 2 2)
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]
next prev parent reply other threads:[~2014-09-01 16:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-31 15:26 navi-search-and-switch fails Alan Schmitt
2014-08-31 15:44 ` Thorsten Jolitz
2014-09-01 16:50 ` Alan Schmitt [this message]
2014-09-01 17:18 ` Thorsten Jolitz
2014-09-01 17:41 ` Alan Schmitt
2014-09-01 18:13 ` Thorsten Jolitz
2014-09-02 9:10 ` Alan Schmitt
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=m2k35nuvyd.fsf@top-wifi.irisa.fr \
--to=alan.schmitt@polytechnique.org \
--cc=emacs-orgmode@gnu.org \
--cc=tjolitz@gmail.com \
/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.