0

I am trying to activate the frame-local setting in buffer-stack.el, where each frame maintains its own stack of buffers. For example, I split my frame in two with C-x 3, then I look at only my java buffers on the left frame and only my text/ansi-term buffers on the right frame. However, traversing the buffer stack on either frame will give me the buffer at the top of the stack in the other frame.

After reading the documentation, and looking at my local buffer-stack.el, I have the following:

(defcustom buffer-stack-frame-local t
  "Does each frame maintain a seperate buffer stack?
If you switch this off during a GNU Emacs session, the initial buffer
ordering might be strange."
  :type 'boolean
  :group 'buffer-stack)

Why isn't the frame-local setting working? Do I need to configure this manually? Could my ansi-term buffer be interfering with the frame-local settings? This is also a very old feature, so could something be broken with the frame-local settings?

I am on Ubuntu 14.04 with Emacs 24.3, using buffer-stack.el from here, and have read the documentation from http://www.emacswiki.org/emacs/ControlTABbufferCycling.

Also, here are my settings under my .emacs, if it helps:

;; start buffer-stack keybindings
(require 'buffer-stack)

(global-set-key [(f9)] 'buffer-stack-bury)
(global-set-key [(control f9)] 'buffer-stack-bury-and-kill)
(global-set-key [(f12)] 'buffer-stack-track)
(global-set-key [(control f12)] 'buffer-stack-untrack)

(global-set-key (kbd "C-q") 'buffer-stack-bury)
(global-set-key [C-tab] 'buffer-stack-down)
(global-set-key [C-S-iso-lefttab] 'buffer-stack-up);Linux
(global-set-key [C-S-tab] 'buffer-stack-up);Windows/Linux
modulitos
  • 14,737
  • 16
  • 67
  • 110
  • 1
    The only method I have ever seen where buffers can be associated with frames is by using a system similar to `Frame-Bufs` by Alp Aker: https://github.com/alpaker/Frame-Bufs If `buffer-stack` does not have that built in, you could marry the two libraries (with a little bit of work, that is). Essentially a variable is set (with associated buffers) and incorporated into the `frame-parameter`, which is separate from the `buffer-list` and separate from the `burried-buffer-list`. – lawlist Jun 21 '14 at 16:24
  • I wrote up a minor mode as an answer to one of your earlier questions, which demonstrates how to associate buffers with selected frames -- it is based on the magic of Frame Bufs: http://stackoverflow.com/a/24346990/2112489 It does not include the modification for `Tabbar`, but I may add that at a later time. I use it in conjunction with Tabbar -- i.e., the tabs displayed are either for Associated Buffers (on a per frame basis), or Non-Associated Buffers (on a per frame basis). – lawlist Jun 22 '14 at 00:11

2 Answers2

3

Your terminology is not quite right. Hitting C-x 3 runs split-window-right, which means you have created two windows in the same frame, so they're sharing the same buffer stack. If you hit C-x 5 2 (or M-x make-frame) you will have two frames, which is what you want.

Dan
  • 5,209
  • 1
  • 25
  • 37
2

As Dan mentioned, you're confusing a "window" and a "frame".

Additionally, "Does each frame maintain a seperate buffer stack?" means that each frame keeps its own buffer order not a different buffer list completely. As you can see there is no facility to manage a buffer list per frame, so that sort of feature is not in the buffer-stack package.

You can, however, implement filtering to accomplish the effect you want much like done here: http://www.emacswiki.org/emacs/buffer-stack-suppl.el .

event_jr
  • 17,467
  • 4
  • 47
  • 62