Subject: Re: bug#46051: 27.1; Nroff preview does not work with file that include space in path (quoting problem ?)

From: Eli Zaretskii <[email-masked]>
Date: Sat, 23 Jan 2021 13:30:06 +0200

> From: Bastien ROUCARIES <[email-masked]>
> Date: Sat, 23 Jan 2021 11:11:09 +0000
> Cc: [email-masked]
> 
> > > I believe this is a quoting problem but I am not a lisp expert.
> >
> > Do you mean the nroff-view command?  Or do you mean something else?
> 
> Yes I means this command.
> 
> It faill when running for instance from "/tmp/dir whith space/someman.1"

Does the patch below fix the problem?

diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el
index 8965785..7e54755 100644
--- a/lisp/textmodes/nroff-mode.el
+++ b/lisp/textmodes/nroff-mode.el
@@ -319,7 +319,7 @@ nroff-view
 	 (save-buffer))
     (if viewbuf
 	(kill-buffer viewbuf))
-    (Man-getpage-in-background file)))
+    (Man-getpage-in-background (shell-quote-argument file))))
 
 (provide 'nroff-mode)