Questions tagged [emacs]

For questions regarding usage of the Emacs text editor. See also the Emacs Stack Exchange: https://emacs.stackexchange.com

Filter by
Sorted by
Tagged with
86 votes
11 answers
78k views

How can I open a file read-only from command line with emacs/vi/vim

Is there a way to tell emacs/vi/vim (from the command line) that I want to view the file in view-mode or read-only. I know how to open a file as read only if emacs/vi/vim is already running.
0 votes
1 answer
15 views

Cannot open files with Emacs after mounting Google Drive on Ubuntu using ocamlfuse

I have installed a FUSE filesystem for Google Drive so that I can mount my Drive on Ubuntu. It's something I have done before on other machines with no problem. Everything is installed and mounted ...
5 votes
5 answers
7k views

How to make emacs quit the minibuffer with one press of ESC?

I often press the wrong combination of keys and open some obscure minibuffer mode. I have to press ESC three times (I think), which is pretty annoying. How do I make emacs quit the minibuffer with ...
0 votes
0 answers
10 views

emacs tmp file created by previous OS can not be deleted in new OS

I have installed a VirtualBox with ubuntu20.04 and add a share folder from windows11 host. Then I use emacs and it create a tmp file: $ ls -lah scripts2/org/.#drawer.org -rwxrwx--- 1 root vboxsf 30 ...
14 votes
4 answers
15k views

How do I fix my prompt in emacs shell-mode?

I'm doing some programming on a colleague's machine. He has a version of emacs (23.1.1) I haven't used before. My problem is that when I go to shell-mode, my bash prompt looks like this: ^[]0;jay@...
0 votes
0 answers
20 views

Selecting multiple lines in emacs open from Screen Gnu mode

Normally when open files with "emacs -nw" to edit, I can select line by shift+arrow or ctrl+shift+arrow. The selected line or paragraph gets highlighted. But when I open file using "...
10 votes
3 answers
4k views

Emacs org-mode display time range visually in agenda

I'm looking for a way to get the agenda view in org-mode to 'block out' periods of time for entries with a specified time range. By default it lists items with a specified time range at their start ...
3 votes
1 answer
211 views

emacs meta key doesn't respond after setting option key as meta on OSX

I recently installed macport emacs and spacemacs with brew. I configured the spacemacs to ivy mode. The problem is after setting the option key as Meta on terminal preference, the output of meta key ...
6 votes
1 answer
1k views

org-mode command to create new file from subtree?

In Emacs org-mode, is there a command like new-file-from-subtree? As I envision it, this command would cut the subtree from the current file, paste the subtree into a new buffer, then save the new ...
13 votes
3 answers
6k views

Is there a way to control which window Emacs opens new buffers in?

I'm using sr-speedbar with emacs, and I often have the frame split into 2-3 different windows, and whenever I click on a file in sr-speedbar, it always opens the new buffer in the lowest window. I'm ...
0 votes
0 answers
29 views

Does Neovim or any of its GUI variants have the option to be embedded in a Window?

Emacs as the ability to be embedded in a GUI window using the --parent-id=xid option which is an X Window handle. So I have created GUI programs in which can embed an Emacs session for improved ...
15 votes
3 answers
17k views

How to prevent the "Symbol's function definition is void: error" when running emacs in the console?

To disable the scrollbar in emacs I added (toggle-scroll-bar -1) to the my .emacs file and it works great when I run emacs outside of console mode. However when I run emacs in the terminal I get the ...
2 votes
8 answers
1k views

How to better keep track of/organize multiple buffers in emacs?

I've been using emacs for quite a few years and (like many people), I haven't quite perfected the art of using it yet. One stumbling block I noticed is that when I have several buffers I'm working on, ...
21 votes
7 answers
11k views

Word count for LaTeX within emacs

I want to count how many words my LaTeX document has in it. I can do this by going to the website for the texcount package and using the web interface there. but that's not ideal. I'd rather have ...
5 votes
3 answers
927 views

Double-Mouse-1 selects text and symbol in Emacs

When I double click abcd_efg, emacs selects the part abcd or efg depending on what I click. How can I select the whole string abcd_efg instead?
9 votes
4 answers
2k views

Rebinding <s-mouse-1> to <mouse-2> in Emacs on OS X

