frame-purpose.el icon indicating copy to clipboard operation
frame-purpose.el copied to clipboard

List of functions to not override buffer-list in?

Open akirak opened this issue 7 years ago • 6 comments

Hi,

Your helm-org-rifle does not seem to work inside a purpose-specific frame. The same for counsel-org-goto-all.

I would like to know whether this behavior is a design or something to be fixed.

akirak avatar May 27 '18 08:05 akirak

Hi Akira,

That would be a bug. Could you be more specific? In what way doesn't it work?

Thanks.

alphapapa avatar May 27 '18 08:05 alphapapa

The frame is specific to emacs-lisp-mode, so the buffer list function enumerates only Emacs Lisp buffers, but helm-org-rifle seems to be using the function, so it displays an empty result in the frame.

akirak avatar May 27 '18 08:05 akirak

And I think this will happen with any other commands that work on "all live org buffers", e.g. counsel-org-goto-all. If this is a design and won't be fixed, I will implement a workaround for myself, but if it is a bug, it depends.

akirak avatar May 27 '18 08:05 akirak

Oh, I see. Well, that is the expected behavior. If the frame is for elisp files, then helm-org-rifle won't see any Org files, because the helm-org-rifle command uses buffer-list, which is overridden to only return elisp buffers.

It might be possible to add a customizable list of commands which should always list all buffers in all frames. Or you could do your own workaround, e.g. a function which would get a list of buffers in the context of the main frame, or even disable frame-purpose-mode, call the command, and reenable it immediately afterward.

What do you think?

alphapapa avatar May 27 '18 09:05 alphapapa

Thanks. Maybe I'll add some kind of advice to specific functions where I want to disable frame-purpose.

akirak avatar May 27 '18 10:05 akirak

Ok, please feel free to share what you come up with.

For now, I'll leave this open for myself to think about a list of overridden functions. Thanks.

alphapapa avatar May 27 '18 10:05 alphapapa