all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Gnus nnmh problems revisited (with fix)
@ 2021-03-10 13:08 Barry Fishman
  2021-03-10 13:39 ` RETRACT " Barry Fishman
  2021-03-11  6:15 ` Gnus nnmh problems revisited (with fix) Stefan Monnier
  0 siblings, 2 replies; 7+ messages in thread
From: Barry Fishman @ 2021-03-10 13:08 UTC (permalink / raw)
  To: emacs-devel

My issue with nnmh groups marking all messages as unread seems related to
the lexical scope changes.

When I added to my setup:

(defvar nnmh-newsgroup-articles nil "Don't be lexical")

The problems which I localized to nnmh-update-gnus-unreads went away.
I never got e-debug to follow into deffoo's.

And I never discovered why simple setups worked.

--
Barry Fishman




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

* RETRACT Gnus nnmh problems revisited (with fix)
  2021-03-10 13:08 Gnus nnmh problems revisited (with fix) Barry Fishman
@ 2021-03-10 13:39 ` Barry Fishman
  2021-03-10 15:46   ` Barry Fishman
  2021-03-10 15:56   ` Barry Fishman
  2021-03-11  6:15 ` Gnus nnmh problems revisited (with fix) Stefan Monnier
  1 sibling, 2 replies; 7+ messages in thread
From: Barry Fishman @ 2021-03-10 13:39 UTC (permalink / raw)
  To: emacs-devel

On 2021-03-10 08:08:18 -05, Barry Fishman wrote:
> My issue with nnmh groups marking all messages as unread seems related to
> the lexical scope changes.
>
> When I added to my setup:
>
> (defvar nnmh-newsgroup-articles nil "Don't be lexical")
>
> The problems which I localized to nnmh-update-gnus-unreads went away.
> I never got e-debug to follow into deffoo's.
>
> And I never discovered why simple setups worked.

I was too optimistic. The fix did not work after a restart.  It seems
to be an issue in gnus-list-of-unread-articles but debug skills are poor
and I can't seem to step my way into the nnmh code.

--
Barry Fishman




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

* Re: RETRACT Gnus nnmh problems revisited (with fix)
  2021-03-10 13:39 ` RETRACT " Barry Fishman
@ 2021-03-10 15:46   ` Barry Fishman
  2021-03-10 15:56   ` Barry Fishman
  1 sibling, 0 replies; 7+ messages in thread
From: Barry Fishman @ 2021-03-10 15:46 UTC (permalink / raw)
  To: emacs-devel


On 2021-03-10 08:39:11 -05, Barry Fishman wrote:
> On 2021-03-10 08:08:18 -05, Barry Fishman wrote:
>> My issue with nnmh groups marking all messages as unread seems related to
>> the lexical scope changes.
>>
>> When I added to my setup:
>>
>> (defvar nnmh-newsgroup-articles nil "Don't be lexical")
>>
>> The problems which I localized to nnmh-update-gnus-unreads went away.
>> I never got e-debug to follow into deffoo's.
>>
>> And I never discovered why simple setups worked.
>
> I was too optimistic. The fix did not work after a restart.  It seems
> to be an issue in gnus-list-of-unread-articles but debug skills are poor
> and I can't seem to step my way into the nnmh code.

The fix only works if I set up e-debug on nnmh-update-gnus-unreads and
then just go when the breakpoint happens. ???

Is there some magic in defvoo I need?  A compile issue?

--
Barry Fishman




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

* Re: RETRACT Gnus nnmh problems revisited (with fix)
  2021-03-10 13:39 ` RETRACT " Barry Fishman
  2021-03-10 15:46   ` Barry Fishman
@ 2021-03-10 15:56   ` Barry Fishman
  2021-03-10 18:51     ` Matt Armstrong
  1 sibling, 1 reply; 7+ messages in thread
From: Barry Fishman @ 2021-03-10 15:56 UTC (permalink / raw)
  To: emacs-devel


On 2021-03-10 08:39:11 -05, Barry Fishman wrote:
> On 2021-03-10 08:08:18 -05, Barry Fishman wrote:
>> My issue with nnmh groups marking all messages as unread seems related to
>> the lexical scope changes.
>>
>> When I added to my setup:
>>
>> (defvar nnmh-newsgroup-articles nil "Don't be lexical")
>>
>> The problems which I localized to nnmh-update-gnus-unreads went away.
>> I never got e-debug to follow into deffoo's.
>>
>> And I never discovered why simple setups worked.
>
> I was too optimistic. The fix did not work after a restart.  It seems
> to be an issue in gnus-list-of-unread-articles but debug skills are poor
> and I can't seem to step my way into the nnmh code.

The fix does work when I setup e-debug on nnmh-update-gnus-unreads, and
just go when I hit the breakpoint.

Am I missing some defvoo magic?  Is this a compile issue?

--
Barry Fishman




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

* Re: RETRACT Gnus nnmh problems revisited (with fix)
  2021-03-10 15:56   ` Barry Fishman
