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.2k
10 votes
Accepted

Difference between pcase-let & cl-destructuring-bind?

cl-destructuring-bind was designed more or less specifically to destructure data made of cons cells. pcase-let on the other hand is just a special case of pcase which was designed to handle arbitrary ...
Stefan's user avatar
  • 26.5k
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
  • 78k
5 votes
Accepted

Package cl is deprecated, is there any easy fix for it?

It looks like the code comes from Steve Purcell's emacs.d. He actually updated it to use cl-lib now, so you can try his more recent version: (defun sanityinc/add-subdirs-to-load-path (parent-dir) &...
Manuel Uberti's user avatar
3 votes

Does elisp have a way to jump to (goto) labels in the code, ala common lisp's go?

It works exactly the same, we just need to use cl-tagbody instead. (cl-tagbody (setq val 2) (go lp) (incf val 3) lp (incf val 4)) val 6
HappyFace's user avatar
  • 830
3 votes
Accepted

Setf and pushnew do not work on slot "options" of org-export-backend defined by cl-defstruct

Macroexpansion of the body of with-eval-after-load happens eagerly, i.e. before ox-ascii is loaded. So at that time, the slot is not defined and the setf/cl-pushnew macroexpander doesn't know what to ...
Stefan's user avatar
  • 26.5k
3 votes

Package cl is deprecated, is there any easy fix for it?

Just remove the first line, which loads the cl package, and then fix any errors that result. In particular, functions like remove-if-not are now called cl-remove-if-not, and are always available (...
db48x's user avatar
  • 18.4k
2 votes
Accepted

Matching against variable keys in `cl-case`

That behavior is actually described there, albeit in terse form: "Macro: cl-case keyform clause...": cl-case is a macro, macros do not evaluate their arguments. "This macro evaluates ...
wasamasa's user avatar
  • 22.2k
2 votes
Accepted

Debugger entered--Lisp error: (wrong-type-argument sequencep all) cl-intersection((all magit) all)

It looks like this is not related to magit-delta but rather to your magit installation. I would first uninstall magit-delta and magit, and then re-install magit, and see if the error persists. If you ...
5fec's user avatar
  • 196
2 votes
Accepted

Reading Common Lisp Source Code Inside Emacs?

One part of this puzzle to to get comfortable access to the Common Lisp HyperSpec. This snippet from my init explains how to get an info version with index: ;; Set up hyperspec lookup. This is ...
Fran Burstall's user avatar
2 votes

How do I properly use keyword/named arguments in a macro with cl-defmacro?

While not very intuitive, the error in the first value is expected. Per the manual ((info "(cl) Argument Lists) inside of Emacs): The third section consists of a single rest argument. If more ...
schschsch's user avatar
2 votes
Accepted

Accessing nested array elements from a class object

defstruct creates an accessor function for every field; you don’t need to know the field offset. Just call org-noter--session-notes-file-path, or whatever accessor you need (it’s not entirely clear ...
db48x's user avatar
  • 18.4k
2 votes

How did `cl-flet` got circumvented?

You are out of luck here; this is the correct intended behavior. #'counsel-fzf-action refers to the global function definition of counsel-fzf-action, not the local one. The cl-flet binding is local, ...
sds's user avatar
  • 6,124
1 vote
Accepted

Using advice-add to redefine a function call within another function

(defun YOUR/fn () (YOUR/insert)) (defun YOUR/insert () (insert "233")) (advice-add 'YOUR/fn :around (lambda (fn &rest args) (let ((old-def (symbol-...
shynur's user avatar
  • 5,538
1 vote

Reading Common Lisp Source Code Inside Emacs?

Package clhs provides a C-h binding option for looking up CL symbols in the CL HyperSpec: https://gitlab.com/sam-s/clhs
Phil Hudson's user avatar
  • 1,796
1 vote

Reading Common Lisp Source Code Inside Emacs?

Perhaps someone will answer that there's a 3rd-party package that helps with what you ask: interact with the Common Lisp doc using some C-h key(s). I'm not aware of any (but you can use eww to browse ...
Drew's user avatar
  • 78k
1 vote

How to override read-only slot of cl-defstruct?

I think I figured it out. I dug into code and tried learning how oset works. Usually, to set a slot value you'd call it like this: (oset stupid-toy color 'green), but in my case it wouldn't work, ...
iLemming's user avatar
  • 1,273
1 vote

How did `cl-flet` got circumvented?

There are many options for overriding functions, with many different behaviours. https://stackoverflow.com/questions/39550578/in-emacs-what-is-the-difference-between-cl-flet-and-cl-letf will probably ...
phils's user avatar
  • 51.7k
1 vote

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

You're using Emacs 26, and the cl-lib version you're referring to is for Emacs 24. Use the built-in package manager: M-x list-packages. Emacs 26 will probably have cl-lib 1.0 already installed. The ...
algn2's user avatar
  • 31
1 vote

Debugger entered--Lisp error: (wrong-type-argument sequencep all) cl-intersection((all magit) all)

cl-intersection expects sequences, that is, things that satisfy predicate sequencep as its arguments. Instead, it received the list (all magit) and the symbol all as arguments. That's what the error ...
Drew's user avatar
  • 78k
1 vote

Does declare-function recognize functions declared via cl-defun?

At first note that check-declare-verify actually has a pattern for cl-defun in its regexp. So it should work. If it does not maybe you should double-check and report an error if your code is not the ...
Tobias's user avatar
  • 33.3k

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