Question: Hi I have turned on buffer cycling placing following commands in my .emacs 

```
(global-set-key (kbd "<C-tab>") 'bury-buffer)

```

But while cycling how do I avoid cycling through the Messages and the scrratch buffers which
are always present in any emacs buffer list. I never use those buffers and become an eye-sore 
when cycling through my buffer-list

Answer: 
If you never use the scratch buffer, just add this to your .emacs to automatically close it: 

> 
> (kill-buffer "\*scratch\*")
> 
> 
> 

I also found [this code](http://www.emacswiki.org/emacs/ControlTABbufferCycling#toc3) on the [Emacs wiki](http://www.emacswiki.org/) which should do what you want:

```
; necessary support function for buffer burial
(defun crs-delete-these (delete-these from-this-list)
  "Delete DELETE-THESE FROM-THIS-LIST."
  (cond
   ((car delete-these)
    (if (member (car delete-these) from-this-list)
        (crs-delete-these (cdr delete-these) (delete (car delete-these)
                                                 from-this-list))
      (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*"))
; 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
          (append
           (mapcar 'get-buffer crs-hated-buffers)
           (mapcar (lambda (this-buffer)
                     (if (string-match "^ " (buffer-name this-buffer))
                         this-buffer))
                   (buffer-list)))))
; I'm sick of switching buffers only to find KILL right in front of me
(defun crs-bury-buffer (&optional n)
  (interactive)
  (unless n
    (setq n 1))
  (let ((my-buffer-list (crs-delete-these (crs-hated-buffers)
                                          (buffer-list (selected-frame)))))
    (switch-to-buffer
     (if (< n 0)
         (nth (+ (length my-buffer-list) n)
              my-buffer-list)
       (bury-buffer)
       (nth n my-buffer-list)))))
(global-set-key [(control tab)] 'crs-bury-buffer)
(global-set-key [(control meta tab)] (lambda ()
                                       (interactive)
                                       (crs-bury-buffer -1)))

```

You will need to add the scratch and message buffers to the variable `crs-hated-buffers`, e.g.:

```
(add-to-list 'crs-hated-buffers "*Messages*")
(add-to-list 'crs-hated-buffers "*scratch*")

```
Well, if you use `ido-mode` to cycle between buffers you can set `ido-ignore-buffers` to match the buffers you want to ignore. From the documentation:

> 
> List of regexps or functions matching buffer names to ignore. 
>  For example, traditional behavior is not to list buffers whose names begin
>  with a space, for which the regexp is "` ". See the source file for 
>  example functions that filter buffer names.
> 
> 
> 

For more info on `ido-mode` see: [Introduction to ido-mode](http://www.masteringemacs.org/articles/2010/10/10/introduction-to-ido-mode/)