From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: find-file-visit-truename Date: Mon, 29 May 2023 16:04:51 +0300 Message-ID: <83mt1ngufg.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5544"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 29 15:05:00 2023 Return-path: Envelope-to: geh-help-gnu-emacs@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 1q3cYW-0001Ej-H8 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 29 May 2023 15:05:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3cXr-0007EL-UY; Mon, 29 May 2023 09:04:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3cXq-0007Dw-6J for help-gnu-emacs@gnu.org; Mon, 29 May 2023 09:04:18 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3cXp-00038p-U8 for help-gnu-emacs@gnu.org; Mon, 29 May 2023 09:04:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=iMSgoCKFTOeoeetJGdRDmMrBKV/5BIRMQMek1qYaS+Q=; b=bRN2HqBJw82dAwMoI8Zo IzB5yZoP43+Mkh3vXfpimWoJoHqdgXO2x5LuX4F7qFHGAKe9e8oSwIsuPWm45LPfoyDoEJg8xLox2 yEFA9N6LcmO8O5P9bCRebW/bLRh0Wxbml/S7wzcKa7t5u7TBiR98K6+A7xc4jAIrrZutXVEnVAVzz 3WkXanjIfDnztYh7/cZ0tRWAWmOnAgv+JYkvjZgrjehb5/keCwSMEaoAtddg7S/03n+85mPa4kTJ1 JHjVsYcMCnb+AFBhqwny7+oGeev0uLOrldt9UipzyqaU5oM+O2xPutxJOZ8+51fNp+ylPgDqS+/Yi nkcANsjGzSbLCA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3cXk-0005Wq-02 for help-gnu-emacs@gnu.org; Mon, 29 May 2023 09:04:15 -0400 In-Reply-To: (message from Samuel Wales on Sun, 28 May 2023 21:15:09 -0700) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143785 Archived-At: > From: Samuel Wales > Date: Sun, 28 May 2023 21:15:09 -0700 > > i have had find-file-visit-truename set to t forever. it used to > work. i still have it set to t. > > however, in 27.1, it does not work as i expect. > > here is what i expect: > > - a is a symlink that points to real file b > - i find-file a > - real file b shows in mode line buffer identification > - other stuff like echo area notifications and more > > here is what occurs > > - mode line buffer identification shows symlink a <-- bug The doc string of find-file-visit-truename says: Non-nil means visiting a file uses its truename as the visited-file name. That is, the buffer visiting the file has the truename as the value of ‘buffer-file-name’. And the Emacs manual says: If the variable ‘find-file-visit-truename’ is non-‘nil’, then the file name recorded for a buffer is the file’s “truename” (made by replacing all symbolic links with their target names), rather than the name you specify. Note that both speak about the _file_ name recorded for a buffer. By contrast, the default mode line shows the _buffer_ name, not the _file_ name. If you want to see the file name, you need to customize mode-line-buffer-identification to show that; by default it uses %b, which shows the buffer name. I suspect that this is how it used to work for you in previous versions of Emacs, since the code which shows the buffer identification on the mode line hasn't changed in decades.