On 21 Aug 2022, at 21:37, Piscium <grok...@gmail.com> wrote: > > On Sun, 21 Aug 2022 at 19:40, Charlie Gordon <qem...@chqrlie.org> wrote: > >>>> 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 > > I also checked the emacs documentation and also could not find a > simple key. For me in this respect qemacs is better than emacs! This > is because I like a simple way of toggling. In some file managers I > use C-h, there is one file manager that also has the dot to toggle but > I forgot which.
When you write “the emacs documentation”, you mean mg’s documentation I assume… C-h is a prefix key for many help commands in qemacs. >>>> 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. > > Even after replacing dash with underscore, and removing the funny > characters that were there instead of double quotes, it still does not > work for me. This is what I have at the moment. > > 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"); > > Maybe there is something else amiss there? Sorry, the macros were bogus, I forgot the variable name, here is a better version: define_kbd_macro("show-dot-files", "M-x set-variable RET dired-show-dot-files RET 1 RET", "f2"); define_kbd_macro("hide-dot-files", "M-x set-variable RET dired-show-dot-files RET 0 RET", "f3"); >> 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? > > I use several editors and IDEs for different purposes, probably not a > good idea! But with respect to editors somewhat similar to micro > emacs, I evaluated all that are available in Arch but the only one I > am using is qemacs. Of the micro emacs style of editors, mg seems to > be the one available in most distros or OSes. For me qemacs has two > advantages over mg, syntax highlighting and UTF-8. One good thing > about mg is that it is (apparently) well documented. In the OpenBSD > project, documentation is considered very important. I recently set up > a headless back-up server with Debian. As there is no qemacs in Debian > I use mg there (or nvi). There used to be a Debian package for qemacs, but the maintainer probably gave up… The current version should compile fine on Debian. Cheers Chqrlie