From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Is it expected to have reserved "system.el"? Date: Mon, 02 Jan 2023 19:05:12 +0200 Message-ID: <83k02427g7.fsf@gnu.org> References: <83y1ql15e8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18752"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Jean Louis Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 02 18:06:13 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 1pCOGK-0004ev-Pd for ged-emacs-devel@m.gmane-mx.org; Mon, 02 Jan 2023 18:06:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCOFX-00071Y-Td; Mon, 02 Jan 2023 12:05:24 -0500 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 1pCOFO-0006zq-Mj for emacs-devel@gnu.org; Mon, 02 Jan 2023 12:05:16 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCOFI-0006og-Un; Mon, 02 Jan 2023 12:05:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=lIcermoI/BqdqN4X6nPySxGSq1QGHn/BN0H+DcY+H3E=; b=aEE36dk3uaYne7zj2ZEt DqdKIOWBk6w7M1JvdIeEW86CunM7WrGxedCqu/6ZrFhuTcSBWkP54BoOT8XWb/Wn1sgZ1gPCK4d4B 0oSmvwvsKOMw98StRTGdZU1/piB9DRTMTtJS9glj9FXdev4If2gSJR2eOFxSRZ3k84clS0kc9UFJF I8YCeXQ85p9lmBSHFAtJ+hT+mI07M/MjYsGEVMGgSuaoJGOJSKOUI+qERa9jXLXc7Jzbwpt+sAC0n Wj78FcYlw2nSoqM2NuxcqpHx5ofs8c+dFRjqaosMasmRd9aNw4YvincKU8QqW05YkYx3QDCFqiRRD qr14BkByTAKT4Q==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCOFF-000878-Ov; Mon, 02 Jan 2023 12:05:08 -0500 In-Reply-To: (message from Jean Louis on Mon, 2 Jan 2023 19:35:26 +0300) 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:302196 Archived-At: > Date: Mon, 2 Jan 2023 19:35:26 +0300 > From: Jean Louis > Cc: emacs-devel@gnu.org > > > move-file-to-trash is an interactive byte-compiled Lisp function in > > ‘files.el’. > > > (move-file-to-trash FILENAME) > > > Move the file (or directory) named FILENAME to the trash. > > When ‘delete-by-moving-to-trash’ is non-nil, this function is > > called by ‘delete-file’ and ‘delete-directory’ instead of > > deleting files outright. > > > If the function ‘system-move-file-to-trash’ is defined, call it > > with FILENAME as an argument. > > Otherwise, if ‘trash-directory’ is non-nil, move FILENAME to that > > directory. > > Otherwise, trash FILENAME using the freedesktop.org conventions, > > like the GNOME, KDE and XFCE desktop environments. Emacs moves > > files only to "home trash", ignoring per-volume trashcans. > > > Probably introduced at or before Emacs version 23.2. > > As you may see Emacs expects users to define function > `system-move-file-to-trash' and based on that, is there notion that > package named "system.el" is reserved for users on specific computer? No and no. What the above says is that if the function by that name is defined, it will be used. We have 2 platforms which define such a function: MS-Windows and macOS. On other platforms, we use our own Lisp code in move-file-to-trash. We don't _expect_ users to define such a function. And there's no claim here that no other function can be called system-SOMETHING. > Is prefix `system-' maybe reserved from Emacs for every specific > system (computer)? No.