unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Help Debugging Change In Behavior (Last 30 Days)
@ 2023-06-27 14:46 T.V Raman
  2023-06-27 15:37 ` T.V Raman
  2023-06-27 15:40 ` Mattias Engdegård
  0 siblings, 2 replies; 5+ messages in thread
From: T.V Raman @ 2023-06-27 14:46 UTC (permalink / raw)
  To: emacs-devel

I have a fairly complex  piece of code at
https://github.com/tvraman/emacspeak/blob/master/lisp/emacspeak-google.el#L475
that generates a bunch of functions.

The code works correctly in Emacs 30 built on May 25,2023 but bombs
with a hard to explain error in Emacs 30 built on June 25.

The backtrace is hard to understand, and staring at the code after
macroexpand-all didn't help.

Here is what the backtrace looks like --- did something change in
Emacs in the last 30  days  that might explain this?

Debugger entered--Lisp error: (void-function \(setf\ funcall\))
  (\(setf\ funcall\) (completing-read "Set tool to: " range) v v)
  (let* ((v #'(lambda (cl-x) (progn (or (funcall ... cl-x) (signal ... ...)) (aref cl-x 5)))) (v tool)) (\(setf\ funcall\) (completing-read "Set tool to: " range) v v))
  (setf (emacspeak-google-tool-value tool) (completing-read "Set tool to: " range))
  (cond ((and (listp range) (= 2 (length range))) (setf (emacspeak-google-tool-value tool) (if (equal value (cl-first range)) (cl-second range) (cl-first range)))) ((listp range) (setf (emacspeak-google-tool-value tool) (completing-read "Set tool to: " range))) ((stringp range) (setf (emacspeak-google-tool-value tool) (read-from-minibuffer range))) (t (error "Unexpected type!")))
  (let* ((belt (emacspeak-google-toolbelt)) (tool (cl-find-if #'(lambda (tool) (string= (emacspeak-google-tool-name tool) "date-filter")) belt)) (param (emacspeak-google-tool-param tool)) (value (emacspeak-google-tool-value tool)) (range (emacspeak-google-tool-range tool))) (cond ((and (listp range) (= 2 (length range))) (setf (emacspeak-google-tool-value tool) (if (equal value (cl-first range)) (cl-second range) (cl-first range)))) ((listp range) (setf (emacspeak-google-tool-value tool) (completing-read "Set tool to: " range))) ((stringp range) (setf (emacspeak-google-tool-value tool) (read-from-minibuffer range))) (t (error "Unexpected type!"))) (let ((emacspeak-websearch-google-options (concat (emacspeak-google-toolbelt-to-tbs belt) (emacspeak-google-toolbelt-to-tbm belt)))) (emacspeak-google-cache-toolbelt belt) (emacspeak-websearch-google (or emacspeak-google-query (gweb-google-autocomplete)))))
  (emacspeak-google-toolbelt-change-date-filter)
  (#<subr funcall-interactively> emacspeak-google-toolbelt-change-date-filter)
  (apply #<subr funcall-interactively> emacspeak-google-toolbelt-change-date-filter nil)
  (ad-Advice-funcall-interactively #<subr funcall-interactively> emacspeak-google-toolbelt-change-date-filter)
  (apply ad-Advice-funcall-interactively #<subr funcall-interactively> emacspeak-google-toolbelt-change-date-filter)
  (funcall-interactively emacspeak-google-toolbelt-change-date-filter)
  (#<subr call-interactively> emacspeak-google-toolbelt-change-date-filter)
  (apply #<subr call-interactively> emacspeak-google-toolbelt-change-date-filter nil)
  (call-interactively@ido-cr+-record-current-command #<subr call-interactively> emacspeak-google-toolbelt-change-date-filter)
  (apply call-interactively@ido-cr+-record-current-command #<subr call-interactively> emacspeak-google-toolbelt-change-date-filter)
  (call-interactively emacspeak-google-toolbelt-change-date-filter)
  (emacspeak-google-toolbelt-change)
  (emacspeak-websearch-accessible-google "emacspeak" use-toolbelt)
  (emacspeak-websearch-google-with-toolbelt "emacspeak")
  (#<subr funcall-interactively> emacspeak-websearch-google-with-toolbelt "emacspeak")
  (apply #<subr funcall-interactively> emacspeak-websearch-google-with-toolbelt "emacspeak")
  (ad-Advice-funcall-interactively #<subr funcall-interactively> emacspeak-websearch-google-with-toolbelt "emacspeak")
  (apply ad-Advice-funcall-interactively #<subr funcall-interactively> (emacspeak-websearch-google-with-toolbelt "emacspeak"))
  (funcall-interactively emacspeak-websearch-google-with-toolbelt "emacspeak")
  (#<subr call-interactively> emacspeak-websearch-google-with-toolbelt)
  (apply #<subr call-interactively> emacspeak-websearch-google-with-toolbelt nil)
  (call-interactively@ido-cr+-record-current-command #<subr call-interactively> emacspeak-websearch-google-with-toolbelt)
  (apply call-interactively@ido-cr+-record-current-command #<subr call-interactively> emacspeak-websearch-google-with-toolbelt)
  (call-interactively emacspeak-websearch-google-with-toolbelt)
  (emacspeak-websearch-dispatch)
  (#<subr funcall-interactively> emacspeak-websearch-dispatch)
  (apply #<subr funcall-interactively> emacspeak-websearch-dispatch nil)
  (ad-Advice-funcall-interactively #<subr funcall-interactively> emacspeak-websearch-dispatch)
  (apply ad-Advice-funcall-interactively #<subr funcall-interactively> emacspeak-websearch-dispatch)
  (funcall-interactively emacspeak-websearch-dispatch)
  (#<subr call-interactively> emacspeak-websearch-dispatch nil nil)
  (apply #<subr call-interactively> emacspeak-websearch-dispatch (nil nil))
  (call-interactively@ido-cr+-record-current-command #<subr call-interactively> emacspeak-websearch-dispatch nil nil)
  (apply call-interactively@ido-cr+-record-current-command #<subr call-interactively> (emacspeak-websearch-dispatch nil nil))
  (call-interactively emacspeak-websearch-dispatch nil nil)
  (command-execute emacspeak-websearch-dispatch)

-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮

--

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮

--

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮



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

* Re: Help Debugging Change In Behavior (Last 30 Days)
  2023-06-27 14:46 T.V Raman
@ 2023-06-27 15:37 ` T.V Raman
  2023-06-27 15:40 ` Mattias Engdegård
  1 sibling, 0 replies; 5+ messages in thread
From: T.V Raman @ 2023-06-27 15:37 UTC (permalink / raw)
  To: emacs-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 6128 bytes --]

"T.V Raman" <raman@google.com> writes:


Answering my own question:

There may be a subtle bug that has crept in in setf --

In my code, I changed the
(setf (struct-slot-access-form val)
by introducing a local var slot, and then using it

 (setq slot val)
(setf (struct-slot-access-form) slot)

and that fixed the issue> I have a fairly complex  piece of code at
> https://github.com/tvraman/emacspeak/blob/master/lisp/emacspeak-google.el#L475
> that generates a bunch of functions.
>
> The code works correctly in Emacs 30 built on May 25,2023 but bombs
> with a hard to explain error in Emacs 30 built on June 25.
>
> The backtrace is hard to understand, and staring at the code after
> macroexpand-all didn't help.
>
> Here is what the backtrace looks like --- did something change in
> Emacs in the last 30  days  that might explain this?
>
> Debugger entered--Lisp error: (void-function \(setf\ funcall\))
>   (\(setf\ funcall\) (completing-read "Set tool to: " range) v v)
>   (let* ((v #'(lambda (cl-x) (progn (or (funcall ... cl-x) (signal
> ... ...)) (aref cl-x 5)))) (v tool)) (\(setf\ funcall\)
> (completing-read "Set tool to: " range) v v))
>   (setf (emacspeak-google-tool-value tool) (completing-read "Set tool to: " range))
>   (cond ((and (listp range) (= 2 (length range))) (setf
> (emacspeak-google-tool-value tool) (if (equal value (cl-first range))
> (cl-second range) (cl-first range)))) ((listp range) (setf
> (emacspeak-google-tool-value tool) (completing-read "Set tool to: "
> range))) ((stringp range) (setf (emacspeak-google-tool-value tool)
> (read-from-minibuffer range))) (t (error "Unexpected type!")))
>   (let* ((belt (emacspeak-google-toolbelt)) (tool (cl-find-if
> #'(lambda (tool) (string= (emacspeak-google-tool-name tool)
> "date-filter")) belt)) (param (emacspeak-google-tool-param tool))
> (value (emacspeak-google-tool-value tool)) (range
> (emacspeak-google-tool-range tool))) (cond ((and (listp range) (= 2
> (length range))) (setf (emacspeak-google-tool-value tool) (if (equal
> value (cl-first range)) (cl-second range) (cl-first range)))) ((listp
> range) (setf (emacspeak-google-tool-value tool) (completing-read "Set
> tool to: " range))) ((stringp range) (setf
> (emacspeak-google-tool-value tool) (read-from-minibuffer range))) (t
> (error "Unexpected type!"))) (let ((emacspeak-websearch-google-options
> (concat (emacspeak-google-toolbelt-to-tbs belt)
> (emacspeak-google-toolbelt-to-tbm belt))))
> (emacspeak-google-cache-toolbelt belt) (emacspeak-websearch-google (or
> emacspeak-google-query (gweb-google-autocomplete)))))
>   (emacspeak-google-toolbelt-change-date-filter)
>   (#<subr funcall-interactively> emacspeak-google-toolbelt-change-date-filter)
>   (apply #<subr funcall-interactively> emacspeak-google-toolbelt-change-date-filter nil)
>   (ad-Advice-funcall-interactively #<subr funcall-interactively> emacspeak-google-toolbelt-change-date-filter)
>   (apply ad-Advice-funcall-interactively #<subr funcall-interactively> emacspeak-google-toolbelt-change-date-filter)
>   (funcall-interactively emacspeak-google-toolbelt-change-date-filter)
>   (#<subr call-interactively> emacspeak-google-toolbelt-change-date-filter)
>   (apply #<subr call-interactively> emacspeak-google-toolbelt-change-date-filter nil)
>   (call-interactively@ido-cr+-record-current-command #<subr call-interactively> emacspeak-google-toolbelt-change-date-filter)
>   (apply call-interactively@ido-cr+-record-current-command #<subr
> call-interactively> emacspeak-google-toolbelt-change-date-filter)
>   (call-interactively emacspeak-google-toolbelt-change-date-filter)
>   (emacspeak-google-toolbelt-change)
>   (emacspeak-websearch-accessible-google "emacspeak" use-toolbelt)
>   (emacspeak-websearch-google-with-toolbelt "emacspeak")
>   (#<subr funcall-interactively> emacspeak-websearch-google-with-toolbelt "emacspeak")
>   (apply #<subr funcall-interactively> emacspeak-websearch-google-with-toolbelt "emacspeak")
>   (ad-Advice-funcall-interactively #<subr funcall-interactively> emacspeak-websearch-google-with-toolbelt "emacspeak")
>   (apply ad-Advice-funcall-interactively #<subr funcall-interactively> (emacspeak-websearch-google-with-toolbelt "emacspeak"))
>   (funcall-interactively emacspeak-websearch-google-with-toolbelt "emacspeak")
>   (#<subr call-interactively> emacspeak-websearch-google-with-toolbelt)
>   (apply #<subr call-interactively> emacspeak-websearch-google-with-toolbelt nil)
>   (call-interactively@ido-cr+-record-current-command #<subr call-interactively> emacspeak-websearch-google-with-toolbelt)
>   (apply call-interactively@ido-cr+-record-current-command #<subr call-interactively> emacspeak-websearch-google-with-toolbelt)
>   (call-interactively emacspeak-websearch-google-with-toolbelt)
>   (emacspeak-websearch-dispatch)
>   (#<subr funcall-interactively> emacspeak-websearch-dispatch)
>   (apply #<subr funcall-interactively> emacspeak-websearch-dispatch nil)
>   (ad-Advice-funcall-interactively #<subr funcall-interactively> emacspeak-websearch-dispatch)
>   (apply ad-Advice-funcall-interactively #<subr funcall-interactively> emacspeak-websearch-dispatch)
>   (funcall-interactively emacspeak-websearch-dispatch)
>   (#<subr call-interactively> emacspeak-websearch-dispatch nil nil)
>   (apply #<subr call-interactively> emacspeak-websearch-dispatch (nil nil))
>   (call-interactively@ido-cr+-record-current-command #<subr call-interactively> emacspeak-websearch-dispatch nil nil)
>   (apply call-interactively@ido-cr+-record-current-command #<subr call-interactively> (emacspeak-websearch-dispatch nil nil))
>   (call-interactively emacspeak-websearch-dispatch nil nil)
>   (command-execute emacspeak-websearch-dispatch)
>
> -- 
>
> Thanks,
>
> --Raman(I Search, I Find, I Misplace, I Research)
> 7©4 Id: kg:/m/0285kf1  •0Ü8
>
> -- 
>
> Thanks,
>
> --Raman(I Search, I Find, I Misplace, I Research)
> 7©4 Id: kg:/m/0285kf1  •0Ü8

-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
7©4 Id: kg:/m/0285kf1  •0Ü8



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

* Re: Help Debugging Change In Behavior (Last 30 Days)
  2023-06-27 14:46 T.V Raman
  2023-06-27 15:37 ` T.V Raman
@ 2023-06-27 15:40 ` Mattias Engdegård
  1 sibling, 0 replies; 5+ messages in thread
From: Mattias Engdegård @ 2023-06-27 15:40 UTC (permalink / raw)
  To: T.V Raman; +Cc: emacs-devel

27 juni 2023 kl. 16.46 skrev T.V Raman <raman@google.com>:

> The code works correctly in Emacs 30 built on May 25,2023 but bombs
> with a hard to explain error in Emacs 30 built on June 25.

Would that be https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64292 by any chance?




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

* Re: Re: Help Debugging Change In Behavior (Last 30 Days)
@ 2023-06-28  5:36 Pedro Andres Aranda Gutierrez
  2023-06-28 18:35 ` T.V Raman
  0 siblings, 1 reply; 5+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2023-06-28  5:36 UTC (permalink / raw)
  To: emacs-devel, raman

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

Hi,

could this also be relates to buf #64315 I filed yesterday?

Best, /PA

-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 675 bytes --]

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

* Re: Help Debugging Change In Behavior (Last 30 Days)
  2023-06-28  5:36 Re: Help Debugging Change In Behavior (Last 30 Days) Pedro Andres Aranda Gutierrez
@ 2023-06-28 18:35 ` T.V Raman
  0 siblings, 0 replies; 5+ messages in thread
From: T.V Raman @ 2023-06-28 18:35 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: emacs-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 235 bytes --]

Building emacs from Git@Head fixed the issue for me. There may still be
some rough edges -- need to work out a small rpro case.

-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
7©4 Id: kg:/m/0285kf1  •0Ü8



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

end of thread, other threads:[~2023-06-28 18:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-28  5:36 Re: Help Debugging Change In Behavior (Last 30 Days) Pedro Andres Aranda Gutierrez
2023-06-28 18:35 ` T.V Raman
  -- strict thread matches above, loose matches on Subject: below --
2023-06-27 14:46 T.V Raman
2023-06-27 15:37 ` T.V Raman
2023-06-27 15:40 ` Mattias Engdegård

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).