Join this community to post or comment
Hey guys,

Is there is a way i can restrict emacs from creating backup files only when i want it for certain files ? Either using M-x or through a command line argument when opening a file using 'emacs -nw' ?

I know you can disable backup file creation or set another directory for backup files through .emacs config file. I do not want to disable it completely but would like to avoid it for certain files/sessions.

Arshad Mohammed's profile photoLuis Miguel Castañeda Navas's profile photo
true (setq make-backups-files nil) in your mode hook should work.
Add a comment...
Good day all:

I've been attempting to learn org-mode 8 using both the Org mode 8 Reference manual by Carsten Dominik, as well
as David O'Tooles tutoral.

In David's tutoral, he said to make a new TODO list via: M-shift-RET

However that doesn't work; when I do that, it instead puts the cursor on the next line, and indents.

So I try: alt-x; org-insert-todo-heading, and it says to use: c-c-x shift M, which works correctly.

I'm finding numerous times where there is minor inconsistencies with keys. But the alt-x helps. I'm making
keyboard notes as I go along.

So let me ask; is there something wrong with my Emacs/Org? Synaptic says I have the following:

emacs24-nox v24.5.1
howm v1.4.3-1
org-mode 8.3.3-2
org-mode doc 8.3.3-1

Is there something I can do do? or is it that these tutorials are just a bit out of date?
Yuri Khan's profile photoKantuck Nadie Nata-Akon's profile photo
+Yuri Khan sighs There is always something that has to go wrong. I much prefer the terminal myself due to the speed but I guess I can get use to the GUI version. At least it allows me the use of Org. Thanks for your help. Adding the GUI version to all my servers.
Add a comment...

Gabriel Pozo

Questions  - 
What is the best setting to work with ReactJS?

I finally ended up using this:
Add a comment...

Chang Liao

Questions  - 
So most of the time I use Emacs on a Linux and ssh client from Windows. Then recently I planed to pick up Mac, a lot of the keyboard shortcuts are different. Can anyone recommend some keyboard mapping between these OS?
Michael Lockhart's profile photoKantuck Nadie Nata-Akon's profile photo
To be honest (and apologies for the lateness, I just joined.) I've had to set up my own quick keyboard command reference guide though a simple spreadsheet. The key commands can be slightly different even between GNU Emacs terminal (type emacs -nw) and the GUI GNU emacs. So your not alone.

In my guide I write down the exact key commands to avoid confusion. So for saving for example, I wrote in 'c-x s' and for example to spell check a word 'a-s-4' (alt-shift-4, for the $ mark). I wish honestly they'd teach it that way, not the archaic 'meta' which doesn't exist anymore, and be sure to add the 'shift' key as well.
Add a comment...

John Peck

Questions  - 
I"m using Emacs, and my paragraph filling behavior is strange. I used to get nice filled paragraphs with no indentation in message mode, but now I always get a tab on the second line. Has anyone else seen this?
E. Choroba's profile photo
Seems like someone called set-justification-center.
Add a comment...

zhijia yuan

Questions  - 
I have Emacs 24.4 running on windows 7, I installed Git windows version, and it is in the exec-path, I can run git status in eshell, but whenever I try to run something like git push to a remote repo (on github), i got error message like this:

'exec' is not recognized as an internal or external command,
operable program or batch file.
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
however, everything is fine if I run git push in a terminal...

I know I can use magit, but I need a package that calls git push by a shell-command call, so magit is not an option here.

I am pretty sure this is common and duplicatable on any windows system
zhijia yuan's profile photobin chen's profile photo
Add a comment...
Anybody got significant performance reducing in shell programs launched in tmux under ansi-term? I use tmux in this case to get properly displayed escape sequences.
#Emacs   #TMux  #GHCi
Rob Shinn's profile photoYuriy Pitometsu's profile photo
+Rob Shinn just checked multi-term. Work like ansi-term: don't show properly ^B, with tmux fine except performance too. No difference. On the screenshot ghci with plain output, without pretty-printing.
Add a comment...
What config for web-mode most modern and suitable for now? ac-html/yasnippet/emmet/ac-emmet or something else, what setup do you use for web mode?
#Emacs  #Web #Html
Yin Hang (Henry)'s profile photoYuriy Pitometsu's profile photo
After some research, I got this:

;; init-web-mode.el
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.tpl\\(\\.php\\)?\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.jsp\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.xhtml?\\'" . web-mode))

(setq web-mode-ac-sources-alist
'(("css" . (ac-source-css-property))
("html" . (ac-source-words-in-buffer ac-source-abbrev))))

;; init-emmet-mode.el
(add-hook 'sgml-mode-hook 'emmet-mode) ;; Auto-start on any markup modes
(add-hook 'html-mode-hook 'emmet-mode)
(add-hook 'nxml-mode-hook 'emmet-mode)
(add-hook 'css-mode-hook 'emmet-mode) ;; enable Emmet's css abbreviation.
(add-hook 'web-mode-hook 'emmet-mode)

