From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29189: 25.3; Dired does not work with binary filenames Date: Sat, 02 Dec 2017 11:01:01 +0200 Message-ID: <83indp1p2q.fsf@gnu.org> References: <3CE09384-E9D6-4DB9-853A-11088CF8DF80@gnu.org> <83a7ztp6p7.fsf@gnu.org> <83k1ywoq4z.fsf@gnu.org> <83h8u0on7y.fsf@gnu.org> <83po8ii56w.fsf@gnu.org> <83lgj3fy29.fsf@gnu.org> <831skserz8.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1512205336 2627 195.159.176.226 (2 Dec 2017 09:02:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 2 Dec 2017 09:02:16 +0000 (UTC) Cc: schwab@suse.de, 29189@debbugs.gnu.org To: Allen Li Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 02 10:02:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eL3gT-0000Aj-R2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Dec 2017 10:02:05 +0100 Original-Received: from localhost ([::1]:34864 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eL3gb-00080D-5J for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Dec 2017 04:02:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eL3gV-000807-Re for bug-gnu-emacs@gnu.org; Sat, 02 Dec 2017 04:02:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eL3gS-0006sS-QK for bug-gnu-emacs@gnu.org; Sat, 02 Dec 2017 04:02:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60523) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eL3gS-0006sO-MI for bug-gnu-emacs@gnu.org; Sat, 02 Dec 2017 04:02:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eL3gQ-0008Ai-DL for bug-gnu-emacs@gnu.org; Sat, 02 Dec 2017 04:02:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Dec 2017 09:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29189 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29189-submit@debbugs.gnu.org id=B29189.151220529031372 (code B ref 29189); Sat, 02 Dec 2017 09:02:02 +0000 Original-Received: (at 29189) by debbugs.gnu.org; 2 Dec 2017 09:01:30 +0000 Original-Received: from localhost ([127.0.0.1]:40971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eL3fu-00089w-9T for submit@debbugs.gnu.org; Sat, 02 Dec 2017 04:01:30 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35139) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eL3fs-00089k-QT for 29189@debbugs.gnu.org; Sat, 02 Dec 2017 04:01:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eL3fm-0006Mf-Sx for 29189@debbugs.gnu.org; Sat, 02 Dec 2017 04:01:23 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eL3fj-0006ID-8C; Sat, 02 Dec 2017 04:01:19 -0500 Original-Received: from [176.228.60.248] (port=3877 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eL3fi-0007iM-OT; Sat, 02 Dec 2017 04:01:19 -0500 In-reply-to: (message from Allen Li on Fri, 1 Dec 2017 21:21:14 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140618 Archived-At: > From: Allen Li > Date: Fri, 1 Dec 2017 21:21:14 -0800 > Cc: Andreas Schwab , handa@gnu.org, 29189@debbugs.gnu.org > > I applied this patch to master (0b6f4f2c60) and it fixes the bug and > doesn't crash Emacs immediately. The code also looks right, but I am > not familiar with Emacs's C code. A few questions. > > Why do we have to handle multibyte strings in this function > decode_coding? (I found the answer in the docs) decode_coding needs to work when a series of raw bytes is inserted into a multibyte buffer (which happens in the Dired case). > Can you briefly explain how Emacs internally stores unibyte and > multibyte strings? (I found the answer in character.h) Right, the details are in that header file. > After doing the above research, I can more confidently say this is > right, but having an expert opinion would be nice. Thanks for proofreading the patch and testing it. I'm waiting for Handa-san to comment on it.