Questions tagged [cl]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

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

The function outshine-cycle (part of Outshine) calls the function indent-relative. I would like that instead, it called the function indent-for-tab-command. To do this, I want to advise the function ...
scaramouche's user avatar
  • 1,772
0 votes
0 answers

When using `cl-labels` or `cl-flet` shouldn't the compiler catch signature msmatches

I was expecting a compilation error for the snippet below... unfortunately compilation goes through without any errors, but it errors during runtime. Run-time error is expected, so no surprise there. ...
user avatar
0 votes
2 answers

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

I'm trying to use cl-defmacro, with the supposed benefit of having optional arguments specified with keywords. However, I'm not getting the outcome I would expect. (cl-defmacro asd (a &rest body &...
aaa's user avatar
  • 426
0 votes
0 answers

Problem with remove-if and cl-remove-if

I have a very useful bit of code in my .emacs file which closes all buffers except the current one, and scratch and buffers: (defun my/kill-all-buffers-except-toolbox () "Kill ...
sgmoye's user avatar
  • 179
0 votes
1 answer

Accessing nested array elements from a class object

I am trying to access elements within the array generated by defstruct. More specifically, I would like to access the NOTER_DOCUMENT file path from org-noter's org-noter--session variable. The only ...
Sati's user avatar
  • 775
2 votes
4 answers

Reading Common Lisp Source Code Inside Emacs?

I think emacs is just brilliant. The help functionality with C-h is extremely useful. Recently, I started coding in SB Common Lisp. It would be very useful if I could search the definitions of ...
Vinn's user avatar
  • 283
3 votes
0 answers

How to advise a CL method?

I am familiar with setting advice on a function: (advice-add 'some-tag :before 'function-being-advised (lambda (arg) (message "In advice with arg: %s" arg))) How do you advise a ...
Troy Daniels's user avatar
1 vote
1 answer

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

I'm dealing with a third-party package that uses Structures - cl-defstructs. One of the slots is :read-only t. I need to override that. I need to find a way to change the value in that slot and then ...
iLemming's user avatar
  • 1,233
0 votes
1 answer

Use of cl-defun

What is a use case for cl-defun, where defun wouldn't work or would be hard to work with? I am using it to count the number of opening and closing bracemarks. (cl-defun rk-bracemark-count-from-...
Dilna's user avatar
  • 1
0 votes
3 answers

How did `cl-flet` got circumvented?

I want to slightly alter the behavior of counsel-fzf by locally changing the definition of counsel-fzf-action, which activates in the end of the definition of the former. See the source code of ...
Student's user avatar
  • 225
1 vote
1 answer

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

Does elisp have a way to jump to (goto) labels in the code, ala common lisp's go? (tagbody (setq val 2) (go lp) (incf val 3) lp (incf val 4)) => NIL val => 6 PS: This is a ...
HappyFace's user avatar
  • 791
0 votes
0 answers

Org-journal: keeping LOGBOOK drawers when TODO items are carried over

I use org-journal to keep track of my taks (using org-clock). Org-journal has the option to carry over TODO items from previous dates. For example, lets say that on Monday I work on my report, and I ...
Julian Burgos's user avatar
10 votes
3 answers

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

For the warning of Package cl is deprecated is there any easy fix for it? Here is a piece of code I copied from somewhere (that I don't know how to fix): (eval-when-compile (require 'cl)) (defun ...
xpt's user avatar
  • 457
0 votes
0 answers

Using the Modula-3 mode from CM3 I get "Package cl is deprecated". Any replacement?

I get the message that "Package cl is deprecated" when trying to use the Modula 3 mode from [email protected]:modula3/cm3.git. The file in question is
vonbrand's user avatar
  • 101
0 votes
2 answers

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

Emacs 26.3 CentOS 7.0 Install packages soap-client 3.2.0 and cl-lib 0.6 In my init.el I add (require 'soap-...
a_subscriber's user avatar
  • 3,916
1 vote
1 answer

Matching against variable keys in `cl-case`

In cl-case clauses (though naturally not the initial keyform), keys are apparently quoted: (let ((mark ?.)) (case mark (mark 'mark) (?. ?.))) ; 46 (?.) (let ((mark ?.)) (case 'mark (...
outis's user avatar
  • 178
1 vote
2 answers

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

I am trying to use magit-delta ( I am using GNU Emacs 26.3. When I add following line ( (magit-delta-mode 1) )into the .emacs file, I get following error: ...
alper's user avatar
  • 1,300
1 vote
1 answer

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

It seems that declare-function + check-declare-file do not recognize functions defined via cl-defun. I was happy using declare-function because it comes with check-declare-file that actually checks ...
phs's user avatar
  • 1,105
22 votes
1 answer

How do I debug `Package cl is deprecated`?

While compiling an Elisp package from github, I get the Warning: Package cl is deprecated How do I find out what triggers it? The specific file that triggers this is tiny and has no CL code. I ...
sds's user avatar
  • 5,958
2 votes
1 answer

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

Org-mode export backends are defined as instances of the cl structure org-export-backend: (cl-defstruct (org-export-backend (:constructor org-export-create-backend) (:copier nil)) ...
Tobias's user avatar
  • 32.8k
4 votes
1 answer

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

I noticed both pcase-let and cl-destructuring-bind seem to perform the same operation. Is there any difference or reason to use one instead of the other? eg: (pcase-let ((`(,filename ,buf) (pop ...
ideasman42's user avatar
  • 8,546