Emacs: desktop does not retrieve frame names

Viewed 68

All the frames in my session have an explicit name set with set-frame-name, but when the session is restored through desktop, the names of the frames are not retrieved.

Tried emacs -Q: after starting I change the frame name with set-frame-name, then desktop-save and quit emacs. I reboot with emacs -Q and do desktop-read, but the frame name is not restored. I have looked at .emacs.desktop and I don't see the name of the frame.

Do I need any specific configuration to get the frames to recover their names?

I am using emacs 27.1 with Ubuntu 20.04

1 Answers

I have found a solution by checking the frameset.el file.

It was enough for me to put the following line in the init.el (or .emacs) file:

(push '(name . nil) frameset-filter-alist)

Now desktop.el already retrieves the names of the frames set with set-frame-name

This work because frameset-filter-alist is a copy of frameset-persistent-filter-alist and the name parameter is initially set to neither save (desktop-save) nor retrieve (desktop-read)

With (push '(name . nil) frameset-filter-alist) this behavior is override.

Related