Join this community to post or comment

Mandar Gokhale

Discussion  - 
An Emacs quirk that I saw today – we usually think of C-u as providing a numeric prefix argument for a function, i.e. `C-u 10 M-x this-function`. I didn't know, however, that passing `C-u` without an argument would default to 4.(

I tracked this down to simple.el. "C-u runs the command universal-argument, which is an interactive
compiled Lisp function in `simple.el`." Without the comments, it looks like:

(defun universal-argument ()
"Begin a numeric argument for the following command."
(setq prefix-arg (list 4))

Anyone have further comments / insights about this? I wonder if there is a reason if 4 is the default here, and I don't completely understand how the last snippet above works.
20.12 Prefix Command Arguments. Most Emacs commands can use a prefix argument, a number specified before the command itself. (Don't confuse prefix arguments with prefix keys.) The prefix argument is at all times represented by a value, which may be nil , meaning there is currently no prefix ...
Moe Bius's profile photoEric Roode's profile photo
I use that for comment lines sometimes, to separate sections: C-u C-u C-u =
Add a comment...

Felix Albrecht

Discussion  - 
Ivan Arabadzhiev's profile photoBen Key's profile photo
Ben Key
As a matter of fact, Bjarne Stroustrup invented the C++ programming language after I attempted to explain to him the language of the universe. Bjarne Stroustrup got a few details wrong of course. But with C++14, most of the problems have been resolved.


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...
Myrth color theme updated to ver. 0.2.0
Eye-candy light clear minimalistic EMACS color theme
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...

Chris Patti

Articles  - 
Nano How-To explaining how to setup a root file system with only emacs.
Left Right's profile photoNick Alcock's profile photo
Those libraries are mostly optional -- Eli would be most unhappy if they were mandatory. :)
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...

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...
#Emacs dired-based file browser
ranger.el - Bringing the goodness of ranger to dired!
Yuriy Pitometsu's profile photo
Or via el-get:
(:name ranger
:description "Bringing the goodness of ranger to dired!"
:type github
:pkgname "ralesi/ranger.el"
:depends (diminish))
Add a comment...

About this community

A community for Emacs lovers. Now you don't have to restrict those emacs posts because your friends and family have no clue what you are talking about!
I simply don't get those who use antidepressant medicine. Just start up Emacs and start playing with Melpa, Orgmode or one of the countless other modes. I find it rewarding and I can produce stuff that makes my work life and hobbies easier.
Nick Alcock's profile photoEric S. Johansson's profile photo
+Nick Alcock there is a lot of commonality in oral/aural interfaces. One commonality is the bootstrapping process. The other is the need to bypass the keyboard interface and be able to do very invasive and impolite things to application internals
Add a comment...
These tutorials on org mode are quick and very clear. Really nice.
Jim Franklin's profile photo
thx, perfect timing! I'm just giving org mode a go this week.
Add a comment...

John Cook

Discussion  - 
How to create ASCII art diagrams in org-mode with ditaa
Felix Albrecht's profile photoJim Franklin's profile photo
thx :thumbsup:
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...

bin chen

Packages  - 
find-file-in-project v5.0

find file or directory in project

change log:

- `M-x ffip-show-diff` show the the diff in "*ffip-diff*" buffere where you can open the file corresponding to the diff hunk. For example, you can M-x ffip-show-diff to view the git commit and related files. If you use Mercurial, M-x 5 ffip-show-diff.
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...

Zak Elep (zakame)

Announcements  - 
Philippine Emacs Users' Group had its first meetup last Wednesday:

It was just a simple get-together of some 6 people, I talked a bit about some ways to set up customizing emacs (from .emacs to .emacs.d/init.el and using stuff like use-package, git submodules, and previewing tarsius_' borg,) while Karlo Licudine talked about his experience of using Emacs (having started just a few months ago, and on Window for Haxe programming to boot!)

We'll definitely have a next meetup this July!
1st ever Emacs meetup! Bring your ~/.emacs.d ! * Topics - The many ways of ~/.emacs.d - Custom show-and-tell - What else you guys bring (and time allowing!) About the Venue. Mozilla Community Space Manila. Community Organization. Mozilla Community Space Manila's photo.
Add a comment...

Alex Schroeder

Discussion  - 
I always keep going back to Planet Emacsen. So many interesting blog posts. Plus, Emacs News by +Sacha Chua. Also, not too active. Perfect for me.
weather from (use-package wttrin :ensure t :commands (wttrin) :init (setq wttrin-default-cities '("Cheltenham" "Bristol"))). This sets the list of available cities. You can then use M-x wttrin to see the weather. This will prompt for the city and then show a buffer with the forecast.
Add a comment...
#ZSH -like auto-completion for file paths in #Helm !
Yuriy Pitometsu's profile photo
UPD: see suggestions here for any part of directory name matching.
Add a comment...