All Questions

Filter by
Sorted by
Tagged with
13
votes
1answer
2k views

Excessive line spacing with certain fonts

For a long time I've been using DejaVu Sans Mono as my programming font. I've yet to find a better font. But a little while ago I discovered Mozilla's Fira, which looks very nice for code. So I ...
1
vote
2answers
384 views

Regexp to font-lock numbers but not strings?

I would like to have my dollar sign yellow coloured. So after searching around, I learnt that the Emacs regex's are different from default regexs. After a while, I got this worked: (defface font-...
1
vote
2answers
363 views

Smart minor mode toggle depending on major mode

I use several minor modes, which are enabled globally by default: whitespace-mode linum-mode fci-mode I'm finding them very helpful when editing code sources and text files, however I does not want ...
8
votes
1answer
2k views

Adding “date completed” timestamp in org-mode

In org-mode, I would like to add a timestamp to a TODO marking the date completed. What is the best way to do this?
24
votes
4answers
7k views

Understanding SCHEDULED in Org mode

I've read the various manual pages about DEADLINE and SCHEDULED, and have used them both. I understand that DEADLINE is used in the Agenda to alert in advance about an upcoming deadline, and to ...
33
votes
2answers
6k views

Do I still need GNU ELPA if I have MELPA?

This has always confused me, since people are saying that MELPA does have newer versions of packages, but it's not really clear, if GNU ELPA is just a subset of MELPA, or if I do need both? The ...
0
votes
1answer
153 views

How to disable scroll lock when moving point

A strange behaviour happens when I move up or down the point (using the keyboard): Emacs automatically scrolls up or down whenever I pass a certain line threshold. See here: When moving down, at line ...
17
votes
3answers
5k views

How to get element number in a list?

