* Re: [elpa] externals/debbugs b8c84dbe4b: Improve needed advice
[not found] ` <20240912143335.15DACC41F2A@vcs2.savannah.gnu.org>
@ 2024-09-12 19:52 ` Stefan Monnier
2024-09-13 7:16 ` Michael Albinus
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2024-09-12 19:52 UTC (permalink / raw)
To: Michael Albinus; +Cc: emacs-devel
Hi Michael,
> +(defvar debbugs-compat-url-http-attempt-keepalives nil
> + "Temporary storage for `'.")
> +(defun debbugs-compat-add-debbugs-advice ()
> + (with-no-warnings
> + (setq debbugs-compat-url-http-attempt-keepalives
> + url-http-attempt-keepalives))
> + (advice-add
> + 'url-http-create-request :around
> + (lambda (orig-fun)
> + "Set `url-http-attempt-keepalives' to nil."
> + (with-no-warnings (setq url-http-attempt-keepalives nil))
> + (funcall orig-fun))
> + '(name debbugs-advice)))
> +
> +(defun debbugs-compat-remove-debbugs-advice ()
> + (advice-remove 'url-http-create-request 'debbugs-advice)
> + (with-no-warnings
> + (setq url-http-attempt-keepalives
> + debbugs-compat-url-http-attempt-keepalives)))
[...]
> +(defun debbugs-soap-invoke (operation-name &rest parameters)
> + "Invoke the SOAP connection.
> +OPERATION-NAME and PARAMETERS are as described in `soap-invoke'."
> + (debbugs-compat-add-debbugs-advice)
> + (prog1
> + (apply #'soap-invoke operation-name parameters)
> + (debbugs-compat-remove-debbugs-advice)))
I wonder you're doing it this way instead of the "more obvious":
(defun debbugs-soap-invoke (operation-name &rest parameters)
"Invoke the SOAP connection.
OPERATION-NAME and PARAMETERS are as described in `soap-invoke'."
(let ((url-http-attempt-keepalives nil))
(apply #'soap-invoke operation-name parameters)))
- Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [elpa] externals/debbugs b8c84dbe4b: Improve needed advice
2024-09-12 19:52 ` [elpa] externals/debbugs b8c84dbe4b: Improve needed advice Stefan Monnier
@ 2024-09-13 7:16 ` Michael Albinus
2024-09-13 14:23 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Michael Albinus @ 2024-09-13 7:16 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Hi Michael,
Hi Stefan,
>> +(defun debbugs-soap-invoke (operation-name &rest parameters)
>> + "Invoke the SOAP connection.
>> +OPERATION-NAME and PARAMETERS are as described in `soap-invoke'."
>> + (debbugs-compat-add-debbugs-advice)
>> + (prog1
>> + (apply #'soap-invoke operation-name parameters)
>> + (debbugs-compat-remove-debbugs-advice)))
>
> I wonder you're doing it this way instead of the "more obvious":
>
> (defun debbugs-soap-invoke (operation-name &rest parameters)
> "Invoke the SOAP connection.
> OPERATION-NAME and PARAMETERS are as described in `soap-invoke'."
> (let ((url-http-attempt-keepalives nil))
> (apply #'soap-invoke operation-name parameters)))
Because it doesn't work?
soap-invoke-internal binds url-http-attempt-keepalives to t, which is a
problem in a threaded function. See comment in debbugs-compat.el. See
also bug#73199 for the resulting error.
> - Stefan
Best regards, Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [elpa] externals/debbugs b8c84dbe4b: Improve needed advice
2024-09-13 7:16 ` Michael Albinus
@ 2024-09-13 14:23 ` Stefan Monnier
2024-09-13 15:51 ` Michael Albinus
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2024-09-13 14:23 UTC (permalink / raw)
To: Michael Albinus; +Cc: emacs-devel
>> I wonder you're doing it this way instead of the "more obvious":
>>
>> (defun debbugs-soap-invoke (operation-name &rest parameters)
>> "Invoke the SOAP connection.
>> OPERATION-NAME and PARAMETERS are as described in `soap-invoke'."
>> (let ((url-http-attempt-keepalives nil))
>> (apply #'soap-invoke operation-name parameters)))
>
> Because it doesn't work?
🙂
> soap-invoke-internal binds url-http-attempt-keepalives to t, which is a
> problem in a threaded function. See comment in debbugs-compat.el. See
> also bug#73199 for the resulting error.
Hmm... IIUC the problem fundamentally is in `url-http.el`, right?
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [elpa] externals/debbugs b8c84dbe4b: Improve needed advice
2024-09-13 14:23 ` Stefan Monnier
@ 2024-09-13 15:51 ` Michael Albinus
0 siblings, 0 replies; 4+ messages in thread
From: Michael Albinus @ 2024-09-13 15:51 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
Hi Stefan,
>> soap-invoke-internal binds url-http-attempt-keepalives to t, which is a
>> problem in a threaded function. See comment in debbugs-compat.el. See
>> also bug#73199 for the resulting error.
>
> Hmm... IIUC the problem fundamentally is in `url-http.el`, right?
Yes. In bug#73199 I've focused on soap-client.el, because a general
solution in url-http.el seems to be expensive. But if it is possible in
url-http.el, it might be preferable.
> Stefan
Best regards, Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-09-13 15:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <172615161464.14411.6152144440040360858@vcs2.savannah.gnu.org>
[not found] ` <20240912143335.15DACC41F2A@vcs2.savannah.gnu.org>
2024-09-12 19:52 ` [elpa] externals/debbugs b8c84dbe4b: Improve needed advice Stefan Monnier
2024-09-13 7:16 ` Michael Albinus
2024-09-13 14:23 ` Stefan Monnier
2024-09-13 15:51 ` Michael Albinus
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.