GNU bug report logs -
#76853
M-b not navigating to the previous word in the prompt string inside Eshell on emacs 30.1
Previous Next
Reported by: Hrishikesh S <hrish2006 <at> gmail.com>
Date: Sat, 8 Mar 2025 06:54:02 UTC
Severity: normal
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
In GNU Emacs 30.1, System Description: macOS 15.2
which I installed by simply running "brew install emacs" on my work machine,
when I'm inside the eshell buffer, typing `M-b` does not take me back by a
word like how it used to be.
Apologies if the bug doesn't have enough information, but I was able to
verify this behavior on a fresh, clean install, without any of my
configuration or installed packages by running
"emacs -Q" and observing the same behavior.
I searched through existing bug reports and this seems like a new issue.
My relevant emacs config:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; eshell
;;
(require 'em-smart)
(setq eshell-history-size 10000)
(setq eshell-prompt-regexp "^[^#$]*[#$] ")
(defun curr-dir-git-branch-string (pwd)
"Returns current git branch as a string, or the empty string if
PWD is not in a git repo (or the git command is not found)."
(interactive)
(when (and (eshell-search-path "git")
(locate-dominating-file pwd ".git"))
(let ((git-output (shell-command-to-string (concat "cd " pwd " && git
branch | grep '\\*' | sed -e 's/^\\* //'"))))
(propertize (concat " ["
(if (> (length git-output) 0)
(substring git-output 0 -1)
"(no branch)")
"]") 'face `(:foreground "green"))
)))
(setq eshell-prompt-function
(lambda ()
(concat
(propertize ((lambda (p-lst)
(if (> (length p-lst) 3)
(concat
(mapconcat (lambda (elm) (if (zerop (length elm)) ""
(substring elm 0 1)))
(butlast p-lst 3)
"/")
"/"
(mapconcat (lambda (elm) elm)
(last p-lst 3)
"/"))
(mapconcat (lambda (elm) elm)
p-lst
"/")))
(split-string (pwd-repl-home (eshell/pwd)) "/")) 'face
`(:foreground "yellow"))
(or (curr-dir-git-branch-string (eshell/pwd)))
(propertize " # " 'face 'default))))
(setq eshell-highlight-prompt nil)
Thank you for all the work on emacs!
Regards,
Hrishi
[Message part 2 (text/html, inline)]
This bug report was last modified 70 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.