Questions tagged [insert]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6 votes
1 answer
1k views

Insert into specific buffer (not the active buffer)?

Is there any way to insert text into a buffer that isn't the active buffer with Elisp? Perhaps there is an equivalent to with-temp-buffer that takes a specific, existing buffer as an argument?
  • 949
6 votes
2 answers
200 views

Key bound to string does not handle some chars in string correctly

(I ask this question after reading this one.) The form (global-set-key (kbd "M-e") "e") is, as far as I can tell, equivalent to (global-set-key (kbd "M-e") (lambda () (interactive) (insert "e"))) ...
  • 4,133
6 votes
3 answers
973 views

How to insert a specific number of newlines in org-mode

Inside org-mode, RETURN is bound to (org-return &optional INDENT). This command apparently ignores C-u numeric prefixes and so if you want to enter 10 newlines, you can't just type C-u 1 0 RET and ...
4 votes
1 answer
422 views

How can I type simple underline "_" in Auctex

I am using Auctex in Aquamacs. Everytime I type underline "_", it will show as $_{}$ automatically which is very annoying. I am wondering how could I turn off this function. Thanks.
  • 93
3 votes
2 answers
740 views

Is there a way to get a Unicode character by name?

Is there a way to get a character by name (e.g. GREEK SMALL LETTER LAMBDA) instead of by code point (\uX3BB)?
1 vote
1 answer
250 views

How to create a file from a template if it does not exist or open existing copy?

Trying to make a function that I can call to create a file from a template or open an existing file. Current attempt is as follows: (defun journal-entry () (interactive) (let ((daily-name (format-...
0 votes
1 answer
430 views

Run command after each type/insert in particular buffer

I'm implementing a (optional, de-activable) real-time syntax checker. Each time the user types/deletes anything, I want to run my spell-checking funtion : I tried (add-hook 'post-self-insert-hook '...
  • 853
0 votes
2 answers
238 views

AUCTeX LaTeX-math-mode outside a mathematical environment

Using AUCTeX with LaTeX-math-mode enabled, if I type (say) ` a inside a mathematical environment, it inserts \alpha, as I want. But if I do it outside a mathematical environment, it inserts \alpha{}. ...