Q: how do I get the element number in a list? nth gets element number n from a list: (nth 2 '(a b c d)) ; => c I'd like to do the reverse: get the element number given the ...
4
votes
3answers
549 views

Predicate function for dotted pairs?

Q: is there a predicate function for dotted pairs? In other words, is there a function that distinguishes between dotted pairs and 2-element proper lists: (some-predicate-p '(a . b)) ; =&...
4
votes
1answer
751 views

Order of evaluation of nested macros and backquotes

I read https://github.com/lunaryorn/blog/blob/master/posts/byte-compiling-eval-after-load.md which contains this code: (defmacro stante-after (feature &rest forms) `(,(if (or (not byte-compile-...
2
votes
2answers
6k views

cannot install auto-complete package

I am trying to install package auto-complete. But when I typed M-x package-install [ret], then emacs showed "contacting host: elpa.gnu.org:80". After a while, it showed "Install package". Then I typed ...
0
votes
1answer
79 views

cancel outputing in pdb in emacs

In python-mode, I invoke pdb on a python script by M-x pdb script.py. I then type c to run till a breakpoint, and hit the name of a big list. It keeps on printing the content of the list in the buffer ...
1
vote
2answers
187 views

elisp function to insert signature at point or at end, according to the prefix parameter

Under GNU Emacs 24.4.1, in Message Mode, C-c C-w runs message-insert-signature, which inserts the file message-signature-file at the end of the buffer, if such a signature is not already present. How ...
3
votes
1answer
1k views

Wrong letter spacing when using certain fonts

I'm using Classic Console font in buffers. Unfortunately for some reason letter spacing is terrible in Emacs while being correct in Konsole and other programs. Text in Emacs: Text in Konsole (using ...
0
votes
2answers
261 views

Emacs server exit when losing connection to Xserver

I run Emacs on development host under X Window as: $ emacs24 with ~/.emacs: (require 'server) (server-start) Next when I connect to Emacs as: $ ssh -Y localhost ssh$ emacsclient -c C-x C-c ssh$ ...
9
votes
1answer
762 views

why doesn't emacs support key up/down events

AFAIK emacs does not support keyup/keydown events, only keypressed. An example of a consequence is that when we want to mark a region we have to first set a mark set-mark-command and can then mark the ...
8
votes
1answer
1k views

Turn on projectile-mode only for files in actual projects

Projectile is pretty great, but I'm finding it difficult to have it turned on only in places where it would be effective. As I understand it, the two standard choices are to turn it on manually, as ...
8
votes
2answers
1k views

Japanese / CJK font settings for proper horizontal alignment

I've had this right at one point in the past on one machine with a certain font type at a particular font size, but I can't seem to get it right again. Look e.g. at how my org mode tables look once I ...
4
votes
2answers
1k views

Viewing org-journal entries

I have installed org-journal and it seems to work well to create entries. However, I can't find and view them again. The documentation on EmacsWiki says to view the entry: In calendar view: j to ...
2
votes
1answer
240 views

Unicode and `url-unhex-string` and something like \345\205\266\344\273\226

I need to use Emacs built-in url.el url-unhex-string to decode uri (e.g. /%E5%85%B6%E4%BB%96/other) It works, but all non-ascii (I guess it should be Unicode) characters are all converted into ...
1
vote
0answers
99 views

How can I print a full reference using reftex?

I would like to embedd full references of BibTeX entries in selected sections of my org-mode files or at least have the ability to quickly open the full reference in a new buffer. How can I do that? ...
3
votes
1answer
2k views

What is the difference between reftex-citation and org-reftex-citation?

What is the difference between reftex-citation and org-reftex-citation? And where can I find the documentation for org-reftex-citation referenced in this answer? [1] Emacs manual: Creating citations
6
votes
1answer
805 views

Run hook on new buffer

I am trying to create something like uniquely, which renames the buffer to the full path within the projectile project. I have the code working, however, I can't seem to figure out how to get it to ...
9
votes
1answer
234 views

How do I verify a large package in a git repo is safe?

I'm looking at emacs helm specifically, which has the following properties: it has thousands of commits it is largely maintained by one user the maintainer has no other profiles (social media, etc.) ...
0
votes
1answer
757 views

Why is emacs saying my theme is undefined?

I'm pretty new to emacs customization and lisp, so I don't really know how to debug this problem. I'm trying to install a custom theme. Here's a link to the .el file. The theme's load-path is set ...
0
votes
1answer
491 views

Graphical Glitch/Screen Tearing in Emacs

I'm currently having difficulty with a graphical glitch in Emacs 24.4.1. Occasionally all the text in my current frame will tear, and I'll have to force Windows to redraw everything by covering up the ...
0
votes
0answers
164 views

Conventional implementation of display-buffer-above-selected

Despite respectable variety of display-buffer-* functions some of them stand out with lack of flexibility, such as display-buffer-at-bottom or display-buffer-below-selected that exist in absence of ...
5
votes
1answer
2k views

Are there any games to kickstart learning emacs like VIM Adventures?

I am a newbie in emacs and have heard a lot about how powerful emacs is. But the leaning curve seems to be quite steep. If there was a fun way to learn emacs (something like the game VIM adventures) ...
10
votes
3answers
1k views

hl-line-mode hide background, how to avoid this?

With: (when window-system (set-face-background 'hl-line "light yellow") (global-hl-line-mode 1)) current line highlighted by yellow background, but if text has background properties it also ...
8
votes
2answers
410 views

How can I match “snake_case” automatically when I search for “snake-case” by mistake?

I frequently mistype "_" as "-" when doing a quick isearch-forward. E.g. I'm looking for snake_case and accidentally type C-s snake-case and get no results. Best case I notice quickly enough and don'...
13
votes
3answers
14k views

How to set the default font size?

I find myself consistently zooming out (C-x C--) in every buffer that I am using in order to see more lines of code that I'm working on. Is there a way to set the zoom level in my .emacs, not ...
3
votes
1answer
402 views

How to find out if variable is buffer-local?

I'm trying to get rid of tabs, following this guide: (setq-default indent-tabs-mode nil) So: why setq-default and not setq? I know I would need to use setq-default for a buffer-local variable, but I ...
1
vote
1answer
271 views

Look up where package came from

My .emacs file includes a line I presumably added ages ago (require 'some-random-package) I haven't actually been able to learn anything about the package. My load-path is quite complicated (it ...
5
votes
1answer
173 views

How can I fontify a symbol by regexp match group (as in a naming convention)?

I want to add better support for expl3 to AUCTeX. I have regular expressions that properly group according to the naming conventions for: functions (\\(?:__)?[a-z]+_)([a-z_]+)(:[nNpTFwcVvxof]*), ...
13
votes
1answer
6k views

Get Company to show suggestions for Yasnippet names

I use the packages Company mode and Yasnippet. When I'm typing in a buffer, I get autocompletion suggestions from Company. For Yasnippet, I have a directory which contains the snippets. In that ...
2
votes
0answers
740 views

Cannot load auto-complete library

I have installed auto-complete in the /Users/angeldelcastillo/.emacs.d/auto-complete directory following the instruction on the website, using install.el. The process finishes all right, but when I ...
3
votes
1answer
136 views

How can I use the console's menu-bar while running under xwindows?

I like the variable font size feature that emacs has under xwindows. But, I dislike the menus under xwindows. They are generated by GTK or something and they stick out like a sore thumb. Can I use ...
23
votes
2answers
3k views

Org Mode link to open directory in Dired

I'd like to have a link like [[file:~/projects][Projects]] open directly in Dired rather than Finder (I'm on a Mac), which is what it does now. Is there a way? (Of course there's a way. It's ...
3
votes
1answer
895 views

How can I hide a code block in the latex output?

I have the following line at the start of an org file to configure it to use listings for code blocks. #+name: setup-listings #+begin_src emacs-lisp :results silent :export none (setq org-latex-...
2
votes
1answer
154 views

set-transient-map oddity for emacs -nw

I have this tester code: (defvar dbg-vec nil) (defun foobar () (interactive) (message "%S" (setq dbg-vec (this-command-keys-vector)))) (set-transient-map '(keymap (left . foobar) ...
5
votes
2answers
372 views

How can I stop org-mode treating a number followed by a full stop as a bullet point?

I'm using org-mode to write some documentation. After changing some wording, fill-paragraph has arranged things so there's a number followed by a full stop at the start of a line. Like this: Blah ...
0
votes
0answers
544 views

Wrong indent in c-mode and c++-mode

In my coding style tabs used to indent and spaces for align. I've configure Emacs for this, but some times emacs places 4 spaces instead of tabulation in some blocks of code. If can be fixed by ...
3
votes
2answers
451 views

emacs -nw -q takes long time

emacs -nw -q or emacs -nw -Q takes more than 10 seconds to start in terminal, but the result of M-x emacs-init-time is 0.0 seconds, and the emacs takes shorter time (still more than 5s) than emacs -nw ...
4
votes
0answers
2k views

Doc-view not working despite gs being in my path

I have trouble getting the doc-view-mode displaying pdfs. Here's the error message generated : No PNG support is available, or some conversion utility for pdf files is missing. From what I've ...
1
vote
1answer
352 views

Toggling maximize-window in a buffer running ansi-term

I have been using the following function to maximize and unmaximize a window for two years now. (defun toggle-maximize-buffer () "Toggle maximize buffer" (interactive) (if (= 1 (length (window-...
4
votes
1answer
258 views

How can I make Org expand sections while searching?

I search Org files with C-s or isearch-forward. However, when the match is hidden inside a code block in a child several levels deep, and everything is collapsed, it takes a lot of extra keystrokes to ...
1
vote
1answer
155 views

Sort by artist in EMMS with compilation albums?

I've been using the Emacs Multi-Media System and it works pretty well, but one thing i can't figure out how to do is sort by AlbumArtist. This is important, because i have many compilation albums and ...
7
votes
4answers
552 views

How can I find surrounding parenthesis (from emacs lisp)?

Is there a way to find out the type of the surrounding parenthesis (i.e. '(', '[' or '{') around point? For example (using | to represent point) { abc, | df } should return '{', and { abc[ | ], ...
3
votes
1answer
114 views

Getting Helm to default to the shortest match

Is there any way of getting Helm to default to the shortest match? In many cases the way Helm works at the moment (unless I have some weird configuration) is inferior to vanilla Emacs in many cases. ...
0
votes
0answers
126 views

Set javascript mode indents to (1-based) columns 5, 9, 13, 17,

When setting the js-indent-level to 4, my code is aligned in (1-based) columns 4, 8, 12, 16, ... To me this makes perfect sense, but unfortunately I'm sharing code with others whose editors ...

15 30 50 per page
1
344 345
346
347 348
393