Re: dired_show_dot_files
Charlie Gordon <[email protected]> Sun, 21 Aug 2022 22:23:18 +0200
| Newsgroups | gmane.editors.qemacs.devel |
|---|---|
| Message-ID | <[email protected]> |
On 21 Aug 2022, at 21:37, Piscium <[email protected]> wrote: >=20 > On Sun, 21 Aug 2022 at 19:40, Charlie Gordon <[email protected]> = wrote: >=20 >>>> You can toggle this variable by pressing =E2=80=98.=E2=80=99 in a = dired buffer. >>>> The setting applies to all dired current and future buffers, yet it = is not saved (yet) when you exit qemacs. >>>=20 >>> Thanks a lot. This is what I was looking for. It works. >>=20 >> 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 >=20 > 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 =E2=80=9Cthe emacs documentation=E2=80=9D, you mean = mg=E2=80=99s documentation I assume=E2=80=A6 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 =E2=80=98f2=E2=80=99 and =E2=80=98f3=E2=80=99 but given how easy it = is to switch inside a dired buffer, it seems hardly necessary: >>>> define_kbd_macro(=E2=80=9Chide-dot_files", =E2=80=9CM-x = set-variable RET 1 RET", =E2=80=9Cf2"); >>>> define_kbd_macro(=E2=80=9Chide-dot_files", =E2=80=9CM-x = set-variable RET 0 RET", =E2=80=9Cf3=E2=80=9D); >>>=20 >>> This does not work for me. =E2=80=9Chide-dot_files" has a dash and a >>> underscore. It does not work even if I replace the dash with an >>> underscore. >>=20 >> 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. >=20 > 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. >=20 > 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"); >=20 > 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 =E2=80=9Cmg=E2=80=9D, = widely available and part of the OpenBSD source tree, where do you get = it from? >=20 > 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=E2=80=A6 The current version should compile fine on Debian. Cheers Chqrlie