I am trying to create a website using org-mode from here. Having set everything up, when I go to the end of the line (require 'org-publish) and press C-x C-e, I get the following error,
Debugger entered--Lisp error: (void-function org-defvaralias)
org-defvaralias(org-agenda-filter-preset org-agenda-tag-filter-preset)
It seems that the function org-defvaralias is void. How do I fix this?
Looks like that's a function defined in org-compat.el; try M-: (require 'org-compat), which should load and execute that file if it's part of your Org-mode installation. (Emacs 24.3, Org 7.9.3f, does appear to include it, so if you're using a current Emacs, you should be good to go.)
Related
I updated a lot of packages that I had directly from github to the MELPA packages. Nonetheless something really weird happened to my *scratch* buffer. The default message is not appearing (the buffer is completely empty), and also the interactive elisp mode is not set (let's say I write (+ 2 2) and then hit C-j and it tells me invalid function). I have no idea why. I don't even know how to debug it to check where the error is. Any ideas?
Finally the problem was generated by flycheck-add-next-checker, for some reason, using the MELPA repositories is generating this error. I just commented the following part of my configuration file.
(eval-after-load 'flycheck
'(progn
;; Add Google C++ Style checker.
;; In default, syntax checked by Clang and Cppcheck.
(flycheck-add-next-checker 'c/c++-clang
'(warnings-only . c/c++-googlelint))))
I am using emacs version 24.4.2. For some reason, i cannot use tramp at all. Any attempt to do so, i.e. trying to type /sudo:: causes a small hang of application followed by the following error in messages buffer:
expand-file-name: Lisp nesting exceeds `max-lisp-eval-depth'
What can i do to fix that error or diagnose it properly?
Update: Debugging shows the source of a problem is ido. Currently it is set up with following:
(setq ido-everywhere t)
(ido-mode t)
(setq ido-enable-flex-matching t)
Set debug-on-error to non-nil. See what function called expand-file-name, producing the error. Then try M-x debug-on-entry F, where F is that function, and step through the debugger with d to see what happens. Look at the code defining that function, in another window, while using the debugger.
You can also try, first, seeing whether you get the same broken behavior when you start Emacs without your init file: emacs -Q. If not, then recursively bisect your init file to find out what part of it introduces the problem.
My crystal ball is whispering to me that you have advised a function in such a way that it ends up, directly or indirectly, calling itself.
I encounter an error:
scala-block-indentation: Wrong type argument: number-or-marker-p, nil
Whenever I click tab for indent in scala-mode.
I don't know where goes wrong in the code but want to fix it. However, I can only see this error in *Message* buffer without details. I tried to see this error in Backtrace but didn't know how. I tried (1) -debug-init to launch emacs (2) debug-on-entry command for scala-block-indentation but neither of them works.
Does anyone have ideas about how to enable BackTrace/Debugger for this function?
I have not used scala under emacs to tell if this can help you. But try (setq debug-on-error t) in your .emacs, or simply do M-: (setq debug-on-error t) to try for the current emacs session only.
the error is
Warning: ad-Orig-kill-new called with 3 arguments, but accepts only 1-2
I added the code into .emacs following the guide Warning when I revert from desktop session. Emacs
(ad-deactivate 'kill-region)
but after restart emacs, it showed me the error message:
Symbol's function definition is void: ad-deactivate
How can I do to cope with the error: > Warning: ad-Orig-kill-new called with 3 arguments, but accepts only 1-2
thank you for your help
It's hard to be certain without more information about your emacs version and your load files, but if the function's definition is void it sounds like advice.el hasn't been loaded yet. You might try changing your .emacs file so it is loaded explicitly before calling the function; something like this:
(require 'advice)
(ad-deactivate 'kill-region)
This question may be a duplicate of this question, but I can't get the following to work properly in my emacs.
I am trying to enter minor mode mlint-mode whenever I enter major mode matlab-mode (both modes available at their SourceForge page). I have the following in my .emacs file:
(add-hook 'matlab-mode-hook
(function (lambda()
(mlint-mode))))
which looks like the answer to the question I linked above. When opening a .m file, I get the following error:
File mode specification error: (void-function mlint-mode)
Could someone please assist in helping me write the correct hook to enter mlint-mode when I open a .m file? FWIW, I'm running emacs 23.1.50.1.
I think the correct name is mlint-minor-mode. Also, remember to ensure that all matlab stuff is known by Emacs, this can be done using:
(require 'matlab-load)
As a side note, it is typically a bad idea to use lambda functions in hooks. If you inspect the value of the hook you will see a lot of unrelated things. Also, if you modify your lambda expression and re-add it, both the old and the new version will be on the hook.
Instead, you can do something like:
(defun my-matlab-hook ()
(mlint-minor-mode 1))
(add-hook 'matlab-mode-hook 'my-matlab-hook)
The "1" is ensures that mlint mode is turned on or stay on if enabled earlier.