All Questions

Filter by
Sorted by
Tagged with
4
votes
1answer
547 views

How to set the coding system for new files with specific extensions

When I visit a new file, ^xf, that has an extension of .sql or .dsql I would like the coding system to be set to utf-8-with-signature-dos. The default is currently iso-latin-1-dos. I'm running (...
2
votes
1answer
88 views

How to access the original buffer when running M-x compile and friends?

For example, take any buffer. Maybe one named my-file. I want to run M-x compile in it and have access to the my-file buffer in compilation-finish-functions. You'd think think might work: (setq ...
2
votes
1answer
268 views

Links open firefox with starting page, instead of link content (linux)

Problem: For some mysterious reason, when I open a link in firefox, a new firefox instance opens. Also note instead of the content of the link, my home-page shows up. Instead I would like a new tab ...
2
votes
2answers
81 views

Visual clutter on the left edge

I am not sure which terms to search for this with, perhaps you can help. Sometimes when I move around my emacs window, some grey clutter emerges on the left hand side. The file that I am working on is ...
1
vote
1answer
439 views

Tramp ediff problem MS-DOS style path detected

I'm using tramp to edit files remotely. Now I would like to ediff two files which are at the remote location. The problem is, I get the following warning, which prevents using ediff completely. ...
-1
votes
1answer
368 views

Magit fails to create local repository

This is what I got when I select a directory (whether it had a git repository) and choose "yes" when magit asks if I want to create one: Debugger entered--Lisp error: (wrong-type-argument stringp nil)...
0
votes
1answer
761 views

magit fails to install

I am unable to install magit with package.el. While other packages install correctly, magit (v 90150116) currently gives me: Debugger entered--Lisp error: (wrong-number-of-arguments #[(ad--addoit-...
13
votes
4answers
2k views

What does `symbol-value` do?

The docs made me no wiser: This function returns the value stored in symbol's value cell. This is where the variable's current (dynamic) value is stored. If the variable has no local binding, ...
2
votes
1answer
551 views

Always view *.pdb files as text file

I frequently work with Protein Data Bank files. These are text files that contain atomic level structure information of molecules. They can be recognized by their '.pdb' extension. Whenever editing ...
12
votes
3answers
2k views

Persistent shell-command history

When I run shell-command in a new session I do not have access to the history of commands from the last session. How can I have that?
1
vote
1answer
312 views

Can org-babel 'result' not insert a newline at the end?

When I run a snippet of code (C-c C-c) (e.g. for making a PlantUML diagram), there is a trailing new line in the results, e.g.: #+BEGIN_SRC plantuml file hello.png ... #+END_SRC #+results [[img] &...
7
votes
1answer
2k views

Execute src block on org mode export

I have some sort of fundamental confusion about using src blocks in org mode. I define a custom latex class in an emacs-lisp src block at the top of my org file. Export fails however, unless I ...
3
votes
1answer
349 views

Auto-complete mode (inside?) predictive mode & org-mode?

There are many 'prediction' frameworks for emacs, I'm a bit puzzled as whether and how they integrate with one another. I'm looking for something that learns words I type and predicts them. Also ...
6
votes
1answer
626 views

Mimic self-insert-command with insert/insert-char?

Due to various/extensive remappings I insert symbols with Control+key, for example Ctrl+9 inserts a left parenthesis (. This works fine with the remappings and the insert/insert-commands, however, ...
1
vote
1answer
254 views

Use multiple cursor if region is active, otherwise use CUA, how?

I’m trying to implement this when I press C-return: If there’s an active region, it activates multiple cursors by calling mc/edit-lines If there’s no active region, it initiates rectangular selection ...
2
votes
1answer
47 views

Bug in downcase-region when using cua-set-rectangle-mark?

Is the following a bug or a feature? If the former, how do I file? If the latter, can someone explain the logic? On the following content in my buffer (*scratch*), upon marking the inner rectangle ...
2
votes
1answer
980 views

256 colors in FbTerm

Is there a way to get emacs with 256 colors in FbTerm? I've seen some old posts on the topic but I haven't seen any confirmation that it will work. EDIT: If I start FbTerm with this command: ...
5
votes
1answer
164 views

bibtex2html options in org-mode publishing

How do I pass the bibtex2html option -nobibsource when publishing via ox-bibtex.el? I have added it directly to the ox-bibtex.el file by commentling out line 265 and adding my own: ;;'("-a" "-nodoc" "...
24
votes
3answers
8k views

Can cursor jump back to the previous position?

Can I make my cursor in a buffer jump back to its last position? (preferrably without having to mark the previous position) For example, C-a jumps to the beginning of the current line, can I jump ...
3
votes
1answer
490 views

How to stop execution of keyboard macro?

I mistakenly ran a keyboard macro with an Infinite Argument, which made the macro execute endlessly. Take the following example, which just inserts the character a: C-x ( a C-x ) If I then run: C-u ...
1
vote
2answers
231 views

In terminal, C-) and ) both execute evil-forward-sentence. I want C-) to run paredit-forward-slurp-sexp

