GNU bug report logs - #78690
31.0.50; split string: args out of range with TRIM

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Wed, 4 Jun 2025 02:35:02 UTC

Severity: normal

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 78690 <at> debbugs.gnu.org
Subject: bug#78690: 31.0.50; split string: args out of range with TRIM
Date: Mon, 09 Jun 2025 03:22:16 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> The patch below seems to fix the problem, and passes all the tests.
> Does it look reasonable?

Thank you very much.  I did not look at the details of your change yet;
however, I see that a string starting with whitespace still makes the
function error:

#+begin_src emacs-lisp
(let ((text " -*- lexical-binding: t; -*-")
      ;;    ^^^ see here
      (seps "-\\*-")
      (trim "[ \t\n\r-]+"))
  (split-string text seps nil trim))
#+end_src

  ~~> split-string: Args out of range: " -*- lexical-binding: t; -*-", 2, 1

Could you please have a look?


Michael.




This bug report was last modified 22 days ago.

Previous Next


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