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
1
vote
0answers
19 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
29 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, ...
12
votes
2answers
2k views

Using DeskTop for basic project management

I would like to use DeskTop for basic project management, i.e. opening a set of buffers and restore histories depending on the project I am working on. Is this possible, i.e. having one desktop file ...
0
votes
0answers
11 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
0answers
27 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)". ...
3
votes
0answers
27 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
62 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 ...
2
votes
1answer
278 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 ...
0
votes
1answer
29 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
1answer
45 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 ...
1
vote
0answers
49 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
45 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 ...
0
votes
3answers
535 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 ...
1
vote
1answer
65 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?
2
votes
0answers
157 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
29 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
29 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 ...
16
votes
3answers
434 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
3answers
175 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
48 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
22 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
60 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 ...
5
votes
1answer
890 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 ...
2
votes
0answers
29 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 ...
10
votes
1answer
991 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 ...
6
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 ...
2
votes
1answer
272 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 ...
1
vote
2answers
43 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
52 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 ...
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 ...
1
vote
1answer
59 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 (...
0
votes
2answers
312 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 "~/....
3
votes
0answers
65 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
131 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?
0
votes
1answer
306 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 ...
1
vote
1answer
73 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
248 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-...
2
votes
1answer
460 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 ...
6
votes
1answer
107 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 ...
2
votes
1answer
127 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
91 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
145 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 ...
3
votes
0answers
204 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 "....
0
votes
0answers
68 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
69 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
238 views

Emacs 24.4 in OS X 10.10 is not restoring windows configuration (desktop)

I read that Emacs 24.4 should restore the desktop by default. It works perfectly except that the window configuration is not retained. It is saved because I can clearly read it in the desktop file, ...
5
votes
1answer
228 views

Why is the `buffer-undo-list` excluded from `(buffer-local-variables)`?

I am modifying desktop.el to support restoring the buffer-undo-list, and am push-ing that list at the tail end of the function desktop-buffer-info because the buffer-undo-list is not included in the ...
3
votes
1answer
106 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 ...
9
votes
1answer
1k views

Using desktop-mode with Emacs Daemon

I am using emacs 24.3 (ubuntu 14.10) and would like the daemon to participate in the graphical desktop session lifecycle while using desktop-mode. I went through http://www.emacswiki.org/emacs/...
1
vote
1answer
75 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.