From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.devel Subject: Re: Friendlier dired experience [CODE INCLUDED] Date: Thu, 5 Nov 2020 12:56:17 +0300 Message-ID: References: <20201103104340.q34kqfita55w2u7h@E15-2016.optimum.net> <20201104183228.xf7w4yf3fw3427y5@E15-2016.optimum.net> 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="13118"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/+ (1036f0e) (2020-10-18) Cc: Emacs-Devel List , Stefan Monnier , Boruch Baum To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 05 15:02:26 2020 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 1kafqM-0003H8-Ko for ged-emacs-devel@m.gmane-mx.org; Thu, 05 Nov 2020 15:02:26 +0100 Original-Received: from localhost ([::1]:51648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kafqL-00015v-M7 for ged-emacs-devel@m.gmane-mx.org; Thu, 05 Nov 2020 09:02:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kafoG-0007iR-MV for emacs-devel@gnu.org; Thu, 05 Nov 2020 09:00:16 -0500 Original-Received: from static.rcdrun.com ([95.85.24.50]:58553) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kafoF-0001Vw-5B for emacs-devel@gnu.org; Thu, 05 Nov 2020 09:00:16 -0500 Original-Received: from localhost ([::ffff:197.157.0.43]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002A0D01.000000005FA4056C.00003608; Thu, 05 Nov 2020 14:00:11 +0000 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=95.85.24.50; envelope-from=bugs@gnu.support; helo=static.rcdrun.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/05 08:59:12 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_03_06=1.592, RCVD_IN_SORBS_WEB=1.5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:258720 Archived-At: * Arthur Miller [2020-11-05 11:22]: > I have skimmed through diredc (readme + code) but I haven't tried it. > As far as I see, the only part I see worth putting directly in dired > is maybe as you pointed out trash management. I don't use Sunrise nor > any other `comander' Ranger clone; it is just not needed. I don't use > trash folder either for that matter, but I can see there is not much of > trash handling offered via Emacs, so maybe some users would prefer to > have such functionality. I am using trash functions, and it is very handy especially when managing some critical files. Some system /etc/configurations may remain as backup on server, and those are transferred to local Trash now. It would not be handy to delete large video or image on remote ssh/scp systems and that such files are transferred to local Trash, it would consume bandwidth, so I just need to be careful with it. Emacs trash system can use Freedesktop style trash or directory for trash. I am using latter set to be ~/tmp/Trash and inside of directory I have to place .dir-locals.el with following variables: ;;; Directory Local Variables ;;; For more information see (info "(emacs) Directory Variables") ((dired-mode . ((delete-by-moving-to-trash . nil)))) That is easy done by doing {M-x add-dir-local-variable}, then choosing dired-mode and variable `delete-by-moving-to-trash'. Why? Because if variable is true then files in trash would not be deleted from Dired, they would be renamed but not deleted. So deleting truly works only in my trash directory. Emacs does support trashing. So far so good. > For me Helm does the most; dired is needed just sometimes, so it is nice > if we can keep it lightweight. That said it does not mean that Emacs (or > Elpa) can't include a file manager, I would just prefer to keep it > separate from Dired. I prefer using plain Dired for file management as I am using Emacs on many computers and VPS-es. I do not know if that is harder or easier, I have no idea. What I know is that it works well and I am efficient and fast. It would generally disturb me to load some packages to give me my familiarity. That is what I avoid. With many computers I would waste time until I get all packages installed. When I need some particular option during the session then I do: {M-x local-set-key RET} then ' then I can set it for shell command just like diredc proposed it, which is good idea to quickly open shell. I just need to figure out how to invoke new shell buffer in the directory where I am located. Package exist for that, but I want to be fast in setting it up on plain Emacs from `local-set-key' Diredc should improve shell choice, as Eli said, rather not from /etc/passwd but at least from Emacs shell handlings. >From docstring for function `shell': If a file ‘~/.emacs_SHELLNAME’ exists, or ‘~/.emacs.d/init_SHELLNAME.sh’, it is given as initial input (but this may be lost, due to a timing error, if the shell discards input when it starts up). And there is more in the description how Emacs is choosing default shell. Dash is not even a choice but is main shell on Debian GNU/Linux. Again I represent idea that shell list should be taken from /etc/shells as it is system based list. And if such does not exist then some default list from diredc, or any package choosing a shell.