bug#33371: 26.1; cl-make-random-state copying not working
Thanks for reporting this bug; it is a regression introduced when we separated records from vectors. I installed the attached patch into the emacs-26 branch. >From 78c883cc1c30ab82732eac02fb07bb747436854a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 19 Dec 2018 13:42:21 -0800 Subject: [PATCH] cl-make-random-state was not copying its arg Problem reported by Xu Chunyang (Bug#33731). * lisp/emacs-lisp/cl-extra.el (cl-make-random-state): Use copy-sequence, not copy-tree, so that the record is copied. * test/lisp/emacs-lisp/cl-extra-tests.el: (cl-extra-test-cl-make-random-state): New test. --- lisp/emacs-lisp/cl-extra.el| 2 +- test/lisp/emacs-lisp/cl-extra-tests.el | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 36b65f97b0..c38b4957fc 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -484,7 +484,7 @@ cl-make-random-state If STATE is t, return a new state object seeded from the time of day." (unless state (setq state cl--random-state)) (if (cl-random-state-p state) - (copy-tree state t) + (copy-sequence state) (cl--make-random-state (if (integerp state) state (cl--random-time) ;; Implementation limits. diff --git a/test/lisp/emacs-lisp/cl-extra-tests.el b/test/lisp/emacs-lisp/cl-extra-tests.el index baad8eb8e6..fe59703530 100644 --- a/test/lisp/emacs-lisp/cl-extra-tests.el +++ b/test/lisp/emacs-lisp/cl-extra-tests.el @@ -94,4 +94,9 @@ (should (equal (list lst3 (cdr lst3) (cddr lst3)) (cl-maplist fn3 lst lst2 lst3) +(ert-deftest cl-extra-test-cl-make-random-state () + (let ((s (cl-make-random-state))) +;; Test for Bug#33731. +(should-not (eq s (cl-make-random-state s) + ;;; cl-extra-tests.el ends here -- 2.19.2
bug#33785: df: don't suppress remote mounts
On 17/12/18 22:42, lzhong wrote: > Hi list, > > According to the following commit > > commit 2e81e62243409c5c574b899f52b08c000e4d99fd > Author: Pádraig Brady > Date: Wed Oct 29 02:49:17 2014 + > > df: only suppress remote mounts of separate exports with --total > > ... > > diff --git a/NEWS b/NEWS > index 5d3bc58bd..2c7e590e0 100644 > --- a/NEWS > +++ b/NEWS > @@ -32,6 +32,11 @@ GNU coreutils NEWS > -*- outline -*- > > ** Changes in behavior > > + df no longer suppresses separate exports of the same remote device, as > + these are generally explicitly mounted. The --total option does still > + suppress duplicate remote file systems. > + [suppression was introduced in coreutils-8.21] > > The remote mounts should not be suppressed after this change. However, > it turns out > > it doesn't work as the message described. The remote mounts are still > suppressed. And here is > > my patch for this problem: > >1 From 72be959fc9f49420b07b4df5c5017821232cf498 Mon Sep 17 00:00:00 2001 >2 From: Lidong Zhong >3 Date: Tue, 18 Dec 2018 14:24:13 +0800 >4 Subject: [PATCH] df: don't suppress remote mounts >5 MIME-Version: 1.0 >6 Content-Type: text/plain; charset=UTF-8 >7 Content-Transfer-Encoding: 8bit >8 >9 This is the fix for the following commit. > 10 commit 2e81e62243409c5c574b899f52b08c000e4d99fd > 11 Author: Pádraig Brady > 12 Date: Wed Oct 29 02:49:17 2014 + > 13 > 14 df: only suppress remote mounts of separate exports with --total > 15 > 16 It doesn't work as the commit message described. The remote mounts > 17 are also suppressed after this change. > 18 --- > 19 src/df.c | 2 +- > 20 1 file changed, 1 insertion(+), 1 deletion(-) > 21 > 22 diff --git a/src/df.c b/src/df.c > 23 index 55532219f..0246e3df9 100644 > 24 --- a/src/df.c > 25 +++ b/src/df.c > 26 @@ -722,7 +722,7 @@ filter_mount_list (bool devices_only) > 27 < strlen (me->me_mntroot)); > 28if (! print_grand_total > 29&& me->me_remote && seen_dev->me->me_remote > 30 - && ! STREQ (seen_dev->me->me_devname, > me->me_devname)) > 31 + && STREQ (seen_dev->me->me_devname, me->me_devname)) > 32 { > 33/* Don't discard remote entries with different > locations, > 34 as these are more likely to be explicitly > mounted. > > Please share your opinion. The intent of the patch was not to suppress _separate_ exports on the server. I.E. nas.example.com:/Photos and nas.example.com:/Download would not be suppressed (even if they have the same device id). If you want all nfs mounts you could `df -a -t nfs` cheers, Pádraig
bug#33774: glitch in cat
tags 33774 notabug close 33774 stop On 12/16/18 8:58 PM, Valentin Schild wrote: > somehow, when using cat to display a file's content, I get output to > the command line > The file to output contains > ^[Z > like attached file "catbug". > > In terminal I type > cat catbug That's the point: the terminal treats some control characters specially, and therefore does not display them. Your file contains 3 bytes: - octal 33, - a 'Z', and - octal 12 (=newline): od -to1z catbug 000 033 132 012 >.Z.< 003 And cat(1) is exactly writing that to the terminal: $ strace -ve write cat catbug write(1, "\33Z\n", 3) = 3 +++ exited with 0 +++ As there seems nothing to be wrong in 'cat', I'm marking this as not a bug in our bug tracker. Of course, discussion on this may continue, and we may even re-open this issue if needed. Have a nice day, Berny