GNU bug report logs - #41250
28.0.50; Dired displays unconditionally ls-switches on modeline

Previous Next

Package: emacs;

Reported by: Arthur Miller <arthur.miller <at> live.com>

Date: Thu, 14 May 2020 01:43:01 UTC

Severity: minor

Tags: fixed

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #117 received at 41250 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 41250 <at> debbugs.gnu.org, Arthur Miller <arthur.miller <at> live.com>,
 Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#41250: 28.0.50; Dired displays unconditionally ls-switches
 on modeline
Date: Wed, 30 Sep 2020 21:30:56 +0200
Juri Linkov <juri <at> linkov.net> writes:

>> And I'm not sure about this:
>>
>> +                                   (concat " " xs (and (< l2  l1) "…")))))
>>
>> Perhaps that should be conditional upon the terminal being able to
>> display that character?
>
> Like everywhere else (if (char-displayable-p ?…) "…" "...")

Yes.  But this is surely a general problem, and:
`truncate-string-to-width'.

----
If ELLIPSIS is non-nil, it should be a string which will replace the
end of STR (including any padding) if it extends beyond END-COLUMN,
unless the display width of STR is equal to or less than the display
width of ELLIPSIS.  If it is non-nil and not a string, then ELLIPSIS
defaults to ‘truncate-string-ellipsis’.
----

*sigh*

Would anybody mind very much if I added a `string-truncate-right' that
does all this automatically, and amend `string-truncate-left' in the
same way?  I.e., use (if (char-displayable-p ?…) "…" "...").

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 290 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.