Questions tagged [session]

The tag has no usage guidance.

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

desktop-save mode prevents Emacs from refreshing

I'm using Emacs 29.1 on Windows. I've found desktop-save is problematic. My configuration is: (use-package desktop :init (setq desktop-dirname "~/.emacs.d/desktop/" ...
Lai Yu-Hsuan's user avatar
0 votes
0 answers
26 views

using desktop.el in --daemon mode

I eventually figured out that the answer to this question https://groups.google.com/g/gnu.emacs.help/c/WZoW0LlqX6c/m/08Sa6alHp1oJ was to choose --bg-daemon rather than --fg-daemon when starting the ...
StackExchanger's user avatar
0 votes
1 answer
52 views

Setting (desktop-save-mode t) in init file calls (desktop-read) immediately when starting Emacs in daemon mode. How to avoid?

Previously, I used GUI Emacs, everything worked perfectly - the desktop was saved and restored as it should be. I decided to try Emacs in daemon mode. First I made changes to the init.el file: (custom-...
Herman's user avatar
  • 25
0 votes
0 answers
62 views

desktop+ not saving term/shell buffer

For session management, I was happy with inbuilt desktop.el except that it could not retain the term/shell buffers. Everytime I quit emacs, it asked to kill the term/shells. Then I read the ability of ...
user_0525's user avatar
0 votes
0 answers
46 views

Org mode session inferior process

In Python org mode source blocks, the company code completion works only if there is inferior buffer called *Python*. When I use file-wide session inferior buffer with a different name the ...
Arktik's user avatar
  • 962
0 votes
2 answers
48 views

how to eval expression in a elisp "session"?

I would like to eval elisp expressions in a "session" so that side-effects only affect expressions which happen in that "session". For instance defuns that are evaluated in the ...
Wilder's user avatar
  • 95
0 votes
1 answer
118 views

How to give command-line arguments (sys.argv) when executing python session in Orgmode

I want to run my python code (that'll eventually become standalone python script) in org-mode. This script requires command line arguments (provided by sys lib's sys.argv). How do I execute python ...
Garid's user avatar
  • 589
1 vote
1 answer
195 views

How to share context between two code blocks work using sessions?

Based on the examples I've found on :session , I expect the following code blocks to share the same environment: #+begin_src crystal :session foobar :results output # some boilerplate: def echo(word) ...
cinnaroll45's user avatar
0 votes
4 answers
201 views

How to make changes on variables' values be persistent over sessions?

The current question is related to a previous question which is still not fully solved. I have been doing the following: 1 - After executing describe-variable over exec-path, I get: ("/opt/...
Pedro Delfino's user avatar
0 votes
0 answers
27 views

Bug-hunter finds error but it shouldn't (false positive)

I suspect I'm doing something very stupid but I can't figure out what. I have some problems with Eshell, and I was advised to use Bug-hunter. I installed it through Elpa. When I launch it (M-x bug-...
Alessandro Bertulli's user avatar
0 votes
1 answer
87 views

Store sessions on idle and use specific name for each stored session

I usually have multiple instances of doom emacs running (one for every project). I use this line in my config to save the session of each instance after 10 seconds idle time. (run-with-idle-timer 10 t ...
Rotareti's user avatar
  • 426
0 votes
2 answers
227 views

use-package session example please

I want to setup session with use-package but I don't know elisp except copying from working code. Here is what I've copied: ;;;_* session (use-package session :if (not noninteractive) :load-path &...
xpt's user avatar
  • 457
5 votes
1 answer
1k views

Org mode python code block with session does not return a result

I had been successfully using python code blocks with the :session header argument when I noticed that upon export no result was given. I then simplified my example to the following two: #+...
Reginald Marr's user avatar
0 votes
1 answer
238 views

How to open multiple files from desktop in the same emacs session?

I use Pop OS 20.04 on my desktop. When I start Emacs on login, I run the command (server-start). So when I open a file using the command emacsclient <filename> it opens it in the currently ...
Harsh Vardhan's user avatar
1 vote
1 answer
341 views

org-babel's matlab (session) output is malformed

I'm trying to evaluate some Matlab code using org-babel in a session: #+BEGIN_SRC matlab :session :results output a = 1:10; b = a + 3 c = a - 3 #+END_SRC And following the org-babel documentation, ...
Karthik's user avatar
  • 31
1 vote
0 answers
52 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, ...
Egil Möller's user avatar
2 votes
1 answer
128 views

How to use `recover-session` and `dired-omit-mode` in Emacs 26 and lower?

Using Emacs 26.1, I have enabled dired-omit-mode globally with (add-hook 'dired-mode-hook #'dired-omit-mode). When using recover-session, I don't see any files. How to fix this? Creating a .dir-...
Nova's user avatar
  • 1,059
1 vote
0 answers
139 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 (...
Wilson Almeida's user avatar
5 votes
2 answers
374 views

How to play back an edit session in emacs?

The book Clean code says emacs can play back an edit session (page 13): You could work for an hour and then play back your whole edit session like a high-speed movie. When I did this, the results ...
Alaneuler's user avatar
  • 277
4 votes
1 answer
5k views

Org-babel Python with :session

I don't know what happened with org-babel and Python recently. My intuition and my experience with preparing lectures last year was that the :session option would cause Org Mode to capture all the ...
MassimoLauria's user avatar
1 vote
0 answers
82 views

how can I see the result of 'ping -c 5 127.0.0.1' live using org babel session

https://github.com/whacked/ob-shstream/blob/master/ob-shstream.el There's an add-on for org babel that let's you see streaming output of bash shell blocks. It's documentation reads like this: ;; the ...
american-ninja-warrior's user avatar
3 votes
1 answer
282 views

Save *everything* across sessions

When I quit Emacs, nothing is saved, such as my search history, my command history, my replace strings, etc. I want EVERYTHING saved. How do I do that? And by everything, I mean at least the ...
deshmukh's user avatar
  • 1,862
0 votes
0 answers
42 views

Temporarily save modified buffers

I would like to achieve the following workflow: When I open files to edit and close emacs, I want this changed files to be temporarily saved, so that I can very quickly close Emacs / move to other ...
JohnDoe's user avatar
  • 203
4 votes
0 answers
102 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 ...
Lee H's user avatar
  • 2,717
1 vote
1 answer
430 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-...
Arch Stanton's user avatar
  • 1,585
2 votes
1 answer
789 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 ...
Chakravarthy Raghunandan's user avatar
11 votes
4 answers
2k views

One window per project

I am working on several projects right now. I want a single instance of Emacs to handle them all. What I want is a tmux-like behavior wherein every 'window' (in the Emacs sense) corresponds to a ...
sudeepdino008's user avatar
7 votes
1 answer
1k views

Emacs freezes with any org-babel snippet using `:session`

I removed my .emacs and .emacs.d, then created a new .emacs consisting of only the essential to use R and a shell with org-babel to make sure my configs weren't causing this: (require 'org-install) (...
Alex's user avatar
  • 161
2 votes
2 answers
881 views

Error on reopening files from previous session via desktop-save-mode

I like my Emacs to reopen all previously opened files when I start it up. My setup is simple: ;; save desktop autosave sessions (setq desktop-dirname "~/" desktop-base-file-name ...
user673592's user avatar
8 votes
1 answer
2k 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 ...
skyork's user avatar
  • 211
4 votes
3 answers
842 views

Org mode: execute region in session

I'm looking for an easy way to highlight a chunk of text inside a Babel source block (not the entire block) and execute that inside the current session (creating the new session buffer if necessary). ...
Ken Williams's user avatar
3 votes
0 answers
222 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 "....
gavenkoa's user avatar
  • 3,362
7 votes
2 answers
3k views

How can I get sessions.el to save my registers?

I am trying to get session to work, and I am especially keen on having my registers persistent between sessions. I installed the package sessions.el via Melpa (M-x list-packages) and I added this to ...
Vivi's user avatar
  • 361
2 votes
1 answer
4k views

What is causing this error: "Cannot open load file, no such file or directory, session"?

From time to time my Emacs doesn't load my init file at startup and gives me the following error message: File error: Cannot open load file, no such file or directory, session To ensure normal ...
clemera's user avatar
  • 3,441
17 votes
2 answers
2k views

Session files in emacs.d folder

There are files like session.10110ac205e127d7e2143131143297155100000021880037 in my .emacs.d folder. I would like to do something about it but could not figure out what to do. What are these files ...
Rangi Lin's user avatar
  • 987
16 votes
3 answers
4k views

Persistent shell-command history

When I run shell-command in a new session I do not have access to the history of commands from the last session. How can I have that?
RasmusWL's user avatar
  • 267
11 votes
2 answers
2k views

How to Persist Evil Markers?

I want to be able to save my buffer local evil markers (m to mark a location and then ' or ` to jump to it) across emacs sessions/instances. I'm not really sure how to do this. I tried installing/...
noctuid's user avatar
  • 429
0 votes
1 answer
709 views

Emacs ZNC-ERC: How to make Customize save my preferences for all sessions

I am setting up my ERC client to connect to my ZNC IRC proxy server, and I am following this Emacs wiki. At the following step: ;; Configure M-x customize-group znc RET I am in the Emacs customize ...
modulitos's user avatar
  • 2,452
9 votes
2 answers
3k views

How do I save a cursor position?

How can I save the cursor position for every file I have opened? So, next time I open the file, the cursor will be at the position I last opened it.
programking's user avatar
  • 7,134
20 votes
4 answers
9k views

How to setup default windows at startup?

Every time I open up Emacs I tend to set up 3 windows by doing C-x 3 (split-window-right) and then C-x2 (split-window-below). After that I have to switch to each window to open the files I want to ...
El Diego Efe's user avatar
  • 1,611
18 votes
1 answer
3k views

How can I restart emacs and preserve my open buffers and interactive history?

As a follow-up to What's the fastest way to reload my .emacs file when I make changes so all my affected buffers will pick up those changes? It was suggested that the restart question should be ...
b4hand's user avatar
  • 1,995
27 votes
2 answers
4k views

What's the fastest way to reload my .emacs file when I make changes so all my affected buffers will pick up those changes?

I'm aware of C-x C-e which is eval-last-sexp and M-x eval-buffer, but these aren't always sufficient to pick up all changes. Sometimes you need to actually close buffers that are in the modes who have ...
b4hand's user avatar
  • 1,995
12 votes
2 answers
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 ...
Rainer's user avatar
  • 907