all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#24270: Seeming bug in `setf'
@ 2016-08-20  5:57 Rafael D Sorkin
  2016-08-20 14:03 ` Michael Heerdegen
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Rafael D Sorkin @ 2016-08-20  5:57 UTC (permalink / raw)
  To: 24270

Hello,

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


Here's some info on the hardware from /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 44
model name	: Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz
stepping	: 2
microcode	: 0x13
cpu MHz		: 2393.834
cache size	: 12288 KB
physical id	: 1
siblings	: 8
core id		: 0
cpu cores	: 4
apicid		: 32
initial apicid	: 32
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt aes lahf_lm ida arat dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 4787.66
clflush size	: 64
cache_alignment	: 64
address sizes	: 40 bits physical, 48 bits virtual
power management:

Thanks,

~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
 Rafael Sorkin
 Perimeter Institute for Theoretical Physics
 31 Caroline Street North
 Waterloo, ON  N2L 2Y5
 Canada
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~





^ 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
                   ` (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-22 10:53   ` Nicolas Petton
@ 2016-08-22 11:05     ` Michael Heerdegen
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Heerdegen @ 2016-08-22 11:05 UTC (permalink / raw)
  To: Nicolas Petton; +Cc: Rafael D Sorkin, 24270-done

Nicolas Petton <nicolas@petton.fr> writes:

> [..] so Emacs 24.4 should have it, but I would suggest installing
> Emacs 24.5 (the latest stable release) instead.

I have 24.5 here, it's definitely fixed in that version.  I would
recommend 24.5, too.


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
                   ` (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

end of thread, other threads:[~2016-08-23  2:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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-22 11:05     ` Michael Heerdegen
2016-08-23  2:55 ` Rafael D Sorkin

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.