From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 20 12:49:01 2013 Received: (at submit) by debbugs.gnu.org; 20 Sep 2013 16:49:01 +0000 Received: from localhost ([127.0.0.1]:51543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN3t5-0002WD-U3 for submit@debbugs.gnu.org; Fri, 20 Sep 2013 12:49:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46067) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN3t2-0002Vx-8D for submit@debbugs.gnu.org; Fri, 20 Sep 2013 12:48:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VN3sp-0005fq-TA for submit@debbugs.gnu.org; Fri, 20 Sep 2013 12:48:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:35126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN3sp-0005fm-PA for submit@debbugs.gnu.org; Fri, 20 Sep 2013 12:48:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN3sj-0000kM-Fx for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2013 12:48:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VN3sc-0005eS-Vw for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2013 12:48:37 -0400 Received: from gateway-a.fh-trier.de ([143.93.54.181]:58074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN3sc-0005Zo-It for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2013 12:48:30 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier] Received: from luca (dslb-178-004-102-077.pools.arcor-ip.net [178.4.102.77]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id E083817590CD for ; Fri, 20 Sep 2013 18:47:54 +0200 (CEST) Received: from politza by luca with local (Exim 4.72) (envelope-from ) id 1VN3s2-0001HQ-5A for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2013 18:47:54 +0200 From: Andreas Politz To: bug-gnu-emacs@gnu.org Subject: 24.3.50; Multibyte filenames and directory-files in unibyte buffer Date: Fri, 20 Sep 2013 18:47:54 +0200 Message-ID: <87ob7nh22t.fsf@hochschule-trier.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) There seems to be something going wrong with the encoding/decoding of multibyte filenames from a unibyte buffer in recursive calls to directory-files. $ emacs -Q=20 (setq d "/tmp/=C3=84") "/tmp/=C3=84" (make-directory d t) nil (toggle-enable-multibyte-characters) t (car (directory-files d t)) "/tmp/=C3=84/." (car (directory-files (car (directory-files d t)) t)) "/tmp/\301\203\300\204/." In GNU Emacs 24.3.50.3 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1) of 2013-09-20 on luca Bzr revision: 114409 xfq.free@gmail.com-20130920102220-y3z14fcjcduk605j Windowing system distributor `The X.Org Foundation', version 11.0.10707000 System Description: Debian GNU/Linux 6.0.7 (squeeze) Important settings: value of $LC_COLLATE: C value of $LC_MESSAGES: C value of $LANG: de_DE.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: DocView Minor modes in effect: diff-auto-refine-mode: t doc-view-fixed-scroll-mode: t desktop-save-mode: t workgroups-mode: t ispell-track-input-method: t pdf-annot-minor-mode: t pdf-history-minor-mode: t pdf-outline-minor-mode: t pdf-links-minor-mode: t pdf-isearch-minor-mode: t pdf-misc-tool-bar-minor-mode: t pdf-misc-menu-bar-minor-mode: t pdf-misc-size-indication-minor-mode: t pdf-misc-minor-mode: t pdf-info-auto-revert-minor-mode: t recentf-mode: t show-paren-mode: t yas-global-mode: t yas-minor-mode: t window-numbering-mode: t shell-dirtrack-mode: t scroll-other-window-mode: t savehist-mode: t TeX-PDF-mode: t ekey-mode: t winner-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-; s g C-x C-c M-s g g M-g n C-x b =20 C-u C-M-x C-x o C-x b C-s q u C-s=20 w e SPC f SPC SPC f SPC SPC SPC SPC f SPC=20 SPC f SPC SPC SPC f SPC SPC f g C-x o C-M-x C-p C-p=20 C-p C-p C-p C-p C-a C-SPC C-n C-n C-n C-w TAB C-M-f=20 C-n DEL C-M-\ C-n C-n C-n C-n C-n C-n C-n C-n M-m C-o=20 C-y C-p C-p C-p C-p C-k C-k TAB C-n C-n C-n C-2 C-k=20 TAB C-e C-M-\ C-p M-b C-M-b C-M-b C-M-b f i l e n a=20 m e SPC M-q C-n C-e C-M-\ C-c l C-x o C-x k =20 C-x k C-x o C-p M-f C-M-f=20 C-M-f SPC SPC f r o m SPC u=20 n i b y t e SPC b u f f e r . M-q C-x C-s C-x o C-x=20 o C-p C-p M-m C-a M-f M-f M-b M-b C-M-SPC C-M-SPC C-M-SPC=20 C-M-SPC M-w C-x v v C-y DEL SPC w h e n SPC d e l e=20 t i n g SPC C-x o C-x o C-a C-y M-y C-x o C-n C-n C-n=20 C-n C-n C-n C-n C-n C-n C-n C-SPC C-n C-n C-n M-w C-x=20 o C-p C-o C-y C-SPC C-n C-n C-n C-w C-p C-p C-p C-p=20 C-n C-SPC M-f M-b C-b C-f M-w C-a M-% C-y =20 ! C-p C-p M-q M-f M-f M-f M-f SPC w h e n=20 SPC d e l e t i n g SPC c a c h e SPC f i l e s M-q=20 C-c C-c C-x o M-x r e p o r t - e m b u =20 Recent messages: Press C-c C-c when you are done editing. Enter a change comment. Type C-c C-c when done Finding changes in /home/politza/.emacs.d/working/pdf-tools/lisp/pdf-util.e= l... View mode: type C-h for help, h for commands, q to quit. Mark set [5 times] End of buffer Mark set [2 times] Replaced 3 occurrences Checking in /home/politza/.emacs.d/working/pdf-tools/lisp/pdf-util.el...done Auto-saving...done Load-path shadows: /home/politza/.emacs.d/elpa/yasnippet-0.8.0/dropdown-list hides /home/polit= za/.emacs.d/plugins/yasnippet-0.6.1c/dropdown-list /home/politza/.emacs.d/elpa/yasnippet-0.8.0/yasnippet hides /home/politza/.= emacs.d/plugins/yasnippet-0.6.1c/yasnippet /home/politza/.emacs.d/plugins/tblc hides /home/politza/.emacs.d/plugins/tb= lc/tblc /home/politza/.emacs.d/plugins/haskell-mode/haskell-cabal hides /home/polit= za/.emacs.d/plugins/haskell/haskell-cabal /home/politza/.emacs.d/plugins/haskell-mode/haskell-decl-scan hides /home/p= olitza/.emacs.d/plugins/haskell/haskell-decl-scan /home/politza/.emacs.d/plugins/haskell-mode/haskell-doc hides /home/politza= /.emacs.d/plugins/haskell/haskell-doc /home/politza/.emacs.d/plugins/haskell-mode/ghc-core hides /home/politza/.e= macs.d/plugins/haskell/ghc-core /home/politza/.emacs.d/plugins/haskell-mode/haskell-mode hides /home/politz= a/.emacs.d/plugins/haskell/haskell-mode /home/politza/.emacs.d/plugins/haskell-mode/haskell-c hides /home/politza/.= emacs.d/plugins/haskell/haskell-c /home/politza/.emacs.d/plugins/haskell-mode/haskell-indentation hides /home= /politza/.emacs.d/plugins/haskell/haskell-indentation /home/politza/.emacs.d/plugins/haskell-mode/haskell-site-file hides /home/p= olitza/.emacs.d/plugins/haskell/haskell-site-file /home/politza/.emacs.d/plugins/haskell-mode/haskell-ghci hides /home/politz= a/.emacs.d/plugins/haskell/haskell-ghci /home/politza/.emacs.d/plugins/haskell-mode/inf-haskell hides /home/politza= /.emacs.d/plugins/haskell/inf-haskell /home/politza/.emacs.d/plugins/haskell-mode/haskell-indent hides /home/poli= tza/.emacs.d/plugins/haskell/haskell-indent /home/politza/.emacs.d/plugins/haskell-mode/haskell-hugs hides /home/politz= a/.emacs.d/plugins/haskell/haskell-hugs /home/politza/.emacs.d/plugins/haskell-mode/haskell-font-lock hides /home/p= olitza/.emacs.d/plugins/haskell/haskell-font-lock /home/politza/.emacs.d/plugins/haskell-mode/haskell-simple-indent hides /ho= me/politza/.emacs.d/plugins/haskell/haskell-simple-indent /home/politza/.emacs.d/plugins/jedi/scratch hides /home/politza/.emacs.d/pl= ugins/ewm/scratch /home/politza/.emacs.d/elpa/company-0.6.10/.dir-locals hides /home/politza/= .emacs.d/plugins/el-get/.dir-locals /home/politza/.emacs.d/plugins/saveplace hides /home/politza/src/emacs/trun= k/lisp/saveplace /home/politza/.emacs.d/plugins/imenu hides /home/politza/src/emacs/trunk/li= sp/imenu /home/politza/.emacs.d/plugins/term hides /home/politza/src/emacs/trunk/lis= p/term /home/politza/.emacs.d/plugins/python/python/python hides /home/politza/src= /emacs/trunk/lisp/progmodes/python /home/politza/.emacs.d/elpa/company-0.6.10/.dir-locals hides /home/politza/= src/emacs/trunk/lisp/gnus/.dir-locals /home/politza/.emacs.d/plugins/python/python/sym-comp hides /home/politza/s= rc/emacs/trunk/lisp/obsolete/sym-comp /home/politza/.emacs.d/plugins/matlab/matlab hides /usr/share/emacs-snapsho= t/site-lisp/emacs-goodies-el/matlab /home/politza/.emacs.d/plugins/boxquote hides /usr/share/emacs-snapshot/sit= e-lisp/emacs-goodies-el/boxquote /home/politza/.emacs.d/plugins/bm hides /usr/share/emacs-snapshot/site-lisp= /emacs-goodies-el/bm /home/politza/.emacs.d/plugins/haskell-mode/haskell-decl-scan hides /usr/sh= are/emacs-snapshot/site-lisp/haskell-mode/haskell-decl-scan /home/politza/.emacs.d/plugins/haskell-mode/haskell-c hides /usr/share/emac= s-snapshot/site-lisp/haskell-mode/haskell-c /home/politza/.emacs.d/plugins/haskell-mode/haskell-ghci hides /usr/share/e= macs-snapshot/site-lisp/haskell-mode/haskell-ghci /home/politza/.emacs.d/plugins/haskell-mode/haskell-doc hides /usr/share/em= acs-snapshot/site-lisp/haskell-mode/haskell-doc /home/politza/.emacs.d/plugins/haskell-mode/haskell-indent hides /usr/share= /emacs-snapshot/site-lisp/haskell-mode/haskell-indent /home/politza/.emacs.d/plugins/haskell-mode/haskell-mode hides /usr/share/e= macs-snapshot/site-lisp/haskell-mode/haskell-mode /home/politza/.emacs.d/plugins/haskell-mode/haskell-hugs hides /usr/share/e= macs-snapshot/site-lisp/haskell-mode/haskell-hugs /home/politza/.emacs.d/plugins/haskell-mode/haskell-site-file hides /usr/sh= are/emacs-snapshot/site-lisp/haskell-mode/haskell-site-file /home/politza/.emacs.d/plugins/haskell-mode/haskell-cabal hides /usr/share/= emacs-snapshot/site-lisp/haskell-mode/haskell-cabal /home/politza/.emacs.d/plugins/haskell-mode/inf-haskell hides /usr/share/em= acs-snapshot/site-lisp/haskell-mode/inf-haskell /home/politza/.emacs.d/plugins/haskell-mode/haskell-font-lock hides /usr/sh= are/emacs-snapshot/site-lisp/haskell-mode/haskell-font-lock /home/politza/.emacs.d/plugins/haskell-mode/haskell-simple-indent hides /us= r/share/emacs-snapshot/site-lisp/haskell-mode/haskell-simple-indent /home/politza/.emacs.d/plugins/haskell-mode/haskell-indentation hides /usr/= share/emacs-snapshot/site-lisp/haskell-mode/haskell-indentation Features: (shadow sort gnus-cite bbdb-message mail-extr nnir emacsbug sendmail diff-mode log-edit pcvs-util add-log nndraft nnmh utf-7 network-stream starttls nnfolder bbdb-gnus nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime dig mailcap nntp gnus-cache debug ibuf-ext misearch multi-isearch dired-aux vc-dir ewoc vc semantic/format ezimage semantic/tag-ls semantic/ctxt semantic/dep semantic/find semantic/wisent/python-wy python-21 python sym-comp org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp ob-exp org-exp-blocks org-agenda org-info org-gnus org-docview org-bibtex bibtex org-bbdb conf-mode tex-buf reftex-dcr reftex-auc font-latex dired-eshell vc-git doc-view-fixed-scroll pdftk-outline vc-bzr vc-dispatcher vc-svn cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs emacs-customizations nogroup-customizations wp-customizations view-customizations tex-customizations reftex-customizations reftex-miscellaneous-configurations-customizations reftex-label-support-customizations reftex-referencing-labels-customizations reftex-defining-label-environments-customizations AUCTeX-customizations preview-customizations preview-latex-customizations preview-appearance-customizations TeX-parse-customizations TeX-file-customizations TeX-command-customizations TeX-view-customizations LaTeX-customizations LaTeX-macro-customizations LaTeX-math-customizations LaTeX-indentation-customizations table-customizations table-hooks-customizations outlines-customizations programming-customizations tools-customizations vc-customizations log-edit-customizations semantic-customizations makefile-customizations etags-customizations ediff-customizations diff-customizations diff-mode-customizations languages-customizations elpy-customizations matlab-customizations sh-customizations python-customizations rx haskell-customizations c-customizations asm-customizations multimedia-customizations image-customizations pcase help-customizations ekey-customizations info-lookup-customizations info-customizations customize-customizations custom-buffer-customizations apropos-customizations files-customizations uniquify-customizations uniquify sunrise-customizations recentf-customizations find-file-customizations backup-customizations faces-customizations highlight-symbol-customizations font-lock-customizations hi-lock-customizations facemenu-customizations external-customizations server-customizations processes-customizations shell-customizations proced-customizations gud-customizations tooltip-customizations grep-customizations compilation-customizations next-error-customizations comint-customizations SQL-customizations man-customizations environment-customizations xterm-customizations windows-customizations winner-customizations minibuffer-customizations savehist-customizations completion-spelling lib-string menu-customizations keyboard-customizations chistory-customizations initialization-customizations frames-customizations ediff-window-customizations desktop-customizations desktop frameset dired-customizations dired-x-customizations dired-x dired-details-customizations editing-customizations yasnippet-customizations paragraphs-customizations matching-customizations paren-matching-customizations paren-showing-customizations isearch-customizations bookmark-customizations killing-customizations indent-customizations fill-customizations emulations-customizations editing-basics-customizations development-customizations lisp-customizations re-builder-customizations inferior-lisp-customizations ielm-customizations ert-customizations edebug-customizations bytecomp-customizations advice-customizations internal-customizations alloc-customizations extensions-customizations eldoc-customizations cust-print-customizations data-customizations save-place-customizations convenience-customizations diminish-customizations diminish iedit-customizations imenu-tree-customizations tags-tree-customizations company-customizations workgroups-customizations workgroups bookmark pp window-numbering-customizations pabbrev-customizations kmacro-customizations imenu-customizations ibuffer-customizations ibuf-macs hl-line-customizations hippie-expand-customizations file-cache-customizations ffap-customizations completion-customizations iswitchb-customizations browse-kill-ring-customizations auto-revert-customizations auto-insert-customizations Buffer-menu-customizations comm-customizations tramp-customizations browse-url-customizations applications-customizations mediawiki-customizations w3m-customizations package-customizations mail-customizations bbdb-customizations bbdb-sendmail-customizations bbdb-mua-customizations bbdb-mua bbdb-com crm bbdb smtpmail-customizations sendmail-customizations gnus-customizations nnmail-customizations nnmail-split-customizations gnus-summary-customizations gnus-thread-customizations gnus-summary-various-customizations gnus-summary-sort-customizations gnus-summary-marks-customizations gnus-summary-maneuvering-customizations gnus-summary-format-customizations parse-time-rfc2822 gnus-summary-exit-customizations gnus-sum gnus-group gnus-undo gnus-start gnus-spec gnus-win gnus-start-customizations gnus-server-customizations gnus-message-customizations message-customizations message-various-customizations message-sending-customizations message-buffers-customizations gnus-group-customizations gnus-group-visual-customizations gnus-nnimap-format nnimap nnmail gnus-int mail-source message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader parse-time tls utf7 netrc nnoo gnus gnus-ems nnheader mail-utils gnus-group-various-customizations gnus-group-select-customizations gnus-files-customizations gnus-newsrc-customizations gnus-exit-customizations gnus-article-customizations gnus-article-hiding-customizations ispell-customizations eshell-customizations eshell-module-customizations eshell-smart-customizations eshell-hist-customizations eshell-mode-customizations edebug doc-view-customizations pdf-tools-customizations pdf-annot-customizations pdf-links-customizations pdf-isearch-customizations pdf-annot tablist tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet pdf-occur pdf-history pdf-outline pdf-links pdf-isearch pdf-misc imenu pdf-info tq pdf-render pdf-tools pdf-util gnus-range warnings doc-view jka-compr image-mode calendar-customizations org-customizations org-structure-customizations org-plain-lists-customizations org-edit-structure-customizations org-startup-customizations org-link-customizations org-latex-customizations org-appearance-customizations holidays-customizations calculator-customizations calc-customizations server recentf tree-widget .autoload paren yasnippet dropdown-list help-mode window-numbering w3m browse-url timezone w3m-hist w3m-e23 w3m-ccl ccl w3m-fsf w3m-favicon w3m-image w3m-proc w3m-util view tramp tramp-compat tramp-loaddefs trampver shell track-last-window scroll-other-window saveplace savehist reftex reftex-vars pabbrev org ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob org-compat org-macs ob-eval org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs lib-edit lib-window lib-isearch lib-buffer reveal iswitchb lib-basic lib-lispext latex easy-mmode tex-style tex dbus xml tex-site auto-loads info-look info ibuffer hippie-exp grep compile filecache edit-minibuffer eldoc-eval pcomplete esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util ekey assoc dired-details+ dired dired-details cool-prefix-bindings winner lib-kbd comint-history comint ansi-color ring browse-kill-ring advice anticus edmacro kmacro derived cl-macs gv ffap thingatpt url-parse auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core gnus-util mm-util mail-prsvr password-cache url-vars eldoc help-fns cus-edit easymenu cus-start cus-load wid-edit cl cl-loaddefs cl-lib bbdb-loaddefs cl-format-autoloads eldoc-eval-autoloads yasnippet-autoloads package time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 20 13:46:08 2013 Received: (at 15426) by debbugs.gnu.org; 20 Sep 2013 17:46:08 +0000 Received: from localhost ([127.0.0.1]:51660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN4mO-0003wT-75 for submit@debbugs.gnu.org; Fri, 20 Sep 2013 13:46:08 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:55407) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN4mM-0003vq-5R for 15426@debbugs.gnu.org; Fri, 20 Sep 2013 13:46:07 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MTF00100QCQB200@a-mtaout22.012.net.il> for 15426@debbugs.gnu.org; Fri, 20 Sep 2013 20:45:58 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MTF000XKQOMY7A0@a-mtaout22.012.net.il>; Fri, 20 Sep 2013 20:45:58 +0300 (IDT) Date: Fri, 20 Sep 2013 20:46:03 +0300 From: Eli Zaretskii Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer In-reply-to: <87ob7nh22t.fsf@hochschule-trier.de> X-012-Sender: halo1@inter.net.il To: Andreas Politz Message-id: <831u4jl738.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8BIT References: <87ob7nh22t.fsf@hochschule-trier.de> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15426 Cc: 15426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Andreas Politz > Date: Fri, 20 Sep 2013 18:47:54 +0200 > > There seems to be something going wrong with the > encoding/decoding of multibyte filenames from a unibyte buffer in > recursive calls to directory-files. > > $ emacs -Q > > (setq d "/tmp/Ä") > "/tmp/Ä" > > (make-directory d t) > nil > > (toggle-enable-multibyte-characters) > t > > (car (directory-files d t)) > "/tmp/Ä/." > > (car (directory-files (car (directory-files d t)) t)) > "/tmp/\301\203\300\204/." Don't do that: inserting multibyte strings into a unibyte buffer changes the representation of the characters in the string, so you get a unibyte string. Unibyte buffers should only ever hold encoded text or binary data. Why did you need to do something like that, and in what real-life use case? From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 20 14:51:36 2013 Received: (at 15426) by debbugs.gnu.org; 20 Sep 2013 18:51:36 +0000 Received: from localhost ([127.0.0.1]:51707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN5nj-0005WE-Dt for submit@debbugs.gnu.org; Fri, 20 Sep 2013 14:51:36 -0400 Received: from gateway-a.fh-trier.de ([143.93.54.181]:51415) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN5ne-0005Vu-T6 for 15426@debbugs.gnu.org; Fri, 20 Sep 2013 14:51:31 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier] Received: from luca (dslb-178-004-102-077.pools.arcor-ip.net [178.4.102.77]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id D2D2C175477C; Fri, 20 Sep 2013 20:51:09 +0200 (CEST) Received: from politza by luca with local (Exim 4.72) (envelope-from ) id 1VN5nJ-0005EB-3Y; Fri, 20 Sep 2013 20:51:09 +0200 From: Andreas Politz To: Eli Zaretskii Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer References: <87ob7nh22t.fsf@hochschule-trier.de> <831u4jl738.fsf@gnu.org> Date: Fr, 20 Sep 2013 20:51:09 +0200 In-Reply-To: <831u4jl738.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 20 Sep 2013 20:46:03 +0300") Message-ID: <87k3ibgwde.fsf@hochschule-trier.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 15426 Cc: 15426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) Eli Zaretskii writes: > Why did you need to do something like that, and in what real-life use > case? By default buffer for PDF files are in unibyte mode. I use doc-view-mode and store some custom data in some directory below it's cache directory, which I want to remove, when the buffer gets killed. The removing of this directory (e.g. .doc-view/FILENAME-83432/data/) is done with delete-directory, but fails, if FILENAME contains multibyte character (see below). So I am actually not inserting anything into a buffer. Debugger entered--Lisp error: (file-error "Removing old name" "no such file= or directory" "/home/politza/.emacs.d/.doc-view-cache/\301\203\300\204.pdf= -52cb45a94cb1cf895aea4dba33da58be/.pdf-util-cache/pdf-render-temp-file/b536= 6a2d2ac98dae978423083f8b09e5cddc705d.png") delete-file("/home/politza/.emacs.d/.doc-view-cache/\301\203\300\204.pdf-= 52cb45a94cb1cf895aea4dba33da58be/.pdf-util-cache/pdf-render-temp-file/b5366= a2d2ac98dae978423083f8b09e5cddc705d.png" nil) #[257 "\301.!@\302=3D\203.=00\303.\300\304#\207\305.\304\"\207" [t file-a= ttributes t delete-directory nil delete-file] 5 "\n\n(fn FILE)"]("/home/pol= itza/.emacs.d/.doc-view-cache/\301\203\300\204.pdf-52cb45a94cb1cf895aea4dba= 33da58be/.pdf-util-cache/pdf-render-temp-file/b5366a2d2ac98dae978423083f8b0= 9e5cddc705d.png") mapc(#[257 "\301.!@\302=3D\203.=00\303.\300\304#\207\305.\304\"\207" [t f= ile-attributes t delete-directory nil delete-file] 5 "\n\n(fn FILE)"] ("/ho= me/politza/.emacs.d/.doc-view-cache/\301\203\300\204.pdf-52cb45a94cb1cf895a= ea4dba33da58be/.pdf-util-cache/pdf-render-temp-file/b5366a2d2ac98dae9784230= 83f8b09e5cddc705d.png")) delete-directory("/home/politza/.emacs.d/.doc-view-cache/\303\204.pdf-52c= b45a94cb1cf895aea4dba33da58be/.pdf-util-cache/pdf-render-temp-file" t nil) #[257 "\301.!@\302=3D\203.=00\303.\300\304#\207\305.\304\"\207" [t file-a= ttributes t delete-directory nil delete-file] 5 "\n\n(fn FILE)"]("/home/pol= itza/.emacs.d/.doc-view-cache/\303\204.pdf-52cb45a94cb1cf895aea4dba33da58be= /.pdf-util-cache/pdf-render-temp-file") mapc(#[257 "\301.!@\302=3D\203.=00\303.\300\304#\207\305.\304\"\207" [t f= ile-attributes t delete-directory nil delete-file] 5 "\n\n(fn FILE)"] ("/ho= me/politza/.emacs.d/.doc-view-cache/\303\204.pdf-52cb45a94cb1cf895aea4dba33= da58be/.pdf-util-cache/pdf-render-temp-file")) delete-directory("/home/politza/.emacs.d/.doc-view-cache/=C3=84.pdf-52cb4= 5a94cb1cf895aea4dba33da58be/.pdf-util-cache/" t) (progn (delete-directory dir t)) (if (and dir (file-exists-p dir)) (progn (delete-directory dir t))) (let ((dir (pdf-util-cache--get-root-dir))) (if (and dir (file-exists-p d= ir)) (progn (delete-directory dir t)))) pdf-util-cache-clear-all() kill-buffer("=C3=84.pdf") call-interactively(kill-buffer nil nil) command-execute(kill-buffer) -ap From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 20 15:08:31 2013 Received: (at 15426) by debbugs.gnu.org; 20 Sep 2013 19:08:31 +0000 Received: from localhost ([127.0.0.1]:51754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN646-0006AQ-Qg for submit@debbugs.gnu.org; Fri, 20 Sep 2013 15:08:31 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:47586) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN643-0006AA-VU for 15426@debbugs.gnu.org; Fri, 20 Sep 2013 15:08:28 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MTF00K00U9QDF00@a-mtaout20.012.net.il> for 15426@debbugs.gnu.org; Fri, 20 Sep 2013 22:08:21 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MTF00KHDUHWE300@a-mtaout20.012.net.il>; Fri, 20 Sep 2013 22:08:21 +0300 (IDT) Date: Fri, 20 Sep 2013 22:08:26 +0300 From: Eli Zaretskii Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer In-reply-to: <87k3ibgwde.fsf@hochschule-trier.de> X-012-Sender: halo1@inter.net.il To: Andreas Politz Message-id: <83y56rjoph.fsf@gnu.org> References: <87ob7nh22t.fsf@hochschule-trier.de> <831u4jl738.fsf@gnu.org> <87k3ibgwde.fsf@hochschule-trier.de> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15426 Cc: 15426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Andreas Politz > Cc: 15426@debbugs.gnu.org > Date: Fr, 20 Sep 2013 20:51:09 +0200 > > Eli Zaretskii writes: > > > Why did you need to do something like that, and in what real-life use > > case? > > By default buffer for PDF files are in unibyte mode. I use > doc-view-mode and store some custom data in some directory below it's > cache directory, which I want to remove, when the buffer gets killed. > The removing of this directory (e.g. .doc-view/FILENAME-83432/data/) is > done with delete-directory, but fails, if FILENAME contains multibyte > character (see below). So I am actually not inserting anything into a > buffer. Well, I think somehow your code converts a multibyte string into a unibyte one. If you cannot figure out how that happens (e.g., by stepping with Edebug through the code), perhaps show more of your code here. What you sent is backtrace full of byte-compiled code, which is very hard to interpret. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 20 15:15:59 2013 Received: (at 15426) by debbugs.gnu.org; 20 Sep 2013 19:15:59 +0000 Received: from localhost ([127.0.0.1]:51786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN6BL-0006Lv-Bg for submit@debbugs.gnu.org; Fri, 20 Sep 2013 15:15:59 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:4874) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN6BJ-0006Lj-Ur for 15426@debbugs.gnu.org; Fri, 20 Sep 2013 15:15:58 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFpY2x/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFFFpY2x/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="28493069" Received: from 69-165-141-177.dsl.teksavvy.com (HELO pastel.home) ([69.165.141.177]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 20 Sep 2013 15:11:54 -0400 Received: by pastel.home (Postfix, from userid 20848) id D89B166A4A; Fri, 20 Sep 2013 15:15:44 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer Message-ID: References: <87ob7nh22t.fsf@hochschule-trier.de> <831u4jl738.fsf@gnu.org> Date: Fri, 20 Sep 2013 15:15:44 -0400 In-Reply-To: <831u4jl738.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 20 Sep 2013 20:46:03 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15426 Cc: 15426@debbugs.gnu.org, Andreas Politz X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Don't do that: inserting multibyte strings into a unibyte buffer > changes the representation of the characters in the string, so you get > a unibyte string. Unibyte buffers should only ever hold encoded text > or binary data. AFAICT his recipe does not involve inserting any string anywhere. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 20 15:17:19 2013 Received: (at 15426) by debbugs.gnu.org; 20 Sep 2013 19:17:19 +0000 Received: from localhost ([127.0.0.1]:51792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN6Cc-0006OP-Q8 for submit@debbugs.gnu.org; Fri, 20 Sep 2013 15:17:19 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:49069) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN6CZ-0006OA-ND for 15426@debbugs.gnu.org; Fri, 20 Sep 2013 15:17:17 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MTF00M00UUHUD00@a-mtaout23.012.net.il> for 15426@debbugs.gnu.org; Fri, 20 Sep 2013 22:17:09 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MTF00MY3UWKO8B0@a-mtaout23.012.net.il>; Fri, 20 Sep 2013 22:17:09 +0300 (IDT) Date: Fri, 20 Sep 2013 22:17:14 +0300 From: Eli Zaretskii Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer In-reply-to: X-012-Sender: halo1@inter.net.il To: Stefan Monnier Message-id: <83wqmbjoat.fsf@gnu.org> References: <87ob7nh22t.fsf@hochschule-trier.de> <831u4jl738.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15426 Cc: 15426@debbugs.gnu.org, politza@hochschule-trier.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stefan Monnier > Cc: Andreas Politz , 15426@debbugs.gnu.org > Date: Fri, 20 Sep 2013 15:15:44 -0400 > > > Don't do that: inserting multibyte strings into a unibyte buffer > > changes the representation of the characters in the string, so you get > > a unibyte string. Unibyte buffers should only ever hold encoded text > > or binary data. > > AFAICT his recipe does not involve inserting any string anywhere. Perhaps the recipe should be described in more detail, then. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 20 16:56:49 2013 Received: (at 15426) by debbugs.gnu.org; 20 Sep 2013 20:56:49 +0000 Received: from localhost ([127.0.0.1]:51928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN7ku-0000Kk-Sh for submit@debbugs.gnu.org; Fri, 20 Sep 2013 16:56:49 -0400 Received: from gateway-b.fh-trier.de ([143.93.54.182]:42900) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN7kr-0000KS-N4 for 15426@debbugs.gnu.org; Fri, 20 Sep 2013 16:56:46 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier] Received: from luca (dslb-178-004-102-077.pools.arcor-ip.net [178.4.102.77]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-b.fh-trier.de (Postfix) with ESMTPSA id B4A8F17B4B5; Fri, 20 Sep 2013 22:56:23 +0200 (CEST) Received: from politza by luca with local (Exim 4.72) (envelope-from ) id 1VN7kV-0000qH-1P; Fri, 20 Sep 2013 22:56:23 +0200 From: Andreas Politz To: Eli Zaretskii Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer References: <87ob7nh22t.fsf@hochschule-trier.de> <831u4jl738.fsf@gnu.org> <83wqmbjoat.fsf@gnu.org> Date: Fri, 20 Sep 2013 22:56:22 +0200 In-Reply-To: <83wqmbjoat.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 20 Sep 2013 22:17:14 +0300") Message-ID: <87eh8jgqkp.fsf@hochschule-trier.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 15426 Cc: 15426@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Eli Zaretskii writes: >> From: Stefan Monnier >> Cc: Andreas Politz , 15426@debbugs.gnu.org >> Date: Fri, 20 Sep 2013 15:15:44 -0400 >> >> > Don't do that: inserting multibyte strings into a unibyte buffer >> > changes the representation of the characters in the string, so you get >> > a unibyte string. Unibyte buffers should only ever hold encoded text >> > or binary data. >> >> AFAICT his recipe does not involve inserting any string anywhere. > > Perhaps the recipe should be described in more detail, then. Here is another recipe, maybe more to the point: -------------------->8------------------------------------- ;; -*- coding: binary -*- (let ((d "/tmp/\303\204")) ;; utf-8 for german umlaut "A (when (file-exists-p d) (delete-directory d t)) (make-directory d) (append (list (car (directory-files d t)) (file-exists-p (car (directory-files d t)))) ;; switch to a multibyte buffer (with-temp-buffer (list (car (directory-files d t)) (file-exists-p (car (directory-files d t))))))) --------------------8<------------------------------------- If I save this somewhere (/tmp/foo.el), do $ LC_ALL=C emacs -Q /tmp/foo.el and evaluate it with C-x C-e, the minibuffer displays => ("/tmp/\301\203\300\204/." nil "/tmp/\303\204/." t) . I hope that clarifies it. -ap From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 21 02:49:04 2013 Received: (at 15426) by debbugs.gnu.org; 21 Sep 2013 06:49:04 +0000 Received: from localhost ([127.0.0.1]:52574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNH02-000751-PA for submit@debbugs.gnu.org; Sat, 21 Sep 2013 02:49:03 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:60075) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNGzw-00074S-FN for 15426@debbugs.gnu.org; Sat, 21 Sep 2013 02:48:57 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MTG00200QO5Z700@a-mtaout20.012.net.il> for 15426@debbugs.gnu.org; Sat, 21 Sep 2013 09:48:49 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MTG002Z2QX8IXA0@a-mtaout20.012.net.il>; Sat, 21 Sep 2013 09:48:45 +0300 (IDT) Date: Sat, 21 Sep 2013 09:48:50 +0300 From: Eli Zaretskii Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer In-reply-to: <87eh8jgqkp.fsf@hochschule-trier.de> X-012-Sender: halo1@inter.net.il To: Andreas Politz Message-id: <83vc1uk6ul.fsf@gnu.org> References: <87ob7nh22t.fsf@hochschule-trier.de> <831u4jl738.fsf@gnu.org> <83wqmbjoat.fsf@gnu.org> <87eh8jgqkp.fsf@hochschule-trier.de> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15426 Cc: 15426@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Andreas Politz > Cc: Stefan Monnier , 15426@debbugs.gnu.org > Date: Fri, 20 Sep 2013 22:56:22 +0200 > > (let ((d "/tmp/\303\204")) ;; utf-8 for german umlaut "A This makes d a unibyte string: (setq d "/tmp/\303\204") "/tmp/\303\204" (multibyte-string-p d) => nil Why would one do such a thing in the first place? Are any of the file names involved in your real-life use case unibyte strings that include bytes above 127? If there are, I suggest to find out how did they come into existence -- that might be the source of your trouble. Handling of unibyte strings in Emacs is optimized for certain use cases, certainly not those that manipulate file names on the Lisp level. I suggest to stay away of unibyte strings as non-ASCII file names, unless you really must (which normally is only necessary if you need to encode and decode file names by hand, like when you get them from some program, and the encoding of process output is different from the encoding of file names on your system). Otherwise, Lisp code should only ever manipulate file names with non-ASCII characters that are multibyte strings. > (when (file-exists-p d) > (delete-directory d t)) > (make-directory d) > (append > (list (car (directory-files d t)) > (file-exists-p (car (directory-files d t)))) > ;; switch to a multibyte buffer > (with-temp-buffer > (list (car (directory-files d t)) > (file-exists-p (car (directory-files d t))))))) > --------------------8<------------------------------------- > > If I save this somewhere (/tmp/foo.el), do > > $ LC_ALL=C emacs -Q /tmp/foo.el > > and evaluate it with C-x C-e, the minibuffer displays > > => ("/tmp/\301\203\300\204/." nil "/tmp/\303\204/." t) "The minibuffer displays" is the key point here: to display anything in the minibuffer or echo area, Emacs first _inserts_ the textual representation of that thing into a buffer, and then triggers redisplay. Insertion of unibyte strings into a multibyte buffer, or insertion of multibyte strings into the minibuffer when the current buffer is unibyte, causes all kinds of transformations on the inserted string, whose purpose is to intuit what the user expects to see. What you see is the result of those transformations. And yes, that result could be baffling at times; that's why I suggest to stay away of unibyte strings as much as you can, certainly as long as those strings are file names with non-ASCII characters. Again, I suggest to figure out if and how did you get unibyte strings as file names in your original use case. > I hope that clarifies it. Sorry, it does not. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 21 05:36:19 2013 Received: (at 15426) by debbugs.gnu.org; 21 Sep 2013 09:36:19 +0000 Received: from localhost ([127.0.0.1]:52791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNJbu-0002ck-LJ for submit@debbugs.gnu.org; Sat, 21 Sep 2013 05:36:18 -0400 Received: from gateway-a.fh-trier.de ([143.93.54.181]:33248) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNJbs-0002cU-1e for 15426@debbugs.gnu.org; Sat, 21 Sep 2013 05:36:16 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier] Received: from luca (dslb-178-004-102-077.pools.arcor-ip.net [178.4.102.77]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id 1262517592B4; Sat, 21 Sep 2013 11:35:53 +0200 (CEST) Received: from politza by luca with local (Exim 4.72) (envelope-from ) id 1VNJbU-00006E-9U; Sat, 21 Sep 2013 11:35:52 +0200 From: Andreas Politz To: Eli Zaretskii Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer References: <87ob7nh22t.fsf@hochschule-trier.de> <831u4jl738.fsf@gnu.org> <83wqmbjoat.fsf@gnu.org> <87eh8jgqkp.fsf@hochschule-trier.de> <83vc1uk6ul.fsf@gnu.org> Date: Sat, 21 Sep 2013 11:35:52 +0200 In-Reply-To: <83vc1uk6ul.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 21 Sep 2013 09:48:50 +0300") Message-ID: <87a9j6h5zb.fsf@hochschule-trier.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 15426 Cc: 15426@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Andreas Politz >> >> (let ((d "/tmp/\303\204")) ;; utf-8 for german umlaut "A > > This makes d a unibyte string: > > (setq d "/tmp/\303\204") > "/tmp/\303\204" > > (multibyte-string-p d) > => nil > > Why would one do such a thing in the first place? OK. The thing is that Emacs does it. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=multibyte-directory-list.el Content-Transfer-Encoding: quoted-printable ;; -*- coding: binary -*- ;; Save as .../mb-dir/foo.el, where mb-dir is a filename containing ;; multibytes. (let ((d ;; ../mb-dir/mb-dir/ (file-name-as-directory (expand-file-name (file-name-nondirectory (directory-file-name (file-name-directory (buffer-file-name)))) (file-name-directory (buffer-file-name)))))) (unless (file-exists-p d) (make-directory d)) (append (let ((d1 (car (directory-files (car (directory-files d t)) t)))) (list d1 (file-exists-p d1))) ;; switch to a multibyte buffer (with-temp-buffer (let ((d2 (car (directory-files (car (directory-files d t)) t)))) (list d2 (file-exists-p d1)))))) ;; =3D> (d1 nil d2 t) --=-=-= Content-Type: text/plain If I save this in mb-dir/foo.el, where mb-dir is a directory containing multi-bytes, the results (d1 and d2) of the same calls to `directory-list' are different in the uni-byte and multi-byte buffer. It seems that the 2 byte sequences of the UTF-8 characters are replaced by some 4 bytes. Anyway, the resulting filename d2 names a non-existent file. > "The minibuffer displays" is the key point here:[...] No, the key is that the file's existence depends on the buffer's multi-byte status, in which the code is evaluated. > >> I hope that clarifies it. -ap --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 21 05:39:14 2013 Received: (at 15426) by debbugs.gnu.org; 21 Sep 2013 09:39:14 +0000 Received: from localhost ([127.0.0.1]:52795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNJej-0002hF-Vc for submit@debbugs.gnu.org; Sat, 21 Sep 2013 05:39:14 -0400 Received: from gateway-b.fh-trier.de ([143.93.54.182]:39629) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNJeh-0002h2-ST for 15426@debbugs.gnu.org; Sat, 21 Sep 2013 05:39:12 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier] Received: from luca (dslb-178-004-102-077.pools.arcor-ip.net [178.4.102.77]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-b.fh-trier.de (Postfix) with ESMTPSA id 2E98B17B4AC; Sat, 21 Sep 2013 11:38:51 +0200 (CEST) Received: from politza by luca with local (Exim 4.72) (envelope-from ) id 1VNJeM-0000CO-HO; Sat, 21 Sep 2013 11:38:50 +0200 From: Andreas Politz To: Eli Zaretskii Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer References: <87ob7nh22t.fsf@hochschule-trier.de> <831u4jl738.fsf@gnu.org> <83wqmbjoat.fsf@gnu.org> <87eh8jgqkp.fsf@hochschule-trier.de> <83vc1uk6ul.fsf@gnu.org> <87a9j6h5zb.fsf@hochschule-trier.de> Date: Sat, 21 Sep 2013 11:38:50 +0200 In-Reply-To: <87a9j6h5zb.fsf@hochschule-trier.de> (Andreas Politz's message of "Sat, 21 Sep 2013 11:35:52 +0200") Message-ID: <874n9eh5ud.fsf@hochschule-trier.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 15426 Cc: 15426@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Andreas Politz writes: > Anyway, the resulting filename d2 names a non-existent file. Sorry, I meant d1. -ap From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 21 07:59:54 2013 Received: (at 15426) by debbugs.gnu.org; 21 Sep 2013 11:59:54 +0000 Received: from localhost ([127.0.0.1]:53060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNLqr-00077d-BT for submit@debbugs.gnu.org; Sat, 21 Sep 2013 07:59:53 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:40297) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNLqo-00077L-HW for 15426@debbugs.gnu.org; Sat, 21 Sep 2013 07:59:51 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MTH0080058UPH00@a-mtaout22.012.net.il> for 15426@debbugs.gnu.org; Sat, 21 Sep 2013 14:59:43 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MTH0080U5BJM530@a-mtaout22.012.net.il>; Sat, 21 Sep 2013 14:59:43 +0300 (IDT) Date: Sat, 21 Sep 2013 14:59:49 +0300 From: Eli Zaretskii Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer In-reply-to: <87a9j6h5zb.fsf@hochschule-trier.de> X-012-Sender: halo1@inter.net.il To: Andreas Politz Message-id: <83siwyjsga.fsf@gnu.org> References: <87ob7nh22t.fsf@hochschule-trier.de> <831u4jl738.fsf@gnu.org> <83wqmbjoat.fsf@gnu.org> <87eh8jgqkp.fsf@hochschule-trier.de> <83vc1uk6ul.fsf@gnu.org> <87a9j6h5zb.fsf@hochschule-trier.de> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15426 Cc: 15426@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Andreas Politz > Cc: monnier@iro.umontreal.ca, 15426@debbugs.gnu.org > Date: Sat, 21 Sep 2013 11:35:52 +0200 > > If I save this in mb-dir/foo.el, where mb-dir is a directory containing > multi-bytes, the results (d1 and d2) of the same calls to > `directory-list' are different in the uni-byte and multi-byte buffer. For the record, a much simpler test case is this: M-: (multibyte-string-p (car (directory-files default-directory t))) RET invoked from the unibyte buffer that visits your mb-dir/foo.el. Note that default-directory is a multibyte string, as shown by calling multibyte-string-p on it. So the problem happens inside the directory-files call. (You should never trust what the echo area shows when potentially unibyte strings are involved, always use multibyte-string-p to tell if a string is multibyte or unibyte.) The bug that caused this should be fixed now in revision 114421 on the trunk. > It seems that the 2 byte sequences of the UTF-8 characters are > replaced by some 4 bytes. That's how Emacs represents raw bytes internally in a multibyte buffer, so that "expansion" is a clear sign of a unibyte string. > Anyway, the resulting filename d2 names a non-existent file. Because encoding a unibyte string with raw bytes in their internal representation will never get you the right file name. > > "The minibuffer displays" is the key point here:[...] > > No, the key is that the file's existence depends on the buffer's > multi-byte status, in which the code is evaluated. The truth is neither (although what the minibuffer displays in these cases can easily fool you, so don't trust it). The truth was that the code in a subroutine of directory-files, when it is called with its second argument non-nil, incorrectly marked the full file name it produced as a unibyte string. The rest was the consequence of that. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 21 12:06:19 2013 Received: (at 15426) by debbugs.gnu.org; 21 Sep 2013 16:06:19 +0000 Received: from localhost ([127.0.0.1]:53785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNPhK-0004UR-Pz for submit@debbugs.gnu.org; Sat, 21 Sep 2013 12:06:19 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:32147) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNPhI-0004UD-Lx for 15426@debbugs.gnu.org; Sat, 21 Sep 2013 12:06:17 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFsoXM0/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJMEtkQoDpHqBXoMT X-IPAS-Result: Av8EABK/CFFsoXM0/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJMEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="28578142" Received: from 108-161-115-52.dsl.teksavvy.com (HELO pastel.home) ([108.161.115.52]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 21 Sep 2013 12:02:09 -0400 Received: by pastel.home (Postfix, from userid 20848) id 9090963260; Sat, 21 Sep 2013 12:06:10 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer Message-ID: References: <87ob7nh22t.fsf@hochschule-trier.de> <831u4jl738.fsf@gnu.org> <83wqmbjoat.fsf@gnu.org> <87eh8jgqkp.fsf@hochschule-trier.de> <83vc1uk6ul.fsf@gnu.org> Date: Sat, 21 Sep 2013 12:06:10 -0400 In-Reply-To: <83vc1uk6ul.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 21 Sep 2013 09:48:50 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15426 Cc: 15426@debbugs.gnu.org, Andreas Politz X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> => ("/tmp/\301\203\300\204/." nil "/tmp/\303\204/." t) > "The minibuffer displays" is the key point here: No, the key point is that the two strings should be identical because they are the return value of the exact same code which doesn't touch the current buffer, yes once it's run in a unibyte buffer and the second time it's run in multibyte buffer. So the current-buffer's multibyte setting somehow affects the directory-files function. That's the bug. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 21 12:26:34 2013 Received: (at 15426) by debbugs.gnu.org; 21 Sep 2013 16:26:34 +0000 Received: from localhost ([127.0.0.1]:53827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNQ0v-0004xA-Tg for submit@debbugs.gnu.org; Sat, 21 Sep 2013 12:26:34 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:61730) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNQ0s-0004wu-00 for 15426@debbugs.gnu.org; Sat, 21 Sep 2013 12:26:31 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MTH00200HJHUH00@a-mtaout23.012.net.il> for 15426@debbugs.gnu.org; Sat, 21 Sep 2013 19:26:23 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MTH002S1HNYPB90@a-mtaout23.012.net.il>; Sat, 21 Sep 2013 19:26:23 +0300 (IDT) Date: Sat, 21 Sep 2013 19:26:29 +0300 From: Eli Zaretskii Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer In-reply-to: X-012-Sender: halo1@inter.net.il To: Stefan Monnier Message-id: <83mwn6jg3u.fsf@gnu.org> References: <87ob7nh22t.fsf@hochschule-trier.de> <831u4jl738.fsf@gnu.org> <83wqmbjoat.fsf@gnu.org> <87eh8jgqkp.fsf@hochschule-trier.de> <83vc1uk6ul.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15426 Cc: 15426@debbugs.gnu.org, politza@hochschule-trier.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stefan Monnier > Cc: Andreas Politz , 15426@debbugs.gnu.org > Date: Sat, 21 Sep 2013 12:06:10 -0400 > > >> => ("/tmp/\301\203\300\204/." nil "/tmp/\303\204/." t) > > "The minibuffer displays" is the key point here: > > No, the key point is that the two strings should be identical But you don't see the strings, except after they are inserted into some buffer. > So the current-buffer's multibyte setting somehow affects the > directory-files function. That's the bug. Yes. But the way to show the bug is not to display the strings, but to pass them to multibyte-string-p, or some other function whose output's display cannot be possibly affected by multibyte-ness. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 21 13:13:14 2013 Received: (at 15426) by debbugs.gnu.org; 21 Sep 2013 17:13:14 +0000 Received: from localhost ([127.0.0.1]:53913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNQk6-00064B-FC for submit@debbugs.gnu.org; Sat, 21 Sep 2013 13:13:14 -0400 Received: from gateway-a.fh-trier.de ([143.93.54.181]:42378) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNQk2-00063x-TR for 15426@debbugs.gnu.org; Sat, 21 Sep 2013 13:13:12 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier] Received: from luca (dslb-188-097-176-226.pools.arcor-ip.net [188.97.176.226]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id 682A517509DB; Sat, 21 Sep 2013 19:12:49 +0200 (CEST) Received: from politza by luca with local (Exim 4.72) (envelope-from ) id 1VNQjg-0005R8-Ld; Sat, 21 Sep 2013 19:12:48 +0200 From: Andreas Politz To: Eli Zaretskii Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer References: <87ob7nh22t.fsf@hochschule-trier.de> <831u4jl738.fsf@gnu.org> <83wqmbjoat.fsf@gnu.org> <87eh8jgqkp.fsf@hochschule-trier.de> <83vc1uk6ul.fsf@gnu.org> <87a9j6h5zb.fsf@hochschule-trier.de> <83siwyjsga.fsf@gnu.org> Date: Sat, 21 Sep 2013 19:12:48 +0200 In-Reply-To: <83siwyjsga.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 21 Sep 2013 14:59:49 +0300") Message-ID: <87r4ciyu7j.fsf@hochschule-trier.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 15426 Cc: 15426@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Eli Zaretskii writes: > For the record, a much simpler test case is this: > > M-: (multibyte-string-p (car (directory-files default-directory t))) RET > Ok, I didn't know about this invariant. > [...] So the problem happens inside the directory-files call. That's why I put it's name in the title and description. > (You should never trust what the echo area shows when potentially > unibyte strings are involved, always use multibyte-string-p to tell if > a string is multibyte or unibyte.) I think it's reasonable to assume, that two strings have different contents, if they display differently in the same buffer. >> > "The minibuffer displays" is the key point here:[...] >> >> No, the key is that the file's existence depends on the buffer's >> multi-byte status, in which the code is evaluated. > > The truth is neither [...] I guess we can agree on the key, that you seemed to have solved this problem. -ap From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 21 14:53:44 2013 Received: (at 15426-done) by debbugs.gnu.org; 21 Sep 2013 18:53:44 +0000 Received: from localhost ([127.0.0.1]:54083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNSJM-0008QR-21 for submit@debbugs.gnu.org; Sat, 21 Sep 2013 14:53:44 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:63273) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNSJG-0008Q7-B9 for 15426-done@debbugs.gnu.org; Sat, 21 Sep 2013 14:53:39 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MTH00900OG02P00@a-mtaout20.012.net.il> for 15426-done@debbugs.gnu.org; Sat, 21 Sep 2013 21:53:31 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MTH00979OH70D20@a-mtaout20.012.net.il>; Sat, 21 Sep 2013 21:53:31 +0300 (IDT) Date: Sat, 21 Sep 2013 21:53:38 +0300 From: Eli Zaretskii Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer In-reply-to: <87r4ciyu7j.fsf@hochschule-trier.de> X-012-Sender: halo1@inter.net.il To: Andreas Politz Message-id: <83k3iaj9al.fsf@gnu.org> References: <87ob7nh22t.fsf@hochschule-trier.de> <831u4jl738.fsf@gnu.org> <83wqmbjoat.fsf@gnu.org> <87eh8jgqkp.fsf@hochschule-trier.de> <83vc1uk6ul.fsf@gnu.org> <87a9j6h5zb.fsf@hochschule-trier.de> <83siwyjsga.fsf@gnu.org> <87r4ciyu7j.fsf@hochschule-trier.de> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15426-done Cc: 15426-done@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Andreas Politz > Cc: monnier@iro.umontreal.ca, 15426@debbugs.gnu.org > Date: Sat, 21 Sep 2013 19:12:48 +0200 > > I guess we can agree on the key, that you seemed to have solved this > problem. Right, so I'm closing the bug. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 21 21:30:06 2013 Received: (at 15426) by debbugs.gnu.org; 22 Sep 2013 01:30:06 +0000 Received: from localhost ([127.0.0.1]:54541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNYUv-0000bJ-Au for submit@debbugs.gnu.org; Sat, 21 Sep 2013 21:30:05 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:32344) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VNYUr-0000aK-5d for 15426@debbugs.gnu.org; Sat, 21 Sep 2013 21:30:02 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFsoXM0/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJMEtkQoDpHqBXoMT X-IPAS-Result: Av8EABK/CFFsoXM0/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJMEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="28617920" Received: from 108-161-115-52.dsl.teksavvy.com (HELO pastel.home) ([108.161.115.52]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 21 Sep 2013 21:25:52 -0400 Received: by pastel.home (Postfix, from userid 20848) id 9CF9763260; Sat, 21 Sep 2013 21:29:54 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer Message-ID: References: <87ob7nh22t.fsf@hochschule-trier.de> <831u4jl738.fsf@gnu.org> <83wqmbjoat.fsf@gnu.org> <87eh8jgqkp.fsf@hochschule-trier.de> <83vc1uk6ul.fsf@gnu.org> <83mwn6jg3u.fsf@gnu.org> Date: Sat, 21 Sep 2013 21:29:54 -0400 In-Reply-To: <83mwn6jg3u.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 21 Sep 2013 19:26:29 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15426 Cc: 15426@debbugs.gnu.org, politza@hochschule-trier.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> >> => ("/tmp/\301\203\300\204/." nil "/tmp/\303\204/." t) >> > "The minibuffer displays" is the key point here: >> No, the key point is that the two strings should be identical > But you don't see the strings, except after they are inserted into > some buffer. That's OK. Since they print differently, we know they're different, which is all that mattered. Anyway, thanks for finding and fixing the bug, Stefan From unknown Tue Jun 17 20:19:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 20 Oct 2013 11:24:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator