What do you add to your .emacs file to use msysgit bash inside emacs ?
I just modified the cygwin instructions for msysgit replace cygwin with msysgit everywhere in these .
The only thing i can't do is run ssh or vim inside the bash...
directory completions work with windows style drive names prepended at the beginning.
Add this to your "_emacs.el" - it works for me:
;; When running in Windows, we want to use an alternate shell so we
;; can be more unixy.
(setq shell-file-name "C:/Program Files/msysgit/bin/bash")
(setq explicit-shell-file-name shell-file-name)
Update May 2018: Git 2.18 (Q2 2018) has now removed the contrib/emacs/ content.
Users of the git.el mode are now much better off using either Magit or the Git backend for Emacs's own VC mode.
See "Emacs Lisp error at init" for more.
Original answer 2011:
Not tested, but the idea was (2008) to copy in your Git installation directory at least:
contrib\emacs\git.el
contrib\emacs\git-mswin.el
With git-mswin.el being "Windows/msysgit specific modifications for git.el".
Related
I installed prelude with curl before realizing that the OSX version of emacs is too old for prelude. Now I can't find any documentation on how to remove it and I'm hesitant to just start deleting files in my emacs folder that have the word 'prelude' in them. Is there a command to remove this?
The simplest way is to ask prelude where it is installed. Try this (even if emacs does not fully load all prelude):
ESC-x describe-variable prelude-dir
It will tell you where prelude is being loaded from.
I use Ubuntu 16.04 LTS and solved this problem this morning. Here what I do:
cd home/yourusrname
find .emacs and .emacs.d, if not. press Cril + h.
You will also see 2 files named like .emacs-pre-prelude.. and .emacs- pre-prelude.tgz .These are your .emacs and .emacs.d before you install prelude.
del .emacs and .emacs.d
rename .emacs-pre-prelude as .emacs
tar .emacs.d-pre-prelude.tgz find the .emacs.d in it and mv it to your /home/yourusrname/. restart emacs.
I'm using Emacs Muse for work reasons and I don't really enjoy editing my .muse files in emacs.
I haven't found alternatives to publishing .muse files in another editor.
Is it possible to run Emacs commands from outside Emacs almost as if using it as a sort of interpreter?
I want to be able to go to the terminal and run something like:
> emacs -ne file_with_command file_to_publish.muse
The command in question is M-x muse-project-publish-this-file
edit: In Emacs, this command also has inputs that it prompts me to give one at a time. It's the style of publishing (html in my case) and the directory where the publication will go to.
muse-project-publish-this-file is not design to use in batch mode.Use muse-publish-file instead.
First,
git clone https://github.com/jwiegley/muse /path/to/muse
Then create script.el with content
(add-to-list 'load-path "/path/to/muse/lisp")
(require 'muse-publish)
(muse-publish-file "file_to_publish.muse" (muse-define-style "newstyle" nil) "/path/to/publish/directory")
notice is /muse/lisp not muse.
Last, emacs --batch -l script.el
After many changes on my Debian Jessie, when I launch the command emacs I receive an error libgnutls.so.26 : cannot open shared object file: No such file or directory.
If I launch instead the command emacs24 everything is allright.
I have emacs in /usr/local/bin
I have emacs24 in /usr/bin.
So, for now I created an alias to launch emacs24 as emacs, but i don't like and, for example, i have to change the git setting to open the default ide cause emacs is not availlable yet.
The question is where is the correct position of the command ? I have to change my PATH ?
Consider that libgnutls.so.26 is not installable from apt.
Thanks for any suggest or advice.
This is very strange, because a simple sudo dnf install emacs should suffice (I use fedora, so you probably use apt-get instead of dnf). Maybe it is best to just reinstall emacs (backup your .emacs to be safe) using apt-get? Anyhow, in fedora the emacs executable is located at /usr/bin/emacs (which is also the one used in the terminal when you use the emacs command).
I used to take the Programming languages course on Coursera and for the sake of the course i installed SML-Mode.
Now, I'd want to set up a Clojure environment in Emacs but instead of initializing Emacs from ~/.emacs.d, it initializes from the Users/karthik/Documents/sml-mode/sml-mode-startup
I deleted the sml-mode folder and on Emacs startup it shows me a warning about the files not being present. How I do point Emacs to load Emacs Live from the home folder.
I'm an Emacs newbie.
One easy way to do it, is
save you closure settings in /some/dir/my-closure-settings.el and call emacs as the following (to learn about -q -l , try emacs --help )
$ emacs -q -l /some/dir/my-closure-settings.el
or even placing an alias in bashrc,
$ alias closure-emacs='emacs -q -l /some/dir/my-closure-settings.el'
$ closure-emacs # will start emacs with your closure settings.
As you progress in learning some elisp, you will want to do it in one folder.
Assuming you installed Emacs yourself, and this SML-mode was an independent package, then I would speculated that it may have modified your site-start.el.
See if running emacs --no-site-file makes a difference.
If that's the issue, you can visit the file with:
M-: (find-library site-run-file) RET
You might also check:
C-hv user-emacs-directory RET
when running emacs in various ways:
emacs
emacs --no-site-file
emacs -q
emacs -Q
Unless it's a custom binary, at some point it should tell you "~/.emacs.d/"
Installing SML-mode does not change the place of the main initialization file, which is one of ~/.emacs or ~/.emacs.d/init.el. So look at those files (which ever of the two is present), and if none is present, then just create it and add what you need in it.
BTW, it looks like you're using an old sml-mode package (the newer one doesn't have an sml-mode-startup.el file). So please try and make sure the documentation that pointed you to that mode is updated: nowaday sml-mode should be installed from GNU ELPA, i.e. via M-x package-list or M-x package-install.
I just downloaded Emacs and Cygwin for Windows(Vista in my case). Have no idea how to set them up.
Any help would be appreciated !
Thanks !
I use these libraries, in this order:
(require 'cygwin-mount)
(require 'setup-cygwin)
They are both available on EmacsWiki:
http://www.emacswiki.org/emacs/cygwin-mount.el
http://www.emacswiki.org/emacs/setup-cygwin.el
Step 1: Install libraries
http://www.emacswiki.org/emacs/cygwin-mount.el
http://www.emacswiki.org/emacs/setup-cygwin.el
Step 2: Install cygwin to C:\cygwin (This requirement is hardcoded in setup-cygwin.el, so just do it unless you are willing to modify setup-cygwin.el).
Step 3: Add following code into your .emacs or .emacs.d/init.el. Please note the variable cygwin-mount-cygwin-bin-directory is not set by default in cygwin-mount.el, I suggest using hard coded path (I mean "c:/cygwin/bin" actually) since the cygwin install path is already hardcoded by setup-cygwin.el.
(setq *win32* (eq system-type 'windows-nt) )
;; win32 auto configuration, assuming that cygwin is installed at "c:/cygwin"
(if *win32*
(progn
(setq cygwin-mount-cygwin-bin-directory "c:/cygwin/bin")
(require 'setup-cygwin)
;(setenv "HOME" "c:/cygwin/home/someuser") ;; better to set HOME env in GUI
))
Maybe try posting your question on http://superuser.com
But:
Installing Emacs on Windows 95/98/2K/NT/ME/XP/Vista/Windows 7
Quick Start Guide for those more experienced with Windows
Use cygwin-mount.el to integrate Cygwin with Emacs:
http://www.khngai.com/emacs/cygwin.php
You might also want to replace the DOS Shell with the Cygwin bash, that's also covered.
You can find instructions here.
There're several way to integrate emacs with cygwin as follows:
emacs-nox under cygwin. Not attractive!
emacs-X11 under cygwin. An X server is needed like XMing or Cygwin/X. A bit slow and heavy.
emacs-w32 under cygwin.
emacs under windows. You need some configuration to make emacs recognize the cygwin environment. Difficult for beginners.
I'd recommend using emacs-w32 with cygwin, which uses native Windows GUI so that you don't have to start an xserver just to run emacs and you don't need to write/download any tricky code to make emacs aware of cygwin env as other answers do.
Just install emacs-w32 and run it from mintty and here you go. FYI, if you want to start emacs "independently", write a .bat file with D:\cygwin\bin\run.exe /usr/bin/bash.exe --login -i -c /usr/bin/emacs-w32.exe inside or, as I do, write a .ahk script to start emacs with hotkey F12.