[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification
From: |
Eli Zaretskii |
Subject: |
Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification |
Date: |
Mon, 08 May 2017 17:28:36 +0300 |
> From: Jean-Christophe Helary <address@hidden>
> Date: Mon, 8 May 2017 11:40:33 +0900
> Cc: Johan Bockgård <address@hidden>,
> address@hidden,
> address@hidden,
> address@hidden
>
> >>>> I think regexp should be surrounded by a grouping construct, like:
> >>>>
> >>>> (concat "\\`\\(?:" (or regexp "[ \t\n\r]+") "\\)")
> >>>>
> >>>> And similarly for string-trim-right.
> >>>
> >>> Rationale?
> >>
> >> regexp can contain \|
> >
> > Shouldn't such a regexp be surrounded by "\\(..\\)"?
>
> So you both agree that the regexp should be surrounded by a grouping
> construct but you're arguing whether it should be a "normal" grouping or a
> shy grouping ?
No, the issue is whether the function should enclose the argument in a
grouping constructs of any kind, or should this be the caller's
responsibility when the regexp includes \|.
> > I'm _asking_ whether it should be the caller's duty.
>
> How does that relate to the "shy" vs "non-shy" thing above?
It doesn't.
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, (continued)
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Eli Zaretskii, 2017/05/06
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Johan Bockgård, 2017/05/06
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Eli Zaretskii, 2017/05/06
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Johan Bockgård, 2017/05/07
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Eli Zaretskii, 2017/05/07
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Yuri Khan, 2017/05/10
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/10
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Stefan Monnier, 2017/05/10
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/10
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/07
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification,
Eli Zaretskii <=
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/08
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Johan Bockgård, 2017/05/08
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/08
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Michael Heerdegen, 2017/05/09
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/09
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Michael Heerdegen, 2017/05/09
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Michael Heerdegen, 2017/05/10
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/10
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Eli Zaretskii, 2017/05/09
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/09