From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Long file names in Dired Date: Fri, 24 Apr 2015 09:29:44 +0300 Message-ID: <83bnieyr6v.fsf@gnu.org> References: <87a8xyo2zj.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1429857009 13245 80.91.229.3 (24 Apr 2015 06:30:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Apr 2015 06:30:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 24 08:29:58 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YlX7b-0000Ao-FK for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Apr 2015 08:29:55 +0200 Original-Received: from localhost ([::1]:42985 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlX7a-0003Xf-T5 for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Apr 2015 02:29:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlX7R-0003XX-LE for help-gnu-emacs@gnu.org; Fri, 24 Apr 2015 02:29:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlX7O-0005qc-9R for help-gnu-emacs@gnu.org; Fri, 24 Apr 2015 02:29:45 -0400 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:60628) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlX7O-0005qW-1S for help-gnu-emacs@gnu.org; Fri, 24 Apr 2015 02:29:42 -0400 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NNA00900SMT2O00@mtaout26.012.net.il> for help-gnu-emacs@gnu.org; Fri, 24 Apr 2015 09:31:16 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NNA005VUSS4OD30@mtaout26.012.net.il> for help-gnu-emacs@gnu.org; Fri, 24 Apr 2015 09:31:16 +0300 (IDT) In-reply-to: <87a8xyo2zj.fsf@mbork.pl> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.182 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103972 Archived-At: > From: Marcin Borkowski > Date: Fri, 24 Apr 2015 01:10:24 +0200 > > so I have some really, really long filenames (say, more than 70 > characters), and I'd like to shorten them so they don't spill to the > next line in Dired. I can toggle-truncate-lines, of course, but then > I don't see the extension, and I'd prefer to truncate the part /before/ > the extension. > > Is there any Dired hack enabling this? Not that I know of (but others might, so don't consider that as a definitive answer). One obvious way to show long file names is to have wider frames/windows. Failing that, I think we will welcome a patch that shortens file names in Dired intelligently, basically displaying something like foo...bar.ext, with the place of the ellipsis strategically computed to show as much of the file name as possible, including the extension. If you, or someone else, decide to work on that, beware of the fact that Dired puts a special text property on the file name, which is needed for correct operation of Dired commands when the file names include special characters, like whitespace. You should be careful not to destroy this subtle feature.