Nsukami _
  • Member for 7 years, 4 months
  • Last seen more than 1 year ago
How to quickly copy/move file in Emacs Dired?
Accepted answer
87 votes

From the documentation: dired-dwim-target is a variable defined in `dired.el'. Its value is nil Documentation: If non-nil, Dired tries to guess a default target directory. This means: if ...

View answer
How do I switch buffers quickly?
55 votes

There is ido mode that should help. EDIT: put this in your init file, to activate ido mode by default: (ido-mode 1) Now, C-x b will show you a list of candidates. Put this in your init file, if ...

View answer
How to Change size of split screen emacs windows?
Accepted answer
35 votes

C-x- (shrink-window-if-larger-than-buffer) to shrink a window to fit its content. C-x+ (balance-windows) to make windows the same heights and widths. C-x^ (enlarge-window) to increase height by 1 ...

View answer
How to see recently opened files in helm
13 votes

Indeed, if helm-ff-file-name-history-use-recentf set to true, helm-find-files is supposed to use recentf-list instead of file-name-history. To enable the recenf minor mode, I have those lines in my ...

View answer
How to change the mouse pointer colour?
Accepted answer
12 votes

Just found this, did not tried it: (set-mouse-color "red")

View answer
Any functionality differences using a two-space vs one-space convention at the end of a sentence?
Accepted answer
11 votes

The only consequence I'm seeing, is the ability to recognize periods from abbreviations. As stated by gnu.org: If you want to use just one space between sentences, you can set the variable ...

View answer
Anatomy of ~/.emacs.d
Accepted answer
10 votes

There are lots of different ways to organize your .emacs.d. You should probably have a look at some of the great examples here and here. Most of the time, what you want to keep under version control ...

View answer
How can I bookmark Info page to continue reading later?
Accepted answer
10 votes

Some bookmarking commands to get you started: C-x r m – set a bookmark at the current location (e.g. in a file) C-x r b – jump to a bookmark C-x r l – list your bookmarks M-x bookmark-delete – delete ...

View answer
How to setup default windows at startup?
8 votes

write a function close to that one in your init file, you will probably have to modify it a little bit to fit your needs: ;; layout definition (defun my-startup-layout () (interactive) (delete-...

View answer
Backspace without adding to kill ring
Accepted answer
8 votes

According to the documentation: <C-delete> runs the command kill-word (found in global-map), which is an interactive compiled Lisp function in ‘simple.el’. It is bound to <C-delete&...

View answer
Display emacs shortcuts inside emacs, like conky
Accepted answer
8 votes

As @Dan asked me to write up my comment to an aswer: What I've done once to achieve what you want: Use an already existing Emacs cheatsheet or a customized one, as your desktop wallpaper. And ...

View answer
Setting default-directory does not change find-file directory
Accepted answer
7 votes

According to the documentation: default-directory is a variable defined in ‘C source code’. Its value is "~/" Local in buffer *scratch*; global value is nil Automatically becomes permanently ...

View answer
Default commit comment for magit
7 votes

If what you're looking for, is a default template message for a commit, you can put this in your .gitconfig file: [commit] template = /path/to/a/.gitcommitmessagetemplate.txt And inside ....

View answer
Openwith doesn't work in dired
Accepted answer
7 votes

This is the way I've set openwith ; Openwith (openwith-mode t) (setq openwith-associations (list (list (openwith-make-extension-regexp '("pdf")) "evince" '(file)) (...

View answer
How can I use ERC with an IRC offered over SSL?
Accepted answer
7 votes

However, I cannot find any mention of SSL in ERC's Info manual. I've found a mention of SSL here How can I specify that the connection should be secure? What about M-x erc-tls ?

View answer
How to copy killed rectangle to the kill ring
Accepted answer
7 votes

If I understood your question, your are looking to something like this: (defun youngfrog/copy-rectangle-to-kill-ring (start end) "Saves a rectangle to the normal kill ring. Not suitable for yank-...

View answer
How to override keybindings for `term`
7 votes

In term-mode, any regular C-x whatever keybinding becomes C-c whatever instead. Courtesy of Josh Matthews Now to define keybindings that will be active only in term mode, try this: (add-hook 'term-...

View answer
how to make emacs prompt me before closing the last emacs gui frame when running emacs as a daemon?
Accepted answer
6 votes

You may want to define a function that will ask you to confirm before closing a frame. Then you'll check if Emacs was started as a daemon, if it is the case, update the C-x C-c shortcut. Something in ...

View answer
How to convert DOS/Windows newline characters to Unix format within GNU Emacs?
6 votes

Save the file, and Emacs will automatically use the correct newline char when writing the buffer to file, according to the value of buffer-file-coding-system. To know what is the value of buffer-...

View answer
Kill a line deletes the line but leaves a blank newline character
Accepted answer
5 votes

From documentation: kill-whole-line is an interactive compiled Lisp function. It is bound to <C-S-backspace>. (kill-whole-line &optional ARG) Kill current line. With prefix ...

View answer
file-notify support on OSX
5 votes

The short answer is: no. From gnu.org: ** Emacs can now be compiled with file notification support. This happens by default if a suitable system library is found at build time. To prevent this, ...

View answer
Recursive grep in directory with helm and/or projectile?
5 votes

A recursive grep in a directory should be the simplest thing For a simple recursive grep inside current directory, just: M-x grep then, inside the minibuffer: Run grep (like this): grep -nHr "pattern"...

View answer
How do cask, package.el and projectile work together?
Accepted answer
5 votes

Package.el is a builtin package manager that can be used to install emacs packages. Cask is an Emacs Lisp project management tool, similar to Maven or Leiningen. It aims to control and automate the ...

View answer
Tag buffers according to project
Accepted answer
5 votes

First thing is to make sure projectile is installed, you can install projectile using the MELPA repository. Then, you should ensure that projectile-mode is activated: M-x projectile-mode. Projectile ...

View answer
Emacs: How to enable toolbar mode and menubar mode only under a certain mode?
5 votes

tool-bar-mode and menu-bar-mode being a global modes, you can enable them using a mode hook, but all buffers in all frames will be affected. Never used it, but you may be interested by toolbar-here-...

View answer
How to set proper smtp Gmail settings in Emacs in order to be able to work with `M-x diary-mail-entries`
5 votes

smtpmail-send-it: Sending failed: 530 5.7.0 Must issue a STARTTLS command first. u9sm80344949wjy.37 - gsmtp You did not start tls, you need it to open a TLS connection to your gmail account. Not ...

View answer
Sort file names (numbered) in dired
5 votes

Besides @abo-abo answer, I just want to quote the documentation: dired-listing-switches is a variable defined in `dired.el'. Its value is "-Al --si --time-style long-iso" Documentation: ...

View answer
How to copy command output in ansi-term mode?
Accepted answer
5 votes

C-c C-j to activate term-line-mode, then, the terminal buffer act more like a normal text-buffer. Switch back to character mode with C-c C-k. You may be intersted by this function that will help you ...

View answer
Using emacs with thunderbird to compose and respond to mail
5 votes

This should at least, get you started: but compose and send email in emacs. Since python can send mail from the command line, I suspect this would not be too difficult for emacs. This is what I ...

View answer
Kill or copy current line with minimal keystrokes
5 votes

Besides @itsjeyd answer, may I suggest those two functions? (defun xah-copy-line-or-region () "Copy current line, or text selection. When `universal-argument' is called first, copy whole buffer (...

View answer