Most Popular

1500 questions
46
votes
2 answers

Why does elisp not have namespaces?

Q: Why does elisp not have namespaces, and how could we get them? Elisp does not have namespaces other than the global one, which has led to the coding convention of prefixing all global functions, variables, and constants with a unique…
Dan
  • 32,980
  • 7
  • 102
  • 169
46
votes
7 answers

How can I use my local Emacs client as the $EDITOR for remote machines I access over TRAMP?

I often use TRAMP to manage several remote servers, both for editing files and running remote shells in shell-mode. However, this does not work when a command uses the EDITOR variable to edit a file, such as crontab -e especially because shell-mode…
Tikhon Jelvis
  • 6,252
  • 2
  • 28
  • 41
46
votes
6 answers

How can I set default font in Emacs?

I can't set Inconsolata as default font in Emacs 24.4 Linux. I changed the font in the menu -> Save options. The font changed but after a restart the font is the same as it was by default. Added this to ~/.Xresources: Emacs.font: Inconsolata…
Maglight
  • 653
  • 1
  • 5
  • 6
46
votes
3 answers

What can I do to speed up my start-up?

What are some basic things I could do to reduce the start-up time? Is there anything in particular I should pay attention to, for that matter? Note: Startup time can be mitigated by starting Emacs less often (once per session) and opening files in…
caisah
  • 4,096
  • 1
  • 24
  • 43
46
votes
5 answers

Re-open *scratch* buffer

If I accidentally closed the scratch buffer in Emacs, how do I create a new scratch buffer?
programking
  • 7,194
  • 10
  • 42
  • 63
45
votes
10 answers

Keeping my .org files in sync across multiple computers

How can I keep my .org files up to date across several computers, perhaps across multiple platforms(linux/windows)? I could keep all the .org files in git for example, but that would require me to remember to pull and push to keep the repo updated.…
Zavior
  • 591
  • 1
  • 4
  • 7
45
votes
6 answers

Org-mode 9: unable to eval code-blocks

My Emacs config lives inside of a .org file from which I tangle source blocks to a .el file. I could evaluate source blocks with C-c C-c Today I updated to org-mode version 9 from org elpa and now evaluating a source block like #+BEGIN_SRC…
rrogg
  • 595
  • 1
  • 4
  • 7
45
votes
1 answer

Command to insert code block?

I found the command SPC m x c to insert a small code snippet like ~~. I would like to insert a longer snippet like #+BEGIN_SRC #+END_SRC Is there a command to do this? I found a way to add it for markdown, which is SPC m x c
JuanCaicedo
  • 719
  • 1
  • 6
  • 11
45
votes
2 answers

What's the difference between a buffer, a file, a window, and a frame?

When posing questions on this site, people sometimes talk about "windows" when they mean "frames," and "buffers" or "files" when they mean "windows." So: Q: What is the difference between a buffer, a file, a window, and a frame? (I'm posing this…
Dan
  • 32,980
  • 7
  • 102
  • 169
45
votes
7 answers

How to add a prefix to every line?

I have the code below: Hello There I am some code And want to add code in front of it, like: I said Hello I said There I said I am some code So how would I add a prefix to each line?
programking
  • 7,194
  • 10
  • 42
  • 63
44
votes
3 answers

exec-path and $PATH

I have seen examples online where people add paths to the default path in Emacs with: (add-to-list 'exec-path "/usr/local/bin/") I am new to Elisp, and I think I understand what the statement above does, but I have a few questions: In what order…
Amelio Vazquez-Reina
  • 5,197
  • 5
  • 33
  • 47
44
votes
6 answers

How to test REST API with Emacs?

I'm putting together an app, and want to be able to test the api end points. I figured Emacs would be a cool way to go - especially if JSON responses could be parsed and the return data used in subsequent tests. Any ideas on how to go about this, or…
Ryan White
  • 681
  • 1
  • 5
  • 8
43
votes
5 answers

How to shift a selected area of text in Emacs by a certain number of spaces?

I am writing python code so shifting/moving blocks of lines is important to avoid going through each line individually. How can I do this without an add-on? Is there a type of operation keystroke command to do this?
Vass
  • 723
  • 1
  • 5
  • 13
43
votes
1 answer

Multicolumn cells in org-mode tables

Is it possible to merge two or more cells in an org-mode table like when using \multicolumn{}{}{} or \multirow{}{}{} in LaTeX? Something like this does not work: |------------+-----------+----------+----------+-------------| | | …
Tymric
  • 762
  • 1
  • 6
  • 15
43
votes
4 answers

Why can't I list the contents of Desktop on macos using dired?

When I do C-x C-f on ~/Desktop/ in macos Catalina, I get the following error. Listing directory failed but 'access-file' worked I can list the directory for just ~. I'm new to Emacs and know little else. I've tried installing Emacs through Homebrew…
user25536