all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#48666: Leaks are still possible in hook--depth-alist
@ 2021-05-26  8:57 jakanakaevangeli
  2022-02-22 15:25 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 3+ messages in thread
From: jakanakaevangeli @ 2021-05-26  8:57 UTC (permalink / raw)
  To: 48666; +Cc: Stefan Monnier


    (with-temp-buffer
      (add-hook 'post-command-hook (make-symbol "fun-sym") 77 t))
    (get 'post-command-hook 'hook--depth-alist)

Perhaps hook--depth-alist could be a hash table with weak keys.

Best regards.





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

* bug#48666: Leaks are still possible in hook--depth-alist
  2021-05-26  8:57 bug#48666: Leaks are still possible in hook--depth-alist jakanakaevangeli
@ 2022-02-22 15:25 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-07-15 10:40   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-02-22 15:25 UTC (permalink / raw)
  To: jakanakaevangeli; +Cc: 48666, Daniel Mendler

jakanakaevangeli@chiru.no [2021-05-26 10:57:47] wrote:
>     (with-temp-buffer
>       (add-hook 'post-command-hook (make-symbol "fun-sym") 77 t))
>     (get 'post-command-hook 'hook--depth-alist)
> Perhaps hook--depth-alist could be a hash table with weak keys.

I just pushed to `master` a patch which should hopefully fix this
problem for good (basically, the depth alist is now kept in an(other)
variable (so for functions added to the buffer-local portion of the
hook, the depth is stored in the buffer-local portion of the depth
variable)).

I hope it will also fix the problems seen in
https://github.com/minad/corfu/issues/133

It makes it a bit harder to check if the old problem is still present or
not, OTOH, because the depth-alist isn't just a quick (get <hook>
'hook--depth-alist) away but you need to (symbol-value (get <hook>
'hook--depth-alist)) and that will only show you the global portion or
the portion relevant to the current buffer.


        Stefan






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

* bug#48666: Leaks are still possible in hook--depth-alist
  2022-02-22 15:25 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-07-15 10:40   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2022-07-15 10:40 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 48666, jakanakaevangeli, Daniel Mendler

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I just pushed to `master` a patch which should hopefully fix this
> problem for good (basically, the depth alist is now kept in an(other)
> variable (so for functions added to the buffer-local portion of the
> hook, the depth is stored in the buffer-local portion of the depth
> variable)).

This was several months ago, so presumably Stefan's change fixed this
issue, and I'm therefore closing this bug report.  If the issue is still
present, please respond to the debbugs address and we'll reopen.

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





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

end of thread, other threads:[~2022-07-15 10:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-26  8:57 bug#48666: Leaks are still possible in hook--depth-alist jakanakaevangeli
2022-02-22 15:25 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-15 10:40   ` Lars Ingebrigtsen

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.