emacs update. improvements
[distro-setup] / brc
diff --git a/brc b/brc
index 4aacc47397e3e5502809c60229ad369035d4f41d..17fcfd83fe36747a94cb1c60157a5942140f74ab 100644 (file)
--- a/brc
+++ b/brc
@@ -1324,7 +1324,11 @@ etailm() {
 etail2() {
   tail -F /var/log/exim4/mymain -n 200 "$@"
 }
-ccomp tail etail etail2
+# shortcut
+ta() {
+  tail -F "$@"
+}
+ccomp tail etail etail2 ta
 
 # ran into this online, trying it out
 detach() {
@@ -1639,28 +1643,17 @@ g() {
       args+=" -c"
     fi
   fi
-  if [[ $EMACSDIR ]]; then
-
-    # todo: we don't have to alter HOME since emacs 29+, we can set
-    # user-emacs-directory with the flag --init-directory
-
-    # Alter the path here, otherwise the nfs mount gets triggered on the
-    # first path lookup when emacs is not being used.
-    # shellcheck disable=SC2098 disable=SC2097 # false positive
-    PATH="$EMACSDIR/lib-src:$EMACSDIR/src:$PATH" EHOME=$HOME HOME=$EMACSDIR m emacsclient -a "" $args "$@"
+  if $gdb; then
+    # due to a bug, we cant debug from the start unless we get a new gdb
+    # https://sourceware.org/bugzilla/show_bug.cgi?id=24454
+    # m gdb -ex="set follow-fork-mode child" -ex=r -ex=quit --args emacs --daemon
+    m emacsclient -a "" $args "$@"
+    sleep 1
+    cd "/a/opt/emacs-$(distro-name)$(distro-num)"
+    s gdb -p "$(pgrep -f 'emacs --daemon')" -ex c
+    cd -
   else
-    if $gdb; then
-      # due to a bug, we cant debug from the start unless we get a new gdb
-      # https://sourceware.org/bugzilla/show_bug.cgi?id=24454
-      # m gdb -ex="set follow-fork-mode child" -ex=r -ex=quit --args emacs --daemon
-      m emacsclient -a "" $args "$@"
-      sleep 1
-      cd "/a/opt/emacs-$(distro-name)$(distro-num)"
-      s gdb -p "$(pgrep -f 'emacs --daemon')" -ex c
-      cd -
-    else
-      m emacsclient -a "" $args "$@"
-    fi
+    m emacsclient -a "" $args "$@"
   fi
 }