Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [quote]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
60 views

Using add-to-list with a list passed as a function arg

I need to build a function that, among other things, modifies, using add-to-list, a list that is passed as an argument to the function itself. I understand that the list passed as an argument is ...
Gabriele's user avatar
  • 1,660
0 votes
2 answers
55 views

so-long not detecting a long line in compilation output

I am trying to use so-long to improve the performance of compilation-mode when the compiler output contains very long lines (1000s of characters). When the compilation runs and I M-x so-long-minor-...
AnoE's user avatar
  • 450
0 votes
0 answers
26 views

How do I add an option to quote blocks to preserve newlines?

Some blocks such as begin_verse or begin_example preserve newlines. But the begin_quote block does not and we need two new lines to create a new line in the exported HTML. What's the best way to have ...
HappyFace's user avatar
  • 860
0 votes
1 answer
41 views

Creating custom minor mode with keybindings

I've written my first custom elisp function for dealing with the output from grep. (defun open-at-grep () (interactive) (let ((thisline (buffer-substring-no-properties (line-beginning-position) (...
Elliot's user avatar
  • 103
2 votes
1 answer
199 views

Enable Lexical Binding by Binding “lexical-binding” to t

(Please see what is letrec first.) The following code is obviously fine and self-explanatory: ;; -*- lexical-binding: t; -*- (setq post-self-insert-hook `(,@(when (boundp 'post-self-insert-hook) ...
shynur's user avatar
  • 5,578
0 votes
1 answer
48 views

Elisp construct

What is this construct in elisp ? '( ("approx" "approximately") ("appt" "appointment") ("apt" "apartment") ("dept" &...
Dilna's user avatar
  • 1
1 vote
1 answer
129 views

How can I change color of quoted text in org mode?

When I use #+BEGIN_QUOTE.. #+END_QUOTE text in between always shown as white. Example output: Related: how to markup a quotation? Is it possible to change color of the quoted text such as to dimmer ...
alper's user avatar
  • 1,420
0 votes
0 answers
16 views

constructed entry file path in org-capture-templates [duplicate]

I have just started to use org-mode and I am tweaking an existing configuration to my needs. In that configuration, the code is itself in an org file and the org-capture-templates is splited in a lot ...
Seki's user avatar
  • 157
0 votes
1 answer
28 views

face-attribute function returning strange cons with "quote", causing htmlfontify-buffer bug: 'invalid face: quote'

I've been debugging an error when I call htmlfontify-buffer on my *shell* buffer or SLIME. I found out the problem seems to be a value returned by the face-attribute function that seems to be a cons ...
Renato's user avatar
  • 103
9 votes
1 answer
2k views

Warning: quoted with ' rather than with #'

After switching from Emacs 25 to Emacs 28 I started to get this warning message during the loading of my custom settings .emacs.d/init.el: Warning: (lambda nil \.\.\.) quoted with ' rather than with #'...
PinkCollins's user avatar
-2 votes
2 answers
61 views

Passing variable to function and changing its value

The following function is intended to ensure that a variable defined in a defvar is constrained within a numeric range. I do not want to hardwire the modification of conshine-verbiage, so one can pass ...
Dilna's user avatar
  • 1
1 vote
1 answer
174 views

Why does org see this source block as having "unbalanced parentheses"?

Here is a terse snippet with which you can recreate the issue, I hope: #+begin_src sh for x in $(for y in $(cmdA '"'); do cmdB $y; done); do cmdC $x; done #+end_src Here if I try to operate with ...
theherk's user avatar
  • 113
1 vote
1 answer
32 views

How to pass a variable to a click handler?

I'm using this code to make clickable text in a buffer: (defun q() "Entry point." (interactive) (let ((buffer-name "q")) (get-buffer-create buffer-name) (switch-to-...
gdonald's user avatar
  • 167
1 vote
1 answer
48 views

function accepts string literal, but not the result of expression

In my init.el I have a series of programming language specific hooks that I use to add font-lock patterns (namely adding a header style font to some of my comments). Here is an example for c-like ...
Murad's user avatar
  • 13
2 votes
1 answer
321 views

Why is :box on set-face-attribute not getting the current value from (face-background)?

Why is :box not getting the current background color?. It doesn't even work if I setq a variable with the color hardcoded, but if I set the hex color as a literal it works perfectly. If I evaluate ...
Fabman's user avatar
  • 588
3 votes
1 answer
679 views

How can I insert the backslash character ( \ ) before quotation marks (" ") in Emacs?

I am running Emacs and writing on the scratch-buffer. This is my config file. After executing describe-mode, this is the list of minor modes running: Enabled minor modes: Auto-Composition Auto-...
Pedro Delfino's user avatar
2 votes
1 answer
57 views

Key binding to `C-<` and `C->` not working when creating minor mode

I wrote a couple of functions to automatically convert sequences like "<<" in «. (Yeah, I know that input methods can do the same, but I don't want the extra bindings: I'm planning to ...
Alessandro Bertulli's user avatar
0 votes
1 answer
362 views

Why is this function name causing “Invalid function” when in a list for `dolist`?

How can I use dolist to repeat an operation for each item in a list? I have a sequence of statements: (put 'downcase-region 'disabled nil) (put 'upcase-region 'disabled nil) (put 'narrow-to-defun '...
bignose's user avatar
  • 639
1 vote
1 answer
68 views

Process of packages loading

It seems I totally do not understand the mechanism of package loading in Emacs. I have in my init.el something like this: (use-package elpy :ensure t :init (elpy-enable) :config (defalias '...
Alex's user avatar
  • 155
0 votes
1 answer
57 views

Why is (eq (car '('x)) 'x) => nil

Context In notmuch there is the a function that reads the :search-type property from a list and compares it to a symbol. This comparison is always nil for 'tree' / 'unthreaded, even though saved-...
Jens's user avatar
  • 103
0 votes
1 answer
30 views

Function argument does not seem to be visible inside of function

I use this code (found here) to highlight a single line in black: (defun find-overlays-specifying (prop pos) (let ((overlays (overlays-at pos)) found) (while overlays (let ((...
UTF-8's user avatar
  • 917
2 votes
2 answers
300 views

Does Emacs have a builtin way to fix curly quotes' orientation?

I am working on a package that makes an API call and gets strings with improperly oriented curly quotes, e. g., The word ’syneresis’ comes from Greek roots meaning ’take’ and ’together’. Is there a ...
scribe's user avatar
  • 1,045
0 votes
1 answer
90 views

Expand variable and transform it in a quoted list

The function cycle-themes have cycle-themes-theme-list as a quoted list, e.g., (setq cycle-themes-theme-list '(tsdh-light wheatgrass whiteboard womba)). At the same time, (custom-available-themes) ...
BuddhiLW's user avatar
  • 297
3 votes
1 answer
375 views

Call random function from list

I have a list of interactive functions and want to call a random one of them. In the end I expect to have a function that randomly changes the capitalization of the word at point (without moving the ...
Kaligule's user avatar
  • 339
1 vote
0 answers
21 views

Passing string as arg to apply function [duplicate]

I want to call clone-indirect-buffer or clone-indirect-buffer-other-window within a function dependent on the prefix. To do this, I assign the appropriate clone function to a variable using let. ...
Lorem Ipsum's user avatar
  • 4,527
1 vote
1 answer
80 views

Activate a minor mode switching off the other ones in a set of minor modes

I'm developing a set of minor modes that I use in my LaTeX copy-editing work. I have, e.g.. a list of three minor modes stored in a variable: (defvar latex-editing-mode '(preamble-editing-mode ...
Gabriele's user avatar
  • 1,660
1 vote
2 answers
195 views

String-match: symbols variable void

I am trying to write a small function where I extract two sub-strings from a cite-key, e.g. cite:rammstein2017paris. (defun citekey-get-author-and-year () "Get the _author_ and _YEAR_ ...
jsteinbach's user avatar
0 votes
0 answers
35 views

What's the difference between ' (quote) and ` (grave accent) [duplicate]

I've seen both used to quote symbols and list. What's the difference between them? When should I use one or the other?
honestSalami's user avatar
0 votes
1 answer
94 views

Invalid function in font-lock-fontify-keywords-region [duplicate]

Why do I get the error: font-lock-fontify-keywords-region: Invalid function: (concat "\\\\" (regexp-opt (quote ("cs" "hepth" "hepph" "heplat" "...
Gabriele's user avatar
  • 1,660
0 votes
1 answer
37 views

Disable quote replacement in sgml-mode

In sgml-mode, when I type quotes ", they are automatically replaced by &#34;. The culprit is the function sgml-name-self. Perhaps it is called automatically on characters in the variable sgml-...
Arseniy Tsipenyuk's user avatar
1 vote
1 answer
1k views

string-join list with function as list member

I want to string-join a list of strings, one of which is returned by a function call. Like this: (defun foobar () "foobar") (string-join '("foo" (foobar) "bar") "|&...
Johannes Mueller's user avatar
0 votes
1 answer
40 views

Why has my .custom file changed between `(quote` syntax and the `'` syntax and how to convert between the two?

I use the same .custom file on different machines syncronised via a git repo. I just noticed that suddenly the .custom file from one machine uses the (quote syntax while in the past the ' syntax was ...
halloleo's user avatar
  • 1,355
5 votes
1 answer
236 views

How to force filename completion in shell buffers to use quotes instead of backslashes

I have a directory with the file a file name with spaces and in Emacs I have a bash in a shell buffer. Rhen I type ls a<TAB> and shell mode completes to a\ file\ name\ with\ space However I ...
halloleo's user avatar
  • 1,355
2 votes
0 answers
142 views

Why did I get the U+2019 right single quotation mark not plain ASCII single quote in C mode?

In Emacs under C mode, why did the single quote key give me a U+2019 right single quotation mark, not a plain ASCII single quote? (That was corrected by a bot https://stackoverflow.com/posts/64104679/...
Tim's user avatar
  • 5,027
2 votes
2 answers
149 views

Unquoting a variable name (to implement variable pointers)

I know that if I have a variable with a function name, I can call it using funcall, like this (setq func-ref 'my-func) (funcall func-ref) I am wondering if there's a similar functionality for ...
Tohiko's user avatar
  • 1,649
1 vote
1 answer
266 views

Wrong type argument: symbolp, 10

I would like create function that ask me how length I want the Pomodoro but it say wrong type argument. (defun changePomoLength () (interactive) (set-variable org-pomodoro-length (read-string "...
moanrisy's user avatar
4 votes
2 answers
456 views

Is it possible to selectively disable syntax highlighting rules?

The context : GNU Emacs 26.1 working on Debian 10.3 currently editing YAML files (Ansible code) Here's how my code looks like : As you can see, the syntax highlighting is puzzled by the odd number ...
Httqm's user avatar
  • 151
2 votes
1 answer
359 views

eval and quotes

I am trying to execute the code here, which I copy below (defun buffer-local-set-key (key func) (interactive "KSet key on this buffer: \naCommand: ") (let ((name (format "%s-magic" (...
Tohiko's user avatar
  • 1,649
0 votes
2 answers
228 views

What is #'eq and how does it differ from 'eq [duplicate]

I've seen a few snippets of code where symbols were prepended by #' instead '. like the following snippet (seq-count #'not (seq-mapn #'eq seq1 seq2)) What is the difference and why couldn't I just ...
GreenLlama's user avatar
0 votes
1 answer
409 views

which-function-mode and modified mode line

I modified my mode-line, but now which-function-mode stopped working: nothing is displayed. Code: (setq mode-line-position (list '(:eval (propertize "L%l " 'face nil 'help-echo "Line number")) ...
GrB's user avatar
  • 217
1 vote
1 answer
179 views

How to allow a sexp within a quoted list to be evaluated? [duplicate]

(setq a 2) (setq l '(a b c)) (car l) Got a when evaluating this, and why its value not 2 ?
FaiChou's user avatar
  • 113
1 vote
1 answer
51 views

Basic quote regex for font-locking?

I have my own font locking that highlights quotes in comments eg. /* Some comment 'this is quoted' * more 'text in an escaped \` quote'. * Plurals such as Moe's or Joe's should work too. */ ...
ideasman42's user avatar
  • 8,935
1 vote
2 answers
84 views

' versus #' what are the differences and when should I choose one over the other? [duplicate]

Both seem to work equally well when mapping a function over a list, for example. (mapcar #'1+ (list 1 2 3)) ;; => (2 3 4) (mapcar '1+ (list 1 2 3)) ;; => (2 3 4)
user23842's user avatar
0 votes
2 answers
170 views

Symbol's value as variable is void: ‘yes-or-no-p

I have the following lines in my config file: (fset 'yes-or-no-p 'y-or-n-p) (setq confirm-kill-emacs ‘yes-or-no-p) The latter line is what's throwing the error. I would like to be able to use 'y-or-...
alecvn's user avatar
  • 419
0 votes
1 answer
68 views

The difference between (setq shell t) and (shell . t)

Upon configuring babel, encounter such syntax (require 'ob-ipython) (org-babel-do-load-languages 'org-babel-load-languages '((ipython . t) (python . t) (shell . t) ;; other languages.. )...
Wizard's user avatar
  • 1,261
1 vote
0 answers
47 views

why does this function keep updating the same result? [duplicate]

I am trying to do the following exercice: Given a DNA string, compute how many times each nucleotide occurs in the string. DNA is represented by an alphabet of the following symbols: 'A', 'C', ...
little-dude's user avatar
3 votes
1 answer
216 views

regexp: exclude repeated characters for highlight - hi-lock-mode

I want to search using regexp to capture plain text. I want to capture passages that begin with opening quotation marks and end at the end of the paragraph, and even though the quote continues onto a ...
Chris's user avatar
  • 57
2 votes
2 answers
2k views

Invalid read syntax "#"

I'm having trouble using: (add-hook ’before-save-hook #’gofmt-before-save) This is supposed to format the go code before saving. The error I get is: Debugger entered--Lisp error: (invalid-read-...
Erik Bennett's user avatar
0 votes
0 answers
16 views

highlight-regexp(s) with looping over an alist [duplicate]

Although these two expressions seems to be equivalent (both works): ;; 1 (highlight-regexp "foo" "hi-green") ;; 2 (highlight-regexp "foo" 'hi-green) Only the first one of the following loops works ...
Gabriele's user avatar
  • 1,660
9 votes
1 answer
2k views

When to use quote for lists? Modifying quoted lists in Elisp

The Common Lisp Hyper Spec says: The consequences are undefined if literal objects (including quoted objects) are destructively modified. This is further motivated at the Constant Modification ...
Tobias's user avatar
  • 33.4k