Questions tagged [cl]
The cl tag has no usage guidance.
21
questions
0
votes
1
answer
49
views
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 ...
0
votes
0
answers
38
views
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. ...
0
votes
2
answers
137
views
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 &...
0
votes
0
answers
130
views
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 TeX_snippets.org buffers:
(defun my/kill-all-buffers-except-toolbox ()
"Kill ...
0
votes
1
answer
19
views
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 ...
2
votes
4
answers
185
views
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 ...
3
votes
0
answers
54
views
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 ...
1
vote
1
answer
69
views
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 ...
0
votes
1
answer
351
views
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-...
0
votes
3
answers
179
views
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 ...
1
vote
1
answer
219
views
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 ...
0
votes
0
answers
85
views
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 ...
10
votes
3
answers
9k
views
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 ...
0
votes
0
answers
39
views
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 https://github.com/modula3/cm3/blob/master/...
0
votes
2
answers
136
views
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
https://github.com/alex-hhh/emacs-soap-client
https://elpa.gnu.org/packages/cl-lib.html
In my init.el I add
(require 'soap-...
1
vote
1
answer
129
views
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
(...
1
vote
2
answers
908
views
Debugger entered--Lisp error: (wrong-type-argument sequencep all) cl-intersection((all magit) all)
I am trying to use magit-delta (https://github.com/dandavison/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:
...
1
vote
1
answer
82
views
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 ...
22
votes
1
answer
6k
views
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 ...
2
votes
1
answer
230
views
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))
...
4
votes
1
answer
1k
views
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 ...