I use a macbook pro and thus am subjected to a trackpad with one button. I can, of course, do mouse-1 by clicking and mouse-3 by clicking with two fingers, but there isn't much I can do about a middle ...
4 votes
2 answers
5k views

Solarized background colour off in emacs under tmux

Exhibit I: plain Emacs. Exhibit II: Emacs under tmux. The shades of colours are different, and importantly, the background colour differentiation is nil (e.g. look at the top menu). Anyone run into ...
2 votes
3 answers
2k views

How to set field seperator in Emacs csv-mode?

Can I set the field seperator(s) for the current buffer in Emacs 23?
0 votes
0 answers
15 views

Hunspell does not propose an obvious correct form of a misspelled word

For the misspelled word "perapring" hunspell does not propose the correct spelling "preparing" and only proposes the following words: persevering pertaining innerspring preferring ...
15 votes
6 answers
5k views

emacs: How to return to last position after scroll/page up/down?

After issuing scroll-up or scroll-down in emacs, is there a quick way to return the point to its previous position (assuming I didn't remember to add it to the mark ring)? Alternatively is there any ...
67 votes
4 answers
13k views

Jump to first non-whitespace character in line in emacs

I'm looking for the emacs equivalent of vi's ^. How can I move my cursor to the first non-whitespace character in a line?
1 vote
2 answers
871 views

how can I configure emacs on Windows to associated with 'open with'?

I have installed emacs on Windows 7. It works if I go to 'cmd' and type 'emacs'. But how can I configure it with a specific file extension (e.g. .txt') so that I double click it and it will use 'emacs'...
1 vote
1 answer
134 views

CTL-Y no longer works

Suddenly the highlighting color, when copying changed from gray to yellow. CTL-Y no longer works, When I try it I get: Symbol's function definition is void: x-cut-buffer-or-selection-value. My .emacs ...
16 votes
5 answers
4k views

Torrent client for Emacs [closed]

Does anybody know a bittorrent client for Emacs?
6 votes
1 answer
1k views

Is it possible to sync Remember The Milk with emacs org-mode?

I have just started using Org-mode in emacs, and I am very impressed. However, I currently have all of my todo's in Remember the Milk The simplest solution would be to export RTM into an org-mode ...
3 votes
1 answer
317 views

Emacs saving automatically (*not* auto-save)

When I edit Haskell files, Emacs saves the file whenever I stop typing for more than a second. This is not auto-save mode, as it's overwriting the original file. Also, I disabled auto-save mode, and ...
2 votes
2 answers
485 views

Difference between "backward kill line" and "unix line discard"

I'm reading the bash man page and memorizing the keyboard shortcuts. C-x rubout is bound to backward kill line, and C-u is bound to unix line discard, but the descriptions for these commands look the ...
13 votes
8 answers
9k views

How to make emacs truly full screen on start up?

I want emacs to be truly maximized on start up. There are solutions to the problem that just make the emacs window width of the screen. That's not enough for me. I want the emacs window to be docked ...
7 votes
6 answers
9k views

Using C-M-% to do a query-replace-regexp in Emacs running in Mac terminal

I am trying to do a regular expression search-and-replace in Emacs, running in the Terminal program on my MacBook Pro, which is running OS X 10.6.2. As far as I know, this can be done by pressing C-M-%...
36 votes
12 answers
38k views

Which version of Emacs makes the best use of the Mac GUI? [closed]

On Windows and Ubuntu I use GNU Emacs, but FSF doesn't provide binaries for the Mac I have a decent version that came with Snow Leopard, but just running in the bash terminal. Is there a version ...
2 votes
1 answer
1k views

how do you open applications after installing with chocolatey?

I have checked through similar questions concerning chocolately/choco on windows powershell but I still can't find the answer to this simple one: How do you open a package after it's been installed ...
1 vote
1 answer
21 views

Does Ispell send any of the checked data to a server?

Does Ispell only use local dictionaries, or does it send any of the checked data to a server? The best answer I can find is that it is up to the implementation, and the only open-source repository I ...
4 votes
2 answers
55k views

"rm: descend into directory" - what does it mean?

I am trying to follow instructions here to get emacs going but I am stuck with deleting the .emacs.d folder. What do I do when the command line asks: rm: descend into directory '.emacs.d'? a@b:~$ ...
2 votes
3 answers
9k views

Swapping CTRL-CAPS on Windows 10

I've been able to remap Ctrl-Caps on previous versions of Windows (XP and 7) by using this tutorial. Perhaps the scancodes are different for Windows 10. I'm not sure. Whatever the reason, this method ...
8 votes
2 answers
4k views

Customizing org-mode export template?

Related to this question: How to define template for org-mode HTML export? I'd like to customize the template inserted by hitting C-c C-e t such that I get a few customizations and even some help ...
13 votes
6 answers
8k views

In Emacs how can I search a directory and all subdirectories for a filename?

In Emacs how can I search a directory and all subdirectories for a filename?
11 votes
3 answers
16k views

How can I select text in the Mac OS X Terminal without a mouse (for copy and paste, emacs)

I am using Mac OS X Snow Leopard 10.6.8 and emacs 23.3.1. In the Terminal I can mark text with the mouse, copy it with CMD-C and paste it with CMD-V. This is all I need and it works great, even within ...
1 vote
0 answers
114 views

Emacs org-mode export to LaTeX and PDF produces incorrect double quotes

I am currently finishing up the formatting of a book written in Emacs org-mode. I noticed that me using a specific kind of formatting for dialogue produces odd results when it comes to closing double ...
50 votes
3 answers
21k views

How to jump back to the last position of the cursor in emacs?

In emacs, when i am editing a program, and miss-input some command and make the cursor jump to somewhere in other files. Is there a short-cut key or command to jump back to the last location of the ...
0 votes
1 answer
212 views

Building emacs 29 on openSUSE: `configure` cannot find json library despite it being installed

Im currently trying to build emacs 29.0.90 from source. I've installed every version and permutation of json-devel, json-c, libjsoncpp, etc on the repositories, and even built, tested, and installed ...
0 votes
0 answers
31 views

org mode: how to reset files VISIBILITY state to that defined in STARTUP

How to reset files VISIBILITY state to that defined in STARTUP, as if you closed and reopened file. This would mean honouring each particular sections VISIBILITY property as well as that defined in ...
0 votes
1 answer
196 views

How to quickly handle mobile-org pull errors?

According to the org-mode manual, here is what happens during a pull error, and how to handle it: Org moves all entries found in mobileorg.org1 and appends them to the file pointed to by the ...
0 votes
1 answer
29 views

How to access GNU-Emacs binaries located in HOME partition from everywhere?

I built GNU-Emacs from scratch and now I have working binaries of it in my home partition. So ~/somedir/emacs/src has all the binaries. If I issue the following: PATH=$HOME/tmp/emacs/src:$PATH that ...
2 votes
0 answers
1k views

How can I customize the background color of the selected window in Emacs?

Related: How can I change the background colour of a single emacs buffer? I would like to change the background color of the active buffer to, say, white. This sort of thing is possible as ...
3 votes
2 answers
1k views

How to export from Emacs org-mode to both LaTex and OpenOffice with biblatex citations

I write my social science research papers in Emacs org-mode. I would like to export these either to LaTeX or OpenOffice (to save in MS Word format) and have it look presentable either way, with ...
2 votes
1 answer
454 views

how to get all the tags from headlines in a org-mode file

When I incrementally write up a org-mode file, I add tags to the current headline on the spur (instead of predefine it at the beginning of the file with +TAGS:). However, without predefining the tags ...
1 vote
1 answer
859 views

When should TERM be set to alacritty-direct

I am using alacritty 0.11.0 (8dbaa0bb) on Arch. the default TERM type is alacritty, which works well (truecolors etc) for everything except terminal emacs. In a terminal emacs does not show truecolors....
2 votes
1 answer
3k views

How do I save and reload a session in Emacs?

I want to save a session (open buffers) and then restore it at a later date. How can I do this easily in Emacs? I'm using version 24.2.1.
1 vote
1 answer
383 views

how to use pre-defined variables or constants in (custom-theme-set-faces) in emacs

I'd like to use pre-defined variable or constant of string type in (custom-theme-set-faces), so it would go like (setq Blue128 "#000080") (custom-theme-set-faces 'thename '(default ((t ( ...
7 votes
3 answers
1k views

Gnus: get rid of ~/Mail and ~/News folders

Gnus (Emacs's mail client) creates directories ~/Mail/ and ~/News. I don't want to clutter my home folder, how can i change this directories to, say, ~/.emacs.d/mail/ and ~/.emacs.d/news/?

1
2 3 4 5
34