From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Boruch Baum Newsgroups: gmane.emacs.devel Subject: Re: Friendlier dired experience [CODE INCLUDED] Date: Thu, 5 Nov 2020 09:38:00 -0500 Message-ID: <20201105143800.7vt5jfr4gg2wigyb@E15-2016.optimum.net> References: <20201103104340.q34kqfita55w2u7h@E15-2016.optimum.net> <20201104183228.xf7w4yf3fw3427y5@E15-2016.optimum.net> <20201105092232.fk4r5dexnay3eyln@E15-2016.optimum.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1041"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: NeoMutt/20180716 Cc: Stefan Monnier , Emacs-Devel List To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 05 15:42:15 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 1kagSs-00007p-1q for ged-emacs-devel@m.gmane-mx.org; Thu, 05 Nov 2020 15:42:14 +0100 Original-Received: from localhost ([::1]:35606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kagSq-0006Kh-I4 for ged-emacs-devel@m.gmane-mx.org; Thu, 05 Nov 2020 09:42:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kagOz-0005Hx-Ot for emacs-devel@gnu.org; Thu, 05 Nov 2020 09:38:13 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:56423) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kagOw-0007dB-Vm for emacs-devel@gnu.org; Thu, 05 Nov 2020 09:38:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1604587083; bh=qQa0uSMaMH1Yq/OVpIUvkaPZeiILTJK8L0TQtq+92MY=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=S7xQlRHxe2lpGTfrkBIbr2wDll7tLEAM1bmWSBBKy1wZ4Z+0wL42PJoB+f0QyCO+r dhqb1Q1CAmN4PMS7hCImsBfXFAT/kLxOXju4I59nixYC0WL8qzSKYvk8MchVgGj5L1 c/LEs6TdkpNeDAyJZ8q3of9c4dA1l07Zdrb8+klA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from E15-2016.optimum.net ([71.105.138.177]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MOiDX-1kyg6O0tMl-00QFO9; Thu, 05 Nov 2020 15:38:03 +0100 Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:jLJNnaHC6In7ASHfZA9v1SM3WcBETjWirM93ZUFt3ll8AaVBivx 2nFSlEQtSLKM9hFxnRG/VRjHJhp16WhXCeuTLYZZ27Igx6AeBptyailOaMVx1Qg90YBB7Ev F0lERkfarXm66gi5FSWFQ2U0wZ0NDaTMC64YECO+/Z13HlvZIhuCLLP8lQsVA6BbxBU9H1P 3rbbFyIUA6m8Y8p3ycTtw== X-UI-Out-Filterresults: notjunk:1;V03:K0:i2KPi6isMxg=:4IuiHqgRzrfRm0TAI8dWDL RhANvKKpWPCWw3Qs3i2407rYg6R3z2U2k2sjYyi/xxtsQxhEDK+V1NswmFf/MnWl5oh8/wnjC gD8ShrGZKfjY0WL1+nSLYWEk/pZCO83NDlhdtQq3B0Bdf9hDSyyBY/KKgrFeEVHtc5utiLWDN r2KCrRhnAbSof7PvpJSDy7Dnm/69wGgAyPWut5gD+fx1O/GM5Eqtw61hwDaT9/kQc/Z8Lp1cL zmj3Z4LnRue3E5KbLvJ9AZPNSBSCPPtWfSgH5su0rQPfqO0QMO+vB84GLQ6LKT/yXK5deirmO QRklr9zr3VukWozqI8sdJejGmU9pECPFRrXQVHztIuwffMYLza9ri1TmxBOP5FFhgh5qub1kw fTnBCQBmEJ+rL/g+dCHpXvew8EOLvfQRld4zV7YllpAHuBxM8LW6P+QhmLTXGDwMyLTU9+FRq SVaexTDCkCIfh8GFebjBdrYEAsw243LiDtBVZRbvJPKKH673xOTGr1ynZ6g19BZygZ4ckL5zq TX/mLUAw4LxnXMMdHL2vrvT92wyzMKTNE9nxwjHC83ji0prLbcFRnjvdhtUUYVLiXAUa8GeO6 26BdOZol5Nd1aK/KFYTDO1961kgpl3U68UrX9hR7NlKmRMk2NiEbS13PbrW1T/igdamyOJKxa P0TphgsJ8mTYllqMTj3fFzZR1VZSUYEGC+oLa+HeHKOVwJnVj/C369nL9O1wA59KRWsW6QdYh U6oMXx0oo+xh9MDzENeOLrDpK1qNngmLC0CbfzcuUaw+HyhlkL4Os8GA04FE+8iEJLS4N0Ru Received-SPF: pass client-ip=212.227.17.20; envelope-from=boruch_baum@gmx.com; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/05 09:38:07 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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.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:258725 Archived-At: On 2020-11-05 13:54, Arthur Miller wrote: > How do you do bookmarks? I just bookmarked a folder with your shortcut > C-c b a; and the bookmark does not show in bookmarks list. diredc-bookmark-* doesn't share the generic emacs bookmark list. The consideration was not mix directory locations with locations within files. I know that emacs bookmarks works on directories and opens a dired buffer for them, but it made no sense to me mix the two forms > furthermore, when I use C-c b j; it seems to show some byte code, you > can see it in the attached screenshot. I can't reproduce that. Your screenshot seems to indicate you were using helm-something; is that correct? If so: 1) what helm set-up and command (I don't use helm); 2) what happens when you don't use helm; 3) what were you bookmarking. > Another quick impression: opening new frame in the bacgkround is not > really the best feel. It didn't got neither raised nor focused. Oops. Fixed, but before I push the commit, I have a question: As a generic setting, should I have the dired frame start out maximized or with some other specific orientation? At issue is that I'm not a GUI emacs user, so all my development and testing has been done for emacs -nw. I've just now tested the code with GUI emacs and reproduced the issue, but I see that neither my default GUI emacs frame nor my initial diredc frame start maximized and I have no idea what a normal GUI user's expectation is. > Also my original frame got resized and centered on the screen, and > diredc took place of the original frame (but in background and not focus= ed). That I'm not reproducing, but the pending commit may fix it anyway. You know, the change is trivial, so you might want to just manually make the change. Line 2201 goes from: (make-frame-command) to (select-frame (make-frame-command)) I'm just being stingy on commits and also sneak in whatever other frame config is necessary / desirable, (eg. maximize). > The dual pane wasn't so resilient; at least not to Gnus (nothing is > :-)). *I'm* certainly not resilient to gnus. Never ever have I gotten it to work. > After switching to Gnus and back I was left with a single window. Question #1: How did you 'switch' back and forth? Did you use S-F11? What other method(s)? > I am not sure if I understand the docs correctly: is it supposed to > restore window layout and buffers automatically Yes. If you toggle in and out with M-x diredc, bound by default to S-F11. > or do I need to take an action? It didn't happened automatically so I > tried diredc-restore. You mean diredc-recover? I'll presume yes. > I was than ask a question to choose between starting a new or choosing > two panes or something else. I choose two-pane, but I wasn't left with > same buffers after it executed. That's strange and I'd like to be able to reproduce it. If you mean that the result was that one or more of the dired buffers was unexpected, that should never happen. If your emacs had a total of two dired buffers open, they would be used. If your emacs had a total of more than two, then you would have been prompted to choose. What may have happened was that you had killed a dired buffer. In that case, diredc *would* try to intelligently select one, either your $HOME or what it thinks is your current emacs directory. > After I switched to the mail to continue writing it again switched to > just one window. When I switched back it was still just one window. I > then tried running again diredc (C-x 5 d); it just moved my cursor back > to old frame. Running again diredc moved cursor back to second frame but > it never switched back to dual pane nor to original buffers I had in > diredc. Once diredc is started, it respects a user's desire if it thinks the user insists on a custom window configuration for the diredc frame. The way to restore the default is to use diredc-recover (I suppose you could also perform diredc-quit followed by diredc again, but that's so 20th century). > I am sure I am using it wrong, but I don't see in the accompanying > docs how to switch between buffers and go back to dual-pane and > original buffers. If when you wrote above diredc-restore, you meant diredc-recover, that IS the correct way to return a window / buffer configuration that had gotten corrupted. It should always give you a dual pane, and if two dired buffers exist, they will be used. I'd like to be able to reproduce your case, but it may just be that you didn't realize that you had killed a dired buffer, and then didn't perform the recover. > In connection to this, looking at those predefined variables; I am not > sure I find it really useful; > ... > Documentation says they are useful dired values - but in which way are t= hey > useful? Do I really need to export a shortcut to a README file if I am a= lready > using Emacs? Am I supposed to open current file from the shell in new > Eamcs instance No, of course not. > or what was the intended workflow? You want to perform some generic set of shell operations relating to one or both directories displayed. The possibilities and opportunities really are endless, but for starters: You may find yourself comparing two directories and want to tar three files from one and five files from another into a single tar at a third location (not as unusual as it may sound at first). You mark the files in each dired buffer, open a shell, and use the $t1 and $t2 shell variables on your tar command line. As a second theoretical, maybe you want to perform a paste (unix command-line paste, not MSwin concept) of files from two directories - select them and use $f1 $f2. etc. etc. and so forth. > Sorry if I am obnoxious; these are just questions I was left with after > tryimg it. You don't. But people often say I sound obnoxious, so maybe I'm the wrong person to judge. > >> Other functionality I would like to see is some from dired-hacks: tog= gle > >> and filters. > > > > What do you mean by "toggles and filters"? > https://github.com/Fuco1/dired-hacks#dired-subtree > https://github.com/Fuco1/dired-hacks#dired-filter I'll take a look. But later. =2D- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0