elisp Questions
5
Solved
The only way I found to change margins in emacs to my liking without things acting funny is this:
(add-hook 'window-configuration-change-hook
(lambda ()
(set-window-margins (car (get-buffer-wind...
4
Solved
What are some REPLs for Emacs Lisp?
Is there only one that is within Emacs?
Are there some that run inside terminal outside Emacs?
Winebaum asked 14/7, 2011 at 2:7
4
Solved
I am using thhs code in the .emacs file to permanently enable the hs-minor-mode and to change the shortcut:
(setq-default hs-minor-mode t)
(global-set-key (kbd "C-c C-h") (kbd "C-c @ C-h")) ;;hidi...
7
Solved
I often have my emacs split into about 4 windows so I can look at a bunch of buffers at the same time, however I'd like to be able to C-x 1 (make the window the same size as emacs) and then somehow...
2
Solved
In the mode-line appears the name of the buffer I am working with (argf.rb):
For a buffer visiting a file, is it possible to display the absolute file name (i.e., include the path)?
10
Solved
In Vim the * key in normal mode searches for the word under the cursor. In GNU Emacs the closest native equivalent would be:
C-s C-w
But that isn't quite the same. It opens up the incremental se...
6
Solved
I was reading an article about well-formatted Git commits, and I was wondering how I could apply some of the rules to the Magit log mode.
It seems to use 3 major modes simultaneously: Magit, Log, ...
3
Solved
Let's suppose I have an RGB string (format: #<2 hex digits><2 hex digits><2 hex digits>) like this:
"#00BBCC"
and I'd like to match and capture its <2 hex digits> elements in a more ...
4
Solved
This question is related to another one, Emacs :TODO indicator at left side. I recently came across a minor mode I like a lot called FixmeMode. It supports auto highlighting of TODO marks, and navi...
Bellyband asked 2/3, 2010 at 23:11
7
Solved
I want to customize environment while the specific package is installed properly. How to check whether some package is installed in elisp?
Something like this?:
(if (require 'ecb)
(progn (setq .....
4
Is it possible to display whether or not the caps lock and num lock keys are on in Emacs? The reason why I ask is because I am a one-handed typist and use a FrogPad. The 20 key device uses multiple...
8
Solved
How do I programmatically determine which OS Emacs is running under in ELisp?
I would like to run different code in .emacs depending on the OS.
6
I am trying to write a .dir-locals.el file. I want to dynamically find the directory that the file is in and concatenate it with "TAGS". This was my first try:
((nil . ((tags-file-name . (concat d...
4
I eval a lisp expression in scratch
(+ (/ 1 2) (/ 1 2))
I got a 0.
normally it should be 1.
4
Solved
In Elisp this seemingly easy peace of code does not actually move the point.
(with-current-buffer "foo"
(goto-char (point-max)))
AFAIK with-current-buffer should not restore the point in the ta...
3
Solved
I would like to set up emacs so that it plays a typewriter sounds when typing text into the buffer, as well as a carriage return sound when hitting enter (similar to the Q10 editor on windows). Doe...
4
Solved
I set an explicit file to customization created via the UI. It's named custom.el. Currently, I use the followed snippets to create this file if not exist.
(defconst custom-file (expand-file-name "...
3
Solved
I want the sequence // to start a comment when it is at the beginning of a line. But inside of a line it should not start any comments.
// this is a comment
This is a URL: http://example.com
Is ...
5
Solved
In Emacs lisp there is add-to-list to add a single element to a list (if it doesn't exist already).
Instead of one, I want to add multiple elements. Also, I do not want to filter duplicate elemen...
4
Solved
I would like that my linum-mode numbering is right aligned. The closest thing I've found is on emacswiki, but it doesn't work - it seems to left align the digits instead of right align it. The snip...
4
How do change the font size in spacemacs? Do I need to download additional packages such as source code font?
I tried changing the font size in the configuration file, but the font size does not c...
6
Solved
Can I let Emacs automatically load theme ? or do certain command at customized time ? Say what I want is to M-x load-theme RET solarized-light when I am at office at 9:00am and M-x laod-theme RET s...
2
I'm looking for a way to use time tracking information from org-mode agenda files to build a timetable. Time spent in different tasks would be indicated, grouped by tag and restricted to a given ti...
3
Solved
I don't like how plists are indented in Elisp.
;; current desired Python (for comparison)
;; '(a 1 '(a 1 {'a': 1,
;; b 2 b 2 'b': 2,
;; c 3) c 3) 'c': 3}
Tried on M-x emacs-version 24.3.1, ran e...
Applaud asked 4/3, 2014 at 8:45
3
Solved
(completing-read
"Complete a foo: "
'(("foobar1" "~/foobar1/") ("barfoo" "/usr/barfoo/") ("foobaz" "/hello/")))
As shown above, I would like to prompt for "foobar1","barfoo", and "foobaz" but g...
Iscariot asked 14/2, 2016 at 10:29
© 2022 - 2024 — McMap. All rights reserved.