Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When latexing, previewing, and jumping to PDF from emacs, there are sometimes errors and problems, in which case emacs throws up a bunch of frames which intrude on the editing window and which I have to close manually somehow. How do you advise I stop this from happening? I would rather go and look at the appropriate buffer if I really care about the error, or even better, the latex error could appear on a separate window which is in the background.

share|improve this question
up vote 0 down vote accepted

This might be a good starting point (taken from EmacsWiki):

;; Bury unwanted buffers ;;

; necessary support function for buffer burial
(defun crs-delete-these (delete-these from-this-list)
   ((car delete-these)
    (if (member (car delete-these) from-this-list)
        (crs-delete-these (cdr delete-these) (delete (car delete-these)
      (crs-delete-these (cdr delete-these) from-this-list)))
   (t from-this-list)))
                    ; this is the list of buffers I never want to see
(defvar crs-hated-buffers
  '("KILL" "*Compile-Log*" "*Messages*" "*scratch*" "*auto-install"))
                    ; might as well use this for both
(setq iswitchb-buffer-ignore (append '("^ " "*Buffer") crs-hated-buffers))
(defun crs-hated-buffers ()
  "List of buffers I never want to see, converted from names to buffers."
  (delete nil
           (mapcar 'get-buffer crs-hated-buffers)
           (mapcar (lambda (this-buffer)
                     (if (string-match "^ " (buffer-name this-buffer))
; I'm sick of switching buffers only to find KILL right in front of me
(defun crs-bury-buffer (&optional n)
  (unless n
    (setq n 1))
  (let ((my-buffer-list (crs-delete-these (crs-hated-buffers)
                                          (buffer-list (selected-frame)))))
     (if (< n 0)
         (nth (+ (length my-buffer-list) n)
       (nth n my-buffer-list)))))
(global-set-key [(control tab)] 'crs-bury-buffer)
(global-set-key [(control meta tab)] (lambda ()
                                       (crs-bury-buffer -1)))

Add the names of the buffers you never want to see to crs-hated-buffers.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.