[Top][All Lists]

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

Re: ESS completion buffer

From: David Hansen
Subject: Re: ESS completion buffer
Date: Mon, 19 Mar 2007 18:00:42 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux)

On 19 Mar 2007 01:35:35 -0700 cmr Pent wrote:

> On 19 мар, 11:07, David Hansen <address@hidden> wrote:
>> If you are interested i can send my
>> configuration.
> Yes, it would be nice if you sent your .emacs to cmr.Pent(a)
> I'll try special buffers when I get to my home computer.

Note that this is nothing more than some "dirty" configuration.
Comments, improvements welcome.  On a MAC or DOS box you may want to
change the `window-system' test (it's there b/c I run emacs from time
to time in non graphical mode where this makes no sense).

You'll have to tell your window manager to place/size the window
named "*special*" somewhere you like it (can maybe be done from
emacs as well).


(eval-when-compile (require 'cl))

(defun dh-get-special-window ()
  (let ((frame (or (loop for frame in (frame-list)
                      when (and (frame-live-p frame)
                                (frame-parameter frame 'dh-special))
                      do (return frame))
                   (make-frame '((name . "*special*")
                                 (dh-special . t)
                                 (unsplittable . t)
                                 (minibuffer . nil))))))
    (let ((window (frame-first-window frame)))
      (with-selected-window window

(defun dh-special-display (buffer &optional data)
  (let ((window (dh-get-special-window)))
    (with-selected-window window
      (switch-to-buffer buffer)

(defun dh-scroll-up-special-window ()
  (let ((window (dh-get-special-window)))
    (with-selected-window window

(defun dh-scroll-down-special-window ()
  (let ((window (dh-get-special-window)))
    (with-selected-window window

(defun dh-switch-to-special-buffer ()
  (let ((buffer (with-selected-window (dh-get-special-window)
    (switch-to-buffer buffer)))

(when (eq window-system 'x)
  (setq display-buffer-reuse-frames t)

  (setq special-display-regexps
          "^\\*elisp macroexpansion\\*$"
          "^\\*local variables\\*$"
          "^\\*Quail Completions\\*$"
          "^\\*SLIME Description\\*$"
          "^\\*.* output\\*$"           ; tex compilation buffer
          "^\\*TeX Help\\*$"))

  (global-set-key (kbd "C-c SPC") #'dh-scroll-up-special-window)
  (global-set-key (kbd "C-c DEL") #'dh-scroll-down-special-window)
  (global-set-key (kbd "C-c s SPC") #'dh-scroll-up-special-window)
  (global-set-key (kbd "C-c s DEL") #'dh-scroll-down-special-window)
  (global-set-key (kbd "C-c s b") #'dh-switch-to-special-buffer)

  (setq special-display-function #'dh-special-display))

reply via email to

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