unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lewis Creary via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 66696@debbugs.gnu.org
Subject: bug#66696: 29.1; "A bug in the function debug."
Date: Mon, 23 Oct 2023 05:41:46 +0000 (UTC)	[thread overview]
Message-ID: <1239664521.598080.1698039706916@mail.yahoo.com> (raw)
In-Reply-To: 1239664521.598080.1698039706916.ref@mail.yahoo.com

[-- Attachment #1: Type: text/plain, Size: 2398 bytes --]

While I was trying to diagnose a bug in the function displayed just belowwith the help of the function debug, the interim values of the lisp variables shown were inconsistent with the code being debugged.  For example, when called with the argument 5, the first element of the remainder list should be 1 (5 divided by 2 leaves a remainder of 1).  However, the fn debug claims that the variable `rmdr-list' has the first element 0.  This is just wrong!  And it has nothing to do with the problem being debugged.
(defun dec-to-bin (n)  (let ((dividend n)        (rmdr-list nil)        (stop-sw nil)        (numstr "") )    (while ((and (>= dividend 0) (not stop-sw)))       (setq dividend (/ dividend 2)              rmdr-list (append (list (% dividend 2))                                               rmdr-list) )       (if (= dividend 0)            (setq stop-sw t)) )       (debug) )    (while rmdr-list      (setq numstr (concat numstr (number-to-string                                          (car rmdr-list)))             rmdr-list (cdr rmdr-list) ) )    (string-to-number numstr) ))-----------------------------------------------------In GNU emacs 29.1 (build 2, x86_64-w64-mingw32) of 2023-08-02 built on AVALONWindowing system distributor 'Microsoft Corp.', version 10.0.22621System Description: Microsoft Windows 10 Home (v10.0.2009.22621.2428)Configured using: 'configure --with-modules --without-dbus --with-native-compilation=aot --without-compress-install --with-tree-sitter CFLAGS=-O2'
Configured features:ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMPNOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFFTOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB
(NATIVE_COMP present but libgccjit not available)
Important settings:  value of $LANG: ENU  locale-coding-system: cp1252
Major mode: Lisp Interaction
Minor modes in effect:  tooltip-mode: t  global-eldoc-mode: t  eldoc-mode: t  show-paren-mode: t  electric-indent-mode: t  mouse-wheel-mode: t  tool-bar-mode: t  menu-bar-mode: t  file-name-shadow-mode: t  global-font-lock-mode: t  font-lock-mode: t  blink-cursor-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
 

[-- Attachment #2: Type: text/html, Size: 5693 bytes --]

       reply	other threads:[~2023-10-23  5:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1239664521.598080.1698039706916.ref@mail.yahoo.com>
2023-10-23  5:41 ` Lewis Creary via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-10-23  6:57   ` bug#66696: 29.1; "A bug in the function debug." Gerd Möllmann
     [not found] <556885424.775162.1698086427787.ref@mail.yahoo.com>
     [not found] ` <556885424.775162.1698086427787@mail.yahoo.com>
2023-10-23 19:11   ` Gerd Möllmann
2023-11-05  6:00     ` Gerd Möllmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1239664521.598080.1698039706916@mail.yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=66696@debbugs.gnu.org \
    --cc=lewcreary@cs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).