;; see

(defun init-setup-emmet-for-web ()
"Check `emmet-mode' for CSS or HTML language and setup `emmet-mode'."
(let ((web-mode-cur-language
(if (string= web-mode-cur-language "css")
(setq emmet-use-css-transform t)
(setq emmet-use-css-transform nil))))

(eval-after-load 'web-mode
'(add-hook 'web-mode-before-auto-complete-hooks 'init-setup-emmet-for-web))

;; init-ac-emmet.el
(add-hook 'sgml-mode-hook 'ac-emmet-html-setup)
(add-hook 'html-mode-hook 'ac-emmet-html-setup)
(add-hook 'css-mode-hook 'ac-emmet-css-setup)
(eval-after-load 'web-mode
(nconc (assoc "html" web-mode-ac-sources-alist) '(ac-source-emmet-html-aliases
(nconc (assoc "css" web-mode-ac-sources-alist) '(ac-source-css-property

;; init-ac-html.el
(defun init-setup-ac-for-html ()
"Enable HTML sources for `auto-complete-mode'."
(require 'ac-html)
(require 'ac-html-default-data-provider)
(ac-html-enable-data-provider 'ac-html-default-data-provider)
(make-local-variable 'ac-sources)
(setq ac-sources (append '(ac-source-html-tag

(add-hook 'html-mode-hook 'init-setup-ac-for-html)

(defun init-setup-ac-for-haml ()
"Enable HAML sources for `auto-complete-mode'."
(require 'ac-haml)
(require 'ac-html-default-data-provider)
(ac-html-enable-data-provider 'ac-html-default-data-provider)
(make-local-variable 'ac-sources)
(setq ac-sources (append '(ac-source-haml-tag

(add-hook 'haml-mode-hook 'init-setup-ac-for-haml)

(defun init-setup-ac-for-slim ()
"Enable SLIM sources for `auto-complete-mode'."
(require 'ac-slim)
(require 'ac-html-default-data-provider)
(ac-html-enable-data-provider 'ac-html-default-data-provider)
(make-local-variable 'ac-sources)
(setq ac-sources (append '(ac-source-slim-tag

(add-hook 'slim-mode-hook 'init-setup-ac-for-slim)

(defun init-setup-ac-for-jade ()
"Enable JADE sources for `auto-complete-mode'."
(require 'ac-jade)
(require 'ac-html-default-data-provider)
(ac-html-enable-data-provider 'ac-html-default-data-provider)
(make-local-variable 'ac-sources)
(setq ac-sources (append '(ac-source-jade-tag

(add-hook 'jade-mode-hook 'init-setup-ac-for-jade)

;; `web-mode' setup

(defun init-setup-ac-for-web ()
"Prepare `auto-complete-mode' for `web-mode'."
(eval-after-load 'ac-html
(require 'ac-html)
(require 'ac-html-default-data-provider)
(ac-html-enable-data-provider 'ac-html-default-data-provider)

(add-hook 'web-mode-hook 'init-setup-ac-for-web)

(eval-after-load 'web-mode
'(nconc (assoc "html" web-mode-ac-sources-alist) '(ac-source-html-tag
Add a comment...
Hi there! I use next setup in my .Xresources to use Super and Hyper keys in my Emacs on terminal:

! Key translations: Super & Hyper in Emacs
! Make Super, Hyper and Print - Super key, Fn - Hyper, AltGr - Meta
URxvt*keysym.Super_L: \030@s
URxvt*keysym.Super_R: \030@s
URxvt*keysym.Hyper_L: \030@s
URxvt*keysym.Hyper_R: \030@s
URxvt*keysym.Print: \030@s
URxvt*keysym.XF86WakeUp: \030@h
URxvt*keysym.ISO_Level13_Shift: \033

And it work like a charm besides I should type them as prefixes.
BUT, I know, most modern terminals use Alt to send Esc (\033). So is there any way to configure urxvt to prevent autorepeating of such additional modifier keys, and act on hold with other keys?

E.g.: not H f, but H-f.
Yuriy Pitometsu's profile photo
Add a comment...
I use next code to make emacs more friendly with tmux:

;; tmux integration

(defadvice terminal-init-screen
;; The advice is named `tmux', and is run before `terminal-init-screen' runs.
(before tmux activate)
;; Docstring. This describes the advice and is made available inside emacs;
;; for example when doing C-h f terminal-init-screen RET
"Apply xterm keymap, allowing use of keys passed through tmux.
Use xterm default colors in tmux."
;; This is the elisp code that is run before `terminal-init-screen'.
(if (getenv "TMUX")
;; Use the xterm color initialization code
;; use xterm keymap for ctrl + shift
(let ((map (copy-keymap xterm-function-map)))
(set-keymap-parent map (keymap-parent input-decode-map))
(set-keymap-parent input-decode-map map)))))

But I still have next problem: when I run emacs GUI, and then attach to emacs from terminal client, that code nod called. How can I add it for this case also?
Yuri Khan's profile photoYuriy Pitometsu's profile photo
+Yuri Khan now it worked, thanks. But not protected for old terminals...
Add a comment...
New to emacs and org mode... trying to stay orrganized in life with absolutly no programming expierience. Should i continue to dive into org mode or should i learn more of the core emacs itself? Where do i go to learn more of emacs Core and how do i connect in irc from within emacs and how can i recieve my email in emacs assumin i know nothing of programming.
Cass Petrus's profile photoClinton “Methinx” Lee's profile photo
+Cass Petrus Everything helps me at this point I'm just trying to absorb and do what examples I can and practice practice practice.!
Add a comment...

Bin Felix Liu

Questions  - 

Plink comint mode in emacs: Text read only etc.
emacs putty plink
i want to use a new comint mode for plink(putty), i put the code in init.el.

But if M-x run-plink, i got "Text is read-only " and "comint-send-input: Current buffer has no process". There is no prompt Symbol and i can't input. I just want to have a new comint mode for plink(putty).

I'm new with emacs. Can somebody please see that?

Add a comment...

Steve Dowe

Questions  - 
Can anyone suggest a mixed major mode that does indenting properly for PHP/HTML files?  Thanks.
Steve Dowe's profile photoDarryl Hebbes's profile photo
Check out this snippet for setting up other PHP mode like behaviour
Add a comment...

Marcelo Muñoz

Questions  - 
Is there any way to deal with blocks like this?

" SELECT * FROM table "

The idea is to keep aligned quotes and also insert new lines in quotes.


George Jones's profile photoMarcelo Muñoz's profile photo
+Ben Samuel​​​ yes, it is very close!,  great idea from magnars
Add a comment...
Anyone know of some good resources for learning emacs lisp and developing a new major mode? Trying to create one that would allow for Salesforce development on emacs, but so far I'm finding little in terms of resources. 
Philip Yassin's profile photobin chen's profile photo
there is already apex mode. I guess you are interested in how to sync the code to cloud. See 
Add a comment...
Hey Guys,

I'm a new emacs user, so please don't get hard on me, but I've ran into some trouble. This is of course a basic problem but one I can not get the answer too. How do I exit a document and/or an emacs based game without exiting emacs all together.

Mikey G
Adam Sjøgren's profile photoSibtain Naqvi's profile photo
Just close the buffer/file = C-x k
Or C-h m = to find the proper key to exit.
Add a comment...

Leonardo Bighi

Questions  - 
Can you guys help me with a very basic problem?

I started using org-mode a couple weeks ago, but I could never make the feature of moving subtrees to work for me. That one that you do M-S-up or M-S-down.

Just to avoid repeating myself, I described my problem here on Reddit with pictures.

It's not a long text. Any help is appreciated.

PS: I tried to diagnose why it's happening. I deleted everything from my init.el, but the problem persists.
Folmer Fredslund's profile photoLeonardo Bighi's profile photo
+Yin Hang You are absolutely correct. I was using the wrong keyboard shortcuts, I don't know why.
Add a comment...

Jackson David

Questions  - 
I use Emacs on Windows 8.1. I just updated to Emacs pretest 25.0.94. The startup message is shown below. Part of my init.el is shown below, too. According to the startup message, there exists a void-function named gensym. I use tabbar-ruler, which relys on powerline.
(setq tabbar-ruler-global-tabbar t)
(setq tabbar-ruler-global-ruler nil)
(setq tabbar-ruler-popup-menu t)
(setq tabbar-ruler-popup-toolbar t)
(setq tabbar-ruler-popup-scrollbar t)
(require 'tabbar-ruler)
(global-set-key (kbd "C-c t") 'tabbar-ruler-move)
I googled the situation and found the following link: However, it didn't help.
Add a comment...
Is there any way to use ESC <right> as a different from M-<right> key in Emacs on terminal?
It's only this one little issue with terminal emacs left to switch.
Yuriy Pitometsu's profile photo
...and iTerm2 for OS X.
Add a comment...

Qin Ba

Questions  - 
I am new to python mode of emacs. I have this pain when executing python codes.

In the Inferior Python buffer, I could get the correct outcome without any bugs but these messages showed op every time.

1. When using "elpy-shell-send-region-or-buffer":
__pyfile = open('''source_file_name''');
exec(compile(, '''source_file_name''', 'exec'));

2. When using "python-shell-send-file":
__pyfile = open('''temp_file_name''');
exec(compile(, '''source_file_name''', 'exec'));
import os;

How can I remove these message? Hope someone can help me. Thank you. 
Add a comment...