* bug#5082: 23.1.50; print-circle and make-hash-table @ 2009-11-30 15:09 ` 川幡太一 2009-11-30 21:15 ` bug#5082: marked as done (23.1.50; print-circle and make-hash-table) Emacs bug Tracking System 0 siblings, 1 reply; 6+ messages in thread From: 川幡太一 @ 2009-11-30 15:09 UTC (permalink / raw To: emacs-pretest-bug Dear Emacs Developers, I've found an Emacs behavior that seems a bug concerning to `print-circle' and make-hash-table, so I would like to report it. By setting `print-circle' to `t', printing Lisp Object with recursive or repetitive list should be displayed as #N= and #N# syntax. However, it seems this is not true when printing lisp objects within hash tables (which become possible in Emacs 23.1.50.) Following is an example. Is it possible to display the repetitive lisp object within printed hash tables by #N= and #N# syntax, when `print-circle' is set to `t'? I notify this behavior as a bug, but it may not be so. I apologize in that case. (let ((print-circle t) (x (list 10 20)) (y (make-hash-table))) (insert (format "%S\n" (list x x))) (puthash 1 x y) (puthash 2 x y) (insert (format "%S\n" y)) (setcar x 3) (insert (format "%S\n" y))) Result: > (#1=(10 20) #1#) > #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 > data (1 (10 20) 2 (10 20))) > #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 > data (1 (3 20) 2 (3 20))) nil Cordially Yours, -- --------------------------------------------------------------------- KAWABATA, Taichi E-mail: kawabata.taichi@gmail.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#5082: marked as done (23.1.50; print-circle and make-hash-table) 2009-11-30 15:09 ` bug#5082: 23.1.50; print-circle and make-hash-table 川幡太一 @ 2009-11-30 21:15 ` Emacs bug Tracking System 0 siblings, 0 replies; 6+ messages in thread From: Emacs bug Tracking System @ 2009-11-30 21:15 UTC (permalink / raw To: Stefan Monnier [-- Attachment #1: Type: text/plain, Size: 897 bytes --] Your message dated Mon, 30 Nov 2009 16:08:38 -0500 with message-id <jwv8wdnencg.fsf-monnier+emacsbugreports@gnu.org> and subject line Re: bug#5082: 23.1.50; print-circle and make-hash-table has caused the Emacs bug report #5082, regarding 23.1.50; print-circle and make-hash-table to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) -- 5082: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=5082 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems [-- Attachment #2: Type: message/rfc822, Size: 4125 bytes --] From: 川幡太一 <kawabata.taichi@gmail.com> To: emacs-pretest-bug@gnu.org Subject: 23.1.50; print-circle and make-hash-table Date: Tue, 1 Dec 2009 00:09:30 +0900 Message-ID: <270879b0911300709o29a12798m2ae6c6194c25e53@mail.gmail.com> Dear Emacs Developers, I've found an Emacs behavior that seems a bug concerning to `print-circle' and make-hash-table, so I would like to report it. By setting `print-circle' to `t', printing Lisp Object with recursive or repetitive list should be displayed as #N= and #N# syntax. However, it seems this is not true when printing lisp objects within hash tables (which become possible in Emacs 23.1.50.) Following is an example. Is it possible to display the repetitive lisp object within printed hash tables by #N= and #N# syntax, when `print-circle' is set to `t'? I notify this behavior as a bug, but it may not be so. I apologize in that case. (let ((print-circle t) (x (list 10 20)) (y (make-hash-table))) (insert (format "%S\n" (list x x))) (puthash 1 x y) (puthash 2 x y) (insert (format "%S\n" y)) (setcar x 3) (insert (format "%S\n" y))) Result: > (#1=(10 20) #1#) > #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 > data (1 (10 20) 2 (10 20))) > #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 > data (1 (3 20) 2 (3 20))) nil Cordially Yours, -- --------------------------------------------------------------------- KAWABATA, Taichi E-mail: kawabata.taichi@gmail.com [-- Attachment #3: Type: message/rfc822, Size: 2520 bytes --] From: Stefan Monnier <monnier@IRO.UMontreal.CA> To: 川幡太一 <kawabata.taichi@gmail.com> Subject: Re: bug#5082: 23.1.50; print-circle and make-hash-table Date: Mon, 30 Nov 2009 16:08:38 -0500 Message-ID: <jwv8wdnencg.fsf-monnier+emacsbugreports@gnu.org> > I've found an Emacs behavior that seems a bug concerning to `print-circle' > and make-hash-table, so I would like to report it. Thanks for catching this bug and for the clear testcase. I've installed the patch below which should fix it. Stefan === modified file 'src/print.c' --- src/print.c 2009-11-24 15:30:54 +0000 +++ src/print.c 2009-11-30 21:03:36 +0000 @@ -1420,6 +1420,13 @@ size &= PSEUDOVECTOR_SIZE_MASK; for (i = 0; i < size; i++) print_preprocess (XVECTOR (obj)->contents[i]); + if (HASH_TABLE_P (obj)) + { /* For hash tables, the key_and_value slot is past + `size' because it needs to be marked specially in case + the table is weak. */ + struct Lisp_Hash_Table *h = XHASH_TABLE (obj); + print_preprocess (h->key_and_value); + } break; default: ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <mailman.11874.1259601628.2239.bug-gnu-emacs@gnu.org>]
* Re: bug#5082: 23.1.50; print-circle and make-hash-table [not found] <mailman.11874.1259601628.2239.bug-gnu-emacs@gnu.org> @ 2009-12-02 22:19 ` Ted Zlatanov 2009-12-02 22:19 ` Ted Zlatanov 1 sibling, 0 replies; 6+ messages in thread From: Ted Zlatanov @ 2009-12-02 22:19 UTC (permalink / raw To: bug-gnu-emacs; +Cc: Emacs Development On Tue, 1 Dec 2009 00:09:30 +0900 川幡太一 <kawabata.taichi@gmail.com> wrote: > Dear Emacs Developers, > I've found an Emacs behavior that seems a bug concerning to `print-circle' > and make-hash-table, so I would like to report it. > By setting `print-circle' to `t', printing Lisp Object with recursive > or repetitive > list should be displayed as #N= and #N# syntax. > However, it seems this is not true when printing lisp objects within > hash tables > (which become possible in Emacs 23.1.50.) Following is an example. > Is it possible to display the repetitive lisp object within printed hash tables > by #N= and #N# syntax, when `print-circle' is set to `t'? > I notify this behavior as a bug, but it may not be so. I apologize in that > case. > (let ((print-circle t) > (x (list 10 20)) > (y (make-hash-table))) > (insert (format "%S\n" (list x x))) > (puthash 1 x y) > (puthash 2 x y) > (insert (format "%S\n" y)) > (setcar x 3) > (insert (format "%S\n" y))) > Result: (#1=(10 20) #1#) #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data (1 (10 20) 2 (10 20))) #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data (1 (3 20) 2 (3 20))) > nil I looked at the source in src/print.c. At the print_object() level the behavior is correct for lists but fiendishly complicated so I couldn't figure out the parallel structure for hashtables quickly. I'll put it on my TODO list if no one else is interested. Ted ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bug#5082: 23.1.50; print-circle and make-hash-table [not found] <mailman.11874.1259601628.2239.bug-gnu-emacs@gnu.org> 2009-12-02 22:19 ` bug#5082: 23.1.50; print-circle and make-hash-table Ted Zlatanov @ 2009-12-02 22:19 ` Ted Zlatanov 2009-12-03 3:12 ` Glenn Morris 1 sibling, 1 reply; 6+ messages in thread From: Ted Zlatanov @ 2009-12-02 22:19 UTC (permalink / raw Cc: Emacs Development The following message is a courtesy copy of an article that has been posted to gnu.emacs.bug as well. On Tue, 1 Dec 2009 00:09:30 +0900 川幡太一 <kawabata.taichi@gmail.com> wrote: > Dear Emacs Developers, > I've found an Emacs behavior that seems a bug concerning to `print-circle' > and make-hash-table, so I would like to report it. > By setting `print-circle' to `t', printing Lisp Object with recursive > or repetitive > list should be displayed as #N= and #N# syntax. > However, it seems this is not true when printing lisp objects within > hash tables > (which become possible in Emacs 23.1.50.) Following is an example. > Is it possible to display the repetitive lisp object within printed hash tables > by #N= and #N# syntax, when `print-circle' is set to `t'? > I notify this behavior as a bug, but it may not be so. I apologize in that > case. > (let ((print-circle t) > (x (list 10 20)) > (y (make-hash-table))) > (insert (format "%S\n" (list x x))) > (puthash 1 x y) > (puthash 2 x y) > (insert (format "%S\n" y)) > (setcar x 3) > (insert (format "%S\n" y))) > Result: (#1=(10 20) #1#) #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data (1 (10 20) 2 (10 20))) #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data (1 (3 20) 2 (3 20))) > nil I looked at the source in src/print.c. At the print_object() level the behavior is correct for lists but fiendishly complicated so I couldn't figure out the parallel structure for hashtables quickly. I'll put it on my TODO list if no one else is interested. Ted ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bug#5082: 23.1.50; print-circle and make-hash-table 2009-12-02 22:19 ` Ted Zlatanov @ 2009-12-03 3:12 ` Glenn Morris 2009-12-03 17:25 ` Ted Zlatanov 0 siblings, 1 reply; 6+ messages in thread From: Glenn Morris @ 2009-12-03 3:12 UTC (permalink / raw To: Ted Zlatanov; +Cc: Emacs Development Ted Zlatanov wrote: > I'll put it on my TODO list if no one else is interested. ? http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=5082#10 From: Stefan Monnier <monnier at IRO.UMontreal.CA> Date: Mon, 30 Nov 2009 16:08:38 -0500 I've installed the patch below which should fix it. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bug#5082: 23.1.50; print-circle and make-hash-table 2009-12-03 3:12 ` Glenn Morris @ 2009-12-03 17:25 ` Ted Zlatanov 0 siblings, 0 replies; 6+ messages in thread From: Ted Zlatanov @ 2009-12-03 17:25 UTC (permalink / raw To: emacs-devel On Wed, 02 Dec 2009 22:12:18 -0500 Glenn Morris <rgm@gnu.org> wrote: GM> Ted Zlatanov wrote: >> I'll put it on my TODO list if no one else is interested. GM> ? GM> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=5082#10 GM> From: Stefan Monnier <monnier at IRO.UMontreal.CA> GM> Date: Mon, 30 Nov 2009 16:08:38 -0500 GM> I've installed the patch below which should fix it. This is the second emacs bugs message I've missed in the last two weeks (I also didn't see the URL auth bug resolution). Something is up with my news server (I read it via NNTP:gnu.emacs.bug). Sorry for the noise. Ted ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-12-03 17:25 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <jwv8wdnencg.fsf-monnier+emacsbugreports@gnu.org> 2009-11-30 15:09 ` bug#5082: 23.1.50; print-circle and make-hash-table 川幡太一 2009-11-30 21:15 ` bug#5082: marked as done (23.1.50; print-circle and make-hash-table) Emacs bug Tracking System [not found] <mailman.11874.1259601628.2239.bug-gnu-emacs@gnu.org> 2009-12-02 22:19 ` bug#5082: 23.1.50; print-circle and make-hash-table Ted Zlatanov 2009-12-02 22:19 ` Ted Zlatanov 2009-12-03 3:12 ` Glenn Morris 2009-12-03 17:25 ` Ted Zlatanov
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.