Skip to main content
edited tags
Link
Drew
  • 80.9k
  • 10
  • 125
  • 265
Added a user buffer. :)
Source Link
programking
  • 7.6k
  • 12
  • 44
  • 63

I have the following line of code in my .emacs file:

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

This key-binding allows me to C-<tab> my way around Emacs. However, because of certain buffers that I have open by default this becomes very tedious. So I would like a function that switches to the next buffer unless the next buffer is a certain file/buffer. More specifically the following buffers:

  1. *GNU Emacs*
  2. *scratch*
  3. *Messages*
  4. .emacs

Note: Just because I want to skip them when I call next-buffer does not mean that I want to kill that buffer. I rather just get to it by pressing C-x b.

I have the following line of code in my .emacs file:

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

This key-binding allows me to C-<tab> my way around Emacs. However, because of certain buffers that I have open by default this becomes very tedious. So I would like a function that switches to the next buffer unless the next buffer is a certain file/buffer. More specifically the following buffers:

  1. *GNU Emacs*
  2. *scratch*
  3. *Messages*

Note: Just because I want to skip them when I call next-buffer does not mean that I want to kill that buffer. I rather just get to it by pressing C-x b.

I have the following line of code in my .emacs file:

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

This key-binding allows me to C-<tab> my way around Emacs. However, because of certain buffers that I have open by default this becomes very tedious. So I would like a function that switches to the next buffer unless the next buffer is a certain file/buffer. More specifically the following buffers:

  1. *GNU Emacs*
  2. *scratch*
  3. *Messages*
  4. .emacs

Note: Just because I want to skip them when I call next-buffer does not mean that I want to kill that buffer. I rather just get to it by pressing C-x b.

Source Link
programking
  • 7.6k
  • 12
  • 44
  • 63

Switch to next buffer under certain circumstances

I have the following line of code in my .emacs file:

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

This key-binding allows me to C-<tab> my way around Emacs. However, because of certain buffers that I have open by default this becomes very tedious. So I would like a function that switches to the next buffer unless the next buffer is a certain file/buffer. More specifically the following buffers:

  1. *GNU Emacs*
  2. *scratch*
  3. *Messages*

Note: Just because I want to skip them when I call next-buffer does not mean that I want to kill that buffer. I rather just get to it by pressing C-x b.