Skip to main content
26 votes
Accepted

How do I debug `Package cl is deprecated`?

Try the following in an Emacs session with the code in question loaded up: (require 'loadhist) (file-dependents (feature-file 'cl))
wasamasa's user avatar
  • 22.3k
7 votes
Accepted

Warning: Unused lexical variable ‘xxxxx’ for clearly used variables

Here's the reason why you get those warnings when you don't byte-compile the file: My crystal ball tells me this Elisp code is within a file marked as -*- lexical-binding:t -*- (which is a good thing)...
Stefan's user avatar
  • 26.6k
7 votes
Accepted

How to disable automatic appearance of *Warnings* buffer in Emacs?

If you don't need the creation of lock files you can just disable it completely. This can be done by adding the following line to your .emacs or init.el file: (setq create-lockfiles nil) If it is not ...
Karim Aziiev's user avatar
6 votes
Accepted

How can I make Emacs warn about calls to my pure functions?

If you look in byte-optimize-form-code-walker, you can see that a warning is printed for side-effect-free functions, but error-free functions just get optimized out and logged (not warned) only. ...
npostavs's user avatar
  • 9,233
6 votes
Accepted

Fixing "reference/assignment to free variable" warning during compilation if variable is dynamically bounded

Assuming you are using lexical binding, if the variable is dynamic, then it must be defvar'd (to ensure that lexical binding cannot treat it otherwise). AFAIK it would be a bug to not use defvar. For ...
phils's user avatar
  • 52.4k
6 votes

How disable show warning message in shell?

To suppress the warning first make sure the warnings library is loaded by entering M-x load-library RET warnings RET. Then add the listed option to warning-suppress-types. Load the customization ...
martin_joerg's user avatar
6 votes
Accepted

Is there a way to suppress warnings when a package is compiled in elisp?

See byte-compile-warnings: List of warnings that the byte-compiler should issue (t for almost all). Elements of the list may be: docstrings: docstrings that are too wide (longer than byte-compile-...
shynur's user avatar
  • 5,785
5 votes
Accepted

How to get Emacs to know that a symbol has a function definition

Your question is a little confusing, but I suspect you actually mean that you've byte-compiled the prelude-ivy.el library (as opposed to "reading the source file"), and that the compiler has produced ...
phils's user avatar
  • 52.4k
5 votes

Where are these variables defined? - bytecomp Warnings

See the answer by Drew for a general description of compiler warnings pertaining to free variables. In your particular case, however, the culprit is the package oauth2.el, which for some reason is ...
Basil's user avatar
  • 12.5k
5 votes
Accepted

Prevent byte-compiler warnings after requiring features

IMHO, the right way is to ignore it. ;-) But the standard Emacs answer is to use declare-function - see (elisp) Declaring Functions. All you need to do is add a declare-function statement before ...
Drew's user avatar
  • 78.5k
5 votes
Accepted

When I (byte-compile-file "my-package.el"), can I treat warnings as errors?