If I type C-f paredit-forward-slurp-sexp, Emacs tells me the command is mapped to C-). Yet through C-h k I realized that both C-) and ) run evil-forward-sentence. If I do C-f evil-forward-sentence, ...
2
votes
2answers
657 views

Python interactive buffer showing completions of the empty string instead of regular output

I am working with python code, and I would like to be able to evaluate it in an emacs buffer, rather than using another terminal window. I am working with the python-mode from python.el, bundled with ...
0
votes
1answer
411 views

How to use evil in emacs 24.4?

This bug currently prevents me switching to 24.4: https://bitbucket.org/lyro/evil/issue/437/m-x-is-undefined-in-emacs-244 Is there a workaround to make both evil and M-x work in 24.4?
4
votes
2answers
641 views

How can I export to LaTeX every time I save an Org mode buffer?

I'm trying to set up a buffer-local behavior so that optionally, only after I execute the babel section, Org exports to LaTeX asynchronously after each save. I tried the following: (defun kdm/org-...
2
votes
1answer
3k views

Symbol's value as variable is void: company-backends

I'm trying to setup robe for Rails development. It needs company mode and I have some issues with it: Have following in init.el: ;; robe, documentation lookup and completion for Ruby (require 'robe) (...
0
votes
1answer
119 views

How to define a configurable variable in Elisp to be used in other program like Ruby?

I want to define a configurable variable in Emacs, but make it can be used in Ruby code. The situation is like here: https://github.com/zenspider/enhanced-ruby-mode/pull/68 I copy the content to ...
5
votes
2answers
285 views

gnus “fancy” hyperlinks, bullet points, etc

Is there a way to get more formatting options from a gnus message buffer when composing a mail? I'd like to do hyperlinks of the style common in markdown or org-mode, viz: [[example link][http://www....
4
votes
1answer
962 views

Turn off fringes in text-mode

How do I turn off fringes in text-mode? The closest I've gotten is this: (add-hook 'text-mode-hook (lambda () (set-fringe-mode '(0 . 0)))) But that turns off fringes ...
6
votes
3answers
468 views

Non-symmetric keychord

I currently have this in my init file (key-chord-define-global "xf" 'find-file). Actually, xf and fx will trigger the find-file function. In fact, whatever the keychord I defined, it works whatever ...
1
vote
1answer
140 views

Selecting the cursor type when using an overlay 'cursor property

The documentation for the 'cursor overlay property does not discuss methods for altering the type of cursor that is used when point is on a particular overlay: https://www.gnu.org/software/emacs/...
8
votes
1answer
520 views

How to quote symbols in a documentation string?

In the Emacs Lisp documentation, I often come across quoted symbols like `buffer-file-name' inside docstrings. The intersting thing here is the style of quoting, by surrounding the symbol name with a ...
6
votes
1answer
4k views

Warning message about load-path.

When I start up emacs, I see Warning (initialization): Your `load-path' seems to contain your `.emacs.d' directory: ~/.emacs.d/ This is likely to cause problems... Consider using a subdirectory ...
2
votes
0answers
313 views

How to make ansi-term output read only?

When using ansi-term in line mode emacs lets you edit the buffer arbitrarily, not just after the last prompt. I'm trying to make it read only so I stop fudging with command output. The problem is all ...
6
votes
1answer
2k views

Hide inline images and show links in org-mode

On using an image link as, [[./hello.png]] in org-mode, emacs doesn't toggle the inline image display. org-toggle-inline-images works well on start-up. I run a presentation using M-x epresent-run ...
0
votes
2answers
430 views

Extended Cursor Movement in terminal emulator (CHA and others)

Is there a way to get the Emacs terminal emulator to support cursor movement escape sequences beyond its vt100 features? A specific example is CHA (Cursor-Character-Absolute), e.g. ESC[0G should move ...
5
votes
1answer
740 views

Make emacs format Java more consistently

When I open Java files originally created and edited in Emacs, the indentation shows up correctly, as in the image below: However, when I open the same file in Sublime Text, or any other editor ...
3
votes
1answer
397 views

Efficiently use the spell checker

I want to check the spelling in a buffer. I do that by M-x ispell. When it finds nd in the folowing example: apple a nd orange I hit the left or right arrow key, in order to move the cursor to the ...
2
votes
0answers
384 views

.dir-locals.el isn't recognized

I am working on a project that includes some configuration in .dir-locals.el: ((c++-mode . ((compile-command . "cd ../../\; ./build.sh")))) This gets picked up just fine for me and sets the ...
6
votes
1answer
3k views

Running two IPython instances at the same time

I'd like to run two instances of IPython in Emacs at the same time, one with Python 2, and the other Python 3: is it something doable or there's something in the way python.el is designed that would ...
4
votes
0answers
132 views

Special characters (e. g. umlauts) not displayed correctly in *Org tags* fast tag selection buffer

In the "Org tags" buffer (the buffer showing the fast tag selection keys when pressing C-c C-c C-c in a headline) some fast selection keys are shown as e. g. [\212] instead of the actual key. How can ...
1
vote
1answer
104 views

List all lines containing the word under the cursor in helm

Helm is very powerful, how to implement the feature to create a helm list/buffer to highlight all the lines containing the word currently under the cursor?
3
votes
3answers
428 views

Exporting org mode includes as latex lstinputlisting, or equivalent

Latex has the ability to include the contents of a file using the lstinputlisting command. When exporting an org-mode file to latex #+include: somefile inserts the file contents at that point in the ...
5
votes
1answer
120 views

Increasing the frequency of modeline redisplay

Q: Is there a way to (temporarily) increase the rate at which the mode line is redisplayed? I was trying to write a package that adds a spinner to the mode line (to indicate ongoing operations), but ...
2
votes
2answers
740 views

Vertically aligning text in emacs

I am writing this mode where I only want to show one paragraph at a time. Ideally I'd like to show the paragraph in the center of the screen. Getting it horizontally centered is trivial, but I have ...
5
votes
3answers
2k views

Disable evil-mode when git-timemachine mode is activated

How do I disable evil-mode in a buffer in which git-timemachine is activated?
3
votes
5answers
728 views

How to use font-lock to highlight end-of-line comments?

I am trying to add a comment feature to json-mode. A comment starts with a hash sign and ends at the end of the line. However, if the hash sign is inside a string it should not count as the start of ...
7
votes
3answers
1k views

How can I prevent company-mode completing numbers?

In org-mode, when I type some numbers, company always pops up the number completion like: 20 20001 -----------1200111 ----------2 These numbers come from my org-mode files. I would like to ...
1
vote
1answer
209 views

mu4e overwrites minibuffer output when switching buffers

I'm using mu4e for email and I really like it. The only time it annoys me is when I'm switching buffers and I want to see a list of suggested buffer names in the echo area / minibuffer, because mu4e ...
2
votes
1answer
69 views

Understanding why two apparently different overlay strings are `equal`

I am having trouble understanding why two apparently different overlay strings are equal. The following test results positive -- i.e., t. The colors are different and the :data identification names ...
6
votes
2answers
1k views

How to insert the content of a org-mode's code block inside <pre><code> tags when exporting to HTML?

When exporting to HTML, org-mode renders a code block in a very ugly way, I don't like that. I want to use HighlightJs to highlight my exported code blocks. But, how do I tell org-mode to simply ...

15 30 50 per page