0

When I start emacs, it opens an empty buffer named BLANK. I have no idea where this comes from and would like to not have it there, since there's nothing in it and it clutters up the buffer list.

I do use desktop mode and lazy loading, but I don't see any references to something named BLANK.

How can I track down what this buffer is, how it gets opened, and how to get emacs to not open it?

Dan Drake
  • 615
  • 3
  • 18
  • 3
    Does it happen with emacs -Q? If not, bisect your init file to find the culprit - see https://emacs.stackexchange.com/questions/28429/how-do-i-troubleshoot-emacs-problems – NickD Aug 25 '23 at 14:30

1 Answers1

0

This is from Hyperbole.

I still don't know why this was happening on startup, but the exact source of the empty buffer named BLANK is the hycontrol--blank-buffer variable in hycontrol.el, which is used by hycontrol-window-display-buffer.

The function is called when using hycontrol-windows-grid and your grid has more windows than buffers, and it fills in the remaining spaces with this fake, blank buffer.

Why was that always getting run when starting emacs? I have no idea.

But, just to make it more obvious what that buffer is (and that it can safely be ignored, killed, etc), I changed the definition from

(defvar hycontrol--blank-buffer (get-buffer-create "BLANK")

to

(defvar hycontrol--blank-buffer (get-buffer-create " *hycontrol--blank-buffer*")

Since byte-compiling that, the spurious blank buffer no longer appears on startup, so perhaps there was some artifact about some update to Hyperbole?

Dan Drake
  • 615
  • 3
  • 18
  • 1
    If it starts happening again, put (debug-on-entry 'hycontrol-window-display-buffer) early in your init (I'm assuming that's a function name). – phils Oct 01 '23 at 08:20
  • Thank you! I was struggling trying to debug that -- I can use C-u C-M-x to instrument a function for edebug -- but that's useless when trying to debug during initialization. I knew there was this kind of thing I could put into the lisp source but couldn't remember it. – Dan Drake Oct 01 '23 at 11:26