* bug#24270: Seeming bug in `setf'
2016-08-20 5:57 bug#24270: Seeming bug in `setf' Rafael D Sorkin
@ 2016-08-20 14:03 ` Michael Heerdegen
2016-08-20 14:03 ` Nicolas Petton
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Michael Heerdegen @ 2016-08-20 14:03 UTC (permalink / raw)
To: Rafael D Sorkin; +Cc: 24270-done
Hello Rafael,
> (emacs-version) ; GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version
> 3.10.7) of 2014-03-07 on lamiak, modified by Debian
>
> (setq z ())
> (getf z 'indic) ; nil
> (setf (getf z 'indic) 6) ; (indic 6) SHOULD BE JUST 6
> (getf z 'indic) ; 6 okay
Thanks for reporting. Yes, there was such a bug, but your Emacs version
is very old...and the bug has been fixed in the meantime (three years
ago) in
c46c57b, Stefan Monnier <monnier@iro.umontreal.ca>
* lisp/emacs-lisp/cl-extra.el (cl-getf): Return the proper value in
the setter.
Fixes: debbugs:14387
modified lisp/emacs-lisp/cl-extra.el
@@ -597,8 +597,11 @@ cl-getf
(macroexp-let2 nil d def
(funcall do `(cl-getf ,getter ,k ,d)
(lambda (v)
- (funcall setter
- `(cl--set-getf ,getter ,k ,v))))))))))
+ (macroexp-let2 nil val v
+ `(progn
+ ,(funcall setter
+ `(cl--set-getf ,getter ,k ,val))
+ ,val))))))))))
(setplist '--cl-getf-symbol-- plist)
(or (get '--cl-getf-symbol-- tag)
;; Originally we called cl-get here,
modified lisp/emacs-lisp/cl-loaddefs.el
Regards,
Michael.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#24270: Seeming bug in `setf'
2016-08-20 5:57 bug#24270: Seeming bug in `setf' Rafael D Sorkin
2016-08-20 14:03 ` Michael Heerdegen
@ 2016-08-20 14:03 ` Nicolas Petton
2016-08-22 0:34 ` Rafael D Sorkin
2016-08-23 2:55 ` Rafael D Sorkin
3 siblings, 0 replies; 7+ messages in thread
From: Nicolas Petton @ 2016-08-20 14:03 UTC (permalink / raw)
To: Rafael D Sorkin, 24270; +Cc: 24270-done
[-- Attachment #1: Type: text/plain, Size: 666 bytes --]
Rafael D Sorkin <rsorkin@perimeterinstitute.ca> writes:
> Hello,
Hi Rafael,
Thank you for reporting this issue.
> The macro `setf' seems to have developed a bug somewhere between emacs 23.1.1 and 24.3.1:
>
> (emacs-version) ; GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) of 2014-03-07 on lamiak, modified by Debian
>
> (setq z ())
> (getf z 'indic) ; nil
> (setf (getf z 'indic) 6) ; (indic 6) SHOULD BE JUST 6
> (getf z 'indic) ; 6 okay
It seems to have been fixed in master & Emacs 25.1 RC1, so I'm closing the
issue.
However, if you can still reproduce it in master (I couldn't, but who
knows), feel free to reopen it.
Cheers,
Nico
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#24270: Seeming bug in `setf'
2016-08-20 5:57 bug#24270: Seeming bug in `setf' Rafael D Sorkin
2016-08-20 14:03 ` Michael Heerdegen
2016-08-20 14:03 ` Nicolas Petton
@ 2016-08-22 0:34 ` Rafael D Sorkin
2016-08-22 10:53 ` Nicolas Petton
2016-08-23 2:55 ` Rafael D Sorkin
3 siblings, 1 reply; 7+ messages in thread
From: Rafael D Sorkin @ 2016-08-22 0:34 UTC (permalink / raw)
To: Michael Heerdegen, Nicolas Petton; +Cc: 24270-done
Hello Michael and Nico,
The maintainer here says that emacs 25 is not yet officially
released. He has asked me to ask you which version has the
bug fixed:
"Please inquire which version has the error corrected; we can
then install them. If this requires installing a non-relased
version, this will be fine as well, but we then won't make it
the default setting for new users."
Is there a released version in which the bug has been fixed?
Can you advise me which version would be best for him to install?
Many thanks,
Rafael
> Hello Rafael,
>
> > (emacs-version) ; GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version
> > 3.10.7) of 2014-03-07 on lamiak, modified by Debian
> >
> > (setq z ())
> > (getf z 'indic) ; nil
> > (setf (getf z 'indic) 6) ; (indic 6) SHOULD BE JUST 6
> > (getf z 'indic) ; 6 okay
>
> Thanks for reporting. Yes, there was such a bug, but your Emacs version
> is very old...and the bug has been fixed in the meantime (three years
> ago) in
>
>
> c46c57b, Stefan Monnier <monnier@iro.umontreal.ca>
>
> * lisp/emacs-lisp/cl-extra.el (cl-getf): Return the proper value in
> the setter.
>
> Fixes: debbugs:14387
>
>
> modified lisp/emacs-lisp/cl-extra.el
> @@ -597,8 +597,11 @@ cl-getf
> (macroexp-let2 nil d def
> (funcall do `(cl-getf ,getter ,k ,d)
> (lambda (v)
> - (funcall setter
> - `(cl--set-getf ,getter ,k ,v))))))))))
> + (macroexp-let2 nil val v
> + `(progn
> + ,(funcall setter
> + `(cl--set-getf ,getter ,k ,val))
> + ,val))))))))))
> (setplist '--cl-getf-symbol-- plist)
> (or (get '--cl-getf-symbol-- tag)
> ;; Originally we called cl-get here,
> modified lisp/emacs-lisp/cl-loaddefs.el
>
>
> Regards,
>
> Michael.
> Hi Rafael,
>
> Thank you for reporting this issue.
>
> > The macro `setf' seems to have developed a bug somewhere between emacs
23.1.1 and 24.3.1:
> >
> > (emacs-version) ; GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version
3.10.7) of 2014-03-07 on lamiak, modified by Debian
> >
> > (setq z ())
> > (getf z 'indic) ; nil
> > (setf (getf z 'indic) 6) ; (indic 6) SHOULD BE JUST 6
> > (getf z 'indic) ; 6 okay
>
> It seems to have been fixed in master & Emacs 25.1 RC1, so I'm closing the
> issue.
>
> However, if you can still reproduce it in master (I couldn't, but who
> knows), feel free to reopen it.
>
> Cheers,
> Nico
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Rafael Sorkin
Perimeter Institute for Theoretical Physics
31 Caroline Street North
Waterloo, ON N2L 2Y5
Canada
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
A story-poem by Mark Twain -- http://warprayer.org/
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#24270: Seeming bug in `setf'
2016-08-22 0:34 ` Rafael D Sorkin
@ 2016-08-22 10:53 ` Nicolas Petton
2016-08-22 11:05 ` Michael Heerdegen
0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Petton @ 2016-08-22 10:53 UTC (permalink / raw)
To: Rafael D Sorkin, Michael Heerdegen; +Cc: 24270-done
[-- Attachment #1: Type: text/plain, Size: 594 bytes --]
Rafael D Sorkin <rsorkin@perimeterinstitute.ca> writes:
> Hello Michael and Nico,
>
> The maintainer here says that emacs 25 is not yet officially
> released. He has asked me to ask you which version has the
> bug fixed:
I tested it with Emacs 25.1 RC1, but it might have been fixed in an
earlier release.
Michael said he has found the git commit in which this bug was fixed:
c46c57b, Stefan Monnier <monnier@iro.umontreal.ca>
Which was committed 3 years ago, so Emacs 24.4 should have it, but I
would suggest installing Emacs 24.5 (the latest stable release) instead.
Cheers,
Nico
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#24270: Seeming bug in `setf'
2016-08-20 5:57 bug#24270: Seeming bug in `setf' Rafael D Sorkin
` (2 preceding siblings ...)
2016-08-22 0:34 ` Rafael D Sorkin
@ 2016-08-23 2:55 ` Rafael D Sorkin
3 siblings, 0 replies; 7+ messages in thread
From: Rafael D Sorkin @ 2016-08-23 2:55 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: Nicolas Petton, 24270-done
Thanks, Michael and Nico! - Rafael
^ permalink raw reply [flat|nested] 7+ messages in thread