From: "Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org
Subject: Calling Ediff which ignores whitespaces from VC Dir
Date: Thu, 01 Aug 2013 16:28:38 +0200 [thread overview]
Message-ID: <8661vph4dl.fsf@somewhere.org> (raw)
Hello,
I'm trying to call my version of `vc-diff' from VC Dir. It simply is a wrapper
above `vc-diff' where I enforce the fact that whitespaces must be ignored.
I thought this would make it:
--8<---------------cut here---------------start------------->8---
;; hide up-to-date and unregistered files
(add-hook 'vc-dir-mode-hook
(lambda ()
(define-key vc-dir-mode-map
(kbd "E") 'vc-ediff-ignore-whitespace)))
(defun vc-ediff-ignore-whitespace ()
"Ignore regions that differ in white space & line breaks only."
(interactive)
(let ((ediff-ignore-similar-regions t))
(vc-ediff)))
--8<---------------cut here---------------end--------------->8---
but I always get the error:
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-number-of-arguments (1 . 2) 0)
vc-ediff()
(let ((ediff-ignore-similar-regions t)) (vc-ediff))
vc-ediff-ignore-whitespace(nil t)
call-interactively(vc-ediff-ignore-whitespace nil nil)
--8<---------------cut here---------------end--------------->8---
which I don't really understand.
With no certainty, I've tried to copy the parameters of `vc-ediff':
--8<---------------cut here---------------start------------->8---
(defun vc-ediff-ignore-whitespace (historic &optional not-urgent)
"Ignore regions that differ in white space & line breaks only."
(interactive (list current-prefix-arg t))
(let ((ediff-ignore-similar-regions t))
(vc-ediff historic not-urgent)))
--8<---------------cut here---------------end--------------->8---
then it worked further...
Though, I now have:
call-interactively: Symbol's value as variable is void:
ediff-ignore-similar-regions
when pressing `n' to go to the first difference region.
Any help?
Best regards,
Seb
--
Sebastien Vauban
next reply other threads:[~2013-08-01 14:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-01 14:28 Sebastien Vauban [this message]
2013-08-01 15:37 ` Calling Ediff which ignores whitespaces from VC Dir Stefan Monnier
[not found] ` <mailman.2315.1375371479.12400.help-gnu-emacs@gnu.org>
2013-08-02 9:11 ` Sebastien Vauban
2013-08-02 14:39 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8661vph4dl.fsf@somewhere.org \
--to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
--cc=help-gnu-emacs-mXXj517/zsQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.