From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Sean Devlin Newsgroups: gmane.emacs.bugs Subject: bug#40156: 26.3; append-to-file does not work on nonexistent file over ssh Date: Fri, 20 Mar 2020 17:14:16 -0400 Message-ID: <34570465-5AD0-4A4A-B862-08E5DF18E8B5@toadstyle.org> Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3631.0.9.2.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="13762"; mail-complaints-to="usenet@ciao.gmane.io" To: 40156@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 20 22:21:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jFP4r-0003Ro-JM for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Mar 2020 22:21:13 +0100 Original-Received: from localhost ([::1]:59334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFP4q-0002dX-BL for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Mar 2020 17:21:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43679) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFP4h-0002bx-QK for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2020 17:21:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFP4g-0004JD-EK for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2020 17:21:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39766) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jFP4g-0004J9-Bp for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2020 17:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jFP4g-0004NU-7Q for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2020 17:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sean Devlin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Mar 2020 21:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40156 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.158473920516726 (code B ref -1); Fri, 20 Mar 2020 21:21:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Mar 2020 21:20:05 +0000 Original-Received: from localhost ([127.0.0.1]:45739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFP3k-0004Li-R3 for submit@debbugs.gnu.org; Fri, 20 Mar 2020 17:20:05 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:41324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFOyI-0004CF-J4 for submit@debbugs.gnu.org; Fri, 20 Mar 2020 17:14:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42887) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFOyG-0001XN-Tl for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2020 17:14:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFOyF-00056G-BL for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2020 17:14:24 -0400 Original-Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]:34181) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jFOyE-00055s-Uh for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2020 17:14:23 -0400 Original-Received: by mail-qk1-x736.google.com with SMTP id f3so8632150qkh.1 for ; Fri, 20 Mar 2020 14:14:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toadstyle-org.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=IlpS8XzG1o/yZ2BI+bInL+hV0+J7yAhbOnL62rpzYxY=; b=vnvae7hyogeX42FIhg6RnM/3GrHIWK6ulqFOIM+HMGD5FhT2jbtEq8uPM6NIvRjnDl /C1SQKNnyJ0hJd85kseqFyuhDJVndkdmSu559cb5NSn2gr/y9A7sztitlxzPyKq2H4U4 D0714S8tzT8GnbhwR/+UtsMPIZ6T5csemin+FgLU7DVTHY/Ph7UUpeTisUlLgDLmtdA6 USoBOnm0IDhM+P6w1Yx+IPfM+jZD2V609LDFDO9mzdDtCsfyXOgch1ji7HFA/Tj83Nvg llFNLnF6C4C2dU3NZApmQOxM1nqI1SUoGbLXhmH/4LYR3cgv5V2yD/qhKBM06nt356HX kRTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=IlpS8XzG1o/yZ2BI+bInL+hV0+J7yAhbOnL62rpzYxY=; b=e1WQ7eztd/qM07urQKIT+BxNMHd86P7/H51Oo8cYqAPRbE7gfFtqWTBBcUQcl9/DLX vh6BQ1k8WhodJFqWTNPe0Y/Q0stNlKHmdhUIdiSxD60/LiJ61UI0OWawcQRCxGm83dxU ChbbE9c4i1WEFLAupi2IxQUKLYIoOq+m9XCMPNyzwKeGu/zKj6Df/eKho+SHVyzMjv2R jc3uC8B75wg43pp1IuuKzavorm1RDZX68jd/a0R7lF9vLvrJXVaNg3OfFgGVKa76SNoK UVniJGMZPNwV8hUiqeFDJQrxVuZ8Su+npf+V2PQlpvcaGWbzmt2xUJwvVisqrfrOA+Ib dwWA== X-Gm-Message-State: ANhLgQ2Vxl3sFTUa2rp4/5YCvzXs0AcOPQFXKLYeBieUkNgMrdT6IUiG iMZXsWDKKGU0gaibn+uwFFGHnPDA7K0= X-Google-Smtp-Source: ADFU+vsgxjzKDdWPKMMu08nfDdscm//8gscPYNAxPdO6lJSYuJlI7ILmX1Dqh1Z6JNGDlE8PkbYuBg== X-Received: by 2002:a05:620a:1309:: with SMTP id o9mr10351998qkj.293.1584738861079; Fri, 20 Mar 2020 14:14:21 -0700 (PDT) Original-Received: from ?IPv6:2604:2000:14c6:84b0:8db9:8c9:7057:1578? ([2604:2000:14c6:84b0:8db9:8c9:7057:1578]) by smtp.gmail.com with ESMTPSA id x127sm5166363qke.135.2020.03.20.14.14.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Mar 2020 14:14:20 -0700 (PDT) X-Mailer: Apple Mail (2.3631.0.9.2.1) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Fri, 20 Mar 2020 17:20:03 -0400 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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:177581 Archived-At: Hi folks, The append-to-file function (and the underlying write-region in append mode) fails over ssh (via tramp) when applied to a nonexistent file. The same invocation creates the file transparently when invoked locally. I think tramp should create the file as in the local usage, if possible. If this is not possible, the discrepancy should be documented somewhere. (Apologies if it is documented somewhere; I tried to find it and could not.) The following (edited) eshell transcript demonstrates the behavior (though it works the same in Lisp): Welcome to the Emacs shell > ~ $ ls=20 > ~ $ append-to-file "something" nil nonexistent.txt=20 > ~ $ cat nonexistent.txt=20 > something~ $=20 > ~ $=20 > ~ $ cd /ssh:remote:=20 > /ssh:remote:/home/user $ ls=20 > /ssh:remote:/home/user $ append-to-file "something" nil = nonexistent.txt=20 > File =E2=80=98/ssh:remote:/home/user/nonexistent.txt=E2=80=99 not = found on remote host > /ssh:remote:/home/user $=20 > /ssh:remote:/home/user $ touch nonexistent.txt=20 > /ssh:remote:/home/user $=20 > /ssh:remote:/home/user $ append-to-file "something" nil = nonexistent.txt=20 > /ssh:remote:/home/user $=20 > /ssh:remote:/home/user $ cat nonexistent.txt=20 > something/ssh:remote:/home/user $=20 In GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 = Version 10.14.3 (Build 18D109)) of 2019-09-02 built on builder10-14.porkrind.org Windowing system distributor 'Apple', version 10.3.1975 Configured using: 'configure --with-ns '--enable-locallisppath=3D/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Eshell 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: (shadow sort mail-extr emacsbug message rmc puny seq dired dired-loaddefs 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 pp files-x tramp-cache tramp-sh tramp tramp-compat tramp-loaddefs trampver shell parse-time format-spec advice auth-source cl-seq eieio byte-opt bytecomp byte-compile cconv eieio-core cl-macs gv eieio-loaddefs password-cache pcmpl-unix em-unix em-term term disp-table easymenu ehelp em-script em-prompt em-ls cl-loaddefs cl-lib em-hist em-pred em-glob em-dirs em-cmpl em-basic em-banner em-alias pcomplete comint ansi-color ring esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util elec-pair time-date tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win 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 charprop 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 threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 236075 13044) (symbols 48 23407 1) (miscs 40 55 96) (strings 32 40652 1787) (string-bytes 1 1228751) (vectors 16 40619) (vector-slots 8 799289 20336) (floats 8 72 298) (intervals 56 830 0) (buffers 992 14))