all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: bhenz@Lexmark.com
Subject: problems with ediff-startup-hooks
Date: Mon, 27 Feb 2006 09:38:53 -0500	[thread overview]
Message-ID: <OFB3B0C803.4FE6AB9D-ON85257122.00506641-85257122.0050C562@lexmark.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1544 bytes --]

Hi all,

I running emacs 21.4.1. I'm trying to do some fancy ediff stuff. 

Actually not terribly fancy, I just want to invoke it from the command 
line with parmeters similar to "diff", specifically using the -L option to 
give more descriptive names to the buffers. Currently I can ediff two 
files by doing the following...

emacs --eval='(progn (setq ediff-diff-options "-wbB") (ediff-files "file1" 
"file2"))'

Maybe there's an easier/better way?

ANYWAY,

The path I'm currently on requires me to hook into the 
"ediff-startup-hooks" with the following code in my .emacs file...

(require 'ediff)

;; Get rid of the annoying little (separate) ediff window and
;; turn it into a 3rd pane in the main emacs window.
(setq ediff-window-setup-function 'ediff-setup-windows-plain)

;; Put files side-by-side
;(setq ediff-split-window-function 'split-window-horizontally)

(defun my-ediff-startup-hooks ()
    (set-buffer ediff-buffer-A)
    (rename-buffer "bobA")
    (set-buffer ediff-buffer-B)
    (rename-buffer "bobB")
)

(add-hook 'ediff-startup-hooks 'my-ediff-startup-hooks)

OK, so this is just baby-step code because clearly "bobA" and "bobB" are 
not useful, but I can't even get THIS to work! I even tried inserting a 
line I knew would fail in the defined function (something like 
(undefined_bob_qwerty)) and I never got a complaint when I fired up a new 
instance of ediff.

(but I know it was picking up my changes to .emacs because if I made a syntax error then it would warn me about that.)

What am I doing wrong?

Thanks,
Bob

[-- Attachment #1.2: Type: text/html, Size: 2797 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

             reply	other threads:[~2006-02-27 14:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-27 14:38 bhenz [this message]
2006-03-01 18:45 ` problems with ediff-startup-hooks Kevin Rodgers
  -- strict thread matches above, loose matches on Subject: below --
2006-03-02 14:42 bhenz

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=OFB3B0C803.4FE6AB9D-ON85257122.00506641-85257122.0050C562@lexmark.com \
    --to=bhenz@lexmark.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.