all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* dired-hide-details-mode have no effect suddenly
@ 2017-09-03 17:48 Tomas Nordin
  2017-09-03 18:04 ` Drew Adams
  2017-09-05 19:10 ` Charles A. Roelli
  0 siblings, 2 replies; 15+ messages in thread
From: Tomas Nordin @ 2017-09-03 17:48 UTC (permalink / raw)
  To: help-gnu-emacs

Hi List

Here is a problem I don't know how to reproduce. I have this in my
.emacs:

    (add-hook 'dired-mode-hook 'dired-hide-details-mode)

and details are hidden by default, the way I like it. Sometimes I need
to see some details and I use (default I think) the key ( to toggle
visibility of details.

However, suddenly after some long time of keeping emacs alive, details
are always shown and I cannot toggle it. I have been trying to detect at
what moment this happens but I fail to understand what the interference
is. At this point all I can think of is restarting emacs. Did somebody
notice a similar problem?

Best regards
--
Tomas



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

* RE: dired-hide-details-mode have no effect suddenly
  2017-09-03 17:48 dired-hide-details-mode have no effect suddenly Tomas Nordin
@ 2017-09-03 18:04 ` Drew Adams
  2017-09-03 18:52   ` Tomas Nordin
  2017-09-05 19:10 ` Charles A. Roelli
  1 sibling, 1 reply; 15+ messages in thread
From: Drew Adams @ 2017-09-03 18:04 UTC (permalink / raw)
  To: Tomas Nordin, help-gnu-emacs

> Here is a problem I don't know how to reproduce. I have this in my
> .emacs:
> 
>     (add-hook 'dired-mode-hook 'dired-hide-details-mode)
> 
> and details are hidden by default, the way I like it. Sometimes I need
> to see some details and I use (default I think) the key ( to toggle
> visibility of details.
> 
> However, suddenly after some long time of keeping emacs alive, details
> are always shown and I cannot toggle it. I have been trying to detect at
> what moment this happens but I fail to understand what the interference
> is. At this point all I can think of is restarting emacs. Did somebody
> notice a similar problem?

Do you see the same thing if you start Emacs using `emacs -Q'
(no init file)?  If so, it sounds like a bug
(`M-x report-emacs-bug').

Do you perhaps use library `dired-details+.el'? If so, and if
option `dired-details-propagate-flag' has its default value
of `t', and if you happen to use `(` in Dired (to toggle
showing details), then that the resulting state is used from
then on (until you hit `(` again), by default.

IOW, that could explain what you think you see.  If you did
hit `(` then what you get from that (e.g. showing details)
will be what you see in Dired from then on (until you toggle
with `(` again).  If you don't want such propagation then
customize the option value to `nil'.

https://www.emacswiki.org/emacs/download/dired-details%2b.el



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

* RE: dired-hide-details-mode have no effect suddenly
  2017-09-03 18:04 ` Drew Adams
@ 2017-09-03 18:52   ` Tomas Nordin
  2017-09-03 19:37     ` Drew Adams
  0 siblings, 1 reply; 15+ messages in thread
From: Tomas Nordin @ 2017-09-03 18:52 UTC (permalink / raw)
  To: Drew Adams, help-gnu-emacs

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

> Do you see the same thing if you start Emacs using `emacs -Q'

I don's see. Loaded magit, zerodark theme and maybe something else and
it didn't happen.

> Do you perhaps use library `dired-details+.el'? If so, and if

not what I know. I see a readme in my elpa directory,
"dired-details+-readme.txt" but nothing else. I don't know what it's
doing there, but anyway. It informs me it's not needed since emacs 24.4+

I report back if I can be more specific, it feels like there must be a
package doing something.



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

* RE: dired-hide-details-mode have no effect suddenly
  2017-09-03 18:52   ` Tomas Nordin
@ 2017-09-03 19:37     ` Drew Adams
  2017-09-09 19:34       ` Tomas Nordin
  0 siblings, 1 reply; 15+ messages in thread
From: Drew Adams @ 2017-09-03 19:37 UTC (permalink / raw)
  To: Tomas Nordin, help-gnu-emacs

> > Do you see the same thing if you start Emacs using `emacs -Q'
> 
> I don's see. Loaded magit, zerodark theme and maybe something else and
> it didn't happen.

Then recursively bisect your init file to find the culprit.

You can use command `comment-region' to comment or (with `C-u')
uncomment a selection of text.  Use it to comment out 1/2, then
3/4, 7/8, ... of your init file.  Narrow down the code you use,
to find the problem.

> > Do you perhaps use library `dired-details+.el'? If so, and if
> 
> not what I know. I see a readme in my elpa directory,
> "dired-details+-readme.txt" but nothing else. I don't know what it's
> doing there, but anyway. It informs me it's not needed since emacs 24.4+

That's a misreading of that readme.  What it says is that Emacs
24.4 and later provide `dired-hide-details-mode'.  If all you
want is what that offers then you do not need any 3rd-party
library.

But if you want what `dired-details+.el' provides and you have
Emacs 24.4 or later then you can get those additional features
from Dired+ (library `dired+.el').

I've reworded that part of the readme to help prevent misreading:

NOTE: If you use Emacs 24.4 or later, and if you use library
      `dired+.el', then you do not need this library or library
      `dired-details.el'.

      Instead, you can use `dired-hide-details-mode'.  Library
      `dired+.el' enhances `dired-hide-details-mode' to give it
      the same features as `dired-details+.el' provides.  In
      that case, use `(require 'dired+.el)', and use option
      `diredp-hide-details-propagate-flag' instead of option
      `dired-details-propagate-flag'.

> I report back if I can be more specific, it feels like there
> must be a package doing something.

Again, bisect your init file, to find out what you are doing
that causes the behavior you don't like.



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

* Re: dired-hide-details-mode have no effect suddenly
  2017-09-03 17:48 dired-hide-details-mode have no effect suddenly Tomas Nordin
  2017-09-03 18:04 ` Drew Adams
@ 2017-09-05 19:10 ` Charles A. Roelli
  2017-09-09 19:25   ` Tomas Nordin
  1 sibling, 1 reply; 15+ messages in thread
From: Charles A. Roelli @ 2017-09-05 19:10 UTC (permalink / raw)
  To: Tomas Nordin; +Cc: help-gnu-emacs

> From: Tomas Nordin <tomasn@posteo.net>
> Date: Sun, 03 Sep 2017 19:48:59 +0200
> Content-Type: text/plain
> 
> Hi List
> 
> Here is a problem I don't know how to reproduce. I have this in my
> .emacs:
> 
>     (add-hook 'dired-mode-hook 'dired-hide-details-mode)
> 
> and details are hidden by default, the way I like it. Sometimes I need
> to see some details and I use (default I think) the key ( to toggle
> visibility of details.
> 
> However, suddenly after some long time of keeping emacs alive, details
> are always shown and I cannot toggle it. I have been trying to detect at
> what moment this happens but I fail to understand what the interference
> is. At this point all I can think of is restarting emacs. Did somebody
> notice a similar problem?
> 
> Best regards
> --
> Tomas

I had the same issue once.  I had mistakenly added to the global value
of the variable 'font-lock-extra-managed-props' in some of my own code
for a buffer-local minor mode, instead of making the variable
buffer-local.  That resulted in dired-hide-details-mode breaking (and
a month's worth of confusion).



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

* Re: dired-hide-details-mode have no effect suddenly
  2017-09-05 19:10 ` Charles A. Roelli
@ 2017-09-09 19:25   ` Tomas Nordin
  2017-09-20 20:49     ` Tomas Nordin
  0 siblings, 1 reply; 15+ messages in thread
From: Tomas Nordin @ 2017-09-09 19:25 UTC (permalink / raw)
  To: Charles A. Roelli; +Cc: help-gnu-emacs

"Charles A. Roelli" <charles@aurox.ch> writes:

> I had the same issue once.  I had mistakenly added to the global value
> of the variable 'font-lock-extra-managed-props' in some of my own code
> for a buffer-local minor mode, instead of making the variable
> buffer-local.  That resulted in dired-hide-details-mode breaking (and
> a month's worth of confusion).

Ok, my value is nil of that variable in dired, will check it when I get
the problem next time, thanks. But I never touched that variable as far
as I am aware.




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

* RE: dired-hide-details-mode have no effect suddenly
  2017-09-03 19:37     ` Drew Adams
@ 2017-09-09 19:34       ` Tomas Nordin
  2017-09-09 22:48         ` Drew Adams
  0 siblings, 1 reply; 15+ messages in thread
From: Tomas Nordin @ 2017-09-09 19:34 UTC (permalink / raw)
  To: Drew Adams, help-gnu-emacs

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

> Then recursively bisect your init file to find the culprit.

I am sure this is a proper suggestion. It's just that the workflow would
look something like, comment out half, use Emacs to a point in time when
I feel the problem should have occurred (but it didn't occur),
un-comment half of the first commented half plus the first un-commented
half and repeat using Emacs to a point in time when I feel that the
problem should have occurred and so on. I mean, it's just a bit tricky
when the problem is seemingly intermittent. Like now for example, Emacs
has been running for a couple of days and details hide as expected.

Could there be some variables to check while it's working as expected
and then check again when it's not working as expected? Or something
like that.

--
Tomas



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

* RE: dired-hide-details-mode have no effect suddenly
  2017-09-09 19:34       ` Tomas Nordin
@ 2017-09-09 22:48         ` Drew Adams
  2017-09-12 20:40           ` Tomas Nordin
  0 siblings, 1 reply; 15+ messages in thread
From: Drew Adams @ 2017-09-09 22:48 UTC (permalink / raw)
  To: Tomas Nordin, help-gnu-emacs

> > Then recursively bisect your init file to find the culprit.
> 
> I am sure this is a proper suggestion. It's just that the workflow would
> look something like, comment out half, use Emacs to a point in time when
> I feel the problem should have occurred (but it didn't occur),
> un-comment half of the first commented half plus the first un-commented
> half and repeat using Emacs to a point in time when I feel that the
> problem should have occurred and so on. I mean, it's just a bit tricky
> when the problem is seemingly intermittent. Like now for example, Emacs
> has been running for a couple of days and details hide as expected.
> 
> Could there be some variables to check while it's working as expected
> and then check again when it's not working as expected? Or something
> like that.

`C-h f dired-hide-details TAB' shows you these variables:

dired-hide-details-hide-information-lines
dired-hide-details-hide-symlink-targets
dired-hide-details-mode
dired-hide-details-mode-hook

You might start with the last two, checking in your init
file, `custom-file', or other code you might load.

You can also put (debug-on-entry 'dired-hide-details-mode)
in your init file, to find out what code is calling it.
In the debugger, look at how it gets called, then use `c'
to skip debugging.  Use `M-x cancel-debug-on-entry RET'
to cancel such debugger entry.

But it's probably easier to just grep for `dired-hide-details'
in directories of customization and 3rd-party code you load.



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

* RE: dired-hide-details-mode have no effect suddenly
  2017-09-09 22:48         ` Drew Adams
@ 2017-09-12 20:40           ` Tomas Nordin
  0 siblings, 0 replies; 15+ messages in thread
From: Tomas Nordin @ 2017-09-12 20:40 UTC (permalink / raw)
  To: Drew Adams, help-gnu-emacs

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

> `C-h f dired-hide-details TAB' shows you these variables:
>
> dired-hide-details-hide-information-lines
> dired-hide-details-hide-symlink-targets
> dired-hide-details-mode
> dired-hide-details-mode-hook
>
> You might start with the last two, checking in your init
> file, `custom-file', or other code you might load.
>
> You can also put (debug-on-entry 'dired-hide-details-mode)
> in your init file, to find out what code is calling it.
> In the debugger, look at how it gets called, then use `c'
> to skip debugging.  Use `M-x cancel-debug-on-entry RET'
> to cancel such debugger entry.
>
> But it's probably easier to just grep for `dired-hide-details'
> in directories of customization and 3rd-party code you load.

Thanks for this suit of suggestions, I keep it in my back pocket. I
stored away the values of the variables (working condition), didn't grep
any results on `dired-hide-details' in my elpa directory.



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

* Re: dired-hide-details-mode have no effect suddenly
  2017-09-09 19:25   ` Tomas Nordin
@ 2017-09-20 20:49     ` Tomas Nordin
  2017-09-21 18:30       ` Charles A. Roelli
  0 siblings, 1 reply; 15+ messages in thread
From: Tomas Nordin @ 2017-09-20 20:49 UTC (permalink / raw)
  To: Charles A. Roelli; +Cc: help-gnu-emacs

Tomas Nordin <tomasn@posteo.net> writes:

> "Charles A. Roelli" <charles@aurox.ch> writes:
>
>> I had the same issue once.  I had mistakenly added to the global value
>> of the variable 'font-lock-extra-managed-props' in some of my own code
>> for a buffer-local minor mode, instead of making the variable
>> buffer-local.  That resulted in dired-hide-details-mode breaking (and
>> a month's worth of confusion).
>
> Ok, my value is nil of that variable in dired, will check it when I get
> the problem next time, thanks. But I never touched that variable as far
> as I am aware.

And now suddenly...

font-lock-extra-managed-props is a variable defined in ‘font-lock.el’.
Its value is (invisible composition)

... and problem is back. Who has changed it I don't know. I know that it
has happened around doing some magit.

Cool, resetting that variable to nil removes the problem. But still,
hmm, ehh.



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

* Re: dired-hide-details-mode have no effect suddenly
  2017-09-20 20:49     ` Tomas Nordin
@ 2017-09-21 18:30       ` Charles A. Roelli
  2017-09-21 19:10         ` Tomas Nordin
  0 siblings, 1 reply; 15+ messages in thread
From: Charles A. Roelli @ 2017-09-21 18:30 UTC (permalink / raw)
  To: Tomas Nordin; +Cc: help-gnu-emacs

> From: Tomas Nordin <tomasn@posteo.net>
> Cc: help-gnu-emacs@gnu.org
> Date: Wed, 20 Sep 2017 22:49:06 +0200
> 
> Tomas Nordin <tomasn@posteo.net> writes:
> 
> > "Charles A. Roelli" <charles@aurox.ch> writes:
> >
> >> I had the same issue once.  I had mistakenly added to the global value
> >> of the variable 'font-lock-extra-managed-props' in some of my own code
> >> for a buffer-local minor mode, instead of making the variable
> >> buffer-local.  That resulted in dired-hide-details-mode breaking (and
> >> a month's worth of confusion).
> >
> > Ok, my value is nil of that variable in dired, will check it when I get
> > the problem next time, thanks. But I never touched that variable as far
> > as I am aware.
> 
> And now suddenly...
> 
> font-lock-extra-managed-props is a variable defined in ‘font-lock.el’.
> Its value is (invisible composition)
> 
> ... and problem is back. Who has changed it I don't know. I know that it
> has happened around doing some magit.
> 
> Cool, resetting that variable to nil removes the problem. But still,
> hmm, ehh.

Neat.  Does M-x rgrep font-lock-extra-managed-props RET * RET
~/.emacs.d/elpa/ show anything interesting?



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

* Re: dired-hide-details-mode have no effect suddenly
  2017-09-21 18:30       ` Charles A. Roelli
@ 2017-09-21 19:10         ` Tomas Nordin
  2017-09-21 19:20           ` Tomas Nordin
  0 siblings, 1 reply; 15+ messages in thread
From: Tomas Nordin @ 2017-09-21 19:10 UTC (permalink / raw)
  To: Charles A. Roelli; +Cc: help-gnu-emacs

"Charles A. Roelli" <charles@aurox.ch> writes:

>> font-lock-extra-managed-props is a variable defined in ‘font-lock.el’.
>> Its value is (invisible composition)
>> 
>> ... and problem is back. Who has changed it I don't know. I know that it
>> has happened around doing some magit.
>> 
>> Cool, resetting that variable to nil removes the problem. But still,
>> hmm, ehh.
>
> Neat.  Does M-x rgrep font-lock-extra-managed-props RET * RET
> ~/.emacs.d/elpa/ show anything interesting?

Yes, three. I think the relevant two are those:

./markdown-mode-20170610.602/markdown-mode.el:7783:  (add-to-list 'font-lock-extra-managed-props 'composition)
./markdown-mode-20170610.602/markdown-mode.el:7789:  (add-to-list 'font-lock-extra-managed-props 'invisible)




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

* Re: dired-hide-details-mode have no effect suddenly
  2017-09-21 19:10         ` Tomas Nordin
@ 2017-09-21 19:20           ` Tomas Nordin
  2017-09-23  9:43             ` Charles A. Roelli
  0 siblings, 1 reply; 15+ messages in thread
From: Tomas Nordin @ 2017-09-21 19:20 UTC (permalink / raw)
  To: Charles A. Roelli; +Cc: help-gnu-emacs

Tomas Nordin <tomasn@posteo.net> writes:

> "Charles A. Roelli" <charles@aurox.ch> writes:
>
>>> font-lock-extra-managed-props is a variable defined in ‘font-lock.el’.
>>> Its value is (invisible composition)
>>> 
>>> ... and problem is back. Who has changed it I don't know. I know that it
>>> has happened around doing some magit.
>>> 
>>> Cool, resetting that variable to nil removes the problem. But still,
>>> hmm, ehh.
>>
>> Neat.  Does M-x rgrep font-lock-extra-managed-props RET * RET
>> ~/.emacs.d/elpa/ show anything interesting?
>
> Yes, three. I think the relevant two are those:
>
> ./markdown-mode-20170610.602/markdown-mode.el:7783:  (add-to-list 'font-lock-extra-managed-props 'composition)
> ./markdown-mode-20170610.602/markdown-mode.el:7789:  (add-to-list 'font-lock-extra-managed-props 'invisible)

I have updated that package and now those variables are manipulated like this:

(setq-local font-lock-extra-managed-props
              (append font-lock-extra-managed-props
                      '(composition display invisible)))

Is this a more proper way to do it? :)



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

* Re: dired-hide-details-mode have no effect suddenly
  2017-09-21 19:20           ` Tomas Nordin
@ 2017-09-23  9:43             ` Charles A. Roelli
  2017-09-24 15:49               ` Tomas Nordin
  0 siblings, 1 reply; 15+ messages in thread
From: Charles A. Roelli @ 2017-09-23  9:43 UTC (permalink / raw)
  To: Tomas Nordin; +Cc: help-gnu-emacs

> From: Tomas Nordin <tomasn@posteo.net>
> Date: Thu, 21 Sep 2017 21:20:36 +0200
> 
> Tomas Nordin <tomasn@posteo.net> writes:
> 
> > "Charles A. Roelli" <charles@aurox.ch> writes:
> >
> >>> font-lock-extra-managed-props is a variable defined in ‘font-lock.el’.
> >>> Its value is (invisible composition)
> >>> 
> >>> ... and problem is back. Who has changed it I don't know. I know that it
> >>> has happened around doing some magit.
> >>> 
> >>> Cool, resetting that variable to nil removes the problem. But still,
> >>> hmm, ehh.
> >>
> >> Neat.  Does M-x rgrep font-lock-extra-managed-props RET * RET
> >> ~/.emacs.d/elpa/ show anything interesting?
> >
> > Yes, three. I think the relevant two are those:
> >
> > ./markdown-mode-20170610.602/markdown-mode.el:7783:  (add-to-list 'font-lock-extra-managed-props 'composition)
> > ./markdown-mode-20170610.602/markdown-mode.el:7789:  (add-to-list 'font-lock-extra-managed-props 'invisible)
> 
> I have updated that package and now those variables are manipulated like this:
> 
> (setq-local font-lock-extra-managed-props
>               (append font-lock-extra-managed-props
>                       '(composition display invisible)))
> 
> Is this a more proper way to do it? :)

Aha, perfect.  I guess I'm not the only one who learned that lesson
the hard way.



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

* Re: dired-hide-details-mode have no effect suddenly
  2017-09-23  9:43             ` Charles A. Roelli
@ 2017-09-24 15:49               ` Tomas Nordin
  0 siblings, 0 replies; 15+ messages in thread
From: Tomas Nordin @ 2017-09-24 15:49 UTC (permalink / raw)
  To: Charles A. Roelli; +Cc: help-gnu-emacs


> Aha, perfect.  I guess I'm not the only one who learned that lesson
> the hard way.

Yes, perfect and yes, I guess not too. Let's try to summarize the
lesson:

If there is a problem with dired-hide-details-mode and you happen to use
markdown-mode, make sure you have the latest version of markdown-mode,
it has improved its way of handling `font-lock-extra-managed-props`.



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

end of thread, other threads:[~2017-09-24 15:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-03 17:48 dired-hide-details-mode have no effect suddenly Tomas Nordin
2017-09-03 18:04 ` Drew Adams
2017-09-03 18:52   ` Tomas Nordin
2017-09-03 19:37     ` Drew Adams
2017-09-09 19:34       ` Tomas Nordin
2017-09-09 22:48         ` Drew Adams
2017-09-12 20:40           ` Tomas Nordin
2017-09-05 19:10 ` Charles A. Roelli
2017-09-09 19:25   ` Tomas Nordin
2017-09-20 20:49     ` Tomas Nordin
2017-09-21 18:30       ` Charles A. Roelli
2017-09-21 19:10         ` Tomas Nordin
2017-09-21 19:20           ` Tomas Nordin
2017-09-23  9:43             ` Charles A. Roelli
2017-09-24 15:49               ` Tomas Nordin

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.