EzDevInfo.com

Prelude

Swift µframework of simple functional programming tools

What should I use as a config/settings file with emacs prelude?

I would like to add a hook, so that each time I open a new file, projectile is enabled. However, I don't know where to add it so that emacs will read it. Any hints?


Source: (StackOverflow)

Unset 'Tab' binding for yasnippet?

The Tab keybinding of yasnippet often overwrites other useful keys.

Is there a way to disable Tab binding of Yasnippet to enable other Tab usage?


Source: (StackOverflow)

Advertisements

Is there a way to view a list of Prelude functions from the Haskell console?

Is there a way to view a list of Prelude functions (such as Data.Char) from the Haskell console, instead of visiting Hoogle?


Source: (StackOverflow)

I use Emacs with Prelude and want to re/write git-autocommit-mode

Where inside .emacs.d should I put the source code? How should I publish my changes? This is my first attempt at writing an Emacs mode. What are the current commendations?

proggress

I'm not sure if I did it properly but I have added following to my

~/.emacs.d/personal/personal.el

(add-to-list 'load-path "~/emacs.d/vendor")
(require 'git-auto-commit-mode)

then I did 'git clone myrepo' in the vendor directory.


Source: (StackOverflow)

How to save a list of all the installed packages in Emacs 24?

I am using prelude as a base Emacs configuration. I have installed lots of packages from the package manager, and I want to use my settings on another machine.

I don't want to carry the installed packages and also I don't want to create a list manually.

What is the way of saving a list all the installed packages into prelude-package.el or any other file so that when I take this configuration to my other machine, they automatically get installed there on first use?


Source: (StackOverflow)

How to TAB to auto-complete with org-mode?

I've installed auto-complete-mode, and I'm using org-mode. When I hit TAB to auto-complete words, it instead tries to indent the line. Sometimes it indents the whole paragraph, sometimes it does nothing.

I tried customizing the variable (setq tab-always-indent 'complete) and changing it to nil, but now when I hit TAB, it just inserts tab spaces across the screen.

I know it's possible to successfully use org-mode with yasnippet and auto-complete both working correctly, because with Emacs Live it works out of the box.


Source: (StackOverflow)

Separating Line Numbers from Text in Terminal: Emacs

When I run emacs in Terminal mode and have the global-linum-mode option enabled , the line numbers are very close to my text and it is really irritating for the eyes. Is there a way to separate the line numbers from the text in Emacs?


Source: (StackOverflow)

Emacs 24.5 with prelude stuck on contacting host melpa.org

I'm running emacs 24.5 installed via homebrew. for some weird reason my emacs gets stuck on Contacting host: melpa.org:80

I even tried a fresh install of emacs (removed .emacs.d folder as well) Also i'm able to ping the url melpa.org through terminal.

Any ideas on how to fix this.


Source: (StackOverflow)

Emacs Prelude: Background Color

I installed the Emacs Prelude as suggested in https://github.com/bbatsov/prelude . I find the background-color grey of the Zenburn theme to be disturbing. I wish to change the background-color to black. I tried (set-background-color "black") ,but it is not working. The background-color still remains grey. Can someone help on how to fix this ?


Source: (StackOverflow)

Triggering autocomplete in emacs-prelude

I installed emacs prelude in cygwin via the simple curl installation. I open a test.js file and try typing "document." to see autocomplete but nothing pops up. Admittedly I'm totally an emacs/prelude newbie, is there something else I should be doing to get it to autocomplete?


Source: (StackOverflow)

Setting SHIFT+arrow keys to select text in emacs prelude

In emacs prelude I want SHIFT+arrow to select text. By default SHIFT+arrow is assigned to windmove. I've created a windmove.el file in my personal/preload folder with the following contents

(windmove-default-keybindings 's)

But with this both shift and command key are bound to windmove.

How can I bind only command key?


Source: (StackOverflow)

Customize the list of packages that emacs-prelude provides

I see at this link how emacs prelude ensures that a set of packages is installed when emacs starts. I was wondering if I could somehow extend the variable prelude-packages to add some other packages, without changing the prelude-packages.el file?

Barring that I was wondering how I could define a list of packages that are installed at start-up if they aren't currently installed.


Source: (StackOverflow)

What actually $ function does in haskell?

I know

$ :: (a->b) -> a -> b
f $ x = f x

Intuitively it seems to me, like to say, 1. $ delays the evaluation of the function to its left 2. evaluates whats to its right 3. feeds the result of its left to its right.

And it makes perfect sense to me when,

ghci> length $ [1..5]
5
ghci> ($) length [1..5]
5

What I do not understand is why,

ghci> ($ [1..5]) length
5

Judging from the type of $, isn't that its (first) argument should be a function ?


Source: (StackOverflow)

Emacs Prelude, Smartparens, and OsX

I'm using OSX 10.9, iTerm2, Emacs Prelude, and Clojure with all the modes that entails most relevantly, smartparens. Good so far.

The short version is: has anybody out there found a harmonious way to use all of this together with OSX Mission Control?

The longer version goes: I want to be able to use commands like sp-forward-slurp-sexp, which has a default keybinding of C-<right>, better known as the default OS-level shortcut for "switch Spaces right via Mission Control." I can re-map that fairly easily (say, to C-Shift-<right>) -- but now, I discover that C-<right> actually seems to be sending something like M-[1;4A. Instead of triggering sp-forward-slurp-sexp, you get sp-wrap-with-pair "[". Uhm.

I dug up this dissertation on re-mapping keys, which is very thorough, but also involves re-mapping rather a deal of stuff, then disabling the parts of paredit that are listening for the M-[ command. While this technically seems to work, I actually rather like having sp-wrap-with-pair enabled. Perhaps a better option would be to embrace the theoretically equivalent C-( -- except iTerm2 only interprets that as a literal 9, and C-) as 0. This SO post chews on this problem, and gets as far as a tantalizing comment suggesting that C-( and C-) simply be re-mapped to escape sequences that emacs can map back to C-( and C-) -- but frankly, I haven't a clue how to figure out what escape sequences those should be.

Bringing it all home: has anybody found a way to use all of these tools (Mission Control, iTerm2, Emacs Prelude, smartparens) together without having to re-wire or disable parts of some or most of them? Or: who has the most elegant re-wiring? Anybody figured out the C-)-to-escape-sequence-back-to-C-) trick yet?

Edit

Stabbing in the dark, I've done the following: 1. Set iTerm to send an escape sequence for the keyboard shortcut Ctrl-Shift-0 (C-S-)) of SPRTPRN. 2. Put this in my emacs config:

(define-key input-decode-map "\eSPRTPRN" [C-right-paren])
(global-set-key [C-right-paren] (kbd "C-)"))

...it does not work, but I've a hunch I'm getting closer. I think.

Edit, Again

I realized something: the notion that Shift doesn't work here doesn't make sense to me. At least on my emacs install, M-< and M-> jump to the beginning and end of a buffer, respectively -- and to use those commands, I have to actually press Meta-Shift-<. Huh.


Source: (StackOverflow)

Customizing the Emacs Monokai Theme to have a more Sublime Text 2 look

I am using Emacs Prelude. I didn't find most of the custom themes comfortable. I really liked Sublime Text 2's Monokai theme, so I installed the Monokai theme ported for Emacs. Though it is more or less similar to Sublime Text 2's Monokai, there are some differences which I want to correct, so as get my Emacs Monokai more close to Sublime's Monokai.

For example I don't want every Python keyword to be the bold pinkish. I would be prefer keywords like class,def to have a blue color than the pink ones and I would prefer the function arguments to have an orange color.

The Emacs Monokai theme seems to color the variable name to an orange color, which I don't want. How do I implement this? I checked the monokai-theme.el file, but I don't know what variable to edit and what variable to add to give the features in color changes I mentioned above.


Source: (StackOverflow)