qemacs-devel
[Top][All Lists]
Advanced

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

Re: dired_show_dot_files


From: Charlie Gordon
Subject: Re: dired_show_dot_files
Date: Sun, 21 Aug 2022 20:40:34 +0200

On 21 Aug 2022, at 19:42, Piscium <groknok@gmail.com> wrote:
> 
> Hi Charlie,
> 
> On Sun, 21 Aug 2022 at 17:34, Olivier <ogu@xxx> wrote:
> 
> I am not sure who Olivier is!

An alias I use for some of my work for sure :)

>> You can toggle this variable by pressing ‘.’ in a dired buffer.
>> The setting applies to all dired current and future buffers, yet it is not 
>> saved (yet) when you exit qemacs.
> 
> Thanks a lot. This is what I was looking for. It works.

I just realized this binding is non standard, emacs does something else for 
this key
and there is no simple key to toggle between hiding and showing dot files

>> If you want to hide the dot files by default when loading qemacs, add a line 
>> to your ~/.qe/config file:
>>    dired_show_dot_files=0;
> 
> Thanks, this also works.

default settings should go to this file. It is loaded when qemacs is started.

> Btw, before I wrote the email I had tried to put this same line in
> qerc. It nearly worked. What I mean is that if from my home folder I
> would start qe with no parameter, I would be shown the files in my
> home folder including the dot files, but the moment I pressed a key,
> for example, down arrow, the dot files became hidden. I am not sure if
> this is a bug or the way it is intended to work. It looks as if qerc
> was read and processed only after my first key press instead of before
> the text being shown to me.

I never tested this. the “.qerc” files are loaded after attaching the newly 
created or loaded buffer to a window,
This is a problem here because the initial directory scan is performed as a 
side effect of setting the dired-mode
which itself is a side effect of attaching the window. The changed setting is 
detected after the first command run
in the window.  Good catch! It is not intended, but at least there is an 
explanation. I am working on dired
to implement a hierarchical directory view, like the Windows and macOS file 
managers.

>> You could also add these lines to create named macros and bind them to ‘f2’ 
>> and ‘f3’ but given how easy it is to switch inside a dired buffer, it seems 
>> hardly necessary:
>>    define_kbd_macro(“hide-dot_files", “M-x set-variable RET 1 RET", “f2");
>>    define_kbd_macro(“hide-dot_files", “M-x set-variable RET 0 RET", “f3”);
> 
> This does not work for me. “hide-dot_files" has a dash and a
> underscore. It does not work even if I replace the dash with an
> underscore.

Sorry about that, the variable names have `-` (dashes) in them, the underlying 
C variables use `_` (underscore).
The config file parser does the conversion automatically, but the function 
set-variable does not. I should probably make this more transparent.
Sorry also about the guillemets instead of double quotes. This email client 
insists on silly automatic conversions.

>> I have started working on stabilizing and documenting all these features.
> 
> Thanks.

Markdown seems the way to go now, so I will convert the texinfo files and write 
more documentation,
possibly extracting some comments from the source code, ala docbook.

>> As you have noticed, dired-mode is not quite as functional as in emacs, can 
>> you tell me what you use it for in emacs that you miss in qemacs?
> 
> I am not (yet ?) an emacs user, maybe I will become some day, who
> knows. For me the advantage of microemacs is that it is much faster
> than emacs and using it I can get used to the key bindings, as there
> is some commonality.

Interesting.
I have not used microemacs since 1987, and lost track of the may versions 
available, including one customized by Linus Torvalds.
Which version do you use? I suspect it is “mg”, widely available and part of 
the OpenBSD source tree, where do you get it from?

Cheers,

Chqrlie.




reply via email to

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