First keybinding not defined when opening file with auctex in emacs daemonHello. I am using emacs v…
انتشار: 2026/08/16 18:07 UTCدریافت: 2026/08/17 20:17 UTCآخرین مشاهده: 2026/08/17 20:17 UTC
First keybinding not defined when opening file with auctex in emacs daemonHello. I am using emacs v 30.1 with auctex 14.1.2. I want to run emacs in daemon mode and then open a *.tex file. I'm using the script below. Say the script is called em. There are two different outcomes:1. From bash terminal run em file.tex where file.tex is an existing *.tex file. The file opens in the terminal. Then keybindings work as expected. For example C-c C-c asks me which command I want to run.2. From bash terminal run em -c file.tex where file.tex is an existing *.tex file. Note here that I'm creating a new frame. The file opens in the terminal. However, executing C-c C-c tells me "C-c C-c is undefined" but only for the first time. Executing C-c C-c again works as normal.Any ideas what I can do regarding this?#!/bin/bash -lEMACS=$(command -v emacs)if [ -z "$EMACS" ]; then echo "emacs not found on PATH" 1>&2 exit 1fiEMACS_SOCKET_NAME=${EMACS_SOCKET_NAME:-emacs-daemon}export EMACS_SOCKET_NAMEif [ -n "$XDG_RUNTIME_DIR" ]then EMFILE="$XDG_RUNTIME_DIR/emacs/$EMACS_SOCKET_NAME"else EMFILE="/tmp/emacs$UID/$EMACS_SOCKET_NAME"fiDAEMON=$(lsof -c emacs | grep $EMFILE)if [ -z "$DAEMON" ]then emacs --daemon="$EMACS_SOCKET_NAME"fiif [ $# -ne 0 ]then emacsclient -s "$EMACS_SOCKET_NAME" "$@"fiexit 0redd.it/1vpx0vq@r_emacs
