Stream

Join this community to post or comment

Win Treese

Customization  - 
 
If you've got your init file in org-mode, sometimes it's nice to find problems by tracing when different blocks are loaded. Turns out you can hack org-babel's method of writing comments to do just that: http://www.treese.org/win/2015/08/tracing-emacs-init/
7
Add a comment...

ErgoEmacs

Customization  - 
 
#emacs a new comand to sort dired listing by time, size, in dired http://ergoemacs.org/emacs/dired_sort.html
Here's a emacs command that lets you sort dired file listing by any {time, date, size, name}. (defun xah-dired-sort () "Sort dired dir listing in different ways. Prompt for a choice. URL `file:///home/xah/web/ergoemacs_org/emacs/dired_sort.html' Version 2015-07-30" (interactive) (let (ξsort-by ...
9
Yuriy Pitometsu's profile photoErgoEmacs's profile photo
5 comments
 
+Yuriy Pitometsu are you sure? am asking because i'm sure but not sure...
i used mac from 1992 to 2010, but haven't in recent years (only in short duration). But since mac os x, i typically also install gnu ls because i prefer it. But, i don't remember emacs ever told me a error of no gnu ls found when one uses dired. It's such a basic feature. Also, according to the doc, emacs will use its own implementation of ls if OS doesn't have it.

sorry for the long wind...
Add a comment...

Kaviraj Kanagaraj

Customization  - 
 
A simple emacs windows customization
Everytime you split a window(both vertical and horizontal) in Emacs, by default the same buffer appears in newly created window. We can customize it.
5
1
Jürgen Christoffel's profile photofi nurr's profile photoPashh PGH's profile photo
5 comments
fi nurr
 
This is why C-x 4 b in stock emacs exists or e.g. helm-buffers-list opens a buffer in a separate window with C-c o.
Add a comment...
 
Somebody here who uses PHP mode knows how to overwrite some configs?
I mean, because of the project I am working on I need all my php mode config to work according to PSR2 except that I need indentation to be allways two spaces.
I am using editorconfig, but something in php modes seems to be overwrtiing this.
1
Pablo Bernardo (voylinux)'s profile photobin chen's profile photo
9 comments
 
+Pablo Bernardo , raise a issue to prelude developer or to the web-mode developer.

If you prefer html-mode `(setq sgml-basic-offset 4)`, then check my blog post.
Add a comment...

Andreas Tjärnberg

Customization  - 
 
Accidentally hit "(" in a dired buffer and found a new awesome function for dired-mode.
dired-hide-details-mode
9
Chris Smith's profile photoAndreas Tjärnberg's profile photo
6 comments
 
Me: *not going to work tomorrow*. +Chris Smith​
Add a comment...

Remco van 't Veer

Customization  - 
 
I have a new emacs setup! :-)
62
9
郑宇光's profile photoFritz Reichwald's profile photoSylvain Benner's profile photoGabe Montalvo's profile photo
14 comments
 
It's so cool.
Add a comment...

George Jones

Customization  - 
 
+Xah Lee I'd love to see the output of M-x describe-bindings in your default buffer.    I'm doing some reconfig of of the way I work, and I'm particularly interested in how you have function keys setup.

Curious,
---George
1
George Jones's profile photoXah Lee's profile photo
4 comments
Xah Lee
 
you can save it as utf-8, which is becoming the universal encoding these days.
Add a comment...

George Jones

Customization  - 
 
+Xah Lee, this http://ergoemacs.org/emacs/emacs_alias.html is an incredibly useful page pointing to some incredibly useful tools thanks.
  
Was also unaware that "Menu" (linux) is a short cut for M-x
In emacs, you can use alias to shorten commands. For example, make frequently used commands just 1 or 2 letters. Examples of useful alias: (defalias 'yes-or-no-p 'y-or-n-p) ; y or n is enough (defalias 'list-buffers 'ibuffer) ; always use ibuffer (defalias 'perl-mode 'cperl-mode) ; always use ...
9
2
Jürgen Erhard's profile photoGeorge Jones's profile photoXah Lee's profile photoBrian Danilko's profile photo
2 comments
 
+Jürgen Erhard it is when I run without init (emacs -q) on latest source build (This is GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23)
 of 2015-04-23 on octo):


