Questions tagged [desktop]

For questions related to saving and restoring Emacs session data with `desktop-save-mode` and related functions.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

saving cloned buffers in workspaces/desktops/perspectives etc

i would like to be able to save a window (in emacs terms) layout with cloned buffers. i don't need it to save a series of buffers, i just need to be able to load a complex window layout when i work on ...
0
votes
1answer
18 views

How can I display desktop-dirname in the modeline (or elsewhere)?

I often get confused about the current desktop I'm using. Currently, I have to call (display-variable desktop-dirname) to see in which desktop I'm working. It would be much nicer, if the current ...
0
votes
0answers
19 views

`Treemacs` fixed width and `Desktop.el` save

I use Treemacs to toggle my directory. As default, the width of the Treemacs buffer can only be changed by doing M-x toggle-treemacs-fixed-width. Then, I can use my mouse to drag and adjust the ...
1
vote
1answer
13 views

How to save and restore the association of a window to buffer across Emacs sessions?

I have a window layout with three windows and I would like Emacs to remember the buffers even if the buffers don't exist after restart. Context: I am using Spacemacs for Clojure development. In ...
1
vote
0answers
36 views

Make Emacs systemd service kill when logging out/shutting down

I am trying to use desktop-save-mode together with emacs daemon. ;; save desktop before quitting (add-hook 'kill-emacs-hook (lambda () (desktop-save "~/.emacs.d/"))) But when I log out of the ...
1
vote
0answers
33 views

X Session Desktop integration

When I run Emacs under an X11 session manager, it provides a RestartCommand="emacs25 --smid=ef85455de14b4e6a8a8c39dae106b554 --chdir=/some/dir". I would like it to open the same files as last time, ...
0
votes
0answers
21 views

Desktop save mode and save place for specific emacs arrangement: Disable autosave and different desktop save files

Following this post here: https://stackoverflow.com/questions/3792449/remember-all-opened-files-with-split-windows-and-their-positions-in-emacs and putting these in my custom-set-variables: (custom-...
0
votes
2answers
58 views

Segmentation Fault with Desktop Save Mode (emacs 26.3.50)

When I try to run emacs 26.3.50 (built from source), it gives me the following warning: "Warning: desktop file appears to be in use by PID .... Using it may cause conflicts. Use it anyway? (y or n)". ...
4
votes
0answers
54 views

How to restore windows registers from saved desktop

I save a few different windows registers using M-x r w and then save the entire desktop with M-x desktop-save. I then restart Emacs and load the desktop using M-x desktop-read. If I do M-x r j do ...
1
vote
0answers
66 views

Save my Emacs registry entries without having to use desktop-save

I frequently create registry entries which I wish to keep across Sessions. Emacs does not save registry entries across sessions. This can be done by using desktop-save, but the downside is that ...
8
votes
1answer
2k views

Why can't I list the contents of Desktop on macos using dired?

When I do C-x C-f on ~/Desktop/ in macos Catalina, I get the following error. Listing directory failed but 'access-file' worked I can list the directory for just ~. I'm new to Emacs and know little ...
1
vote
1answer
63 views

Help? - Freeze up to 10 seconds happening on windows when exiting (kill-emacs) when desktop-save-mode and back-button-mode are enabled

I've spent a full working day trying to somehow resolve this, no luck, so I'm turning to this place hoping for help. Recently I started experiencing freeze of something like up to 10 seconds when ...
0
votes
1answer
35 views

window-configuration-change-hook false positives from desktop-mode

I'm trying to use window-configuration-change-hook in a package to perform some action when a buffer becomes visible for the first time. It works, however when starting Emacs, desktop-mode calls ...
1
vote
0answers
59 views

Reading frame configuration from file

I'm just trying my hands on emacs lisp. So far I've had some luck, but I'm stuck trying to load my frames configuration into a list. Here's what I'm trying to do... I am saving frames configuration (...
1
vote
1answer
47 views

Why does a certain file always gets opened on startup?

I'm using desktop-save-mode to automatically open the files that I had opened in the last session. This mode should also remember the files that I closed so that it no longer opens them in the next ...
1
vote
1answer
84 views

desktop-save-mode: prevent emacs from showing each buffer on start-up

If you use desktop-save-mode, and have several hundred buffers saved, when you start emacs, emacs cycles through these buffers and shows each of them for a split second. Can this be prevented?
1
vote
1answer
42 views

How can I save the text-scale info when `desktop-save-in-desktop-dir`?

By default, even if I text-scale-decrease in some frames before I desktop-save-in-desktop-dir, when I restart Emacs and desktop-read, all frames show in the default text-scale. How can I save the ...
2
votes
0answers
36 views

Restoring windows with Desktop when running Emacs inside a terminal? [duplicate]

Maybe a silly question: I'm using desktop for saving Emacs' sessions. I've set (setq desktop-restore-frames t) (desktop-save-mode 0) So windows and frames state is supposed to be saved, and I'm ...
0
votes
3answers
253 views

How to prompt to ask for confirmation when C-x C-c in emacsclient?

I use (setq desktop-save 'ask) in my init.el, so every time I C-x C-c to exit Emacs, it will prompt to ask if saving desktop or not; I use this trick to avoid accidentally exiting Emacs. But after ...
1
vote
1answer
77 views

Limit number of files saved by emacs in desktop-save

I tend not to delete buffers in emacs, so over time, the number of buffers tends to grow to a hundred or more. (At the moment, *Buffer List* has 144 lines.) Many of these files are java files, and ...
1
vote
0answers
24 views

Possible to save winner history winner-ring-alist in savehist or desktop-save to save across sessions

I added in the following command to my .emacs but it doesn't seem to work: (add-to-list 'savehist-additional-variables 'winner-ring-alist) Is there a way to get the winner-undo history to save ...
1
vote
1answer
86 views

Open another emacs and cause conflicts

I have a GUI emacs running as the major working area, When I reading articles from web, need to open a emacs as a tool to keep note; Web on the left and new emacs on the right, Usually, get ...
2
votes
0answers
31 views

How to get desktop-read to ignore/modify frame size?

I'm using (desktop-save-mode 1) to save a session which I then reload, but logging in remotely from a different machine with a different resolution display. Something stored in the desktop winds up ...
0
votes
3answers
674 views

Project management in projectile or other, like Sublime Text's projects

Ever since I first started using Emacs (Spacemacs) a few months ago I've been trying to set up a sane multi-project workflow. I got the single project workflow going by having Emacs start up into what ...
7
votes
4answers
3k views

Speed up Emacs start-up time

I have seen this thread but my problem is an order of magnitude larger. Also, a newbie, I did not understand much of what was being discussed there. So, this new question. I am running Emacs 25.2.2 ...
1
vote
2answers
49 views

Why do desktops depend on folders?

I think, it'd make a lot more sense to have desktops be identified by names (like bookmarks). If it's deemed desirable that they can be stored in different locations, it'd make sense to select what ...
1
vote
0answers
53 views

desktop-save doesn't save file names with emoji properly

desktop-save-in-desktop-dir doesn't save file names that include glyphs from upper unicode range like emoji characters properly. By "upper", I mean "greater" like one with a code point 1F604 instead ...
2
votes
1answer
322 views

Restoring Emacs desktops with daemon + clients

How to use Emacs desktop functionality with emacs daemon + emacsclient instances? I've enabled (desktop-save-mode 1) in my init file, and when I start the daemon I see messages like this: Desktop: 1 ...
2
votes
0answers
162 views

reopening emacsclient -t with desktop-save-mode doesn't save buffers/frames in place [duplicate]

I added (desktop-save-mode 1) to my custom.el towards the end to save buffers and frames. But I primarily use emacs --daemon and start an emacsclient -t. For some reason, if I use just Emacs the ...
1
vote
1answer
63 views

What is missing to show the desktop-dirname in the frame title? [duplicate]

I tried to get the value of desktop-dirname into the title of a frame: (setq frame-title-format '("%b Desktop: " (car (last (split-string desktop-dirname "/" t))))) The (...
16
votes
3answers
486 views

Daemon mode: Defer interactive prompts on startup?

(Note that, title to the contrary, this question is not the same as How to start in daemon mode and suppress interactive dialogs?, as that question was "answered" by the submitter eliminating what was ...
0
votes
2answers
349 views

change the default directory that's suggested in desktop-save command

When you run M-x desktop-save, you're prompted with the message and the default option: Directory to save desktop file in: "~/.emacs.d" How can I change this default path to something else like "~/....
4
votes
2answers
1k views

Handle stale desktop lock files after emacs/system crash

If Emacs or the system crashes when desktop-save-mode is active, Emacs leaves a stale desktop lock file. The next time the desktop is loaded (from another Emacs process ID), loading is interrupted ...
3
votes
0answers
73 views

How to have desktop-mode restore only the <n> most recently used buffers

I currently have in my config: (desktop-save-mode 1) (setq desktop-restore-eager 10) Which on startup, will eagerly restore 10 buffers, and then when Emacs is idle, restore all the others. Is there ...
2
votes
1answer
149 views

Periodic desktop save

How can I have emacs save my desktop periodically, so it will persist even if I do not exit with C-c C-x in desktop-save-mode or save manually?
1
vote
1answer
82 views

Emacs reopens all frames in current virtual desktop, not in each correct one

I am using emacs for OSX (GUI, not the terminal). I use desktop-save in order to save my workflow when closing emacs. All works fine except when I use OSX virtual desktop: if I open emacs in "Virtual ...
1
vote
1answer
276 views

Save and load different desktop files based on the mode

I would like to keep distinct desktop files in order to be able resume sessions based on the mode. When I open Emacs it should load the desktop file for the mode it starts with and when I run, say, M-...
0
votes
1answer
336 views

Configuring the number of buffers saved by ido, using ido-use-virtual-buffers?

I really love the ability to quickly navigate to files opened in old editing sessions that desktop provides. However, there are a few things I don't like about it so I'd like to stop using it if ...
2
votes
1answer
507 views

How to make emacs prompt yes or no to save the session when desktop-save-mode is on?

I started to use emacs a few days ago and still getting the hang of it. desktop-save-mode is really handy at times as I don't have to reopen all the files that I had already opened in my previous ...
2
votes
1answer
131 views

How to not load font faces from desktop files?

I use desktop-save and desktop-change-dir a lot. Recently, I upgraded my hardware and now have a screen with way more DPI. This forced me to increase the font size in emacs. Unfortunately, all my ...
1
vote
0answers
96 views

Why doesn't desktop-save-mode persist neotree?

Desktop-save-mode seems to save all windows except neotree - When I restart emacs, the neotree window is always gone. Why is this window different from the others? Is it possible for neotree's state ...
2
votes
1answer
161 views

How to make desktop-save store relative paths?

Perhaps I'm kind of misusing that feature – but I find desktop files rather handy to be kept with projects. Clearly, it doesn't make much sense then to store absolute paths for the files to be ...
6
votes
1answer
108 views

How can one restore buffers on startup in correct order?

I use desktop-save-mode in order to restore buffers on startup. However, the buffer which is visible immediately after startup is *scratch*, *Messages*, .bbdb, etc. I am not interested in those. Is ...
6
votes
1answer
1k views

desktop-save-mode fails to save window layout

I use Emacs 24.5.1 on OS X in terminal mode. I intend to use desktop-save-mode to save and restore window layout (i.e. positions of buffer windows) upon exiting and starting Emacs. From this answer ...
3
votes
0answers
209 views

Do I need session mode if I use desktop mode?

I found old mail in my mailbox: Date: 2010-09-13 17:41:21+0300 Mon (require 'session) (add-hook 'after-init-hook 'session-initialize) Now I am using desktop mode: (setq desktop-base-file-name "....
11
votes
1answer
1k views

Emacs desktop-save-mode - only save desktop when previous desktop was fully restored

I have the following in my .emacs: (desktop-save-mode 1) (setq desktop-restore-eager 10) (setq desktop-save t) Often I have a lot of buffers open (100 or so), then this really helps - as emacs is ...
0
votes
0answers
74 views

How can I apply a frame register (saved via desktop.el) to the current frame instead of opening a new frame?

I am using desktop.el and I saved a few frame configurations in my registers. But when I jump to a saved register (C-x r j), Emacs opens a new frame instead of applying that setting to the current ...
1
vote
0answers
71 views

Aborting desktop save without aborting Emacs close

I have the following code in my init files for auto saving the desktop: (desktop-save-mode 1) (setq desktop-dirname (concat user-emacs-directory "tmp/") desktop-base-file-name "...
3
votes
1answer
115 views

How to save modified buffers when changing desktop?

I am using desktop-save-mode and desktop-change-dir to handle multiple desktops. This works fine, except for the case when I have modified some buffers, and then run desktop-change-dir before having ...
1
vote
1answer
79 views

POSIX signal handler in Emacs Lisp

Does Emacs allow it to implement POSIX signal handling in Lisp? Specifically, I would like to handle SIGTERM to finish desktop-mode related things.