help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: passing commands to ediff-directories from the elisp function


From: Kevin Rodgers
Subject: Re: passing commands to ediff-directories from the elisp function
Date: Tue, 27 Sep 2005 14:58:03 -0600
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

mak kwak wrote:
> I trying to write a method that will run ediff-directories comand for
> my two directories, then will mark all equal files for hiding (=h) and
> will hide them (x).
>
> I did the following:
> (defun compare-my-dirs (dir1 dir2)
> "compares two directories"
> (ediff-directories dir1 dir2)
> (switch-to-buffer "*Ediff Session Group Panel*") ;; success, switches to that buffer.
> (insert "=h") ;; !!!! neither does not mark equal files for hiding..
> (insert "x")) ;; !!!! ..nor hides them.
>
> My question is, how can I pass my commands to *`Ediff Session Group
> Panel*' from elisp function ?

`=h' and `x' are not commands, they are key sequences that are bound to
commands:

,----[ C-h k = h ]
| = h runs the command ediff-meta-mark-equal-files
|    which is an interactive compiled Lisp function in `ediff-mult'.
| (ediff-meta-mark-equal-files)
|
| Run though the session list and mark identical files.
| This is used only for sessions that involve 2 or 3 files at the same time.
`----

,----[ C-h k x ]
|x runs the command ediff-hide-marked-sessions
|   which is an interactive compiled Lisp function in `ediff-mult'.
|(ediff-hide-marked-sessions UNHIDE)
|
|Hide marked sessions.  With prefix arg, unhide.
`----

So:

(ediff-meta-mark-equal-files)
(ediff-hide-marked-sessions nil)

--
Kevin Rodgers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]