Comments (7)
Hello @Nicholas-Autio-Mitchell,
While in a tmux pane, can you execute this command?
$ tmux lsk | grep -E 'prefix\s+e\s+'
Can you also try to set EDITOR
to only emacs
?
from .tmux.
Hi @gpakosz , here is the unedited output
π ▶ tmux lsk | grep -E 'prefix\s+e\s+'
bind-key -T prefix e new-window -e "EDITOR=emacs -nw --no-splash" -n "#{TMUX_CONF_LOCAL}" sh -c "case \"\\${EDITOR:-vim}\" in *vim) \\${EDITOR:-vim} -c \":set syntax=tmux\" \"\\$TMUX_CONF_LOCAL\";; *) \"\\$EDITOR\" \"\\$TMUX_CONF_LOCAL\";; esac && \"\\$TMUX_PROGRAM\" \\${TMUX_SOCKET:+-S \"\\$TMUX_SOCKET\"} source \"\\$TMUX_CONF\" \\; display \"\\$TMUX_CONF_LOCAL sourced\""
Here is me trying EDITOR=emacs
:
π ▶ echo $EDITOR
emacs -nw --no-splash
π ▶ EDITOR="emacs"
π ▶ echo $EDITOR
emacs
π ▶ tmux lsk | grep -E 'prefix\s+e\s+'
bind-key -T prefix e new-window -e "EDITOR=emacs -nw --no-splash" -n "#{TMUX_CONF_LOCAL}" sh -c "case \"\\${EDITOR:-vim}\" in *vim) \\${EDITOR:-vim} -c \":set syntax=tmux\" \"\\$TMUX_CONF_LOCAL\";; *) \"\\$EDITOR\" \"\\$TMUX_CONF_LOCAL\";; esac && \"\\$TMUX_PROGRAM\" \\${TMUX_SOCKET:+-S \"\\$TMUX_SOCKET\"} source \"\\$TMUX_CONF\" \\; display \"\\$TMUX_CONF_LOCAL sourced\""
Executing <prefix> e
still has no effect.
from .tmux.
I notice in the output of tmux lsk | grep -E 'prefix\s+e\s+'
above, after changing to EDITOR=emacs
, the command still uses emacs -nw --no-splash
. I have killed/restarted the tmux server, and also edited by ~/.bashrc
to ensure the change to EDITOR is already there in the new session, but it still records the original EDITOR value.
Ok, realised tmux takes the value of EDITOR
from the parent shell, before tmux itself starts up. 🤦 Made the correct change, and it seems to have fixed the issue! 🎉
Just trying a few more things to make sure it is the case...
from .tmux.
It seems adding any argument at all the emacs
command in EDITOR
causes the issue. Could it be a problem with escaping the command when tmux reads it?
from .tmux.
I tried wrapping emacs -nw --no-splash
inside a function emacs_fn
and set EDITOR=emacs_fn
. It still doesn't work, so not likely an issue with escaping the command etc.
Additionally, I have had EDITOR=emacs -nw --no-splash
set for years... I also didn't pull any updates from oh my tmux recently, so perhaps it is coming from elsewhere. My only guess is an emacs or emacs dependency update, but couldn't find a possible reason after a quick search now. Unless you have more ideas, I will assume it isn't an issue to resolve here.
As always, thanks for your help @gpakosz !
from .tmux.
Can you please try setting EDITOR='emacs -nw --no-splash'
again with the gh-744
branch?
This implies quitting tmux etc like you noticed above
from .tmux.
The changes to quotes when reading the $EDITOR env var (made in gh-744) do fix the issue.
I had an older config on a different machine, where I still used EDITOR='emacs -nw --no-splash'
, so could compare three versions. Here is a summary:
# Works: an old tmux.conf (unknown commit)
bind e new-window -n "#{TMUX_CONF_LOCAL}" sh -c '${EDITOR:-vim} "$TMUX_CONF_LOCAL" && "$TMUX_PROGRAM" ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} source "$TMUX_CONF" \; display "$TMUX_CONF_LOCAL sourced"'
# Fails: current master
bind e new-window -n "#{TMUX_CONF_LOCAL}" -e "EDITOR=$EDITOR" sh -c 'case "${EDITOR:-vim}" in *vim) ${EDITOR:-vim} -c ":set syntax=tmux" "$TMUX_CONF_LOCAL";; *) "$EDITOR" "$TMUX_CONF_LOCAL";; esac && "$TMUX_PROGRAM" ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} source "$TMUX_CONF" \; display "$TMUX_CONF_LOCAL sourced"'
# Works: gh-744
bind e new-window -n "#{TMUX_CONF_LOCAL}" -e EDITOR="$EDITOR" sh -c 'case "${EDITOR:-vim}" in *vim) ${EDITOR:-vim} -c ":set syntax=tmux" "$TMUX_CONF_LOCAL";; *) $EDITOR "$TMUX_CONF_LOCAL";; esac && "$TMUX_PROGRAM" ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} source "$TMUX_CONF" \; display "$TMUX_CONF_LOCAL sourced"'
from .tmux.
Related Issues (20)
- What is the recommended way to do theme customization? HOT 2
- When using {battery_vbar} or {battery_hbar}, the battery status display does not take effect. HOT 1
- Changing prefix to <C-s> works but <C-a> continues to be another prefix even after unbind HOT 1
- Question: Change bg color of status bar if prefix is active HOT 2
- unable to work with nvim-osc52 HOT 1
- .tmux.conf is ignored HOT 1
- ${TERM} always set to tmux-256color, how to change it HOT 4
- Fail to minimize back to original window/pane HOT 1
- Suggestion for keybinds HOT 2
- Statusline broken after update HOT 1
- I had some problems during the installation process
- The shortcut keys set using ohmytmux take effect, but the style is still the default style. HOT 14
- Unable to get this to work at all, using .config and migrating from dracula/snazzy (OSX Sonoma 14.4.1 M3) HOT 2
- Plugin setup and configuration is entirely skipped HOT 20
- Status Bar custom module disappearing HOT 9
- Command prompt position -- don't hide status line HOT 4
- Can't get status line to update HOT 2
- How to enable copy from system clipboard in mouse mode (Mobaxterm)
- small arraw symbol in macos terminal app HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from .tmux.