M-x vc-diff is cool.
But not enough for me.
Is it possible to diff side-by-side in emacs like GUI diff tools ? (kdiff3, meld)
You must use vc-ediff (bound to "E" in my config published on https://github.com/fniessen/emacs-leuven/blob/master/emacs-leuven.el).
Related
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
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'd like to run emacs without any installed plugins. Emacs manual says that you may use -q option to skip init file. I've tried emacs -q and discovered that plugins from /usr/share/emacs/site-lisp (ubuntu installs plugins here) are still loaded.
I've searched google about emacs's initialization routine and found nothing usefull. I'm curios what emacs do step by step while initializing and what variables, options, evironment, etc. may change default behaviour.
Try emacs -Q
From the manpage:
-Q, --quick
Similar to "-q --no-site-file --no-splash". Also, avoid processing X resources.
If you only want to avoid loading site lisp code, you might want to run
emacs -q --no-site-file
Emacs == self-documenting.
C-hig (emacs) Emacs Invocation RET
If you really want to get into the details, you can peruse startup.el with
M-x find-library RET startup RET
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".
I was an Eclipse user, now I have to use Vim in my machine.
I used to "compare" a file I edited with a CVS repository to do merges an commit the files, using a context menu and my mouse.
Is this possible in Vim? Opening a vimdiff for a file before commiting, and commit it from vim itself?
And how is that supposed to work?
I'm supposing I would be editing a file. Then, I want to see the modifications. I run vimdiff in gvim, and a new window (or buffer) is opened. I run the modifications, save what is applicable (using vimdiff commands), and commit running another command.
Is this all transparent in vim? Do I have to keep getting out of vim to my terminal, or can all be done inside it?
Do I need to use some plugins, or just really simple functions inside my vimrc?
There is a couple plugins to integrate VCS to vim.
I personnally use vcscommand. It does at least the 2 things you're asking for: comparing from repository using vimdiff and commiting from within vim.
I personally just switch between vim and the terminal.
Usually I'd have several console tabs open at the same time (if you're on windows, Console can do that).
It depends on the VCS used, but you can linked that VCS with vimdiff (see git, for instance)
You could also try and integrate directly Vim into your Eclipse session with eclim.
(should you still be using eclipse. If not, I leave the following for others)
It does support the Eclipse local History.