From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jason Kim Newsgroups: gmane.emacs.devel Subject: Re: Small shell-mode patch to handle auto-cd (e.g. shells like zsh) Date: Sat, 8 May 2021 10:19:41 -0700 Message-ID: <2a15023f-94b3-4726-6cc8-d7a8dd8e5aaa@icloud.com> References: <83v97we0ey.fsf@gnu.org> <83v97tag0r.fsf@gnu.org> <831rah9no1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13033"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 Cc: michael.albinus@gmx.de, emacs-devel@gnu.org, shivers@cs.cmu.edu, jason.kim@revtera.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 08 19:21:24 2021 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 1lfQdo-0003GF-2Z for ged-emacs-devel@m.gmane-mx.org; Sat, 08 May 2021 19:21:24 +0200 Original-Received: from localhost ([::1]:46820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lfQdn-00067Y-5U for ged-emacs-devel@m.gmane-mx.org; Sat, 08 May 2021 13:21:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lfQcD-0005PT-Vo for emacs-devel@gnu.org; Sat, 08 May 2021 13:19:45 -0400 Original-Received: from mr85p00im-hyfv06021301.me.com ([17.58.23.188]:48616) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lfQcC-0006Jo-Kq for emacs-devel@gnu.org; Sat, 08 May 2021 13:19:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1620494382; bh=eKahhzsX7N4K8U1mCG7/RE2F8VG5GulS+zspVFZ3Rg0=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type; b=RqUv+MnyZASYMYW5zhVRQfKfp2cVVwmr1hWEPq+/gqYilPsc7gBeSXdNdpg+C8wvm c/7dQo5RkKMTafL6PgO1lspgDCr6DDPqSo4j6adU2nvMRSkro0NcdyOz5XpYEx6Zbo IWhtQK2bLCPyGku8FnMDg7mw0t6XUmgaPkIZ2JUJP7VJLqbDwV6S/BOlwC+sHV88FO EQvRGqLxXW81zN8Rz4KdE17pTskQA4zUweQxxD7P+ubCpO4CyeBWL/KF7/vV2EsU1+ f0A2l8UtUgTaKfZQpmlVhMWFKA36fXxhjhihWgNDdAKchDuOApVMeAJ+n046QXFUro cwDthDqmoW31g== Original-Received: from [10.26.18.5] (unknown [143.244.48.87]) by mr85p00im-hyfv06021301.me.com (Postfix) with ESMTPSA id 163A940670; Sat, 8 May 2021 17:19:42 +0000 (UTC) In-Reply-To: <831rah9no1.fsf@gnu.org> Content-Language: en-US X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.391,18.0.761,17.0.607.475.0000000_definitions?= =?UTF-8?Q?=3D2021-05-08=5F07:2021-05-06=5F02,2021-05-08=5F07,2020-04-07?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 clxscore=1015 spamscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2105080137 Received-SPF: pass client-ip=17.58.23.188; envelope-from=jason.w.kim@icloud.com; helo=mr85p00im-hyfv06021301.me.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_REPLY=1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:269061 Archived-At: On 5/8/21 9:48 AM, Eli Zaretskii wrote: >> Cc: michael.albinus@gmx.de, emacs-devel@gnu.org, shivers@cs.cmu.edu, >> jason.kim@revtera.com >> From: Jason Kim >> Date: Sat, 8 May 2021 09:39:48 -0700 >> >>> Sorry, I don't think I understand. My understanding was that this >>> feature is supported by some shells whose names are known in advance >>> (like zsh), so Emacs could compute the value as appropriate for that >>> shell without asking the user to set it. If this is not a good idea, >>> can you explain why? >>> >> >> Hi, sorry for the confusion - >> auto-cd feature in zsh is optional. It is not on by default, and I don't >> know of a good way to detect whether a zsh process tied to a shell >> buffer has that option turned on. > > Can't you ask zsh itself, by running some command once, when the mode > is turned on? > Sure, I suppose, but why do it? I'm a zsh user and I'm perfectly fine with it as a switch that I can put in my .emacs :-) and hijacking comint like that can add glitches, and introduce irreproducibility (I automate creation of shells, pasting commands to comint etc..). Auto injecting commands to what should be a user-input space seems a bit wierd just to support this feature, and may not be optimal, because it is unexpected I'd be happy to help with this improvement, if that's REALLY what you want but it can add glitches to user's automation of shells, but I don't think its necessary (for now), and I humbly request we punt on it. Thanks! -Jason