all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* semantic-symref-symbol returns "Wrong argument type"
@ 2015-07-22 19:34 Nicolas Bock
  2015-07-22 19:49 ` Dmitry Gutov
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Bock @ 2015-07-22 19:34 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Hi,

I enabled semtantic-mode and opened a Fortran source file. When I run
semantic-symref-symbol I get the following in the status line:

Wrong type argument: syntax-table-p, nil

The same sequence of steps works for a C source file. What does this
error message tell me?

Thanks already,

nick



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: semantic-symref-symbol returns "Wrong argument type"
  2015-07-22 19:34 semantic-symref-symbol returns "Wrong argument type" Nicolas Bock
@ 2015-07-22 19:49 ` Dmitry Gutov
  2015-07-22 19:53   ` Nicolas Bock
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Gutov @ 2015-07-22 19:49 UTC (permalink / raw)
  To: Nicolas Bock, help-gnu-emacs@gnu.org

On 07/22/2015 10:34 PM, Nicolas Bock wrote:

> I enabled semtantic-mode and opened a Fortran source file. When I run
> semantic-symref-symbol I get the following in the status line:
>
> Wrong type argument: syntax-table-p, nil

It seems Semantic doesn't support Fortran. As such, it can't determine 
the "current symbol", and the search for symbols won't work.

> The same sequence of steps works for a C source file. What does this
> error message tell me?

Make it wanted you to M-x toggle-debug-on-error, and fix the error all 
by yourself. Filing a bug is also an adequate reaction.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: semantic-symref-symbol returns "Wrong argument type"
  2015-07-22 19:49 ` Dmitry Gutov
@ 2015-07-22 19:53   ` Nicolas Bock
  2015-07-22 20:05     ` Dmitry Gutov
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Bock @ 2015-07-22 19:53 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: help-gnu-emacs@gnu.org

Hi Dimitry,

On Wed, Jul 22, 2015 at 1:49 PM, Dmitry Gutov <dgutov@yandex.ru> wrote:
> On 07/22/2015 10:34 PM, Nicolas Bock wrote:
>
>> I enabled semtantic-mode and opened a Fortran source file. When I run
>> semantic-symref-symbol I get the following in the status line:
>>
>> Wrong type argument: syntax-table-p, nil
>
>
> It seems Semantic doesn't support Fortran. As such, it can't determine the
> "current symbol", and the search for symbols won't work.
>
That's what I suspected, but what I don't understand is why it doesn't
use 'grep' as a fallback. That should be language agnostic, I would
think.

>> The same sequence of steps works for a C source file. What does this
>> error message tell me?
>
>
> Make it wanted you to M-x toggle-debug-on-error, and fix the error all by
> yourself. Filing a bug is also an adequate reaction.

The backtrace unfortunately does not help me much either:

Debugger entered--Lisp error: (wrong-type-argument syntax-table-p nil)
  set-syntax-table(nil)
  semantic-ctxt-current-symbol-default(nil)
  semantic-ctxt-current-symbol()
  semantic-ctxt-current-thing()
  semantic-complete-default-to-tag(nil)
  semantic-complete-read-tag-engine([object
semantic-collector-project-brutish "Symrefs for: " #<buffer
solvers_mod.F90> nil unbound unbound unbound unbound unbound #<buffer
solvers_mod.F90>] [object
semantic-displayor-traditional-with-focus-highlight "simple" nil
unbound unbound] "Symrefs for: " nil nil nil)
  semantic-complete-read-tag-project("Symrefs for: ")
  (semantic-tag-name (semantic-complete-read-tag-project "Symrefs for: "))
  (list (semantic-tag-name (semantic-complete-read-tag-project
"Symrefs for: ")))
  call-interactively(semantic-symref-symbol nil nil)
  command-execute(semantic-symref-symbol)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: semantic-symref-symbol returns "Wrong argument type"
  2015-07-22 19:53   ` Nicolas Bock
@ 2015-07-22 20:05     ` Dmitry Gutov
  2015-07-22 20:12       ` Nicolas Bock
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Gutov @ 2015-07-22 20:05 UTC (permalink / raw)
  To: Nicolas Bock; +Cc: help-gnu-emacs@gnu.org

On 07/22/2015 10:53 PM, Nicolas Bock wrote:

> That's what I suspected, but what I don't understand is why it doesn't
> use 'grep' as a fallback. That should be language agnostic, I would
> think.

Like I said, it could use Grep, but first it wants to determine what to 
search for (the "symbol"), and that's normally the "current tag", in 
buffers supported by Semantic.

Regarding Grep, though, there's no entry for Fortran in 
semantic-symref-filepattern-alist.

If you're using the current master (or can install it), you could try 
M-x xref-find-regexp instead. Or M-x xref-find-references.

> The backtrace unfortunately does not help me much either:

> Debugger entered--Lisp error: (wrong-type-argument syntax-table-p nil)
>    set-syntax-table(nil)

This is from macro-expansion of `with-syntax-table'. As you can see, the 
argument is semantic-lex-syntax-table, which is apparently nil.

>    semantic-ctxt-current-symbol-default(nil)

^ That's the function, inside which you should be looking.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: semantic-symref-symbol returns "Wrong argument type"
  2015-07-22 20:05     ` Dmitry Gutov
@ 2015-07-22 20:12       ` Nicolas Bock
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Bock @ 2015-07-22 20:12 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: help-gnu-emacs@gnu.org

Thanks for all the pointers. I will dig a little deeper....

On Wed, Jul 22, 2015 at 2:05 PM, Dmitry Gutov <dgutov@yandex.ru> wrote:
> On 07/22/2015 10:53 PM, Nicolas Bock wrote:
>
>> That's what I suspected, but what I don't understand is why it doesn't
>> use 'grep' as a fallback. That should be language agnostic, I would
>> think.
>
>
> Like I said, it could use Grep, but first it wants to determine what to
> search for (the "symbol"), and that's normally the "current tag", in buffers
> supported by Semantic.
>
> Regarding Grep, though, there's no entry for Fortran in
> semantic-symref-filepattern-alist.
>
> If you're using the current master (or can install it), you could try M-x
> xref-find-regexp instead. Or M-x xref-find-references.
>
>> The backtrace unfortunately does not help me much either:
>
>
>> Debugger entered--Lisp error: (wrong-type-argument syntax-table-p nil)
>>    set-syntax-table(nil)
>
>
> This is from macro-expansion of `with-syntax-table'. As you can see, the
> argument is semantic-lex-syntax-table, which is apparently nil.
>
>>    semantic-ctxt-current-symbol-default(nil)
>
>
> ^ That's the function, inside which you should be looking.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-22 20:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-22 19:34 semantic-symref-symbol returns "Wrong argument type" Nicolas Bock
2015-07-22 19:49 ` Dmitry Gutov
2015-07-22 19:53   ` Nicolas Bock
2015-07-22 20:05     ` Dmitry Gutov
2015-07-22 20:12       ` Nicolas Bock

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.