From unknown Fri Jun 20 07:15:57 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#6893 <6893@debbugs.gnu.org> To: bug#6893 <6893@debbugs.gnu.org> Subject: Status: evaluating `'#'(lambda (b) b)8 ; => 8 with `eval-last-sexp' "C-x C-e" in `emacs-lisp-mode' Reply-To: bug#6893 <6893@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:15:57 +0000 retitle 6893 evaluating `'#'(lambda (b) b)8 ; =3D> 8 with `eval-last-sexp' = "C-x C-e" in `emacs-lisp-mode' reassign 6893 emacs submitter 6893 MON KEY severity 6893 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 21 17:53:58 2010 Received: (at submit) by debbugs.gnu.org; 21 Aug 2010 21:53:58 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Omw0j-0002MC-Nb for submit@debbugs.gnu.org; Sat, 21 Aug 2010 17:53:58 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Omw0h-0002M7-9h for submit@debbugs.gnu.org; Sat, 21 Aug 2010 17:53:55 -0400 Received: from lists.gnu.org ([199.232.76.165]:49316) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Omw1s-0002md-Eo for submit@debbugs.gnu.org; Sat, 21 Aug 2010 17:55:08 -0400 Received: from [140.186.70.92] (port=50548 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Omw1r-0002kw-1O for bug-gnu-emacs@gnu.org; Sat, 21 Aug 2010 17:55:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,GAPPY_SUBJECT, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Omw1p-0005BR-KP for bug-gnu-emacs@gnu.org; Sat, 21 Aug 2010 17:55:06 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:33789) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Omw1p-0005B8-FN for bug-gnu-emacs@gnu.org; Sat, 21 Aug 2010 17:55:05 -0400 Received: by wwb31 with SMTP id 31so1555309wwb.30 for ; Sat, 21 Aug 2010 14:55:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.54.9 with SMTP id h9mr891378wec.34.1282427703404; Sat, 21 Aug 2010 14:55:03 -0700 (PDT) Received: by 10.216.65.140 with HTTP; Sat, 21 Aug 2010 14:55:03 -0700 (PDT) Date: Sat, 21 Aug 2010 17:55:03 -0400 X-Google-Sender-Auth: mv8FtplvBifzwegNjaVgrTmkMag Message-ID: Subject: evaluating `'#'(lambda (b) b)8 ; => 8 with `eval-last-sexp' "C-x C-e" in `emacs-lisp-mode' From: MON KEY To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) Interactive invocation of `eval-last-sexp' (e.g. "C-x C-e" ) in Emacs-lisp mode buffer for this form: `'#'(lambda (b) b)8 ;=3D> 8 `eval-last-sexp' for this makes (some) sense: `'#'(lambda (b) b) ;=3D> (quote (function (lambda (b) b))) And so, presumably the above is equivalent to: (eval '(list 'quote '(function (lambda (b) b)))) ;=3D> (quote (function (lambda (b) b))) But what is the equivalent form which would explain the results for following: `'#'(lambda (b) b)8 ;=3D> 8 Surely it isn't this: (funcall (eval (eval (eval '(list 'quote '(function (lambda (b) b)))))) 8) ;=3D> 8 If it is, then why is eval'ing the same `'#'(lambda (b) b)8 form with `eval-expression' (e.g. "M-:") met with the message: "Trailing garbage following expression" Likewise, giving `eval-expression' this form lands me in the debugger: (`'#'(lambda (b) b) 8) ;=3D> Debugger entered--Lisp error: (wrong-number-of-arguments #[(structure) "\301=08!A\207" [structure backquote-process] 2 1720176] = 2) Reproducable on 23.2 with emacs -Q -- /s_P\ From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 21 18:45:36 2010 Received: (at 6893-done) by debbugs.gnu.org; 21 Aug 2010 22:45:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Omwoi-0002i9-0N for submit@debbugs.gnu.org; Sat, 21 Aug 2010 18:45:36 -0400 Received: from impaqm4.telefonica.net ([213.4.138.4]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmwiQ-0002fD-8j for 6893-done@debbugs.gnu.org; Sat, 21 Aug 2010 18:39:06 -0400 Received: from IMPmailhost2.adm.correo ([10.20.102.39]) by IMPaqm4.telefonica.net with bizsmtp id xAaZ1e0060r0BT63QAgJ3t; Sun, 22 Aug 2010 00:40:18 +0200 Received: from ceviche.home ([83.61.35.93]) by IMPmailhost2.adm.correo with BIZ IMP id xAgH1e00C20aCvn1iAgJZq; Sun, 22 Aug 2010 00:40:18 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Received: by ceviche.home (Postfix, from userid 20848) id 9165A660E9; Sun, 22 Aug 2010 00:40:17 +0200 (CEST) From: Stefan Monnier To: MON KEY Subject: Re: bug#6893: evaluating `'#'(lambda (b) b)8 ; => 8 with `eval-last-sexp' "C-x C-e" in `emacs-lisp-mode' Message-ID: References: Date: Sun, 22 Aug 2010 00:40:17 +0200 In-Reply-To: (MON KEY's message of "Sat, 21 Aug 2010 17:55:03 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 6893-done X-Mailman-Approved-At: Sat, 21 Aug 2010 18:45:33 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.4 (-) > Interactive invocation of `eval-last-sexp' (e.g. "C-x C-e" ) in > Emacs-lisp mode buffer for this form: > `'#'(lambda (b) b)8 > ;=> 8 C-x C-e doesn't evaluate "the expression on the line" but "the last sexp before point". The "last-sexp" is just "8" (try C-M-b to see what it is), so whatever other sexp you put before won't make any difference. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 21 18:49:08 2010 Received: (at 6893) by debbugs.gnu.org; 21 Aug 2010 22:49:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Omws8-0002kE-GJ for submit@debbugs.gnu.org; Sat, 21 Aug 2010 18:49:08 -0400 Received: from mail-out.m-online.net ([212.18.0.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Omws5-0002js-D6 for 6893@debbugs.gnu.org; Sat, 21 Aug 2010 18:49:06 -0400 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 6E04E1C00349; Sun, 22 Aug 2010 00:50:16 +0200 (CEST) Received: from igel.home (ppp-93-104-151-37.dynamic.mnet-online.de [93.104.151.37]) by mail.mnet-online.de (Postfix) with ESMTP id 3C0551C003F1; Sun, 22 Aug 2010 00:50:16 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id C783FCA299; Sun, 22 Aug 2010 00:50:15 +0200 (CEST) From: Andreas Schwab To: MON KEY Subject: Re: bug#6893: evaluating `'#'(lambda (b) b)8 ; => 8 with `eval-last-sexp' "C-x C-e" in `emacs-lisp-mode' References: X-Yow: The LOGARITHM of an ISOSCELES TRIANGLE is TUESDAY WELD!! Date: Sun, 22 Aug 2010 00:50:15 +0200 In-Reply-To: (MON KEY's message of "Sat, 21 Aug 2010 17:55:03 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 6893 Cc: 6893@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) MON KEY writes: > But what is the equivalent form which would explain the results for > following: > > `'#'(lambda (b) b)8 > ;=> 8 8 Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 21 20:16:11 2010 Received: (at 6893) by debbugs.gnu.org; 22 Aug 2010 00:16:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmyEN-0003Gn-8n for submit@debbugs.gnu.org; Sat, 21 Aug 2010 20:16:11 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmyEL-0003Gi-7q for 6893@debbugs.gnu.org; Sat, 21 Aug 2010 20:16:09 -0400 Received: by wwb22 with SMTP id 22so6295409wwb.15 for <6893@debbugs.gnu.org>; Sat, 21 Aug 2010 17:17:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.203.71 with SMTP id e49mr2915001weo.60.1282436242091; Sat, 21 Aug 2010 17:17:22 -0700 (PDT) Received: by 10.216.65.140 with HTTP; Sat, 21 Aug 2010 17:17:22 -0700 (PDT) In-Reply-To: References: Date: Sat, 21 Aug 2010 20:17:22 -0400 X-Google-Sender-Auth: Uxv04m_kd_dEirBeTrGcR98Fo04 Message-ID: Subject: Re: bug#6893: evaluating `'#'(lambda (b) b)8 ; => 8 with `eval-last-sexp' "C-x C-e" in `emacs-lisp-mode' From: MON KEY To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 6893 Cc: 6893@debbugs.gnu.org, Andreas Schwab X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Sat, Aug 21, 2010 at 6:40 PM, Stefan Monnier wrote: >> Interactive invocation of `eval-last-sexp' (e.g. "C-x C-e" ) in >> Emacs-lisp mode buffer for this form: > >> =C2=A0`'#'(lambda (b) b)8 >> =C2=A0;=3D> 8 > > C-x C-e doesn't evaluate "the expression on the line" but "the last sexp > before point". OK. > The "last-sexp" is just "8" (try C-M-b to see what it is), so whatever > other sexp you put before won't make any difference. So what about these? `'#'8 ;=3D> (quote (function 8)) `#'?\x27?\x23 ;=3D> (function 39) Where did 35 go? > =C2=A0 =C2=A0 =C2=A0 =C2=A0Stefan -- /s_P\ From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 24 13:26:31 2010 Received: (at 6893) by debbugs.gnu.org; 24 Aug 2010 17:26:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnxGX-0005gV-TM for submit@debbugs.gnu.org; Tue, 24 Aug 2010 13:26:30 -0400 Received: from smtp23.services.sfr.fr ([93.17.128.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnxGV-0005gQ-As for 6893@debbugs.gnu.org; Tue, 24 Aug 2010 13:26:28 -0400 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2301.sfr.fr (SMTP Server) with ESMTP id 3090A700008F; Tue, 24 Aug 2010 19:27:47 +0200 (CEST) Received: from fmsmemgm.homelinux.net (132.92.71-86.rev.gaoland.net [86.71.92.132]) by msfrf2301.sfr.fr (SMTP Server) with ESMTP id D3F2A700009A; Tue, 24 Aug 2010 19:27:46 +0200 (CEST) X-SFR-UUID: 20100824172746868.D3F2A700009A@msfrf2301.sfr.fr Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 68D65BA692; Mon, 23 Aug 2010 00:49:53 +0200 (CEST) From: Stefan Monnier To: MON KEY Subject: Re: bug#6893: evaluating `'#'(lambda (b) b)8 ; => 8 with `eval-last-sexp' "C-x C-e" in `emacs-lisp-mode' Message-ID: References: Date: Mon, 23 Aug 2010 00:49:53 +0200 In-Reply-To: (MON KEY's message of "Sat, 21 Aug 2010 20:17:22 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > So what about these? > `'#'8 > ; => (quote (function 8)) What about it? C-M-b indeed shows that '#'8 is the sexp. [...] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 GAPPY_SUBJECT Subject: contains G.a.p.p.y-T.e.x.t 0.6 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 1.2 DATE_IN_PAST_24_48 Date: is 24 to 48 hours before Received: date -1.1 BAYES_05 BODY: Bayesian spam probability is 1 to 5% [score: 0.0123] X-Debbugs-Envelope-To: 6893 Cc: 6893@debbugs.gnu.org, Andreas Schwab X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 1.0 (+) > So what about these? > `'#'8 > ;=> (quote (function 8)) What about it? C-M-b indeed shows that '#'8 is the sexp. > `#'?\x27?\x23 > ;=> (function 39) > Where did 35 go? That's a known shortcoming of syntax tables which aren't able to describe correctly the syntax of Elisp char constants. But again C-M-b shows you correctly what C-x C-e considers as "the last sexp". Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 24 16:48:13 2010 Received: (at 6893) by debbugs.gnu.org; 24 Aug 2010 20:48:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oo0Pl-0008Sr-GN for submit@debbugs.gnu.org; Tue, 24 Aug 2010 16:48:13 -0400 Received: from mail-ey0-f172.google.com ([209.85.215.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oo0Pi-0008Sm-NX for 6893@debbugs.gnu.org; Tue, 24 Aug 2010 16:48:11 -0400 Received: by eyd10 with SMTP id 10so3556830eyd.3 for <6893@debbugs.gnu.org>; Tue, 24 Aug 2010 13:49:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.50.73 with SMTP id y51mr6464382web.85.1282682970942; Tue, 24 Aug 2010 13:49:30 -0700 (PDT) Received: by 10.216.65.140 with HTTP; Tue, 24 Aug 2010 13:49:30 -0700 (PDT) In-Reply-To: References: Date: Tue, 24 Aug 2010 16:49:30 -0400 X-Google-Sender-Auth: 3KfNqdFv56yLt_oZUwZXgvsRa3U Message-ID: Subject: Re: bug#6893: evaluating `'#'(lambda (b) b)8 ; => 8 with `eval-last-sexp' "C-x C-e" in `emacs-lisp-mode' From: MON KEY To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 6893 Cc: 6893@debbugs.gnu.org, Andreas Schwab X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.1 (-) On Sun, Aug 22, 2010 at 6:49 PM, Stefan Monnier wrote: >> So what about these? > >> `'#'8 >> =C2=A0;=3D> (quote (function 8)) > > What about it? =C2=A0C-M-b indeed shows that '#'8 is the sexp. > >> =C2=A0`#'?\x27?\x23 >> =C2=A0;=3D> (function 39) > My point is that with these C M-b: `'#' `' point is skipped back beyond the sexp at point to "M-b:". Isn't there an implicit list after the last quote created by backquote? It "feels" like there is with these: `#1=3D#1# ;=3D> (nil) `','#1=3D#1# ;=3D> (quote (nil)) `',#''#1=3D#1# ;=3D> (quote (quote (nil))) `',#','#1=3D#1# ;=3D> (quote \,) `,#','#1=3D#1# ;=3D> \, `',#','nil ;=3D> (quote \,) `',#',#1=3D#1# ;=3D> (quote \,) >> Where did 35 go? > > That's a known shortcoming of syntax tables which aren't able to > describe correctly the syntax of Elisp char constants. Does that affect how the range of "last sexp" is allowed to extend beyond t= he beginning-of-line only to find some arbitrary word barier a few lines up? > But again C-M-b > shows you correctly what C-x C-e considers as "the last sexp". Yes well, even w/ C M-b hopping its still not a valid sexp for `eval': `#'?\x27?\x23 =3D> (function 39) (eval (function 39)) ;=3D> 39 (eval `#'?\x27?\x23) ;=3D> Debugger entered--Lisp error: (wrong-number-of-arguments eval 2) And besides, theres this anomaly too: #&8"\377" ;=3D> "\377" (actually on Emacs 23.2 its =3D> "=C3=BF") `#&8"\377" ;=3D> "\377" (actually on Emacs 23.2 its =3D> "=C3=BF") `#&8"\x3fffff" ;=3D> "\377" (actually on Emacs 23.2 its =3D> "=C3=BF") Which would make sense except that _both_ of these manages to fail "correct= ly": `'#s `'#s" " !string =3D> Debugger entered--Lisp error: (invalid-read-syntax "#") Despite the fact that C M-b for either of this forms: `'#s(hash-table size 30 data (key1 val1 key2 300)) #s(hash-table size 30 data (key1 val1 key2 300)) puts point just after "#s". I understand that the hash-table read syntax has a higher priority because = its newer but the cummulative effect of the various sharpsign quoting/evaluatio= n rules for the immediate sexp before point feels inconsistently biased when viewed in the aggregate. > > > Stefan -- /s_P\ From unknown Fri Jun 20 07:15:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 22 Sep 2010 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator