Stream

Join this community to post or 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?
1
Ben Samuel's profile photoGeorge Jones's profile photo
3 comments
 
Avoid the Mac. You will spend your life working around its quirks. 
Add a comment...

John Peck

Questions  - 
 
I"m using Emacs 25.1.50.2, 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?
1
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
1
zhijia yuan's profile photobin chen's profile photo
4 comments
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...

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...
 
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 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...

Marcelo Muñoz

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

" SELECT * FROM table "
" WHERE "
" CONDITION-1 AND "
" CONDITION-1 "

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

Thankss!!

2
George Jones's profile photoMarcelo Muñoz's profile photo
5 comments
 
+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. 
2
Emacs Wiki's profile photoPhilip Yassin's profile photo
4 comments
 
Look at the basic, very simple major mode I made for pixilang: https://github.com/xaccrocheur/pixilang-mode
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.

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...
 
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...
 
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 photo
9 comments
 

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