Subject: bug#26156: closed (Re: bug#26156: 26.0.50; expand-file-name fails to expand ~ if tramp is loaded and "/" is specified)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 18 Mar 2017 19:21:02 +0000

Your bug report

#26156: 26.0.50; expand-file-name fails to expand ~ if tramp is loaded and "/" is specified

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
26156: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26156
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#26156: 26.0.50; expand-file-name fails to expand ~ if tramp is loaded and "/" is specified
From: Michael Albinus <[email-masked]>
To: Bruce V Chiarelli <[email-masked]>
Cc: [email-masked]
Date: Sat, 18 Mar 2017 20:20:01 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Bruce V Chiarelli <[email-masked]> writes:

> Hi,

Hi Bruce,

> Yes, it works for me. Thanks.

Thanks for checking. I'm closing the bug.

> Best,
> BC

Best regards, Michael.

Subject: 26.0.50; expand-file-name fails to expand ~ if tramp is loaded and "/" is specified
From: [email-masked]
To: [email-masked]
Date: Fri, 17 Mar 2017 18:49:28 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

On the most recent version, if tramp is loaded, expand-file-name does
not expand ~ properly when the second argument is "/". This breaks
breaks magit-clone, though weirdly, that command only fails if the
active point is in a dired buffer. To clarify, "~" is absolute (per the
docstring for file-name-absolute-p), but it is not canonical (per the
docstring for expand-file-name).

Bisecting, the breaking change was 19a04b4c32. 

Starting from "emacs -Q":

(expand-file-name "~" "/")
"/home/sh0e"

(expand-file-name "~/" "/")
"/home/sh0e/"

(require 'tramp)
tramp

(expand-file-name "~" "/")
"~"

(expand-file-name "~/" "/")
"~/build/"

In GNU Emacs 26.0.50 (build 2, x86_64-unknown-linux-gnu, GTK+ Version 3.22.10)
 of 2017-03-14 built on topd0g
Repository revision: c66aaa61639e72a70a4f2c4bc73645048caebe53
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description:	Arch Linux

Recent messages:
Mark set
report-emacs-bug-hook: M-x report-emacs-bug was canceled, please read *Bug Help* buffer
Mark set [2 times]
Sending...
message-send: No methods specified to send by
Mark set
Sending...
message-send: No methods specified to send by
Mark set
Making completion list... [2 times]

Configured using:
 'configure --with-xwidgets'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XWIDGETS LIBSYSTEMD

Important settings:
  value of $LC_CTYPE: hu_HU.utf8
  value of $LANG: hu_HU.utf8
  value of $XMODIFIERS: @im=fcitx
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(network-stream nsm starttls tls gnutls mailalias smtpmail cus-edit
cus-start cus-load wid-edit pp shadow sort mail-extr emacsbug message
puny seq rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils thingatpt help-fns radix-tree tramp
tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete
comint ansi-color ring parse-time format-spec advice auth-source cl-seq
eieio byte-opt subr-x bytecomp byte-compile cl-extra help-mode easymenu
cconv eieio-core cl-macs gv eieio-loaddefs cl-loaddefs pcase cl-lib
password-cache dired dired-loaddefs time-date mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript case-table epa-hook jka-cmpr-hook help
simple abbrev obarray minibuffer cl-preloaded 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 dbusbind inotify dynamic-setting system-font-setting
font-render-setting xwidget-internal move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 242235 33519)
 (symbols 48 23632 17)
 (miscs 40 98 441)
 (strings 32 27983 6861)
 (string-bytes 1 879172)
 (vectors 16 39469)
 (vector-slots 8 750802 14512)
 (floats 8 73 394)
 (intervals 56 874 430)
 (buffers 976 16))