All Questions

Filter by
Sorted by
Tagged with
7 votes
3 answers
1k views

Set windows layout by a function

We all use multi-windows in Emacs, and for some projects, I developed a habit of using four windows, one each for a different buffer. I wonder if I can define a function and when I start to work in ...
yi.tang.uni's user avatar
  • 1,017
3 votes
2 answers
889 views

How to get the server-name?

When starting a server it's possible to set a name for the server (http://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html). These names are to be useful for connecting emacsclients ...
Aaron Lee's user avatar
  • 377
5 votes
1 answer
842 views

Add window to the right of two horizontally split windows

Following scenario: 1) I start emacs and the initial frame is as follow: +---------------+ | | | | | | | | | | +---------------+ ...
Rainer's user avatar
  • 907
2 votes
1 answer
144 views

How to get UTF-8 displayed properly in Emacs menus?

I use GNU Emacs 23.4.1 that comes with Debian Wheezy and UTF-8 as system character encoding. When I add bookmark it displays properly in minibuffer and in the buffer, however the bookmark name is ...
helcim's user avatar
  • 121
0 votes
1 answer
184 views

current-active-maps shortens map entries [duplicate]

I try to print all key bindings in the current buffer using (current-active-maps) In the message buffer, the entries are not fully printed & are replaced by .... after a level. Like this, ((...
Saravana's user avatar
  • 2,071
31 votes
10 answers
21k views

How do use Emacs to look up a function in Python?

What is the easiest way to configure Emacs to be able to look up where a function is defined? I want to highlight it in Emacs and press a key combo to look up where the source of the function is. Can ...
Low Kian Seong's user avatar
7 votes
1 answer
2k views

Can you have org-mode headings with checkboxes?

I'd like to have this sort of functionality: * TODO master task ** [ ] my subtask 1 << checkbox in heading :-D ** [X] my completed subtask With the C-c C-c combo checking/unchecking such ...
Leo Ufimtsev's user avatar
  • 4,558
13 votes
2 answers
2k views

Parsing formatted time string (inverse of format-time-string)

The format-time-string function takes a time argument like '(21761 64499 350937 0) and a format string like "%y-%m-%d %a %H:%M" and returns something like "15-03-12 Thu 16:49". What is the inverse ...
Matthew Piziak's user avatar
5 votes
1 answer
697 views

Emacs Orgmode: hiding other items in the tree

I have an org file, that looks like: * Item 1 ** Subitem 1.1 * Item 2 ** Subitem 2.1 This text from Subitem 2.1 ** Subitem 2.2 I am editing text under Subitem 2.1. Is there a way to hide everything ...
schatten's user avatar
  • 261
7 votes
2 answers
1k views

Stop org-mode from defining agenda files in custom

I have the following line in my .emacs: (setq org-agenda-files (directory-files "~/org-files" 'absolute "[^#]*.org$" 'no-sort)) I would like for org-agenda-files to be defined in this way on startup....
Matthew Piziak's user avatar
4 votes
1 answer
651 views

Is there a command/package to pretty print based on parentheses?

I'm dealing with large files of output from Haskell code, most of which is debug info of stuff generating using Haskell's show. The important thing about that is that it's a large file of things, ...
Joey Eremondi's user avatar
4 votes
3 answers
370 views

How to scroll another buffer while in minibuffer?

I'll describe what I'm doing currently to get an issue. First, I store the current buffer. M-: eval-expression (setq bb (current-buffer)) Then, M-: (with-current-buffer bb (insert "foo")) While ...
abo-abo's user avatar
  • 14.1k
2 votes
0 answers
180 views

Display helm-ag in helm-mini

I recently discovered helm-ag, and like its functionality. For some reason, though, I have to enter the pattern to search and then press Return to actually get the helm-ag buffer to appear in helm-...
heuristicus's user avatar
1 vote
1 answer
160 views

Automatically prompt for comment character and apply it in older versions of emacs

When I try to comment a block of code using comment-region in a file type emacs doesn't know the proper comment type for, then it prompts me No comment syntax is defined. Use: so I can specify the ...
Joey O's user avatar
  • 135
3 votes
2 answers
1k views

Use emacs for batch-processing files

I'm a newbie elisp user. I would like to process a few hundred xml files and call an elisp function for each line which does an query-replace to fix a problem in these files. My question is: how do I ...
Beginner's user avatar
  • 2,721
6 votes
2 answers
325 views

How to shuffle albums in EMMS?

In the Emacs Multi-Media System, shuffling by song is as easy as M-xemms-shuffle, but i cant figure out how to shuffle by album, or to add a random album to the playlist. Is this possible?
Plutonium Overcast's user avatar
5 votes
3 answers
2k views

How do I turn off syntax coloring for lines that exceed the word-limit in prelude?

I'm using Prelude v 1.0.0. I want to turn off the syntax coloring when my lines exceed a certain word-limit. I don't know where that setting is set. Thanks! EDIT: I should be more precise. Prelude, ...
Son of the Wai-Pan's user avatar
4 votes
1 answer
787 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 (...
Shannon Severance's user avatar
2 votes
1 answer
99 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 ...
nanny's user avatar
  • 5,756
2 votes
1 answer
352 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 ...
Leo Ufimtsev's user avatar
  • 4,558
2 votes
2 answers
90 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 ...
puslet88's user avatar
  • 243
1 vote
1 answer
498 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. ...
Beginner's user avatar
  • 2,721
-1 votes
1 answer
419 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)...
dmvianna's user avatar
  • 392
0 votes
1 answer
960 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-...
dmvianna's user avatar
  • 392
14 votes
4 answers
5k 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, ...
The Unfun Cat's user avatar
2 votes
1 answer
772 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 ...
Steven C. Howell's user avatar
16 votes
3 answers
4k 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?
RasmusWL's user avatar
  • 267
3 votes
1 answer
691 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] &...
Leo Ufimtsev's user avatar
  • 4,558
8 votes
1 answer
3k 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 ...
jake's user avatar
  • 245
3 votes
1 answer
445 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 ...
Leo Ufimtsev's user avatar
  • 4,558
6 votes
1 answer
923 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, ...
user avatar
2 votes
1 answer
394 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 ...
MetroWind's user avatar
  • 187
2 votes
1 answer
60 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 ...
Pål GD's user avatar
  • 163
2 votes
1 answer
2k 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: ...
MajorBriggs's user avatar
5 votes
1 answer
222 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" "...
m43cap's user avatar
  • 183
49 votes
6 answers
18k 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 ...
Tim's user avatar
  • 5,007
3 votes
1 answer
907 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 ...
Keta's user avatar
  • 33
1 vote
2 answers
308 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, ...
user7610's user avatar
  • 113
2 votes
2 answers
912 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 ...
T. Verron's user avatar
  • 4,283
0 votes
1 answer
415 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?
Croad Langshan's user avatar
5 votes
2 answers
1k 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-...
mankoff's user avatar
  • 4,216
6 votes
1 answer
5k 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) (...
yujaiyu's user avatar
  • 896
0 votes
1 answer
129 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 ...
stardiviner's user avatar
  • 1,928
5 votes
2 answers
358 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....
Steven Arntson's user avatar
5 votes
1 answer
2k 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 ...
MajorBriggs's user avatar
6 votes
3 answers
552 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 ...
Nsukami _'s user avatar
  • 6,521
2 votes
1 answer
254 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/...
lawlist's user avatar
  • 19.1k
10 votes
1 answer
1k 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 ...
Håkon Hægland's user avatar
6 votes
1 answer
5k 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 ...
Faheem Mitha's user avatar
2 votes
0 answers
472 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 ...
Joseph Garvin's user avatar

15 30 50 per page
1
498 499
500
501 502
542