From: "Drew Adams" <drew.adams@oracle.com>
To: "'BDB'" <noemail@yahoo.com>, <help-gnu-emacs@gnu.org>
Subject: RE: Automating function with interactive args
Date: Thu, 26 Apr 2012 10:21:46 -0700 [thread overview]
Message-ID: <A86435A25E0D4D70A986DF43D654EFE4@us.oracle.com> (raw)
In-Reply-To: <slrnjpivd6.1mm.noemail@us.news.astraweb.com>
> Quite often I use "M-x ediff-revision", which then prompts me for the
> files to ediff, and I always just accept the defaults by
> hitting return to the 3 prompts. I would like to make all of
> this a single keystroke. A straight keyboard macro doesn't seem
> to work with the prompts, and my other googling hasn't turned up
> a solution. Ideas?
Perhaps something like this (untested)?
(defun my-ediff-revision ()
"..."
(interactive)
(find-file (expand-file-name
(file-name-directory (ediff-get-default-file-name))
(if ediff-use-last-dir
ediff-last-dir-A
default-directory)))
(when (and (buffer-modified-p)
(y-or-n-p (format "Buffer %s is modified. Save buffer? "
(buffer-name))))
(save-buffer (current-buffer)))
(ediff-load-version-control)
(funcall (intern (format "ediff-%S-internal"
ediff-version-control-package))
"" "" nil))
next prev parent reply other threads:[~2012-04-26 17:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 16:53 Automating function with interactive args BDB
2012-04-26 17:08 ` Tassilo Horn
2012-04-26 17:21 ` Drew Adams [this message]
[not found] ` <mailman.105.1335460111.855.help-gnu-emacs@gnu.org>
2012-04-26 20:35 ` BDB
2012-04-27 7:42 ` Tassilo Horn
[not found] ` <mailman.155.1335512574.855.help-gnu-emacs@gnu.org>
2012-04-27 16:30 ` BDB
2012-04-27 16:43 ` Drew Adams
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=A86435A25E0D4D70A986DF43D654EFE4@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=noemail@yahoo.com \
/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.