Questions tagged [session]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
68 views

Save/Restore the Frame Position and Size of the Last Session

I want my Emacs to store its frame position and frame size into some-specific-file before quitting, so that at the beginning of the next session, Emacs will appear where the last session ended and ...
  • 1,317
0 votes
0 answers
26 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 ...
  • 892
0 votes
1 answer
32 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 ...
  • 85
0 votes
1 answer
43 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 ...
  • 357
1 vote
1 answer
117 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) ...
0 votes
4 answers
96 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/...
0 votes
0 answers
21 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-...
0 votes
1 answer
52 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 ...
  • 426
0 votes
2 answers
180 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 &...
  • 427
4 votes
1 answer
897 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: #+...
0 votes
1 answer
212 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 ...
1 vote
1 answer
291 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, ...
  • 31
1 vote
0 answers
47 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, ...
2 votes
1 answer
110 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-...
  • 1,039
1 vote
0 answers
119 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 (...
5 votes
2 answers
331 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 ...
  • 277
4 votes
1 answer
4k 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 ...
1 vote
0 answers
79 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 ...
3 votes
1 answer
220 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 ...
  • 1,832
0 votes
0 answers
40 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 ...
  • 203
4 votes
0 answers
98 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,669
1 vote
1 answer
409 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-...
  • 1,485
2 votes
1 answer
737 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 ...
10 votes
4 answers
1k 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 ...
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) (...
  • 161
2 votes
2 answers
851 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 ...
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 ...
  • 211
3 votes
2 answers
771 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). ...
3 votes
0 answers
221 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 "....
  • 3,290
7 votes
2 answers
2k 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 ...
  • 351
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 ...
  • 3,371
16 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 ...
  • 977
15 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?
  • 257
11 votes
2 answers
1k 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/...
  • 409
0 votes
1 answer
685 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 ...
  • 2,360
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.
  • 6,904
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 ...
  • 1,581
18 votes
1 answer
2k 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 ...
  • 1,985
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 ...
  • 1,985
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 ...
  • 897