Emacs: dbus-related error when trying to switch to latex mode -
since began using dbus emacs days ago (meaning recompiled dbus-support), when open latex-file or try switch manually latex-mode, get
file mode specification error: (invalid-function dbus-ignore-errors)
and emacs stops there remaining in fundamental mode.
i use dbus zeitgeist-support , works fine , recompilation, auctex worked equally fine. checked if dbus-functions available result: show in (including "dbus-ignore-errors") don't seem available execute-extended-commad (m-x) meaning don't show in completion , cannot executed. on other hand available lisp-eval.
i don't know if that's normal behavior these functions, anyway there seems sort of problem availability of functions auctex?
the situation not change disabling zeitgeist-plugin.
any suggestions?
best regards
matthias
the error invalid-function
means piece of emacs lisp code compiled before macro defined, , trying call macro function. solve this, find module in question , recompile after making sure macro (dbus-ignore-errors
in case) defined.
in case of auctex, happens because tex.el
contains following:
;; require dbus @ compile time prevent errors due `dbus-ignore-errors' ;; not being defined. (eval-when-compile (and (featurep 'dbusbind) (require 'dbus nil :no-error)))
that is, tries load dbus library, ignores failures. if emacs under auctex being compiled doesn't support dbus, dbus-ignore-errors
compiled function call when compiling tex.el
. that's no problem, because dbus-ignore-errors
call protected featurep
test.
if byte-compiled file loaded emacs instance does support dbus, reach line in question, , try call macro function, fails invalid-function
. that's why file needs recompiled before being loaded dbus-enabled emacs.
one way solve wrap dbus-ignore-errors
line eval
, changing line:
(dbus-ignore-errors (dbus-get-unique-name :session))
to this:
(eval '(dbus-ignore-errors (dbus-get-unique-name :session)))
that postpone decision on how evaluate expression until runtime, when emacs know dbus-ignore-errors
macro.
Comments
Post a Comment