From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#58338: 29.0.50; mapatoms called on more elements than in obarray? Date: Thu, 06 Oct 2022 16:16:03 +0000 Message-ID: <87ilkxlygs.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19102"; mail-complaints-to="usenet@ciao.gmane.io" To: 58338@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 06 19:32:37 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ogUjd-0004kr-CU for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Oct 2022 19:32:37 +0200 Original-Received: from localhost ([::1]:52744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogUjc-00029V-7T for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Oct 2022 13:32:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogTYU-0000L1-RK for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2022 12:17:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34241) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogTYU-0006zt-K6 for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2022 12:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogTYU-0001xL-EN for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2022 12:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Oct 2022 16:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58338 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16650729777460 (code B ref -1); Thu, 06 Oct 2022 16:17:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Oct 2022 16:16:17 +0000 Original-Received: from localhost ([127.0.0.1]:33319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogTXk-0001wF-Iv for submit@debbugs.gnu.org; Thu, 06 Oct 2022 12:16:17 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:46560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogTXi-0001w9-D9 for submit@debbugs.gnu.org; Thu, 06 Oct 2022 12:16:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogTXh-0007uz-QO for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2022 12:16:14 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:51745) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogTXf-0006ue-2r for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2022 12:16:13 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B695D24002B for ; Thu, 6 Oct 2022 18:16:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665072968; bh=ZCXHYiPHRtpNdtr+mEcgYEBBjPynXCirADub02Th1/M=; h=From:To:Subject:Autocrypt:Date:From; b=EEp9G92FrTRohCoyegr7NSxDqRs6V03o72Xsj6CDVoPJTmXqqLMFwsrY5TgCmKWIc Hg8yvY/5RvKuM2FFTgPJxWmjD7zgRX/Zatpb1ZsS3zZ6Jf9v8wlFSMhS3/XNFvBWx2 sImWEV5xywxfkwbfbbJLgPPJOwsUTvo7qThEqj33YIyB61qqrdyyCcNhVOV6yNYURe +rEFQwTlRJ8NwvciIxB++Sy5BwzeDvSEKVXCAZdidzh8uNbCrOBHtq9K2Ys/QVGjUK l5eBxyJVUrC1eVAB0FXOxwn0XhYISD3wc9k+V2AtiD2ZIPAHc2mHMCXQksFBV0WHX3 tys1englLkwWQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MjxPv5wtWz9rxL for ; Thu, 6 Oct 2022 18:16:03 +0200 (CEST) Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:244686 Archived-At: >From reading the docstring of `mapatoms', I would assume that this would evaluate to t: (let ((i 0)) (mapatoms (lambda (_) (setq i (1+ i))) obarray) (=3D (length obarray) i)) But instead on my system I get (length obarray) =E2=86=9D 15121 and and i = =E2=86=9D 78050, which is are at a ratio of 5.16169565505. Also interesting, if I intern a variable "foo", the value of i increases to 83106, while (length obarray) stays the same (?) Interestingly enough, I'd expect this to at least output a single message: (let ((ht (make-hash-table))) (mapatoms (lambda (s) (cl-incf (gethash s ht 0)))) (maphash (lambda (sym i) (when (> i 1) (message "%S: %d" sym i))) ht)) but apparently no symbol is invoked twice. Not even by name (let ((ht (make-hash-table :test #'equal))) (mapatoms (lambda (s) (cl-incf (gethash (symbol-name s) ht 0)))) (maphash (lambda (sym i) (when (> i 1) (message "%S: %d" sym i))) ht)) Is this perhaps related to symbol positions? I don't quite understand bare symbols yet, but it doesn't appear to change anything if I check (let ((i 0)) (mapatoms (lambda (s) (when (bare-symbol-p s) (setq i (1+ i)))) obarray) (list (length obarray) i)) I am confused. All I want is a max value for a progress reporter :( In GNU Emacs 29.0.50 (build 14, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-10-06 built on rhea Repository revision: 2c4c72b45d833b6ccdd2cc06ca3c6c9e9ad54357 Repository branch: feature/package+vc System Description: Fedora Linux 36 (Workstation Edition) Configured using: 'configure --with-pgtk --with-imagemagick' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ IMAGEMAGICK JPEG JSON LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS XIM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: TeX-PDF-mode: t rcirc-color-mode: t rcirc-track-minor-mode: t global-git-commit-mode: t magit-auto-revert-mode: t outline-minor-mode: t flymake-mode: t yas-minor-mode: t flyspell-mode: t repeat-mode: t display-battery-mode: t display-time-mode: t diff-hl-flydiff-mode: t diff-hl-mode: t winner-mode: t windmove-mode: t corfu-history-mode: t corfu-mode: t vertico-multiform-mode: t vertico-mode: t electric-pair-mode: t shell-dirtrack-mode: t recentf-mode: t save-place-mode: t savehist-mode: t pixel-scroll-precision-mode: t pixel-scroll-mode: t xterm-mouse-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tab-bar-mode: t file-name-shadow-mode: t context-menu-mode: t global-font-lock-mode: t font-lock-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/philip/.config/emacs/site-lisp/emacs-inspector/inspector hides /home/= philip/.config/emacs/elpa/inspector-0.8/inspector /home/philip/.config/emacs/site-lisp/emacs-inspector/inspector-tests hides = /home/philip/.config/emacs/elpa/inspector-0.8/inspector-tests /home/philip/.config/emacs/site-lisp/flymake-proselint/flymake-proselint hi= des /home/philip/.config/emacs/elpa/flymake-proselint-0.3.0/flymake-proseli= nt /home/philip/.config/emacs/elpa/transient-0.3.7/transient hides /home/phili= p/Source/emacs/lisp/transient /home/philip/.config/emacs/elpa/xref-1.5.1/xref hides /home/philip/Source/e= macs/lisp/progmodes/xref Features: (shadow emacsbug descr-text solar cal-dst holidays holiday-loaddefs cal-move loadhist reporter ert slime etags fileloop arc-mode archive-mode hyperspec package-vc gnus-search eieio-opt speedbar ezimage dframe flymake-proselint markdown-mode find-dired grep magit-ediff ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util goto-addr eudc-capf eudc cus-start eudc-vars magit-patch emacs-news-mode avy rect focus tex-info tex texmathp texinfo texinfo-loaddefs gnus-fun sh-script smie executable shortdoc facemenu two-column dictionary dictionary-connection ffap find-file magit-extras face-remap pulse color xref ibuffer ibuffer-loaddefs cl-print vertico-buffer consult-vertico consult compat-28 magit-bookmark bookmark whitespace bug-reference mule-util flow-fill modus-vivendi-theme nndoc gnus-dup url-cache display-line-numbers debbugs-gnu debbugs-compat debbugs soap-client url-http url-auth url-gw rng-xsd rng-dt rng-util xsd-regexp mailalias smtpmail autocrypt-message ecomplete rcirc-color rcirc ietf-drums-date sort smiley gnus-cite mm-archive mail-extr textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check qp gnus-bcklg gnus-async gnus-ml disp-table vc-fossil vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs org-element avl-tree generator ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect ol-docview doc-view jka-compr image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex ol org-keys oc org-compat advice org-macs org-loaddefs cal-menu calendar cal-loaddefs char-fold misearch multi-isearch dired-aux gnus-dired ef-duo-light-theme ef-duo-dark-theme ef-night-theme ef-spring-theme ef-themes vc-git buffer-env compat misterioso-theme cus-theme orderless vertico-directory vertico-flat magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu edebug debug backtrace find-func magit-diff smerge-mode git-commit log-edit add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process with-editor server magit-mode transient edmacro kmacro magit-git magit-section magit-utils crm dash vc-backup copyright autocrypt-gnus autocrypt nndraft nnmh utf-7 nnfolder epa-file network-stream nsm gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig nntp gnus-cache gnus-sum shr pixel-fill kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range message yank-media puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win noutline outline checkdoc flymake-proc flymake warnings yasnippet-snippets cl-extra yasnippet flyspell ispell auth-source-pass repeat project battery dbus xml shell-command+ thingatpt dired-x dired dired-loaddefs time sendmail rfc2047 rfc2045 ietf-drums gnus nnheader gnus-util mail-utils range mm-util mail-prsvr finder-inf diff-hl-flydiff diff diff-hl log-view pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode easy-mmode hippie-exp winner windmove corfu-history corfu vertico-multiform vertico elec-pair tramp-cache time-stamp tramp-sh tramp tramp-loaddefs trampver tramp-integration cus-edit pp icons files-x tramp-compat rx shell pcomplete parse-time iso8601 time-date ls-lisp format-spec recentf tree-widget wid-edit saveplace savehist pixel-scroll cua-base xt-mouse modus-operandi-theme modus-themes pcase cus-load setup site-lisp auto-site compile text-property-search comint ansi-osc ansi-color autoload loaddefs-gen lisp-mnt debbugs-autoloads rcirc-color-autoloads inspector-autoloads ef-themes-autoloads flylisp-autoloads keycast-autoloads flymake-proselint-autoloads which-key-autoloads geiser-guile-autoloads focus-autoloads vertico-autoloads consult-autoloads vc-fossil-autoloads corfu-autoloads diff-hl-autoloads crdt-autoloads embark-autoloads auctex-autoloads tex-site magit-autoloads buffer-env-autoloads compat-autoloads geiser-chibi-autoloads geiser-impl help-fns radix-tree help-mode geiser-custom geiser-base ring geiser-autoloads slime-autoloads transient-autoloads xref-autoloads info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile cconv url-vars cl-loaddefs cl-lib rmc iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win pgtk-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo gtk pgtk multi-tty make-network-process emacs) Memory information: ((conses 16 1442594 267553) (symbols 48 63865 588) (strings 32 303656 13102) (string-bytes 1 10565718) (vectors 16 140881) (vector-slots 8 3010917 366454) (floats 8 3863 612) (intervals 56 72554 2447) (buffers 1000 114))