From unknown Wed Aug 20 05:18:06 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#76715 <76715@debbugs.gnu.org> To: bug#76715 <76715@debbugs.gnu.org> Subject: Status: 30.1; Issues when pretty printing lists with elements ending with a dot Reply-To: bug#76715 <76715@debbugs.gnu.org> Date: Wed, 20 Aug 2025 12:18:06 +0000 retitle 76715 30.1; Issues when pretty printing lists with elements ending = with a dot reassign 76715 emacs submitter 76715 pkryger@gmail.com severity 76715 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 03 11:24:20 2025 Received: (at submit) by debbugs.gnu.org; 3 Mar 2025 16:24:20 +0000 Received: from localhost ([127.0.0.1]:50579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tp8aZ-0000Tq-EP for submit@debbugs.gnu.org; Mon, 03 Mar 2025 11:24:19 -0500 Received: from lists.gnu.org ([2001:470:142::17]:43402) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tp8aV-0000Sv-FF for submit@debbugs.gnu.org; Mon, 03 Mar 2025 11:24:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tp8aP-0002xI-UY for bug-gnu-emacs@gnu.org; Mon, 03 Mar 2025 11:24:10 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tp8aN-0006If-NS for bug-gnu-emacs@gnu.org; Mon, 03 Mar 2025 11:24:09 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-439950a45daso29746435e9.2 for ; Mon, 03 Mar 2025 08:24:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741019044; x=1741623844; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=HWiamILMMji6LjfeyDWD90SvCnNLn6QS+75fNohL+M4=; b=SuNBWrj8hi6owZcEYkjY+go9p1cImcMi+g2Eik5M6ZiuGYshXA5jszYBk6+nhOlDmb v+TPNMBWRG/q6tLBsfJlnH07s5DvkkD7UryqJVA0tmlscQg/N0lG7WNLNTwh9tRq09vj mJ19zjJ8tyzmp/3ZGjJlkopdtifDmceaEIAYzQtLs5aUhLwX8eDnEORyrHMBaVIfDUYA cpGTzJivH4nTlAL4T2mxFT6SmnNuuIdks1W8T2aaiJuyid7fWBSKNbUoZUEoGpAJOUBF RoQIpaShD8iYvQY4veA3l3xSR/HvdNdYKJ8qzV4BjVcLuab/5lfdp1GVMIupfF11yMqQ PUNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741019044; x=1741623844; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HWiamILMMji6LjfeyDWD90SvCnNLn6QS+75fNohL+M4=; b=dZm4N7EftjVTJC4N4QL4/2F69GLNmWJ8SE7QYq+rT5gN1fU4phUg6xsseWy+127Fq3 uVuvvvYcZIAs43LQ8n4X8y2sI4sfkJXEqtGL0pTST//klD9msiYfDmPrj3kgBnhmjbOo Q8h+VgWG6u2m+UW1oePXjqmo9ZigCHB+79xhO+AaOocOXNojk6cJbSGTusTBjKBw88F9 vI9ZlonFVUD6Vc+lNM9mxHqxb0CpmlEt4ZCdFsLO1Hb35tGxNLKoY+nr6TVlwWZ+qXJ+ iC2TW8olqTooFdG9qjZaZu/c0TM2KNT7NfTD6ZuVZaF7BjroBq/KtlSfMwFhVFG7rDQO 9csA== X-Gm-Message-State: AOJu0YzP2Zlg8hkchBLz0Wn/VY9VQ8NKejNplk2RJzdTYXHODzZ2rVbD 39dI6ynkwB+as4nzZ4EjLjF0ctX9HcjcxlwwOqKhINbhCOmEdL78LcsSoA== X-Gm-Gg: ASbGncs1d3eHEfOnFZ+0ZFzdE5ZEpcKmd2JdDbLa12ZvGZ0G3AmXK3JQb24vro8dLcC POXs2cpF/BUcJ8ANutXspslqhJe3WfUJYNJGlF8oV0qqgXuCUe7OiNqglQtkVDY4ohp4aSkwTHv ox+jdhXyrmiOwlvwkbMfQwnBpoVqcZ9wJJKJzO7uUCj3/PpZQoRfRBsxKoniKtfmp581ly/Hm/0 OQ2tciST0xYz9PNNLV08+IBwbYWI30zt+pQYSyTDTdQ9de5I7hFa7upW3eXfd+I+ej+kkM8R7aj aBfArcHN9hi63ltY4pfiaX/zcdYwfrClwEFawBaO+MgcBrm5RR3mznppKgwjrVr140BfI0T+63n U+1YHns/cN6nR42OH/YPh+G6j7DU= X-Google-Smtp-Source: AGHT+IFB/p10yP19q1KMS2Nvpyx4G6BVF+yBR+nIGGtL/EfS9Kpp7ska7EnR18d4sMhJnyOP+CVggg== X-Received: by 2002:a05:600c:3584:b0:43b:c541:51d3 with SMTP id 5b1f17b1804b1-43bc541542fmr24301435e9.6.1741019044364; Mon, 03 Mar 2025 08:24:04 -0800 (PST) Received: from 2f343e6a5217 (host31-52-96-183.range31-52.btcentralplus.com. [31.52.96.183]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-390e479609asm14733410f8f.2.2025.03.03.08.24.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Mar 2025 08:24:03 -0800 (PST) From: pkryger@gmail.com To: bug-gnu-emacs@gnu.org Subject: 30.1; Issues when pretty printing lists with elements ending with a dot X-Debbugs-Cc: Date: Mon, 03 Mar 2025 16:22:04 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=pkryger@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) The defualt pretty printing function `pp-fill' yields different output than the expression to be printed. I managed to simplify the cases to the following: (let ((pp-default-function #'pp-fill) (fill-column 8)) (pp '(x. y. z.))) yields output that is not the same expression as the input: (x. y . z.) When the `fill-column' is smaller (or there are more elements in input) the yielded value is not a valid s-expression (let ((pp-default-function #'pp-fill) (fill-column 5)) (pp '(x. y. z.))) yields: (x . y . z.) Trying to `read' it back: (read (let ((pp-default-function #'pp-fill) (fill-column 5)) (pp '(x. y. z.)))) Yields the following error: Debugger entered--Lisp error: (invalid-read-syntax "expected )") read("(x\n . y\n . z.)\n") (progn (read (let ((pp-default-function #'pp-fill) (fill-column 5)) (pp '(x. y. z.))))) eval((progn (read (let ((pp-default-function #'pp-fill) (fill-column 5)) (pp '(x. y. z.))))) t) elisp--eval-last-sexp(nil) #f(compiled-function () #)() handler-bind-1(#f(compiled-function () #) (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) For comparison the `pp-29' yields correct output (it's `fill-column' insensitive, hence omitted in the example): (let ((pp-default-function #'pp-29)) (pp '(x. y. z.))) yields (I guess) exepcted output: (x. y. z.) For a real life error, please see: https://github.com/purcell/package-lint/issues/285 In GNU Emacs 30.1 (build 1, aarch64-unknown-linux-gnu) System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --prefix=/nix/store/whhfliclsxcxxjb43hd1csncqj6jf5aj-emacs-30-1 --disable-build-details --with-modules --with-x=no --with-ns=no --with-xpm=no --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no' Configured features: GMP GNUTLS LIBXML2 MODULES NOTIFY INOTIFY PDUMPER SECCOMP SOUND SQLITE3 THREADS TREE_SITTER Important settings: locale-coding-system: nil 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 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 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: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dnd dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader smtpmail auth-source eieio eieio-core password-cache json subr-x map sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-macs use-package-ensure cl-seq use-package-core jka-compr noutline outline icons cl-extra shortdoc text-property-search comp-common regexp-opt rx help-fns radix-tree cl-print debug backtrace help-mode tool-bar find-func pp cl-loaddefs cl-lib term/xterm xterm byte-opt gv bytecomp byte-compile disp-table rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select 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 multi-tty make-network-process emacs) Memory information: ((conses 16 117797 13078) (symbols 48 8010 0) (strings 32 21505 2148) (string-bytes 1 550215) (vectors 16 11636) (vector-slots 8 99179 8394) (floats 8 89 258) (intervals 56 1933 148) (buffers 992 15)) From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 04 07:37:10 2025 Received: (at 76715) by debbugs.gnu.org; 4 Mar 2025 12:37:10 +0000 Received: from localhost ([127.0.0.1]:56128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tpRWI-0000OJ-02 for submit@debbugs.gnu.org; Tue, 04 Mar 2025 07:37:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56792) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tpRWF-0000Nv-6a for 76715@debbugs.gnu.org; Tue, 04 Mar 2025 07:37:07 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tpRW9-00040C-6Y; Tue, 04 Mar 2025 07:37:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=RBX4tk+YZaDGvAFRFZgIgmm8DJxg7m1GquwVDNTfc4A=; b=D0eW4pH/7UiX UE5o62P1EMMmxObXNoG53UEI+X3J4X4LMZ5xn7w4hpxS3NzaqU1mOVKJ6Nxdt9ovz7ayeTxz1S/4/ 0PcUrOYAsXfUAfpeq3FJinxZro1cQusyqEfxlLqpKHQwjOKOAdeX5vJPtx6Rk5FIUMwM+swcsdXXX 2lzsE3lix/F2ZYnDBR60wBMUz6SrkW54WZOfmEPCFm9Nqz6XHGSwoRfF6cEwkdpZdF0bIJ1kctdS3 drWsOZ6VSgjsXf3RnCEkq08WNL0l+EPmDuz5df3n7ybUZHfbUzxxN89QZPCc3CUasEtZ7oGCWPSpH eVXEO5JvxeNLsiVjlESKWg==; Date: Tue, 04 Mar 2025 14:36:59 +0200 Message-Id: <86jz95j7kk.fsf@gnu.org> From: Eli Zaretskii To: pkryger@gmail.com, Stefan Monnier In-Reply-To: (pkryger@gmail.com) Subject: Re: bug#76715: 30.1; Issues when pretty printing lists with elements ending with a dot References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76715 Cc: 76715@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: pkryger@gmail.com > Date: Mon, 03 Mar 2025 16:22:04 +0000 > > > The defualt pretty printing function `pp-fill' yields different output than the expression to be printed. I managed to simplify the cases to the following: > > (let ((pp-default-function #'pp-fill) > (fill-column 8)) > (pp '(x. y. z.))) > > yields output that is not the same expression as the input: > > (x. y > . z.) > > When the `fill-column' is smaller (or there are more elements in input) the yielded value is not a valid s-expression > > (let ((pp-default-function #'pp-fill) > (fill-column 5)) > (pp '(x. y. z.))) > > yields: > > (x > . y > . z.) > > Trying to `read' it back: > (read > (let ((pp-default-function #'pp-fill) > (fill-column 5)) > (pp '(x. y. z.)))) > > Yields the following error: > > Debugger entered--Lisp error: (invalid-read-syntax "expected )") > read("(x\n . y\n . z.)\n") > (progn (read (let ((pp-default-function #'pp-fill) (fill-column 5)) (pp '(x. y. z.))))) > eval((progn (read (let ((pp-default-function #'pp-fill) (fill-column 5)) (pp '(x. y. z.))))) t) > elisp--eval-last-sexp(nil) > #f(compiled-function () #)() > handler-bind-1(#f(compiled-function () #) (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) > > For comparison the `pp-29' yields correct output (it's `fill-column' insensitive, hence omitted in the example): > > (let ((pp-default-function #'pp-29)) > (pp '(x. y. z.))) > > yields (I guess) exepcted output: > > (x. y. z.) > > For a real life error, please see: https://github.com/purcell/package-lint/issues/285 Stefan, any comments or suggestions? From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 05 08:36:39 2025 Received: (at 76715) by debbugs.gnu.org; 5 Mar 2025 13:36:39 +0000 Received: from localhost ([127.0.0.1]:36163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tpovO-00055H-Kk for submit@debbugs.gnu.org; Wed, 05 Mar 2025 08:36:38 -0500 Received: from mout.web.de ([212.227.15.4]:48095) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tpovM-000550-7p for 76715@debbugs.gnu.org; Wed, 05 Mar 2025 08:36:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1741181787; x=1741786587; i=michael_heerdegen@web.de; bh=ytP9tU9Bsrqyhh0gt5XU/IFpgRLCxS/K7b5zVwtTw58=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=beiDfqmVIhaCFrIYSpwfCMM6Lqo7GU5UWUxnurUzHVxA080reuztpuAusxYfCchO 9dE9i8YIfrvZVxEMrVJ3wVEt542PGhgT64ppLZ/F6o35CYAq6+ptxaN745YdU/ab/ uU/IUUBEZ5GjncjOzT9Y9ezOrUcjOOolUwBeU57/UyZAR2rNTTYKlvBQ9dZmWrqsK FEpbagbMtWGRxle5rjpqRO22FA79VbebOcSvjaPtII92a6/S7KMFWElfq83Pe6ZNu noD5grqRbLVp4Q56xrhfQnEqbose/7TJXMXdxhUUvKsS4CUqr3Uh7aHBvnmBPvzzk 780chG4uCL+MV8PAqg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([84.59.210.100]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MVJRb-1tiucu2JsN-00Vz4X; Wed, 05 Mar 2025 14:36:27 +0100 From: Michael Heerdegen To: Eli Zaretskii Subject: Re: bug#76715: 30.1; Issues when pretty printing lists with elements ending with a dot In-Reply-To: <86jz95j7kk.fsf@gnu.org> References: <86jz95j7kk.fsf@gnu.org> Date: Wed, 05 Mar 2025 14:37:51 +0100 Message-ID: <87tt87egy8.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:YIP5qYbZ/y0/EkykAB+ajXsLdDs4fL1FN3Zz2b0rXo3STQDPDhk pE8Pw0PqNGYOe3u9wbeKG8pRwgJtsQtHuk3qszUlygPVRg7NIEjFwye/dIVSbL+TbEBsszM L4A46KwBkVG5gogic50zP16XYh8BWVOmTN/3mEOqWIPrAFBrMKk+7Nr1QaK+5BeYzldxMgM C6YB/FjKKmh8OCPW0xAeQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:9KURr1S4Kbw=;s4100wWMnHF2zrZzIJV+x2ySG1h 3SzlUjT/flU2uogkFQam55TypV6amxjLSsSjDCry0TQBlpjtfX+q//g9f2JSNlztdHhSzfmeA 0DpErRzeQkopQcS/n0V95Ng9gnqeuntHMLtof3T8OiSu3bVaqPuFIq2/DF90SxyxlnPXBc0On GRy/FqakvuAW8QiqXxQy93PQJkSguDqHvT4xzYKiY1Pxn7OZGxu8NgZMjRczrXf3I2/g2Y/0I fSY/9cFTW94n/cLhVDaFmtRsY0ec4kPtyVgmEu90dSXOgw9kHYwovYLch9w1NiDyYYdHAENAA BPCRODNRpSDOuFzfdukwQQYDyKG7tHEmft/TBLordVtYmqXd9i0F7SwGR2/aMzc/EQafuHfkZ Fze56MLgA92pG1voq5Bof69gMWaWoipfiwBl8GWCm0/EUZ/Ip+aLeBjhhCH2vnPrTqQyPwqGx YHKNHGAtSFE48+6GqJnCtGoGohv57CjFtO+kX7UezGG5WPf75P+wTASsj6CYNqaiGHfcERJCA KUyCmmw7cYKqAJjCJLyhC5IblInlS0NoiyEftO0J5a2pQjGyOk3Kq+bORGKLvIOgiXWxo8kXU 4AzmcBaU3D0sxCwpJD0xCioWCRRNLS0qhLoty2UH2xLhGeKFLmDHdk8Rqs8EMpgurAI/r15is ghGzKumnevriHE+ep8QfhMLvW423nsSiBegWCNvyKW16sy3yFaukHJegBy+zuJdCGCPoYEA1q whaPjjDIxsgac+mHk/mCH4urALz28jWSK/2UEGOu4Crg+vUufo+fWD7n1buy3K2pnaKt+S2j0 6uLxv95rK/fzkqaFpvFZBawvEr5ALtC0CVwAL1b2kVFo/wzHGIUwOiOQ7+pduf82knWXlU2q6 P5vjuYI5vLQCJh3hTyLp4Zc3c7uITXC946jg+2X1ueDcd+sL4NxwwBVeKgd4C8zf40yCaF72p GEiuSyLzn1RI54ORRtdbx8mXOn9dIHZc500p53QQfDOt9QMdFZfxU+HF6GTRVti09GtQpK09U Inm3e1+8zWQ+JZJinb1DNvgIQ6fYw6OFYKzIF6RWOTKDNAXL1PiwkYyc7zpkvWzSWoYX24Bu1 QVW/xDIUQn2OrkB6ivca09yGqiLT0/NUaw2EMUS/AlTwWObaeE9lO7HXX+MgHatH4L42hQsEU k+AbRdSoWoB+S0cAlh2enbMhj5dht5T1hA0XCAwA/MHf8BjEffPhkRXXbc/blwLNZlT6Po/x8 AeayNHBReiEFMa3lOYhaO/dW5YuCQNz/tXJ0qIp8bLowQnuV2jY87M1Qnc2gfMyTOmiSo/N/Z qRRZx3OQ/pKx01g5gJVMpGzA+gul7jr1bZAGzeZbbJNGiJsI7pnhy4Fdx33ZQEfFLg232mpty I8e+TwHCwY55JHJQej+dB2CzbJgooBoPlnXttRn8WSUCDFJNjze2i1nGl5 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 76715 Cc: pkryger@gmail.com, 76715@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: > Stefan, any comments or suggestions? It's a regression from 2024, related to 7269a2f1586 "(pp-fill): Cut before parens and dots" So we must ensure that the dots where we cut are not part of a symbol. Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 05 18:36:02 2025 Received: (at 76715-done) by debbugs.gnu.org; 5 Mar 2025 23:36:03 +0000 Received: from localhost ([127.0.0.1]:40352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tpyHS-0001sW-E6 for submit@debbugs.gnu.org; Wed, 05 Mar 2025 18:36:02 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:20514) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tpyHQ-0001ry-7w for 76715-done@debbugs.gnu.org; Wed, 05 Mar 2025 18:36:00 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CB833442F2B; Wed, 5 Mar 2025 18:35:53 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1741217752; bh=fTZPtfTAlDFDUjq2HWNzchWVtWarhNBnHHFQIu0GWDA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=hdOYryablqzSGd3t1tflbGfeKctC0KzPEboI84Aa3nECyv3J3dx5hJWjmSsphJktT 2QqW+uC/P/mf0V0JltF/5TU0euUejrcKb8qfbGJa9+NprL03gTRAbJnp4G7E+Ffaxl O0ywntysscxsZHWaISFCWUUwbOKRT58MSK+9XSjjbs/SkrHAeQjCI9uQBYcq6eDDQg YFYSo42n5QT7NvpSzRdFB0V0ne8Q0zDhXhIDPw5J3bBQA9U2OrfN5HSUDlgxhS6yxq C+YM5iCtgkm21kw69uzA8gHw84I170mb0xpq5BrsmY6vi4vuFOooIbHRpEktgraQMJ SMy5qf9w6gvQw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CCA74442EF1; Wed, 5 Mar 2025 18:35:52 -0500 (EST) Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C133F120262; Wed, 5 Mar 2025 18:35:52 -0500 (EST) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#76715: 30.1; Issues when pretty printing lists with elements ending with a dot In-Reply-To: <86jz95j7kk.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 04 Mar 2025 14:36:59 +0200") Message-ID: References: <86jz95j7kk.fsf@gnu.org> Date: Wed, 05 Mar 2025 18:35:52 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.213 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76715-done Cc: pkryger@gmail.com, 76715-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> The defualt pretty printing function `pp-fill' yields different >> output than the expression to be printed. I managed to simplify the >> cases to the following: >> >> (let ((pp-default-function #'pp-fill) >> (fill-column 8)) >> (pp '(x. y. z.))) >> >> yields output that is not the same expression as the input: >> >> (x. y >> . z.) I pushed the patch below to `master`. That should fix this problem. Stefan diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index 3e75807f757..c183f442d8d 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -208,7 +208,14 @@ pp-fill (while (progn (funcall avoid-unbreakable) - (not (zerop (skip-chars-backward " \t({[',."))))) + (let ((pos (point))) + (skip-chars-backward " \t({[',.") + (while (and (memq (char-after) '(?\. ?\{)) + (not (memq (char-before) + '(nil ?\n ?\) \" ?\])))) + ;; `.' and `{' within symbols? (Bug#76715) + (forward-char 1)) + (not (eql pos (point)))))) (if (bolp) ;; The sexp already starts on its own line. (progn (goto-char beg) nil) From unknown Wed Aug 20 05:18:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 03 Apr 2025 11:24:07 +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