From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#41250: 28.0.50; Dired displays unconditionally ls-switches on modeline Date: Mon, 05 Oct 2020 09:08:11 +0200 Message-ID: <87r1qdqhes.fsf@gnus.org> References: <87v9ky9p6o.fsf@mail.linkov.net> <654acc31-015d-4552-bd9b-3b8c69661fcd@default> <0957af50-7f85-455a-9d2c-e96451727872@default> <6073a2d5-4024-465d-8293-88ad7f6127ed@default> <87mu172qxb.fsf@gnus.org> <87sgazi550.fsf@mail.linkov.net> <87tuvfxdsf.fsf@gnus.org> <875z7vdol3.fsf@mail.linkov.net> <87pn63xcgp.fsf@gnus.org> <874knd7mow.fsf@mail.linkov.net> <877ds91zvy.fsf@gnus.org> <87lfgpm82u.fsf@mail.linkov.net> <87sgawww8o.fsf@gnus.org> <87y2klixr5.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31380"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 41250@debbugs.gnu.org, Arthur Miller To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 05 09:09:09 2020 Return-path: Envelope-to: geb-bug-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 1kPKcP-00083K-Ox for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Oct 2020 09:09:09 +0200 Original-Received: from localhost ([::1]:34720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPKcO-0006s6-EV for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Oct 2020 03:09:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPKcI-0006s0-IT for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2020 03:09:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36055) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPKcI-0006BN-9g for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2020 03:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kPKcI-0006jr-4t for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2020 03:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Oct 2020 07:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41250 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 41250-submit@debbugs.gnu.org id=B41250.160188170825861 (code B ref 41250); Mon, 05 Oct 2020 07:09:02 +0000 Original-Received: (at 41250) by debbugs.gnu.org; 5 Oct 2020 07:08:28 +0000 Original-Received: from localhost ([127.0.0.1]:47601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPKbk-0006j3-Ce for submit@debbugs.gnu.org; Mon, 05 Oct 2020 03:08:28 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:45580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPKbi-0006il-0l for 41250@debbugs.gnu.org; Mon, 05 Oct 2020 03:08:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=hnLaUWVJEUs2KNh+Jeg66tOnlPLPJhte/Typsp639O4=; b=u4a7SUJH4E14q0tue3HFtW+yZ5 8klnlj6rK2rIxaq5G2ZXRBJkaqGuaSognWXi0APhFDGtosaSWwFNSEN7dunduvEChRrFQ0Ydn77Pa VIcAjJeh1aK+59KwRz/EFUjEKRymS1GPRrfTBHMdD1Y/NjStCARwIeDvZVprbGoTyNkM=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPKbV-0004lW-3U; Mon, 05 Oct 2020 09:08:15 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEXSRjLjSjSrPDBW JyPWa1fbi3PkvLT///+l+FD6AAAAAWJLR0QHFmGI6wAAAAd0SU1FB+QKBQYhMJKkQloAAAGnSURB VDjL1ZLNbusgEIWJZbJOq3ZPh2ZfgdQ1aQevfW8Z1lEFvP8jdLCJY1v3PkAnSqScj/nhDEL8kjj9 R+9ACPvyD/BoTgcLe/VQgTbavm3FQ6c02BpmpWshZtHqDdB2HbdSB7xUYKavtmppHkuegDadUvz/ oemylPIF50iujrCKgUGuP2U3fowMql7SFjQ5ib44IVQHrfkxYc0p7NPrtwKAroGI5Dkl8UkgtaqU EJETrtOhanDT+wq4lKfAA7IxG1ByDODHCjalfBYJwPgKOlCtEXmMbvg0oM8uik6JNq6MwSXpreWh 3OqGfb3bmKRhHfAaF1QdHND5CVTDXAPH6qAUDPhTDRiXUhS875+BH4HJREuGGIKQvpefvKf3hJTX N5Ee8S+vcChj7zZAIg4f9jyUP9uF9M8BXcz5mN0OhIDY4xjDab9cj56iK5dFoSmBClvs03E10WQA xRKQKK/fQprd4sPo2xLnuM7gym8rFxrvYJyfzygQqWR8WsZ1dcEyc39uwU7dU/S8RsnuMQh3ADPw xKNtQDcDanHX2+Jv4LQvdQO3qX4A+7+AFHeY4dQAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMTAt MDVUMDY6MzM6NDgrMDA6MDB2N8LgAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTEwLTA1VDA2OjMz OjQ4KzAwOjAwB2p6XAAAAABJRU5ErkJggg== X-Now-Playing: Stereolab's _Margerine Eclipse_: "Bop Scotch" In-Reply-To: <87y2klixr5.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 04 Oct 2020 22:44:22 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:189792 Archived-At: Juri Linkov writes: > Pushed now with a NEWS item. Great! > When I grepped for more usages of truncate-string-to-width, I found > one call in Gnus. It seems this patch could improve gnus-set-mode-line, > but I'm not sure, and moreover I have no idea how to test this: [...] > - (concat (truncate-string-to-width mode-string (- max-len 3)) > - "..."))))) > + (truncate-string-to-width mode-string (- max-len 3) nil nil t))))) I applied the patch and tested it, and it looks fine, so I've pushed it to Emacs 28. > Here is another function, and it needs not just an improvement, > but a plain bug fix because its args were wrong, and this patch should fix > its args, but again currently I don't yet know how to test this: [...] > - `(truncate-string-to-width str strlen (- strlen ,maxvar) nil ?\s) > + `(truncate-string-to-width str strlen (- strlen ,maxvar) ?\s) > `(truncate-string-to-width ,strvar ,maxvar nil ?\s))) Testing should be pretty easy -- just say `M-x ibuffer' and look at how it truncates buffer names. :-) However, the patch doesn't fix the ellipsis stuff here, because ibuffer has a `ibuffer-eliding-string' variable (that could be obsoleted now). (But the patch otherwise looks "obviously correct" to me; passing in ?\s as the ellipsis argument doesn't make much sense.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no