The documentation for the customisable variable byte-compile-error-on-warn says: If true, the byte-compiler reports warnings with `error'.
Basil's user avatar
  • 12.5k
5 votes
Accepted

--debug-init changes emacs behaviour

Visit your ~/.emacs.d/init.el file and do M-x check-parens RET. It should show you the unclosed open paren in that file. As for --debug-init, I guess you could M-x report-emacs-bug indicating that ...
Stefan's user avatar
  • 26.6k
5 votes

Can't use soap-client. Package cl is deprecated

Something that is deprecated is not unsupported. So it's not true that you cannot use it. A warning is not, at least in Emacs, an error. It's just a message to let you know something you might not ...
Drew's user avatar
  • 78.5k
4 votes
Accepted

`Warning (bytecomp)` is a bit vague - can I get any more information?

This happens due to display-warning delaying warnings until after init time. By then, the file name and location are no longer known. (defun display-warning (type message &optional level buffer-...
npostavs's user avatar
  • 9,233
4 votes
Accepted

Why does Flycheck complain "mapcar called for effect" when my function returns the result of mapcar by design?

It's mainly just a warning - really a suggestion. It's pointing out that if you don't care to produce a new list from the original one, where the returned list's elements are the results of applying ...
Drew's user avatar
  • 78.5k
4 votes
Accepted

How can I get which packages define certain variables?

From the names. The variable helm-blah-blah-blah is, by convention, defined in the package Helm. c-basic-offset is defined in a package called cc-mode (Ok, they didn’t always follow today’s rules way ...
db48x's user avatar
  • 18.8k
3 votes

How to suppress mu4e warning messages?

Much simpler than I realized: just set mu4e-index-update-error-warning to nil. The docstring: Whether to display warnings during the retrieval process. This depends on the ‘mu4e-get-mail-command’ ...
Dan's user avatar
  • 33.3k
3 votes
Accepted

Python shell warning about readline and completion?

AFAIU that warning only realizes if you call TAB at the end of a symbol, which will try completion. It's just a warning. If Python3's module pyreadline is not installed. Emacs' own completion will ...
Andreas Röhler's user avatar
3 votes
Accepted

dnd-unescape-uri is undefined

Same problem for me after updating org-ref. It is linked to the fix related to the issue mentioned by @Philopolis: https://github.com/jkitchin/org-ref/commit/a7d24f48fe6416162cb1f32d9b87934b9e6c563d ...
maxechstack's user avatar
3 votes

Prevent byte-compiler warnings after requiring features

Here's how I'd do it: (require 'markdown-mode nil 'noerror) ... ... ... (if (fboundp 'markdown-mode) ..use markdown-mode..)
Stefan's user avatar
  • 26.6k
3 votes

How to disable flycheck fringe markers for warnings?

as a workaround I make it invisible by (set-face-attribute 'flycheck-fringe-warning nil :foreground (face-attribute 'fringe :background )) similarly, I removed the underline with (set-face-...
Fabio Dalla Libera's user avatar
3 votes
Accepted

Avoiding warnings of undefined functions while compiling

Node Warning Tips of the Elisp manual tells us: • To avoid a compiler warning about an undefined function that you know will be defined, use a declare-function statement (see Declaring Functions). • ...
Drew's user avatar
  • 78.5k
2 votes
Accepted

Emacs init.el warning

Something in your init file is invoking font-lock-fontify-buffer. You can track it down and see if you want to change it as suggested by the warning. Or you can ignore it. Emacs has added a ton of ...
Drew's user avatar
  • 78.5k
2 votes

emacs lsp-mode python how to disable certain warnings

Use (setq lsp-pyls-plugins-pycodestyle-enabled nil)
Ivan Dimitrov Yonchovski's user avatar
2 votes
Accepted

How to prevent "the function ‘->’ is not known to be defined." warning

-> is a Lisp macro in `dash.el'. Macros don't follow the usual rules for function definition which is likely why you're getting this error. You might be able to do it by explicitly requiring dash in ...
shoshin's user avatar
  • 914
2 votes

Where are these variables defined? - bytecomp Warnings

Those are only warnings, which means that the rest of your code that loads libraries or whatever should still do that. In that case, you can use C-h v to find out where each such variable is defined. ...
Drew's user avatar
  • 78.5k
2 votes
Accepted

Initialization error related to tramp scp function

The problem is very simple: You added ~/.emacs.d/ to your load-path. Remove it from your load-path and things will go back to normal. This directory should not be in your load-path because it does ...
Stefan's user avatar
  • 26.6k
2 votes
Accepted

Source of "Pattern t is deprecated. Use `_' instead" message

pcase (part of cl-lib) generates this message when usage conforms to: (pcase ... ... (t ...) ) To address the message, replace t with _ (which is special to pcase). (pcase ... ... (_ ....
outis's user avatar
  • 208
2 votes

*Compile-log* buffer warning

As long as you only see warnings and not errors, the installation is successful. Compilation warnings are relevant to the author of the package, but usually not to users. Warnings may indicate that ...
Gilles 'SO- stop being evil''s user avatar
2 votes

How do I move the cursor to the *Warnings* buffer whenever there is a new warning?

I am a strong believer in not polluting hooks, especially something so fundamental like special-mode that is used by countless other major-modes. As such, I would recommend not using the special-mode-...
lawlist's user avatar
  • 19.4k

Only top scored, non community-wiki answers of a minimum length are eligible