all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: stefan@marxist.se, 56685@debbugs.gnu.org
Subject: bug#56685: OBOE in string-truncate-left?
Date: Fri, 22 Jul 2022 17:23:27 +0200	[thread overview]
Message-ID: <87h739f9xs.fsf@gmx.net> (raw)
In-Reply-To: <83zgh1jmr0.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 22 Jul 2022 16:33:07 +0300")

On Fri, 22 Jul 2022 16:33:07 +0300 Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Stephen Berman <stephen.berman@gmx.net>
>> Cc: stefan@marxist.se,  56685@debbugs.gnu.org
>> Date: Fri, 22 Jul 2022 14:35:02 +0200
>>
>> Currently, the result of applying string-truncate-left to STRING can be
>> a string just as long as STRING but beginning with "..." instead of the
>> first three letters of STRING.  What is a valid use case for that?
>
> When STRING is part of a longer string.

I don't see why that is relevant, and one of the few uses of
string-truncate-left in the Emacs sources seems to confirm my doubt,
namely, in gnus-shorten-url, which results in displaying
e.g. "cvs.savannah.gnu.org...emacs.svg?view=log" instead of
"https://cvs.savannah.gnu.org/viewvc/emacs/emacs/etc/images/icons/hicolor/scalable/apps/emacs.svg?view=log".
But if the too-long string is
"https://cvs.savannah.gnu.org/viewv/emacs/emacs/1/", then with the
current string-truncate-left gnus-shorten-url "shortens" it to
"cvs.savannah.gnu.org...ewv/emacs/emacs/1/".  AFAICS replacing the three
characters "/vi" by "..." here just loses information.  Can you show a
specific case where such a length-preserving substitution is preferable?

Steve Berman





  reply	other threads:[~2022-07-22 15:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21 22:10 bug#56685: OBOE in string-truncate-left? Stefan Kangas
2022-07-22 10:26 ` Stephen Berman
2022-07-22 11:31   ` Eli Zaretskii
2022-07-22 12:35     ` Stephen Berman
2022-07-22 13:33       ` Eli Zaretskii
2022-07-22 15:23         ` Stephen Berman [this message]
2022-07-23  6:58           ` Lars Ingebrigtsen
2022-07-23  8:51             ` Stephen Berman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h739f9xs.fsf@gmx.net \
    --to=stephen.berman@gmx.net \
    --cc=56685@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.