all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Štěpán Němec" <stepnem@gmail.com>
Cc: larsi@gnus.org, 39980@debbugs.gnu.org
Subject: bug#39980: [PATCH] gnus-shorten-url: Improve and avoid args-out-of-range error
Date: Sun, 12 Apr 2020 16:38:57 +0300	[thread overview]
Message-ID: <838sj0lt72.fsf@gnu.org> (raw)
In-Reply-To: <87k12lc4dz.fsf@gmail.com> (message from Štěpán Němec on Sun, 12 Apr 2020 13:47:20 +0200)

> From: Štěpán Němec <stepnem@gmail.com>
> Cc: larsi@gnus.org,  39980@debbugs.gnu.org
> Date: Sun, 12 Apr 2020 13:47:20 +0200
> 
> >> There are no changes in the patch that are not necessary for fixing the
> >> problem. The ediff changes (only adjusting callers) are necessitated by
> >> moving the helper function to subr-x.el, so that Gnus (or anything else)
> >> can use it, too.
> >
> > The changes in subr-x and in ediff are unnecessary.  Let's make
> > changes only in gnus-summary-browse-url, OK?  The full changeset can
> > go to master.
> 
> You mean instead of reusing an existing function, fix `gnus-shorten-url'
> without using it?

Almost: the "existing function" doesn't really exist, you introduced
it with the same changeset, right?

> I can only see disadvantages here: having to maintain
> two separate versions, reinventing the wheel (and possibly introducing
> bugs that way, which is how all this started)... are you sure you
> couldn't be persuaded otherwise? Surely just renaming a function and
> adjusting callers should be safer for the release branch, too?

It isn't safe enough for my taste, sorry.  It affects every package
that uses subr-x, and it affects Ediff.  I'd like to avoid that for
the release branch, however low risk that is.  Solving it just in
gnus-shorten-url makes the risk of breaking anything else exactly
zero on the release branch.

The change on the release branch should be marked by "don't merge to
master", and the original changeset pushed to master instead.

> * lisp/vc/ediff-init.el (ediff-truncate-string-left): Rename to
> 'string-truncate-left' and move...
> * lisp/emacs-lisp/subr-x.el (string-truncate-left): ...here.
> * lisp/vc/ediff-mult.el (ediff-meta-insert-file-info1)
> (ediff-draw-dir-diffs): Adjust callers.
> * lisp/gnus/gnus-sum.el (gnus-shorten-url): Fix args-out-of-range
> error, don't drop #fragments, use 'string-truncate-left'.
> 
> Or even compacting the first three items to:
> 
> * lisp/vc/ediff-init.el (ediff-truncate-string-left): Rename to
> 'string-truncate-left' and move...
> * lisp/emacs-lisp/subr-x.el (string-truncate-left): ...here.  All callers
> changed.

Both variants of the log message are fine.

Thanks.





  reply	other threads:[~2020-04-12 13:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-08  9:06 bug#39980: [PATCH] gnus-shorten-url: Improve and avoid args-out-of-range error Štěpán Němec
2020-03-14 11:41 ` Lars Ingebrigtsen
2020-03-14 16:34   ` Štěpán Němec
2020-03-14 18:03     ` Lars Ingebrigtsen
2020-03-14 18:12       ` Štěpán Němec
2020-03-14 18:15       ` Eli Zaretskii
2020-03-28 14:17         ` Štěpán Němec
2020-04-02 11:01           ` Lars Ingebrigtsen
2020-04-12  9:53             ` Štěpán Němec
2020-04-12 10:33               ` Eli Zaretskii
2020-04-12 10:49                 ` Štěpán Němec
2020-04-12 11:05                   ` Eli Zaretskii
2020-04-12 11:47                     ` Štěpán Němec
2020-04-12 13:38                       ` Eli Zaretskii [this message]
2020-04-12 14:13                         ` Štěpán Němec
2020-04-12 14:35                           ` Eli Zaretskii
2020-04-12 20:02                             ` Štěpán Němec
2020-04-13  4:26                               ` Eli Zaretskii
2020-04-13 10:31                                 ` Štěpán Němec

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=838sj0lt72.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=39980@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=stepnem@gmail.com \
    /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.