GNU bug report logs - #78156
31.0.50; 3.2 Install a Function Definition

Previous Next

Package: emacs;

Reported by: badli al rashid <theothernighttheotherday <at> gmail.com>

Date: Wed, 30 Apr 2025 06:03:02 UTC

Severity: normal

Merged with 78157

Found in version 31.0.50

To reply to this bug, email your comments to 78156 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#78156; Package emacs. (Wed, 30 Apr 2025 06:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to badli al rashid <theothernighttheotherday <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 30 Apr 2025 06:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: badli al rashid <theothernighttheotherday <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; 3.2 Install a Function Definition
Date: Wed, 30 Apr 2025 14:01:30 +0800
[Message part 1 (text/plain, inline)]
--text follows this line--
From the elisp intro book, 3.2 Install a Function Definition.
An error occur when installing / running (C-x C-e) the function below

     (defun multiply-by-seven (number)
       "Multiply NUMBER by seven."
       (* 7 number))


Debugger entered--Lisp error: (void-variable number)
  (* 7 number)
  (progn (* 7 number))
  eval((progn (* 7 number)) t)
  elisp--eval-last-sexp(nil)
  #f(compiled-function () #<bytecode 0x18675df5af7f>)()
  handler-bind-1(#f(compiled-function () #<bytecode 0x18675df5af7f>)
(error) eval-expression--debug)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)
  recursive-edit()
  debug(error (void-variable definition.) :backtrace-base
eval-expression--debug)
  eval-expression--debug((void-variable definition.))
  (progn definition.)
  eval((progn definition.) t)
  elisp--eval-last-sexp(nil)
  #f(compiled-function () #<bytecode 0x18675df5af7f>)()
  handler-bind-1(#f(compiled-function () #<bytecode 0x18675df5af7f>)
(error) eval-expression--debug)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)
  recursive-edit()
  debug(error (void-variable number) :backtrace-base eval-expression--debug)
  eval-expression--debug((void-variable number))
  (* 7 number)
  (progn (* 7 number))
  eval((progn (* 7 number)) t)
  elisp--eval-last-sexp(nil)
  #f(compiled-function () #<bytecode 0x18675df5af7f>)()
  handler-bind-1(#f(compiled-function () #<bytecode 0x18675df5af7f>)
(error) eval-expression--debug)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)


In GNU Emacs 31.0.50 (build 1, aarch64-unknown-linux-android21) of
 2025-04-29 built on xeon
Repository revision: 825ea052ad5638c056037c4cac92c9e666dc3820
Windowing system distributor 'Xiaomi', version 34.0.0
System Description:
Redmi/sunstone_global/sunstone:14/UKQ1.240624.001/OS2.0.1.0.UMQMIXM:user/release-keys

Configured using:
 'configure --with-png=yes --with-webp=yes --with-gif=yes
 --with-jpeg=yes --with-xml2=yes --with-sqlite3=yes --with-gnutls=yes
 --with-tiff=yes --with-selinux=yes --with-modules=yes
 --with-tree-sitter=yes --with-imagemagick=no --with-lcms2=yes
 --with-mailutils= --with-pop=no-by-default --with-harfbuzz=yes
 --with-threads=yes --with-rsvg=yes --enable-check-lisp-object-type=
 --cache-file=config_cache.1 'CFLAGS=-O2
 -Werror=implicit-function-declaration''

Configured features:
GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBSELINUX LIBXML2 MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SQLITE3 THREADS TIFF TREE_SITTER WEBP
ZLIB

Important settings:
  value of $LANG: en_GB.UTF8
  locale-coding-system: utf-8-unix

Major mode: Debugger

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
  modifier-bar-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
  minibuffer-regexp-mode: t
  buffer-read-only: t
  column-number-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:
~/Documents/packages/rainbow/rainbow-delimiters hides
/data/data/org.gnu.emacs/files/.emacs.d/elpa/rainbow-delimiters-2.1.5/rainbow-delimiters

