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

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

RE: [h-e-w] EmacsW32, gnuserv, pathes in .emacs


From: Drew Adams
Subject: RE: [h-e-w] EmacsW32, gnuserv, pathes in .emacs
Date: Tue, 11 Jul 2006 16:05:07 -0700

    It is quite frequent to read help screens and compare them with some
    text that is being edited. My (personal) order of preference is

      1) have them side by side,
      2) activate "always on top" or similar option for the help frame,
      3) switch _rapidly_ between help and text, i.e. single keystroke

Try this. The Emacs 20 version is in help+.el; the Emacs 21, 22,... version
is in help-mode+.el. Both are here:
http://www.emacswiki.org/cgi-bin/wiki?action=index;match=%5C.el%28%5C.gz%29%
3F.

Emacs 21, 22,...:

(defvar help-origin-buffer nil "Buffer that we left, to go to *Help*.")

(defun pop-to-help-toggle ()
  "Pop to buffer *Help* or back to the buffer that sent you to *Help*."
  (interactive)
  (let ((orig-buf (and (buffer-live-p help-origin-buffer)
                       (get-buffer help-origin-buffer)))
        (w32-grab-focus-on-raise   t)
        (win32-grab-focus-on-raise t))   ; Older name.
    (if (string-match "*Help*" (buffer-name))
        (cond ((not orig-buf)
               (error "No buffer to return to"))
              ((minibufferp orig-buf)
               (select-frame-set-input-focus
                (window-frame (select-window (minibuffer-window)))))
              (t
               (pop-to-buffer orig-buf)))
      (setq help-origin-buffer (current-buffer))
      (pop-to-buffer "*Help*"))))

(define-key help-map "\C-o" 'pop-to-help-toggle) ; Bind to `C-h C-o'

For Emacs 20, replace (minibufferp orig-buf) by this:

 (string-match "Minibuf" (buffer-name orig-buf))

Use `M-x set-variable pop-up-frames t' if you want to always open a new
frame instead of a new Emacs window.

HTH - Drew






reply via email to

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