Stream

Join this community to post or 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.

Sincerely,
Mikey G
1
Adam Sjøgren's profile photoSibtain Naqvi's profile photo
6 comments
 
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. https://www.reddit.com/r/orgmode/comments/4l0vkl/noob_question_orgmovesubtreeup_is_not_working_as/

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.
1
Folmer Fredslund's profile photoLeonardo Bighi's profile photo
3 comments
 
+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: https://github.com/milkypostman/powerline/issues/40. However, it didn't help.
1
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.
1
Yuriy Pitometsu's profile photo
9 comments
 
...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(__pyfile.read(), '''source_file_name''', 'exec'));
__pyfile.close()

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

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

耿嵩

Questions  - 
 
Is there any advice using emacs to program in scala?
3
耿嵩's profile photoLauri Niskanen's profile photo
2 comments
 
Has anybody ensime running well with multiproject sbt setup? 
Add a comment...
 
I'm tearing my hair out in dispair!!!

I have a lot of errors in my flychecker in my python code. I use jedi. After I upgraded my debian I get a lot of these errors and I don't know where to start searching for a solution.

Can you give me any pointers?

Thanks in advance.
1
1
Philip Schwartz's profile photoIlya Kalashnikov's profile photoFusheng Yu's profile photo
9 comments
 

M-x flycheck-list-errors
Add a comment...

耿嵩

Questions  - 
 
What kind of programming lans does everyone usually develop using emacs?
1
Nguyen Vinh Linh's profile photo耿嵩's profile photo
6 comments
耿嵩
 
Thanks.
Add a comment...

Faxiang Zheng

Questions  - 
 
Does anyone use idlwave-mode in Emacs for IDL (Interactive Data Language) ? It basically support completion (idlwave-complete) which is bound to "C-M-i" and "M-tab". But I want a more modern style of auto completion with tooltip like auto-completion or company-mode. So how to integrate idlwave-mode with auto-completion or company?
1
Jonathan H's profile photoFaxiang Zheng's profile photo
2 comments
 
+Jonathan H I've been using company-mode for nearly 1 year, and company-capf is in my company-backends as I just checked. May I ask you how to setup company-capf to complete IDL functions and procedures? 
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
1
Alex Schroeder's profile photozhijia yuan's profile photo
3 comments
 
+Alex Schroeder everything works under system shell (cmd),so i dont think it is a path issue...
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
1
Rob Shinn's profile photoYuriy Pitometsu's profile photo
5 comments
 
+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
1
Yin Hang (Henry)'s profile photoYuriy Pitometsu's profile photo
2 comments
 
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 http://web-mode.org/

(defun init-setup-emmet-for-web ()
"Check `emmet-mode' for CSS or HTML language and setup `emmet-mode'."
(let ((web-mode-cur-language
(web-mode-language-at-pos)))
(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
'(progn
(nconc (assoc "html" web-mode-ac-sources-alist) '(ac-source-emmet-html-aliases
ac-source-emmet-html-snippets))
(nconc (assoc "css" web-mode-ac-sources-alist) '(ac-source-css-property
ac-source-emmet-css-snippets))))

;; 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)
(ac-html-setup)
(make-local-variable 'ac-sources)
(setq ac-sources (append '(ac-source-html-tag
ac-source-html-attr
ac-source-html-attrv)
ac-sources)))

(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)
(ac-haml-setup)
(make-local-variable 'ac-sources)
(setq ac-sources (append '(ac-source-haml-tag
ac-source-haml-attr
ac-source-haml-attrv)
ac-sources)))

(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)
(ac-slim-setup)
(make-local-variable 'ac-sources)
(setq ac-sources (append '(ac-source-slim-tag
ac-source-slim-attr
ac-source-slim-attrv)
ac-sources)))

(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)
(ac-jade-setup)
(make-local-variable 'ac-sources)
(setq ac-sources (append '(ac-source-jade-tag
ac-source-jade-attr
ac-source-jade-attrv)
ac-sources)))

(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
'(progn
(require 'ac-html)
(require 'ac-html-default-data-provider)
(ac-html-enable-data-provider 'ac-html-default-data-provider)
(ac-html-setup))))

(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
ac-source-html-attr
ac-source-html-attrv)))
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.
3
Yuriy Pitometsu's profile photo
5 comments
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")
(progn
;; Use the xterm color initialization code
(xterm-register-default-colors)
(tty-set-up-initial-frame-faces)
;; 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?
3
Yuri Khan's profile photoYuriy Pitometsu's profile photo
4 comments
 
+Yuri Khan now it worked, thanks. But not protected for old terminals...
Add a comment...
 
What are the best JavaScript libraries for Emacs?
2
1
Marcin Antczak's profile photoJim Franklin's profile photospecops872's profile photo
3 comments
 
the open source ones ;)

https://www.gnu.org/software/librejs/
Add a comment...
 
Hey,
does someone knows, how does the c file has to look that gtags will generate tags. So far it only sees enum and one struct in my file no functions :/
1
Krzysztof Czapla's profile photo
13 comments
 
Shame on me folks... I have a syntax error in ifdef block. That is why gtags couldnt parse the file. Problem solved. Thank u.
Add a comment...

John Peck

Questions  - 
 
I have a huge makefile with lots of targets. Is there a good way for me to browse this file with Emacs? I tried Speedbar, but it didn't seem to let me jump between targets or variables. Thanks for your help.
1
Left Right's profile photoJohn Peck's profile photo
5 comments
 
+Noah Friedman: imenu was what I wanted. Thanks a lot.
Add a comment...

J. Gerald

Questions  - 
 
Hello community.
Has somebody ever work with "org babel" and tangle the source block code to an specific directory, is possible to tangle all the src blocks to a default folder. I mean "tangle" not just execute the source code. Thank you.
2
Ciarán Mulloy's profile photoJ. Gerald's profile photo
3 comments
 
Thank you everyone, finally i had to modify "ob-tangle.el" to allow a new header arg ":base-dir" and every tangle block goes directly to that folder.
Add a comment...

Byung Choi

Questions  - 
 
Is there a way to post on Google+ using Emacs?

6
Ryo Cook's profile photoChris Patti's profile photo
10 comments
 
There is no way to post to G+ from emacs because G+ has never opened their posting APIs. Google has never actually been serious about social networkingf :)

Add a comment...

Tedd Martin

Questions  - 
 
Hi people, I have a little issue, hope anyone can give me some advise.

In a new installation of emacs I was trying to install auto-complete.el, which I used in the past but now you can use melpa to install it, something that I didn't in the past or was not available.

So I followed the instruction and put the code in .emacs, then I installed auto-complete.el using this code that was in the manual:

(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(ac-config-default)

When I checked the directory for this extension it doesn't exists, it seems like all the files are in the elpa dic...but still works, how is working then?¡¡

When I rebooted emacs, a warning message regarding my load-path appears, this was what I was using:

(add-to-list 'load-path "~/.emacs.d")

And this is the warning:

Warning (initialization): Your `load-path' seems to contain
your `.emacs.d' directory: ~/.emacs.d/
This is likely to cause problems...
Consider using a subdirectory instead, e.g.: /home/user/.emacs.d/lisp

So I changed to (add-to-list 'load-path "~/.emacs.d/elpa").

Will this affect me in the future? It has something to do with melpa?

Thanks.
1
Sachin's profile photoTedd Martin's profile photo
3 comments
 
+Left Right and +Sachin p thank you very much, seems like it works fine :) In the future if I install an extension manually I will put it in a lisp dic.

Add a comment...