Features:
(shadow sort mail-extr emacsbug lisp-mnt message yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util text-property-search mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils ielm pp comint ansi-osc
ansi-color ring kmacro thingatpt vc-git diff-mode track-changes files-x
vc-dispatcher elec-pair face-remap help-fns radix-tree cl-print debug
backtrace help-mode find-func time-date mule-util info
display-line-numbers init finder-inf rainbow-delimiters easy-mmode
rainbow-delimiters-autoloads package browse-url xdg 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 icons password-cache json
subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib
rmc iso-transl tooltip cus-start cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel android-win
term/common-win touch-screen ls-lisp 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
theme-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 inotify dynamic-setting
android multi-tty move-toolbar make-network-process tty-child-frames
emacs)

Memory information:
((conses 16 125782 40750) (symbols 48 10611 0) (strings 32 34048 1974)
 (string-bytes 1 800690) (vectors 16 20310)
 (vector-slots 8 196436 9107) (floats 8 51 153) (intervals 56 4321 0)
 (buffers 992 18))


Sent from Gmail
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78156; Package emacs. (Wed, 30 Apr 2025 06:33:02 GMT) Full text and rfc822 format available.

Message #8 received at 78156 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: badli al rashid <theothernighttheotherday <at> gmail.com>
Cc: 78156 <at> debbugs.gnu.org
Subject: Re: bug#78156: 31.0.50; 3.2 Install a Function Definition
Date: Wed, 30 Apr 2025 09:31:17 +0300
> From: badli al rashid <theothernighttheotherday <at> gmail.com>
> Date: Wed, 30 Apr 2025 14:01:30 +0800
> 
> From the elisp intro book, 3.2 Install a Function Definition.
> An error occur when installing / running (C-x C-e) the function below
> 
>      (defun multiply-by-seven (number)
>        "Multiply NUMBER by seven."
>        (* 7 number))
> 
> Debugger entered--Lisp error: (void-variable number)
>   (* 7 number)
>   (progn (* 7 number))
>   eval((progn (* 7 number)) t)
>   elisp--eval-last-sexp(nil)
>   #f(compiled-function () #<bytecode 0x18675df5af7f>)()
>   handler-bind-1(#f(compiled-function () #<bytecode 0x18675df5af7f>) (error) eval-expression--debug)
>   eval-last-sexp(nil)
>   funcall-interactively(eval-last-sexp nil)
>   call-interactively(eval-last-sexp nil nil)
>   command-execute(eval-last-sexp)
>   recursive-edit()
>   debug(error (void-variable definition.) :backtrace-base eval-expression--debug)
>   eval-expression--debug((void-variable definition.))
>   (progn definition.)
>   eval((progn definition.) t)
>   elisp--eval-last-sexp(nil)
>   #f(compiled-function () #<bytecode 0x18675df5af7f>)()
>   handler-bind-1(#f(compiled-function () #<bytecode 0x18675df5af7f>) (error) eval-expression--debug)
>   eval-last-sexp(nil)
>   funcall-interactively(eval-last-sexp nil)
>   call-interactively(eval-last-sexp nil nil)
>   command-execute(eval-last-sexp)
>   recursive-edit()
>   debug(error (void-variable number) :backtrace-base eval-expression--debug)
>   eval-expression--debug((void-variable number))
>   (* 7 number)
>   (progn (* 7 number))
>   eval((progn (* 7 number)) t)
>   elisp--eval-last-sexp(nil)
>   #f(compiled-function () #<bytecode 0x18675df5af7f>)()
>   handler-bind-1(#f(compiled-function () #<bytecode 0x18675df5af7f>) (error) eval-expression--debug)
>   eval-last-sexp(nil)
>   funcall-interactively(eval-last-sexp nil)
>   call-interactively(eval-last-sexp nil nil)
>   command-execute(eval-last-sexp)

Please describe what you did, because I cannot reproduce the problem.
My steps were:

 . emacs -Q
 . insert the function's definition into the *scratch* buffer
 . C-x C-e on the closing parenthesis of the function to install the
   function in Emacs
 . type (multiply-by-seven 10) into *scratch* buffer
 . type C-x C-e after that
 . the result (70) is shown in the echo area, as expected

So I see no bug here.

From the backtrace you show, I'm guessing that you evaluated something
like

   (multiply-by-seven number)

without making 'number' a variable with some numerical value.




Merged 78156 78157. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 30 Apr 2025 06:39:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78156; Package emacs. (Wed, 30 Apr 2025 06:58:02 GMT) Full text and rfc822 format available.

Message #13 received at 78156 <at> debbugs.gnu.org (full text, mbox):

From: badli al rashid <theothernighttheotherday <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 78156 <at> debbugs.gnu.org
Subject: Re: bug#78156: 31.0.50; 3.2 Install a Function Definition
Date: Wed, 30 Apr 2025 14:57:32 +0800
[Message part 1 (text/plain, inline)]
I just do what the info file stated "Place the cursor after the last
parenthesis of the
function definition and type ‘C-x C-e’" but the output was the one I got.
Sent from Gmail

On Wed, Apr 30, 2025, 14:31 Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: badli al rashid <theothernighttheotherday <at> gmail.com>
> > Date: Wed, 30 Apr 2025 14:01:30 +0800
> >
> > From the elisp intro book, 3.2 Install a Function Definition.
> > An error occur when installing / running (C-x C-e) the function below
> >
> >      (defun multiply-by-seven (number)
> >        "Multiply NUMBER by seven."
> >        (* 7 number))
> >
> > Debugger entered--Lisp error: (void-variable number)
> >   (* 7 number)
> >   (progn (* 7 number))
> >   eval((progn (* 7 number)) t)
> >   elisp--eval-last-sexp(nil)
> >   #f(compiled-function () #<bytecode 0x18675df5af7f>)()
> >   handler-bind-1(#f(compiled-function () #<bytecode 0x18675df5af7f>)
> (error) eval-expression--debug)
> >   eval-last-sexp(nil)
> >   funcall-interactively(eval-last-sexp nil)
> >   call-interactively(eval-last-sexp nil nil)
> >   command-execute(eval-last-sexp)
> >   recursive-edit()
> >   debug(error (void-variable definition.) :backtrace-base
> eval-expression--debug)
> >   eval-expression--debug((void-variable definition.))
> >   (progn definition.)
> >   eval((progn definition.) t)
> >   elisp--eval-last-sexp(nil)
> >   #f(compiled-function () #<bytecode 0x18675df5af7f>)()
> >   handler-bind-1(#f(compiled-function () #<bytecode 0x18675df5af7f>)
> (error) eval-expression--debug)
> >   eval-last-sexp(nil)
> >   funcall-interactively(eval-last-sexp nil)
> >   call-interactively(eval-last-sexp nil nil)
> >   command-execute(eval-last-sexp)
> >   recursive-edit()
> >   debug(error (void-variable number) :backtrace-base
> eval-expression--debug)
> >   eval-expression--debug((void-variable number))
> >   (* 7 number)
> >   (progn (* 7 number))
> >   eval((progn (* 7 number)) t)
> >   elisp--eval-last-sexp(nil)
> >   #f(compiled-function () #<bytecode 0x18675df5af7f>)()
> >   handler-bind-1(#f(compiled-function () #<bytecode 0x18675df5af7f>)
> (error) eval-expression--debug)
> >   eval-last-sexp(nil)
> >   funcall-interactively(eval-last-sexp nil)
> >   call-interactively(eval-last-sexp nil nil)
> >   command-execute(eval-last-sexp)
>
> Please describe what you did, because I cannot reproduce the problem.
> My steps were:
>
>  . emacs -Q
>  . insert the function's definition into the *scratch* buffer
>  . C-x C-e on the closing parenthesis of the function to install the
>    function in Emacs
>  . type (multiply-by-seven 10) into *scratch* buffer
>  . type C-x C-e after that
>  . the result (70) is shown in the echo area, as expected
>
> So I see no bug here.
>
> From the backtrace you show, I'm guessing that you evaluated something
> like
>
>    (multiply-by-seven number)
>
> without making 'number' a variable with some numerical value.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78156; Package emacs. (Wed, 30 Apr 2025 08:21:02 GMT) Full text and rfc822 format available.

Message #16 received at 78156 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: badli al rashid <theothernighttheotherday <at> gmail.com>
Cc: 78156 <at> debbugs.gnu.org
Subject: Re: bug#78156: 31.0.50; 3.2 Install a Function Definition
Date: Wed, 30 Apr 2025 11:20:04 +0300
> From: badli al rashid <theothernighttheotherday <at> gmail.com>
> Date: Wed, 30 Apr 2025 14:57:32 +0800
> Cc: 78156 <at> debbugs.gnu.org
> 
> I just do what the info file stated "Place the cursor after the last parenthesis of the
> function definition and type ‘C-x C-e’" but the output was the one I got.

That doesn't happen here.

With the text below in *scratch*

     (defun multiply-by-seven (number)
      "Multiply NUMBER by seven."
      (* 7 number)) <===

if I place the cursor after the closing parenthesis marked by "<==="
and type "C-x C-e", all I see is "multiply-by-seven" in the echo area.

So you are probably doing something different, but what?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78156; Package emacs. (Wed, 30 Apr 2025 08:57:01 GMT) Full text and rfc822 format available.

Message #19 received at 78156 <at> debbugs.gnu.org (full text, mbox):

From: badli al rashid <theothernighttheotherday <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 78156 <at> debbugs.gnu.org
Subject: Re: bug#78156: 31.0.50; 3.2 Install a Function Definition
Date: Wed, 30 Apr 2025 16:56:04 +0800
[Message part 1 (text/plain, inline)]
I did not root the phone, could it be the android enterprise settings ?

Sent from Gmail

On Wed, Apr 30, 2025, 16:20 Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: badli al rashid <theothernighttheotherday <at> gmail.com>
> > Date: Wed, 30 Apr 2025 14:57:32 +0800
> > Cc: 78156 <at> debbugs.gnu.org
> >
> > I just do what the info file stated "Place the cursor after the last
> parenthesis of the
> > function definition and type ‘C-x C-e’" but the output was the one I got.
>
> That doesn't happen here.
>
> With the text below in *scratch*
>
>      (defun multiply-by-seven (number)
>       "Multiply NUMBER by seven."
>       (* 7 number)) <===
>
> if I place the cursor after the closing parenthesis marked by "<==="
> and type "C-x C-e", all I see is "multiply-by-seven" in the echo area.
>
> So you are probably doing something different, but what?
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78156; Package emacs. (Wed, 30 Apr 2025 09:54:02 GMT) Full text and rfc822 format available.

Message #22 received at 78156 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: badli al rashid <theothernighttheotherday <at> gmail.com>,
 Po Lu <luangruo <at> yahoo.com>
Cc: 78156 <at> debbugs.gnu.org
Subject: Re: bug#78156: 31.0.50; 3.2 Install a Function Definition
Date: Wed, 30 Apr 2025 12:53:00 +0300
> From: badli al rashid <theothernighttheotherday <at> gmail.com>
> Date: Wed, 30 Apr 2025 16:56:04 +0800
> Cc: 78156 <at> debbugs.gnu.org
> 
> I did not root the phone, could it be the android enterprise settings ? 

Sorry, I have no idea what that means (but I doubt that).

Po Lu, any ideas or suggestions?




This bug report was last modified 52 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.