Questions tagged [desktop]

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

0
votes
1answer
16 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
29 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
43 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
33 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
16 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
23 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
57 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
28 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 ...
0
votes
0answers
37 views

Save whole emacs session

After closing emacs I would like to restore the same session I left, which includes opened windows, font sizes within the windows and open buffers. I'm aware there's a lot out there, but most things ...
1
vote
0answers
20 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
43 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
25 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
327 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 ...
6
votes
4answers
2k 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
39 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
48 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
184 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
154 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
50 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 (...
15
votes
3answers
319 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
226 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
835 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
52 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
95 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
69 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
196 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
253 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
379 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
119 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
79 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
110 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
99 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 ...
5
votes
1answer
667 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
187 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 "....
10
votes
1answer
895 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
58 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
65 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
98 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
74 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.
7
votes
1answer
975 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/...
4
votes
2answers
1k views

How to use a fixed desktop save directory name with desktop-save-mode?

I would like to use a standard desktop save file when using Emacs as a server (with Emacsclient) and use no desktop save file (or optionally, another desktop save file) when running a regular Emacs ...
3
votes
0answers
283 views

Restore desktop frames for Emacs server

The version of desktop.el that comes with Emacs 24.4 allows restoring frames as well as windows and buffers. This works fine for an Emacs server (i.e., daemon) with at least one open frame. However, a ...
3
votes
1answer
235 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, ...
9
votes
1answer
371 views

Remembering history between sessions in Inferior Emacs Lisp Mode

I can't make Emacs remember the history for *ielm* buffers between sessions. As far as I can tell, such history is recorded in the buffer-local variable comint-input-ring. Therefore I have added the ...
5
votes
1answer
205 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 ...
11
votes
1answer
1k 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 ...