From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Documentation fix Date: Fri, 07 Apr 2023 21:37:30 +0800 Message-ID: <87wn2nolt1.fsf@yahoo.com> References: <871qkvq4o4.fsf.ref@yahoo.com> <871qkvq4o4.fsf@yahoo.com> <83ttxroph8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31295"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 07 15:38:33 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pkmIT-0007wY-CK for ged-emacs-devel@m.gmane-mx.org; Fri, 07 Apr 2023 15:38:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkmHh-0005qD-Rm; Fri, 07 Apr 2023 09:37:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkmHg-0005pe-EV for emacs-devel@gnu.org; Fri, 07 Apr 2023 09:37:44 -0400 Original-Received: from sonic308-56.consmr.mail.ne1.yahoo.com ([66.163.187.31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pkmHe-0005YF-Hs for emacs-devel@gnu.org; Fri, 07 Apr 2023 09:37:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1680874660; bh=VwXucx/HK5TpPJOAgwghUs3SiflgG2UhfCM8JiOM/ww=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=hKxlfQoYp0/UyNBIQMzTx/SlUrSmvrD+Le4Ex25rxX/JKLB8c7AAKXA65uiSGezRGhuwo+rErfwG4+ViX9LYu7LzpqfXdAaiV/10YoQLn8FQZYkXUYYw/rv/tmEHUhxQ0P8MNJy8ytJQQX6SH4h30myeTkpslkc+8HTFXbbDuCnfSJQWcxGjhRRxgvtDvd8lPA+J5bHlk/8TunLUW65rIc+7AvA+1yvS7PEkL6iBfst8KxZWq/77a0TpX3oswoSYGmRsG7+Uvc8cubv8EaV9HFlQWQEGLu7B0d16EFpzwqIgd0EjpXqAPliws6S4gZxKg9FzLCSTjCF5RbzMOcIa9g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1680874660; bh=uVlSyVjwCYfnom4jJTsktHdnLwy2zRRKISpJqnVh707=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=XMTPguE38VyQME9ddma6TWKUtQyX9Xy+3oeVXreWtl1+IzuwaQc1KRw2OI7mUhZ0MYZvFUPMufhyh+p4LkfB1Fgwt1yGCNUhIS6DWidZ/2xJdBl2NRdf9C7EIkB6Ao34MAk0jLGc3JLRCONKGstlxGKy+F7crmGsC7J2rJO7VGeK4RL6x/PMJ3xezjsdGEzAOM1JUr3hFLO/DsN46vh6gntS1bgsqYgGup5clo4703caRRppzYzoQ3/FOMrgoL1NdiQmXXMnjCMY4N7pUqtAMCbDmWzT0YEqvEPDG+8g5yIaTeG2wl/PjorWpkCThQ/1sw4xGisYaq9s7oJBFrzufw== X-YMail-OSG: wceAaC8VM1koIuTk.U5bi.3OQgpKC79hBtMGrFN64DiKE1XrzTYFSk4_ZLFJEId cmsuCpKWW5J291FIThficd61XL6rlhKjfsqZ3D8RotP_68V7mg_1G.jYpXEYsnZ6VVy670n6gKVI 4u1Je5o9RSB29PNVZ2Aj7VGYQj5UOGHOS6_ea27W3WsrylL6XYJv.7Ko94xtHOXOaR.ejdZAuoyL qFPe6momAH1k4hgaTOpiLfvNb.CL91lL.lR91LMHhQzL.20gdSgHlsj79MhI9i.3odzWQbcYSV8V uhd4JrqCA0MEDrnwBPOXFFvIErRB25GAGMt1hb8qC4R9LdrXZaDCNjhV760rjzBfQHWY4IEyVKKN 80OBedBKyVAZYOsmukqpWItwCLW5VfDZTKY63LxeMUI4INy86Y09d9knZsPnACLbRknHMkCCnbX6 TEvVkcYbiZ8iIUeFndv9kjmSzwvFM24ut.lElAPXoYw6q05s5LKD9q0lI9IYiEB.k1Yd1ePjdweY GBiYpCoChwU_tReb3CeYrvqwhNccGOtqG3CFMm58dzEujmSC41DSNcsJEW.HzwVzVkEMMFCJTD9P pRzpLeajvdFlKI.p_FWBZhiiOKCjYp5Lw.zNFHBFlqzVlXtE1FCoGcDW5r5PSnk0jp5J5aVrd.8t WocqchONy2HEoJqoM2W5UZ0v7hLq4Difcs4UGAdMB79cqLjOBbZacP5ojttkALl.3xhX8kYPfy73 7eg0mxEPx4k6mzMAjrYJVM5yQlA7Rk8GOiYcc.AQVWf1zxMo9vA_XeIh4OsJD7ec9kCJFnsc0Hwe jw8rXUm9h4hOgvEuQHsMQeN436jMCCgFIJE2RCy2iW X-Sonic-MF: X-Sonic-ID: e17a9a19-5e68-48de-ab05-b85f37be6c11 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Fri, 7 Apr 2023 13:37:40 +0000 Original-Received: by hermes--production-sg3-6d6fb994f6-qwzcd (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID c3006281a2fa49df496fa5772015a922; Fri, 07 Apr 2023 13:37:35 +0000 (UTC) In-Reply-To: <83ttxroph8.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 07 Apr 2023 15:18:11 +0300") X-Mailer: WebService/1.1.21365 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.31; envelope-from=luangruo@yahoo.com; helo=sonic308-56.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305159 Archived-At: Eli Zaretskii writes: > Does this mean the function gets on the basename of the file, without > any leading directories? Or does it mean something else? Yes. >> + The function should return the complete file name under which the >> +file should be saved, including the directory where it should be >> +saved, under which Emacs will ask the other program to save the file. > > How would the function know what is the "right" directory to save the > file? Without some hints to that effect, this documentation is not > very useful, IMO. How about: For example, a function defined for Dired buffers may want to return the directory containing the file under the position of the drop. >> + If the file was successfully saved, > > And if not? Emacs never gets a reply from the program performing the drop, and thus cannot do anything. >> the function is called again, >> +this time with the first argument set to @code{nil}, and the second >> +argument set to the file name that was returned. The function should >> +then perform whatever action is appropriate (i.e., opening the file or >> +refreshing a directory listing.) ^^^^ > > I guess, you mean "e.g." there. Yes, sorry. > More importantly, I don't understand why would Emacs need to do > anything with the file at all. As a matter of fact, I don't think I > understand the purpose of this protocol at all, and I don't see it > clarified in the manual. Can you explain what is this used for? > Without such explanation, this documentation lacks context without > which the information makes no sense. It allows a program to drop files into a file manager, such as Dired, and directly save the file into the directory that is currently open in the file manager's window. This is a three-step process: 1. The program performing the drop sends the name of a file to Emacs, such as gen_sqrtab.c. 2. Emacs replies with the file name under which the file should be saved. If it's dropped on top of a Dired buffer visiting /export/home/user/Documents, for example, Emacs should reply with /export/home/user/Documents/gen_sqrtab.c. 3. If saving the file is successful, the program performing the drop notifies Emacs, at which point the Dired buffer is reverted. This protocol is mainly supported by web browsers and GTK based file managers, and now Emacs as well.