Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions dotfiles.org
Original file line number Diff line number Diff line change
Expand Up @@ -724,14 +724,35 @@ corresponding section of Bash config for more info.
if status is-interactive
# Commands to run in interactive sessions can go here

if test -f "/usr/lib64/libc_malloc_debug.so.0"
set -x EDITOR="LD_PRELOAD=/usr/lib64/libc_malloc_debug.so.0 emacsclient -t"
else
set -x EDITOR "emacsclient -t"
set -x ALTERNATE_EDITOR ''

function em
set -l PRELOAD_LIB /usr/lib/libc_malloc_debug.so
set -l EC_ARGS -t

if set -q INSIDE_EMACS
and not set -q EMACS_SERVER_NAME
echo "em: EMACS_SERVER_NAME not set" >&2
return 1
end

if set -q EMACS_SERVER_NAME
set -a EC_ARGS -s $EMACS_SERVER_NAME
end

if set -q INSIDE_EMACS
set -a EC_ARGS -n
end

if test -e $PRELOAD_LIB
env LD_PRELOAD=$PRELOAD_LIB emacsclient $EC_ARGS $argv
else
emacsclient $EC_ARGS $argv
end
end

set -x ALTERNATE_EDITOR ''
alias em $EDITOR
set -x EDITOR em

end
#+end_src

Expand Down
Loading