unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* describe-variable error when using dir-locals-set-directory-class
@ 2013-07-06 14:47 Hongxu Chen
  2013-07-09  1:40 ` Michael Heerdegen
  0 siblings, 1 reply; 2+ messages in thread
From: Hongxu Chen @ 2013-07-06 14:47 UTC (permalink / raw)
  To: help-gnu-emacs


Hi,

  I followed the docs on this page
  http://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html
  and does some tweaks for the directory variables for ffap-c-path.

#+BEGIN_SRC emacs-lisp
(dir-locals-set-class-variables 'llvm-3.4-directory
                                '((nil . ((ffap-c-path . ("/usr/lib/llvm-3.4/include"))))))
(dir-locals-set-directory-class
 "/usr/lib/llvm-3.4/include/clang-c/" 'llvm-3.4-directory)
#+END_SRC

  However when I try `C-h v ffap-c-path', there is an error;
  when I `toggle-debug-on-error', it reports:

#+BEGIN_SRC emacs-lisp
  Debugger entered--Lisp error: (wrong-type-argument char-or-string-p ("/usr/lib/llvm-3.4/include/clang-c/" llvm-3\.4-directory nil))
  insert-text-button(("/usr/lib/llvm-3.4/include/clang-c/" llvm-3\.4-directory nil) type help-dir-local-var-def help-args (ac-clang-flags ("/usr/lib/llvm-3.4/include/clang-c/" llvm-3\.4-directory nil)))
  describe-variable(ac-clang-flags)
  call-interactively(describe-variable nil nil)
#+END_SRC

  And describe-variable ONLY sucks for those variables that are set
  using this sort of syntax.
  
  Also, I am wondering whether this kind of directory variable setting
  can accept `evil' syntax just as `.dir-locals.el' does.


-- 
Regards,
Hongxu Chen



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

* Re: describe-variable error when using dir-locals-set-directory-class
  2013-07-06 14:47 describe-variable error when using dir-locals-set-directory-class Hongxu Chen
@ 2013-07-09  1:40 ` Michael Heerdegen
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Heerdegen @ 2013-07-09  1:40 UTC (permalink / raw)
  To: help-gnu-emacs

Hongxu Chen <leftcopy.chx@gmail.com> writes:

> Hi,
>
>   I followed the docs on this page
>   http://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html
>   and does some tweaks for the directory variables for ffap-c-path.
>
> #+BEGIN_SRC emacs-lisp
> (dir-locals-set-class-variables 'llvm-3.4-directory
>                                 '((nil . ((ffap-c-path . ("/usr/lib/llvm-3.4/include"))))))
> (dir-locals-set-directory-class
>  "/usr/lib/llvm-3.4/include/clang-c/" 'llvm-3.4-directory)
> #+END_SRC
>
>   However when I try `C-h v ffap-c-path', there is an error;
>   when I `toggle-debug-on-error', it reports:
>
> #+BEGIN_SRC emacs-lisp
>   Debugger entered--Lisp error: (wrong-type-argument char-or-string-p ("/usr/lib/llvm-3.4/include/clang-c/" llvm-3\.4-directory nil))
>   insert-text-button(("/usr/lib/llvm-3.4/include/clang-c/" llvm-3\.4-directory nil) type help-dir-local-var-def help-args (ac-clang-flags ("/usr/lib/llvm-3.4/include/clang-c/" llvm-3\.4-directory nil)))
>   describe-variable(ac-clang-flags)
>   call-interactively(describe-variable nil nil)
> #+END_SRC
>
>   And describe-variable ONLY sucks for those variables that are set
>   using this sort of syntax.

That looks like a bug to me.  Although I can't reproduce it here with
trunk.  When I follow your recipe, I get a help buffer looking normal:

,----------------------------------------------------------------------
| ffap-c-path is a variable defined in `ffap.el'.
| Its value is ("/usr/lib/llvm-3.4/include")
| Local in buffer micha; global value is 
| ("/usr/include" "/usr/local/include" "/usr/include/x86_64-linux-gnu")
| 
| 
|   This variable's value is directory-local.
| 
| Documentation:
| List of directories to search for include files.
| 
`----------------------------------------------------------------------

What's your Emacs version, and does this happen with emacs -Q?

>   Also, I am wondering whether this kind of directory variable setting
>   can accept `evil' syntax just as `.dir-locals.el' does.

Sorry, I can't answer that.  Maybe someone else can help.


Regards,

Michael.




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

end of thread, other threads:[~2013-07-09  1:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-06 14:47 describe-variable error when using dir-locals-set-directory-class Hongxu Chen
2013-07-09  1:40 ` Michael Heerdegen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).