From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matthias Meulien Newsgroups: gmane.emacs.devel Subject: Re: Wrong default-directory in shell buffer Date: Tue, 17 May 2022 22:59:41 +0200 Message-ID: <87bkvv27uq.fsf@gmail.com> References: <874k1vzyom.fsf@posteo.net> <87lev2j3g0.fsf_-_@gmail.com> <87h75pic7h.fsf@gmail.com> <875ym5i8cz.fsf@gmail.com> <87wnekfpjx.fsf@gmail.com> <87lev09dkg.fsf@gmail.com> <87ee0shscs.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15075"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Stefan Monnier , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 17 23:02:11 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nr4KY-0003mq-1a for ged-emacs-devel@m.gmane-mx.org; Tue, 17 May 2022 23:02:10 +0200 Original-Received: from localhost ([::1]:32902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nr4KW-00022T-NL for ged-emacs-devel@m.gmane-mx.org; Tue, 17 May 2022 17:02:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nr4JT-0001G6-7U for emacs-devel@gnu.org; Tue, 17 May 2022 17:01:03 -0400 Original-Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:33296) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nr4JR-0003bC-IR for emacs-devel@gnu.org; Tue, 17 May 2022 17:01:02 -0400 Original-Received: by mail-wr1-x42a.google.com with SMTP id f2so61585wrc.0 for ; Tue, 17 May 2022 14:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=+nhi3JjqPPcPrPf0j9HWz7kxbpt4ISSIphb1jUKm4k4=; b=qyD/FgZcDNk+cGqUP0Ye3zFvImnrpy3uI3Dqiz/Ekwrr3ioHNMtQS2t5ZYsAEVVFNI zH71wz6s1+B1PHn7EFygGf5Cnq/Vf6V9Y+vY5JXvpb/oOnzzKEHEGmeThdYL+5C7JjI7 wuBDuxPjP/w0wkE384BEOL/2gu+8IXW10fA+O7u4U25mpH+fBK/SbsbrNkti/N+RWRWw ZVt8T3IJd1WBNcASAktblFvbgF/GK5Cp4ICyL7PhFBiEmxFX4praCx0ffXpe2fyNECAp PhlIyX5XRJT4iEEPelRGNbsiPFq2L6k1MV4NeYKR90+aPnQJNMvXUuyD3L46nuz/R7OL W+jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=+nhi3JjqPPcPrPf0j9HWz7kxbpt4ISSIphb1jUKm4k4=; b=xnpPgNQhGJG1cCxcgxSyFjlpw5oysen2Wx6LolGuEoYmhdvGMvok5iTp5fLHb8bOXZ mxvVkTqWTBeuheH5ASym6E1hekThEQcFm6DuY8HX+BvTjoCh8z0eQg7H/ymXjJshISy4 eQoYIZZp4v5pbBHnZjgGMPjm1kOiz8sqCixuFD1c24z9s+r0D9Sbs19bfeVMEmfVCit1 eOZoKdxwuPueMAfyazHN/YtGj1GVHTbFi87LjL9x2JIOVkDkNXHg4SeWFfdYFQoZmHiq qehQA6N4j7QZWiL19s8VsnUgAetrCuShbdGz58/HSdli0tXkXD15/DbUjJWYVCXB+qwx D9mQ== X-Gm-Message-State: AOAM531a+x8FttgY0zoDXFPGhDqxJO8FjarK3srOq442LpU/NosAQyIR eqnoz0EMboDcuvt9mZVI4S6sWseOwgs= X-Google-Smtp-Source: ABdhPJxUN7ZSfxje7ITdKjoyVi6k4kK5okil82X8xKAwKfZ4Ha0GhjDJkHnbPX5m1xkuG5cI2NI5/A== X-Received: by 2002:adf:ed8a:0:b0:20c:fe1d:d9e3 with SMTP id c10-20020adfed8a000000b0020cfe1dd9e3mr14434598wro.546.1652821258848; Tue, 17 May 2022 14:00:58 -0700 (PDT) Original-Received: from carbon.localdomain ([2a01:e0a:245:c850:98f5:429a:aa8e:95bb]) by smtp.gmail.com with ESMTPSA id u23-20020a05600c00d700b003942a244f42sm3271530wmm.27.2022.05.17.13.59.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 14:00:03 -0700 (PDT) In-Reply-To: <87ee0shscs.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 17 May 2022 21:27:47 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=orontee@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:289879 Archived-At: Thank you! Using `comint-osc-directory-tracker' with a custom Bash prompt works like a charm. One possible minor comment update: diff --git a/lisp/comint.el b/lisp/comint.el index 3dc80c20ac..3da61fb992 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -3978,10 +3978,12 @@ comint-redirect-results-list-from-process ;;; OSC escape sequences (Operating System Commands) ;;============================================================================ -;; Adding `comint-osc-process-output' to `comint-output-filter-functions' -;; enables the interpretation of OSC escape sequences. By default, only -;; OSC 8, for hyperlinks, is acted upon. Adding more entries to -;; `comint-osc-handlers' allows a customized treatment of further sequences. +;; Adding `comint-osc-process-output' to +;; `comint-output-filter-functions' enables the interpretation of OSC +;; escape sequences. By default, OSC 7 and 8 (for current directory +;; and hyperlinks respectively) are acted upon. Adding more entries +;; to `comint-osc-handlers' allows a customized treatment of further +;; sequences. (defvar-local comint-osc-handlers '(("7" . comint-osc-directory-tracker) ("8" . comint-osc-hyperlink-handler)) Thanks a lot. -- Matthias