Commit 943e2d81 authored by Lev Lamberov's avatar Lev Lamberov

New upstream version 0.18

language: generic
sudo: false
- curl -fsSkL > && source ./
- evm install $EVM_EMACS --use --skip
- cask
- EVM_EMACS=emacs-24.4-travis
- EVM_EMACS=emacs-24.5-travis
- EVM_EMACS=emacs-25.1-travis
- emacs --version
- make test
(source gnu)
(source melpa)
(package-file "git-messenger.el")
(depends-on "magit"))
Revision history for git-messenger.el
Revision 0.18 2017/01/01 syohex
- Drop older Emacs support
- Implement magit integration
Revision 0.17 2016/08/16 syohex
- Initial support going parent commit(#40)
- Show command keys in prompt(#39)
- Improve deciding VCS type(#38)
- Support merurial(#37 Thanks Sean Farley!!)
- Enable view-mode(#36)
Revision 0.16 2015/03/14 syohex
- Support Subversion
Revision 0.15 2014/08/29 syohex
- Improve quit command.
Thanks tsdh !!
Revision 0.14 2014/08/10 syohex
- Fix customizable variable type
Thanks conleym !!
Revision 0.13 2014/07/06 syohex
- Refactoring
- Improve for tramp
Revision 0.12 2014/05/25 syohex
- Improve for tramp
Revision 0.11 2014/04/02 syohex
- Fix some bugs
- restore popup-ed buffer mode
- set git option for working correctly in Emacs
Revision 0.10 2014/04/02 syohex
- Support 'git diff' and 'git show' command
Revision 0.09 2014/04/02 syohex
- Support key mapping(Thanks stsquad)
Revision 0.08 2014/01/17 syohex
- Only documentation change
Revision 0.07 2014/01/14 syohex
- Fix double escaping issue(#13)
Reported by achitu
Revision 0.06 2014/01/09 syohex
- Support TRAMP
Revision 0.05 2013/07/18 syohex
- add git-messenger:before-popup-hook
- fix case core.autocrlf=true or input(Reported by redguardtoo)
Revision 0.04 2013/06/13 syohex
- Refactoring
rename confused variable name
Revision 0.03 2013/06/13 syohex
- Support showing detail(Advice by redguardtoo)
Revision 0.02 2013/06/11 syohex
- Support not committed line(Thanks @stsquad, @percell)
- Shell Quote file name
Revision 0.01 2013/06/11 syohex
- Initial version
.PHONY : test
EMACS ?= emacs
CASK ?= cask
ELPA_DIR = $(shell EMACS=$(EMACS) $(CASK) package-directory)
test: elpa
$(CASK) exec $(EMACS) -Q -batch $(LOADPATH) \
-l test/test.el \
-f ert-run-tests-batch-and-exit
elpa: $(ELPA_DIR)
$(ELPA_DIR): Cask
$(CASK) install
touch $@
# git-messenger.el [![melpa badge][melpa-badge]][melpa-link] [![melpa stable badge][melpa-stable-badge]][melpa-stable-link]
`git-messenger.el` is Emacs port of [git-messenger.vim](
`git-messenger.el` provides function that popup commit message at current line.
This is useful when you want to know why this line was changed.
## Screenshot
![Screenshot of git-messenger.el](image/git-messenger.png)
## Installation
`git-messenger` is available on [MELPA]( and [MELPA stable](
You can install `git-messenger` with the following command.
<kbd>M-x package-install [RET] git-messenger [RET]</kbd>
## Dependency
* [popup](
## Supported VCS
- Git
- Subversion
- Mercurial
## Commands
### `git-messenger:popup-message`
Pop up last commit message at current line. Show detail message, Commit ID, Author,
Date and commit message with `C-u` prefix
![Screenshot of git-messenger with prefix argument](image/git-messenger-detail.png)
## Key Bindings
You can modify key bindings by customizing `git-messenger-map`.
| Key | Command |
| `M-w` | Copy commit message and quit |
| `c` | Copy commit ID and quit |
| `d` | Pop up `git diff` of last change of this line |
| `s` | Pop up `git show --stat` of last change of this line |
| `S` | Pop up `git show --stat -p` of last change of this line |
| `q` | Quit |
## Customize
### `git-messenger:show-detail`(Default `nil`)
Always show detail message if this value is `t`.
### `git-messenger:handled-backends`(Default `'(git svn)`)
Handled VCS which `git-messenger` uses.
Entries in this list will be tried in order to determine whether a
file is under that sort of version control.
### `git-messenger:use-magit-popup`(Default `nil`)
Use `magit-show-commit` instead of `pop-to-buffer`.
## Hooks
### `git-messenger:before-popup-hook`
Run before popup commit message. Hook function take one argument, commit message.
### `git-messenger:after-popup-hook`
Run after popup commit message. Hook function take one argument, commit message.
### `git-messenger:popup-buffer-hook`
Run after popup buffer.
## Global Variables
You may be able to use these variables useful in commands of `git-messenger-map`.
#### `git-messenger:last-message`
Last popup-ed commit message
#### `git-messenger:last-commit-id`
Last popup-ed commit ID
## Sample Configuration
(require 'git-messenger) ;; You need not to load if you install with package.el
(global-set-key (kbd "C-x v p") 'git-messenger:popup-message)
(define-key git-messenger-map (kbd "m") 'git-messenger:copy-message)
;; Enable magit-show-commit instead of pop-to-buffer
'(git-messenger:use-magit-popup t))
This diff is collapsed.
;;; test.el --- test of git-messenger
;; Copyright (C) 2016 by Syohei YOSHIDA
;; Author: Syohei YOSHIDA <>
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <>.
;;; Code:
(require 'ert)
(require 'git-messenger)
(ert-deftest find-vcs ()
(let* ((tmp-dir (file-name-as-directory
(concat default-directory (make-temp-name "git-messenger"))))
(git-dir (concat tmp-dir ".git"))
(hg-dir (concat tmp-dir "foo/" ".hg"))
(test-dir (concat tmp-dir "foo/bar/")))
(make-directory git-dir t)
(make-directory hg-dir t)
(make-directory test-dir t)
(let ((default-directory test-dir))
(should (eq (git-messenger:find-vcs) 'hg))))
(delete-directory tmp-dir t))))
;;; test.el ends here
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment