unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45127: 28.0.50; wdired + dired-hide-details-mode toggling?
@ 2020-12-08 21:34 Michael Heerdegen
  2020-12-08 22:18 ` Drew Adams
  2022-01-28 14:56 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 9+ messages in thread
From: Michael Heerdegen @ 2020-12-08 21:34 UTC (permalink / raw)
  To: 45127


Hello,

My wishlist proposal is: may we allow to toggle
`dired-hide-details-mode' in a wdired buffer (currently an error is
signaled in this case)?  I ask because (1) seems this would work out of
the box, and (2) it may be useful, e.g. because I started with hidden
details, already have performed some changes, and see that I need to
change something in the details also.  Or I have long filenames and thus
want to hide details although I have already switched to wdired.

Anyway, the implementation of d-h-details-mode only seems to toggle some
invisibility spec, and thus I expect no problems (will try it out
privately in the meantime).

I guess we would need a new key for it, since the binding for toggling,
"(", is bound to self-insert-command in a wdired buffer.  C-c ( maybe?

TIA,

Michael.


In GNU Emacs 28.0.50 (build 20, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0)
 of 2020-12-08 built on drachen
Repository revision: 9965fc635f54cabc9da7a234356eeed4c1fc7257
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: Debian GNU/Linux bullseye/sid





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#45127: 28.0.50; wdired + dired-hide-details-mode toggling?
  2020-12-08 21:34 bug#45127: 28.0.50; wdired + dired-hide-details-mode toggling? Michael Heerdegen
@ 2020-12-08 22:18 ` Drew Adams
  2020-12-08 22:28   ` Michael Heerdegen
  2022-01-28 14:56 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 9+ messages in thread
From: Drew Adams @ 2020-12-08 22:18 UTC (permalink / raw)
  To: Michael Heerdegen, 45127

FWIW, I don't see this problem with Emacs 27.1
or earlier on MS Windows.

Perhaps it's a regression for Emacs > 27?
Or perhaps it's platform-dependent?  (Windows
uses `ls-lisp'; dunno whether that makes any
difference, but I don't expect it would.)





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#45127: 28.0.50; wdired + dired-hide-details-mode toggling?
  2020-12-08 22:18 ` Drew Adams
@ 2020-12-08 22:28   ` Michael Heerdegen
  2020-12-08 22:45     ` Drew Adams
  2020-12-08 22:47     ` Michael Heerdegen
  0 siblings, 2 replies; 9+ messages in thread
From: Michael Heerdegen @ 2020-12-08 22:28 UTC (permalink / raw)
  To: Drew Adams; +Cc: 45127

Drew Adams <drew.adams@oracle.com> writes:

> FWIW, I don't see this problem with Emacs 27.1
> or earlier on MS Windows.

d-h-details-mode has this test since it had been added:

#+begin_src emacs-lisp
(unless (derived-mode-p 'dired-mode)
    (error "Not a Dired buffer"))
#+end_src

Does your wdired buffer fulfill (derived-mode-p 'dired-mode)?


Thanks,

Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#45127: 28.0.50; wdired + dired-hide-details-mode toggling?
  2020-12-08 22:28   ` Michael Heerdegen
@ 2020-12-08 22:45     ` Drew Adams
  2020-12-08 22:47     ` Michael Heerdegen
  1 sibling, 0 replies; 9+ messages in thread
From: Drew Adams @ 2020-12-08 22:45 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 45127

> Does your wdired buffer fulfill (derived-mode-p 'dired-mode)?

No.  That sexp returns nil.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#45127: 28.0.50; wdired + dired-hide-details-mode toggling?
  2020-12-08 22:28   ` Michael Heerdegen
  2020-12-08 22:45     ` Drew Adams
@ 2020-12-08 22:47     ` Michael Heerdegen
  2020-12-08 22:57       ` Drew Adams
  1 sibling, 1 reply; 9+ messages in thread
From: Michael Heerdegen @ 2020-12-08 22:47 UTC (permalink / raw)
  To: Drew Adams; +Cc: 45127

Michael Heerdegen <michael_heerdegen@web.de> writes:

> #+begin_src emacs-lisp
> (unless (derived-mode-p 'dired-mode)
>     (error "Not a Dired buffer"))
> #+end_src

And it also seems that wdired-mode never was derived from dired-mode.
So I wonder why it works for you.  Or maybe you just misunderstood what
I tried to suggest?


Thanks,

Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#45127: 28.0.50; wdired + dired-hide-details-mode toggling?
  2020-12-08 22:47     ` Michael Heerdegen
@ 2020-12-08 22:57       ` Drew Adams
  2020-12-08 23:49         ` Michael Heerdegen
  0 siblings, 1 reply; 9+ messages in thread
From: Drew Adams @ 2020-12-08 22:57 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 45127

> And it also seems that wdired-mode never was derived from dired-mode.
> So I wonder why it works for you.  Or maybe you just misunderstood what
> I tried to suggest?

All I tried was `emacs -Q', then Dired, then `C-x C-q',
then evaluate (derived-mode-p 'dired-mode), which
returned nil.

I used Emacs 26.3 and 27.1.  Maybe the test you show
was introduced after 27.1?  Where do you see that test?

(FWIW, I can't imagine why `wdired-mode' would ever be
derived from `dired-mode'.)





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#45127: 28.0.50; wdired + dired-hide-details-mode toggling?
  2020-12-08 22:57       ` Drew Adams
@ 2020-12-08 23:49         ` Michael Heerdegen
  2020-12-09  0:15           ` Drew Adams
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Heerdegen @ 2020-12-08 23:49 UTC (permalink / raw)
  To: Drew Adams; +Cc: 45127

Drew Adams <drew.adams@oracle.com> writes:

> All I tried was `emacs -Q', then Dired, then `C-x C-q',
> then evaluate (derived-mode-p 'dired-mode), which
> returned nil.

But you also said "FWIW, I don't see this problem with Emacs 27.1",
i.e. you said you don't see the error this is about.

> I used Emacs 26.3 and 27.1.  Maybe the test you show
> was introduced after 27.1?  Where do you see that test?

It's the first expression in the body of `dired-hide-details-mode' and
has been there since `dired-hide-details-mode' had been added 8 years
ago AFAICT.

Regards,

Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#45127: 28.0.50; wdired + dired-hide-details-mode toggling?
  2020-12-08 23:49         ` Michael Heerdegen
@ 2020-12-09  0:15           ` Drew Adams
  0 siblings, 0 replies; 9+ messages in thread
From: Drew Adams @ 2020-12-09  0:15 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 45127

> > All I tried was `emacs -Q', then Dired, then `C-x C-q',
> > then evaluate (derived-mode-p 'dired-mode), which
> > returned nil.
> 
> But you also said "FWIW, I don't see this problem with Emacs 27.1",
> i.e. you said you don't see the error this is about.

Yes.  But I was wrong.

I was using `(', not `M-x dired-hide-details-mode'.
Which means I was never using it when already in
`wdired-mode'.

If I use `M-x dired-hide-details-mode' when in `wdired-mode'
I see the error you reported.

Sorry for the noise.

I was first using `(' and then turning on `wdired-mode',
not turning on `wdired-mode' and then using
`M-x dired-hide-details-mode'.

(And I was evaling `(derived-mode-p 'dired-mode)' in
`wired-mode' - which returns nil.)





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#45127: 28.0.50; wdired + dired-hide-details-mode toggling?
  2020-12-08 21:34 bug#45127: 28.0.50; wdired + dired-hide-details-mode toggling? Michael Heerdegen
  2020-12-08 22:18 ` Drew Adams
@ 2022-01-28 14:56 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-28 14:56 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 45127

Michael Heerdegen <michael_heerdegen@web.de> writes:

> My wishlist proposal is: may we allow to toggle
> `dired-hide-details-mode' in a wdired buffer (currently an error is
> signaled in this case)?  I ask because (1) seems this would work out of
> the box, and (2) it may be useful, e.g. because I started with hidden
> details, already have performed some changes, and see that I need to
> change something in the details also.  Or I have long filenames and thus
> want to hide details although I have already switched to wdired.
>
> Anyway, the implementation of d-h-details-mode only seems to toggle some
> invisibility spec, and thus I expect no problems (will try it out
> privately in the meantime).
>
> I guess we would need a new key for it, since the binding for toggling,
> "(", is bound to self-insert-command in a wdired buffer.  C-c ( maybe?

I tried it out for a bit, and it seems to work without any problems, so
I lifted the dired-mode restriction and added the key binding in Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-01-28 14:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 21:34 bug#45127: 28.0.50; wdired + dired-hide-details-mode toggling? Michael Heerdegen
2020-12-08 22:18 ` Drew Adams
2020-12-08 22:28   ` Michael Heerdegen
2020-12-08 22:45     ` Drew Adams
2020-12-08 22:47     ` Michael Heerdegen
2020-12-08 22:57       ` Drew Adams
2020-12-08 23:49         ` Michael Heerdegen
2020-12-09  0:15           ` Drew Adams
2022-01-28 14:56 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).