emacs-pool 0.2.0

An emacs daemon pool for fast emacs startups.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::env;
use std::path::PathBuf;

pub fn default_sock_filename() -> &'static str {
    ".emacs-pool.sock"
}

pub fn default_sock_path() -> String {
    let mut buf = PathBuf::from(env::var_os("HOME").expect("Could not read $HOME"));
    buf.push(default_sock_filename());
    buf.to_str()
        .expect("Could not get default sock path")
        .to_string()
}