[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#60562: [PATCH] Fix split-string error if there is a space in the fil
From: |
lux |
Subject: |
bug#60562: [PATCH] Fix split-string error if there is a space in the filename. |
Date: |
Sat, 7 Jan 2023 22:52:09 +0800 |
On Sat, 07 Jan 2023 11:29:58 +0200
Eli Zaretskii <eliz@gnu.org> wrote:
> > Cc: 60562@debbugs.gnu.org
> > From: Robert Pluim <rpluim@gmail.com>
> > Date: Fri, 06 Jan 2023 10:48:43 +0100
> >
> > >>>>> On Thu, 5 Jan 2023 06:56:05 +0800, lux <lx@shellcodes.org>
> > >>>>> said:
> >
> > lux> * lisp/htmlfontify.el (hfy-list-files): Specify separator
> > lux> (\n\r). ---
> > lux> lisp/htmlfontify.el | 5 +++--
> > lux> 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > lux> diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
> > lux> index c989a12d205..be020b6b1c5 100644
> > lux> --- a/lisp/htmlfontify.el
> > lux> +++ b/lisp/htmlfontify.el
> > lux> @@ -1826,8 +1826,9 @@ hfy-list-files
> > lux> ;;(message "hfy-list-files");;DBUG
> > lux> ;; FIXME: this changes the dir of the current buffer.
> > lux> Is that right?? (cd directory)
> > lux> - (mapcar (lambda (F) (if (string-match "^./\\(.*\\)" F)
> > lux> (match-string 1 F) F))
> > lux> - (split-string (shell-command-to-string
> > lux> hfy-find-cmd))) )
> > lux> + (remove-if #'string-empty-p
> > lux> + (mapcar (lambda (F) (if (string-match
> > lux> "^./\\(.*\\)" F) (match-string 1 F) F))
> > lux> + (split-string
> > lux> (shell-command-to-string hfy-find-cmd) "[\n\r]+")) ))
> >
> > You can avoid the issue (and improve portability) by using
> > `directory-files-recursively' instead of `find'
>
> Right. Would you like to rewrite the patch using
> directory-files-recursively?
>
I try rewrite the patch using directory-files-recursively.
0001-Replace-hfy-find-cmd-with-directory-files-recursivel.patch
Description: Text Data
- bug#60562: [PATCH] Fix split-string error if there is a space in the filename., lux, 2023/01/04
- bug#60562: [PATCH] Fix split-string error if there is a space in the filename., Robert Pluim, 2023/01/06
- bug#60562: [PATCH] Fix split-string error if there is a space in the filename.,
lux <=
- bug#60562: [PATCH] Fix split-string error if there is a space in the filename., Ruijie Yu, 2023/01/07
- bug#60562: [PATCH] Fix split-string error if there is a space in the filename., lux, 2023/01/08
- bug#60562: [PATCH] Fix split-string error if there is a space in the filename., Robert Pluim, 2023/01/09
- bug#60562: [PATCH] Fix split-string error if there is a space in the filename., lux, 2023/01/09
- bug#60562: [PATCH] Fix split-string error if there is a space in the filename., Eli Zaretskii, 2023/01/14
bug#60562: [PATCH] Fix split-string error if there is a space in the filename., lux, 2023/01/07