emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Friendlier dired experience [CODE INCLUDED]


From: Boruch Baum
Subject: Re: Friendlier dired experience [CODE INCLUDED]
Date: Thu, 5 Nov 2020 09:38:00 -0500
User-agent: NeoMutt/20180716

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 focused).

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 they
> useful? Do I really need to export a shortcut to a README file if I am already
> 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: toggle
> >> 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.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]