@ 2021-03-10 18:51     ` Matt Armstrong
  2021-03-10 20:31       ` UNRETRACTING Gnus nnmh problems fix Barry Fishman
  0 siblings, 1 reply; 7+ messages in thread
From: Matt Armstrong @ 2021-03-10 18:51 UTC (permalink / raw)
  To: Barry Fishman, emacs-devel

Barry Fishman <barry@ecubist.org> writes:

> On 2021-03-10 08:39:11 -05, Barry Fishman wrote:
> The fix does work when I setup e-debug on nnmh-update-gnus-unreads, and
> just go when I hit the breakpoint.
>
> Am I missing some defvoo magic?  Is this a compile issue?

It sounds like you have modified the `nnmh-update-gnus-unreads' function
but are not seeing the effect until you "e-debug" it, especially after
re-starting Emacs.  Is that a correct description?

If that is the case, the simplest explanation is that the .el file is
newer than its corresponding .elc file (compiled elisp), probably
present in the same directory.  Emacs, by default, will load the older
.elc file anyway.  Emacs probably issued a warning about this when the
.elc was loaded (check your *Messages* buffer).

If that is the case, a simple `eval-defun' (by default, bound to C-M-x
and works while point is within the function) would cure it too.  It is
probaly not related to edebug, but instead re-evaluating the function
definition.

To compile the .el file, try:

  M-x byte-compile-file

After that, you should be able to restart Emacs and see the expected
effect of your edits.

See this for a lot more information:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Byte-Compilation.html#Byte-Compilation



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

* UNRETRACTING Gnus nnmh problems fix
  2021-03-10 18:51     ` Matt Armstrong
@ 2021-03-10 20:31       ` Barry Fishman
  0 siblings, 0 replies; 7+ messages in thread
From: Barry Fishman @ 2021-03-10 20:31 UTC (permalink / raw)
  To: emacs-devel


On 2021-03-10 10:51:08 -08, Matt Armstrong wrote:
> Barry Fishman <barry@ecubist.org> writes:
>
>> On 2021-03-10 08:39:11 -05, Barry Fishman wrote:
>> The fix does work when I setup e-debug on nnmh-update-gnus-unreads, and
>> just go when I hit the breakpoint.
>>
>> Am I missing some defvoo magic?  Is this a compile issue?
>
> It sounds like you have modified the `nnmh-update-gnus-unreads' function
> but are not seeing the effect until you "e-debug" it, especially after
> re-starting Emacs.  Is that a correct description?

Yes.  It later dawned on me that although the defvar on
nnmh-newsgroup-articles stopped it form being lexical, it would
not do anything until I recompiled the function using it. [Ouch!]

So I ask that the fix be implemented in nnmh.el.

--
Barry FIshman




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

* Re: Gnus nnmh problems revisited (with fix)
  2021-03-10 13:08 Gnus nnmh problems revisited (with fix) Barry Fishman
  2021-03-10 13:39 ` RETRACT " Barry Fishman
@ 2021-03-11  6:15 ` Stefan Monnier
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2021-03-11  6:15 UTC (permalink / raw)
  To: Barry Fishman; +Cc: emacs-devel

> My issue with nnmh groups marking all messages as unread seems related to
> the lexical scope changes.
> When I added to my setup:
> (defvar nnmh-newsgroup-articles nil "Don't be lexical")
> The problems which I localized to nnmh-update-gnus-unreads went away.

Thanks for your report.  I believe I've fixed the problem in the `master` branch.
And thanks for tracking down the `nnmh-update-gnus-unreads` defvar that
was needed, it saved me a lot of trouble.


        Stefan




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

end of thread, other threads:[~2021-03-11  6:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-10 13:08 Gnus nnmh problems revisited (with fix) Barry Fishman
2021-03-10 13:39 ` RETRACT " Barry Fishman
2021-03-10 15:46   ` Barry Fishman
2021-03-10 15:56   ` Barry Fishman
2021-03-10 18:51     ` Matt Armstrong
2021-03-10 20:31       ` UNRETRACTING Gnus nnmh problems fix Barry Fishman
2021-03-11  6:15 ` Gnus nnmh problems revisited (with fix) Stefan Monnier

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.