<menu> runs the command execute-extended-command (found in
global-map), which is an interactive compiled Lisp function in
`simple.el'.

It is bound to <execute>, <menu>, M-x.

(execute-extended-command PREFIXARG &optional COMMAND-NAME TYPED)
Add a comment...

John Cook

Customization  - 
 
If you want to put OS-specific code in your initialization file but use the same file everywhere,  you might find this sample code useful.

On Windows, use dired+ and set the default font to Consolas.
On Linux, configure Emacs to play well with the X clipboard and use Inconsolata as the default font.

You can use system-type "darwin" to test for OS X.

(cond
    ((string-equal system-type "windows-nt") ; Microsoft Windows
        (progn
            (require 'dired+)         
            (set-default-font "Consolas")                
        )
    )
    ((string-equal system-type "gnu/linux") ; linux
        (progn
            (setq x-select-enable-clipboard t)
            (set-default-font "Inconsolata")
        )
    )
 )
8
1
Mark Hepburn's profile photoJohn Cook's profile photoJeroen Tiebout's profile photo
3 comments
 
+Mark Hepburn That makes sense, especially if you have a lot of OS-specific or machine-specific configuration. I don't, so I prefer keeping everything in one file.
Add a comment...

Max Polk

Customization  - 
 
For remote emacs sessions in a terminal, one of the best things you can do is ensure your TERM env var is set to xterm-256color instead of xterm, before running emacs.  Assuming your terminal can handle it, you can then do M-x list-colors-display and see if you get huge number of 256 colors instead of just 16.
7
1
Guanghui Qu's profile photo
Add a comment...

Rene Froger

Customization  - 
 
After a long time of fiddling around with my keyboard, I think I've  found a way of flow where I'm satisfied with it. And I like to share it with you.

It's entirely focused on the home row of the keyboard: (https://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/QWERTY-home-keys-position.svg/2000px-QWERTY-home-keys-position.svg.png).

-Setup
First, I have an autohotkey script. With autohotkey, the capslock is remapped to Control key. On my keyboard, it happens that the capslock is on the same row as the letters 'ASDFGHJKL;'.

When I press 'C-f', it will send 'C-f'. But when I press 'Control' only, it will send the key '[f9]'. Why I choosed that key? It one of the most less used keys, I guess.

And I have bounded that key to a prefix. So it will looks like this:

'(define-key evil-normal-state-map (kbd "C-f") 'foobar-1)'
'(define-key evil-normal-state-map (kbd "<f9> f") 'foobar-2)'

Press 'C-f' simultaneously for 'foobar-1', or roll with 'Control' and 'f' for 'foorbar-2'.
But there is more. With the the package key-seq(https://github.com/vlevit/key-seq.el) I extended my workflow. 

So when you're fast:

'(key-seq-define evil-normal-state-map "fl" 'foobar-3)'

But when you're doing it normally, 

'(define-key evil-normal-state-map "fl" 'foobar-4)'

Usually it will look for the character 'l', after pressing 'f', but you get the idea.

- Ok, what now?
It's all the same key 'f', but with 4 different dimensions.
If you're wondering what I achieved with, on the first sight, a quite complex setup? I do not need to move my fingers from the home row, which is really comfortable. er. I can achieve it with the same key, because every key on the keyboard have 5 possibilities without pressing a row of keycombinations now. You'll get accustomed to this workflow.
3
1
Yuriy Pitometsu's profile photoLeu Zhe's profile photoJeroen Tiebout's profile photo
2 comments
Leu Zhe
 
Impressive, but can you share your configuration code with us?
Add a comment...

Jürgen Christoffel

Customization  - 
In emacs we can open a file in a non-existent directory and then use the command M-xmake-directory to create the parent directory (or directories) if …
4
Kaviraj Kanagaraj's profile photo
 
Good idea.. I think this can also be done without M-x make-directory. All u need to do is just open the file and start editing.. While saving the buffer for the first time, emacs prompts you whether to create a directory. 
Add a comment...

Nat Sheppard

Customization  - 
 
WHAT HAS SCIENCE DONE?
clippy.el - Show tooltip with function documentation at point
43
14
Pierre Rambaud's profile photoMetro Wind's profile photoPeter Eisentraut's profile photoStephen Andrews's profile photo
9 comments
 
Shoot me now. :p
Add a comment...

Ernst Jaja

Customization  - 
 
Seven specialty Emacs settings with big payoffs
Let's skip the bread and butter Emacs modes and focus on settings that are hard to find, but which once activated provide a big payoff. For reference, my complete Emacs settings are defined in init.el and lisp/packages.el ...
27
5
Michael Lausch's profile photoStan Dyck's profile photo
Add a comment...

xie longtao

Customization  - 
 
Is there any way to let compile-command forget the last shell command?  When I use f90-mode and gnuplot-mode in one emacs session, if I compile in gnuplot-mode first and then in f90-mode, the compile-command is not make -k but the command used in the gnuplot-mode which is trouble for me.
1
Max Gusev's profile photoxie longtao's profile photo
2 comments
 
+Max Gusev
wonderful suggestion. It should be the right solution to my problem. I will try it out.
Add a comment...

Alexander Yakushev

Customization  - 
 
Just some silly light-hearted stuff for your Emacs.
A couple of years ago I have discovered this silly definition of the word Yegge on Urban Dictionary. For those who don't know Steve Yegge is a software developer, a former Google employee, and an author of his blog Stevey's Blog Rants. So the UD definition of "Yegge" goes as following: ...
11
1
Ross Bagley's profile photoXah Lee's profile photoMatt Proud's profile photo
4 comments
Xah Lee
 
+Ross Bagley thanks. I was crazily searching for news yesterday. :>
Add a comment...

Ernst Jaja

Customization  - 
 
View and edit your Google Calendar or another calendars inside Emacs
emacs-calfw - A calendar framework for Emacs
32
11
Marcin Michalak's profile photoMatthias Scheidegger's profile photoVadim Nasardinov's profile photoJeroen Tiebout's profile photo
3 comments
 
this is brilliant really!
Add a comment...

Rene Froger

Customization  - 
 
Edit text fields inside Chrome with your Emacs configuration!
Allow user to edit web-page textareas with Emacs (and other editors).
22
3
Left Right's profile photoMaxime Déraspe's profile photoSylvain Benner's profile photoJeroen Tiebout's profile photo
5 comments
 
It's not directly though, you will need to enable K2Emacs plugin (this one: https://raw.githubusercontent.com/myuhe/KeySnail_Plugin/master/K2Emacs.ks.js).
Add a comment...

Rene Froger

Customization  - 
 
Check this out, if you are active in creating new programming files. 
The automatically headers will save you around 10% of your time. 

http://www.reddit.com/r/emacs/comments/349779/pro_tip_get_automatic_headers_when_create_new/
9
1
Kinley Dorji's profile photoJack D's profile photoJeroen Tiebout's profile photo
3 comments
Jack D
 
LOL. You spend 10% of your time writing file headers? Hope you get paid by the hour :-)
Add a comment...