GNU bug report logs - #48902
28.0.50; Directory names containing apostrophes and backticks cause problems

Previous Next

Package: emacs;

Reported by: Rudolf Adamkovič <salutis <at> me.com>

Date: Mon, 7 Jun 2021 14:05:02 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 28.1

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: naofumi <at> yasufuku.dev <naofumi <at> yasufuku.dev>
To: "Eli Zaretskii" <eliz <at> gnu.org>
Cc: 48902 <at> debbugs.gnu.org, Rudolf Adamkovič <salutis <at> me.com>
Subject: bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems
Date: Tue, 08 Jun 2021 12:39:19 +0200
[Message part 1 (text/plain, inline)]
On Monday, June 07, 2021 16:15 CEST, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Lars Ingebrigtsen <larsi <at> gnus.org>
> > ... so perhaps it's only a problem for the Macos build?
>
> I suspect it has to do with the special way macOS encodes non-ASCII
> file names.
>

I found the same issue with images which has Japanese filename on macOS.
Message buffer says:
------------------------------------------------------------------------
Unable to load image (image :type png :file /Users/naofumi/_git/git.sv.gnu.org/emacs_png/いーまっくす.png :scale 1 :max-width 480 :max-height 781 :format nil :transform-smoothing t) [5 times]
------------------------------------------------------------------------

At least, attached small patch could fix this.

attachments:
0001-Fix-to-show-images-with-non-ascii-filename-on-macOS.patch
ns_load_image-error-with-non-ascii-filename.png
revert-filename-NSString-in-nsimage.png
emacs_png.tar.gz

This [EmacsImage allocInitFromFile:] change was introduced by the
following commit:
------------------------------------------------------------------------
commit 747a923b9a35533f98573ad5b01fccf096195079
Author: Alan Third <alan <at> idiocy.org>
Date:   Tue Dec 22 23:28:25 2020 +0000

    Use new NSString lisp methods

    * src/nsfont.m (ns_otf_to_script):
    (ns_registry_to_script):
    (ns_get_req_script): Use NSString conversion methods.
    * src/nsimage.m ([EmacsImage allocInitFromFile:]): Use NSString
    conversion methods.
    * src/nsmenu.m (ns_menu_show): Use NSString conversion methods.    * src/nsselect.m (symbol_to_nsstring):
    (ns_string_to_pasteboard_internal): Use NSString conversion methods.
    * src/nsterm.m (ns_term_init):
    ([EmacsView initFrameFromEmacs:]): Use NSString conversion methods.    * src/nsxwidget.m (nsxwidget_webkit_uri):
    (nsxwidget_webkit_title):
    (js_to_lisp): Use NSString conversion methods.
    (build_string_with_nsstr): Functionality replaced by NSString    extensions.

------------------------------------------------------------------------

Regards,
--Naofumi
[emacs_png.tar.gz (application/x-gzip, attachment)]
[ns_load_image-error-with-non-ascii-filename.png (image/png, inline)]
[0001-Fix-to-show-images-with-non-ascii-filename-on-macOS.patch (application/octet-stream, attachment)]
[revert-filename-NSString-in-nsimage.png (image/png, inline)]

This bug report was last modified 4 years and 59 days ago.

Previous Next


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