Most Popular

1500 questions
43
votes
3 answers

How to change the cursor type and color?

I would like to change the cursor, like in Terminal, from the block to the I-Beam cursor. From this: To this: How would I do this? Also, on a side note, how do I change the color of the cursor?
programking
  • 7,194
  • 10
  • 42
  • 63
43
votes
1 answer

What is the difference between a function and a command?

When posting questions and answers here, people sometimes use the terms "function" and "command" interchangeably. In other cases, people only use one of the two terms to discuss specific pieces of code. As their posts usually focus on other topics,…
itsjeyd
  • 14,666
  • 3
  • 59
  • 87
43
votes
1 answer

How should I change my workflow when moving from IDO to Helm

As an Emacs newbie, I found IDO and loved it since it made searching for files so much quicker. After spending some time on this site, I've read more and more about Helm and I'm planning on making the switch. Some of my questions are: What are the…
Ryan
  • 4,039
  • 1
  • 27
  • 49
43
votes
6 answers

Effectively using the mark ring

I have used the mark to select regions of a buffer. For example, I know the sequence C- C-s foo can be used to select all text between the current point and the point after a search for foo. I recently discovered the existence of the mark…
Patrick Steele
  • 1,125
  • 9
  • 10
42
votes
2 answers

What is the regex to match a newline character?

In Emacs regex, \n doesn't match a new line character \n. Am I correct that $ matches the position between a new line character and the character right before the new line character. e.g. for a string abc\n, $ matches the position between c…
Tim
  • 5,007
  • 7
  • 32
  • 61
42
votes
2 answers

How to evaluate the variables before adding them to a list?

The below obviously doesn't work and hence this question. How do I correct the below code so that the value of somelist becomes '(("abc" . 123)) ? (setq x "abc") (setq y 123) (setq somelist nil) (add-to-list 'somelist '(x . y))
Kaushal Modi
  • 25,651
  • 4
  • 80
  • 183
41
votes
2 answers

Intelligent spell-checking in org-mode

By default, the results of running M-x ispell-buffer in org-mode are very disappointing. Ispell looks inside :PROPERTY: drawers, which commonly contain things like :ID: 797495bd-581b-4a42-883b-c2a55a08f08a It tries to correct org…
Malabarba
  • 23,148
  • 6
  • 79
  • 164
41
votes
7 answers

How to update packages installed with use-package

I'm using use-package to install and configure packages (most of these packages are in melpa). Is there a clean automated way of keeping all these packages up-to-date ? If not, what is the best work flow in this case ? Note: A very similar question…
Jaagrit Sapana
  • 515
  • 1
  • 4
  • 5
41
votes
4 answers

Weird shell output when using IPython 5

I just upgraded to the latest version of IPython and now something is wrong when using it in emacs. When using it in a regular terminal it works fine (colors, tab-completion, etc.), however either in M-x eshell or M-x shell, instead of outputing In…
Literal
  • 675
  • 5
  • 10
41
votes
7 answers

org-mode: How to export underscore as underscore instead of highlight in HTML?

I am using org-mode, and the document I am writing has a table name whose name looks like this: tab_weekly_report. When I export the document to HTML, I expect the name to exported as tab_weekly_report, but org-mode treats _ specially (as a markup…
Daniel Wu
  • 1,751
  • 2
  • 17
  • 26
41
votes
6 answers

Problems with keybindings when using terminal

I have the following line in init.el: (global-set-key [(control \;)] 'comment-region) It works very well in GUI window, but if emacs is invoked with the -nw option then C-; doesn't comment region, only inserts ; character. M-x comment-region RET…
40
votes
5 answers

What is the easiest way to search all useful files inside a single project?

What is the easiest way to search for a regexp throughout the contents all files in the current project, skipping files that are not useful? Useless files are things like compiled files, imported libraries, version-control files, etc. I’m aware of…
Malabarba
  • 23,148
  • 6
  • 79
  • 164
40
votes
5 answers

Exporting from org-mode to markdown

The emacs functions mentioned in the docs don't seem to exist in my org version 7.9.3f. http://orgmode.org/manual/Markdown-export.html Any idea how I can get org-mode to export to markdown for me without pulling my hair out?
Alex Baranosky
  • 1,079
  • 1
  • 8
  • 17
40
votes
3 answers

Command that formats (prettifies) Elisp code

Let's say I have a function that looks like the following (as is often the case when printing elisp output). (defun my-example-function () (let ((a (do-something)) (b (do-something))) (setq someone me) (with-current-buffer b (do-that (or this (and…
Malabarba
  • 23,148
  • 6
  • 79
  • 164
40
votes
3 answers

How to stash individual files with magit

git is capable of stashing of individual hunks. With --patch, you can interactively select hunks from the diff between HEAD and the working tree to be stashed. The stash entry is constructed such that its index state is the same as the index state…
ayvango
  • 585
  • 4
  • 6