From unknown Tue Aug 19 02:59:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13744: glyphless-char-display-control doesn't work with acronym Resent-From: starback@stp.lingfil.uu.se (Per =?UTF-8?Q?Starb=C3=A4ck?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Feb 2013 16:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13744 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 13744@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.136120373324742 (code B ref -1); Mon, 18 Feb 2013 16:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Feb 2013 16:08:53 +0000 Received: from localhost ([127.0.0.1]:34920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7TGu-0006R1-HK for submit@debbugs.gnu.org; Mon, 18 Feb 2013 11:08:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53900) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7TGs-0006Qr-9l for submit@debbugs.gnu.org; Mon, 18 Feb 2013 11:08:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7TFk-00025P-21 for submit@debbugs.gnu.org; Mon, 18 Feb 2013 11:07:49 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:59010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7TFj-00025K-VU for submit@debbugs.gnu.org; Mon, 18 Feb 2013 11:07:39 -0500 Received: from eggs.gnu.org ([208.118.235.92]:36932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7TFe-0008Eb-6X for bug-gnu-emacs@gnu.org; Mon, 18 Feb 2013 11:07:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7TFT-00022T-Tk for bug-gnu-emacs@gnu.org; Mon, 18 Feb 2013 11:07:34 -0500 Received: from numerus.lingfil.uu.se ([130.238.78.148]:52363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7TFT-00021T-JB for bug-gnu-emacs@gnu.org; Mon, 18 Feb 2013 11:07:23 -0500 Received: from numerus.lingfil.uu.se (numerus.lingfil.uu.se [130.238.78.148]) by numerus.lingfil.uu.se (8.14.4/8.14.4) with ESMTP id r1IG7CXC016433; Mon, 18 Feb 2013 17:07:15 +0100 From: starback@stp.lingfil.uu.se (Per =?UTF-8?Q?Starb=C3=A4ck?=) Date: Mon, 18 Feb 2013 17:07:12 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -5.0 (-----) In GNU Emacs 24.2.93.1 (i686-pc-linux-gnu, GTK+ Version 2.18.9), but it's not new in the pretests. (I think this bug has been present all the time since this feature was introduced in 24.1.) $ LANG=C src/emacs -Q M-x customize-option RET glyphless-char-display-control RET Activate c0-control and choose "Display acronym"; "Set for current session" Switch to some buffer and C-q RET It displays as "^M" but I expected a [CR] box. (Settings other than acronym work as intended.) === THE REASON === The code puts 'acronym in glyphless-char-display, but there should instead be the actual string to use. === FIX === $ diff -cp lisp/international/characters.el lisp/international/characters-fixed.el *** lisp/international/characters.el 2013-01-01 21:37:17.000000000 +0100 --- lisp/international/characters-fixed.el 2013-02-18 16:11:10.064000575 +0100 *************** This function updates the char-table `gl *** 1410,1425 **** (or (memq method '(zero-width thin-space empty-box acronym hex-code)) (error "Invalid glyphless character display method: %s" method)) (cond ((eq target 'c0-control) ! (set-char-table-range glyphless-char-display '(#x00 . #x1F) ! method) ;; Users will not expect their newlines and TABs be ;; displayed as anything but themselves, so exempt those ;; two characters from c0-control. (set-char-table-range glyphless-char-display #x9 nil) (set-char-table-range glyphless-char-display #xa nil)) ((eq target 'c1-control) ! (set-char-table-range glyphless-char-display '(#x80 . #x9F) ! method)) ((eq target 'format-control) (map-char-table #'(lambda (char category) --- 1410,1425 ---- (or (memq method '(zero-width thin-space empty-box acronym hex-code)) (error "Invalid glyphless character display method: %s" method)) (cond ((eq target 'c0-control) ! (glyphless-set-char-table-range glyphless-char-display ! #x00 #x1F method) ;; Users will not expect their newlines and TABs be ;; displayed as anything but themselves, so exempt those ;; two characters from c0-control. (set-char-table-range glyphless-char-display #x9 nil) (set-char-table-range glyphless-char-display #xa nil)) ((eq target 'c1-control) ! (glyphless-set-char-table-range glyphless-char-display ! #x80 #x9F method)) ((eq target 'format-control) (map-char-table #'(lambda (char category) *************** This function updates the char-table `gl *** 1443,1448 **** --- 1443,1456 ---- (t (error "Invalid glyphless character group: %s" target)))))) + (defun glyphless-set-char-table-range (chartable from to method) + (if (eq method 'acronym) + (let ((i from)) + (while (<= i to) + (set-char-table-range chartable i (aref char-acronym-table i)) + (setq i (1+ i)))) + (set-char-table-range chartable (cons from to) method))) + ;;; Control of displaying glyphless characters. (defcustom glyphless-char-display-control '((format-control . thin-space) ====================================================================== From unknown Tue Aug 19 02:59:15 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: starback@stp.lingfil.uu.se (Per =?UTF-8?Q?Starb=C3=A4ck?=) Subject: bug#13744: closed (Re: bug#13744: glyphless-char-display-control doesn't work with acronym) Message-ID: References: X-Gnu-PR-Message: they-closed 13744 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 13744@debbugs.gnu.org Date: Mon, 11 Mar 2013 17:47:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1363024022-15567-1" This is a multi-part message in MIME format... ------------=_1363024022-15567-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #13744: glyphless-char-display-control doesn't work with acronym which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 13744@debbugs.gnu.org. --=20 13744: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D13744 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1363024022-15567-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 13744-done) by debbugs.gnu.org; 11 Mar 2013 17:46:45 +0000 Received: from localhost ([127.0.0.1]:46667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UF6o8-00042Y-R9 for submit@debbugs.gnu.org; Mon, 11 Mar 2013 13:46:45 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:37490) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UF6o7-00042N-EB for 13744-done@debbugs.gnu.org; Mon, 11 Mar 2013 13:46:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KL9/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA2IQgbBLZEKA6R6gV6DEw X-IPAS-Result: Av4EABK/CFHO+KL9/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA2IQgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="4229906" Received: from 206-248-162-253.dsl.teksavvy.com (HELO ceviche.home) ([206.248.162.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 11 Mar 2013 13:45:40 -0400 Received: by ceviche.home (Postfix, from userid 20848) id C700A660E5; Mon, 11 Mar 2013 13:45:41 -0400 (EDT) From: Stefan Monnier To: starback@stp.lingfil.uu.se (Per =?iso-8859-1?Q?Starb=E4ck?=) Subject: Re: bug#13744: glyphless-char-display-control doesn't work with acronym Message-ID: References: Date: Mon, 11 Mar 2013 13:45:41 -0400 In-Reply-To: ("Per =?iso-8859-1?Q?S?= =?iso-8859-1?Q?tarb=E4ck=22's?= message of "Mon, 18 Feb 2013 17:07:12 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13744-done Cc: 13744-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -0.5 (/) > The code puts 'acronym in glyphless-char-display, but there should > instead be the actual string to use. Thanks, installed, Stefan ------------=_1363024022-15567-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 18 Feb 2013 16:08:53 +0000 Received: from localhost ([127.0.0.1]:34920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7TGu-0006R1-HK for submit@debbugs.gnu.org; Mon, 18 Feb 2013 11:08:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53900) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7TGs-0006Qr-9l for submit@debbugs.gnu.org; Mon, 18 Feb 2013 11:08:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7TFk-00025P-21 for submit@debbugs.gnu.org; Mon, 18 Feb 2013 11:07:49 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:59010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7TFj-00025K-VU for submit@debbugs.gnu.org; Mon, 18 Feb 2013 11:07:39 -0500 Received: from eggs.gnu.org ([208.118.235.92]:36932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7TFe-0008Eb-6X for bug-gnu-emacs@gnu.org; Mon, 18 Feb 2013 11:07:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7TFT-00022T-Tk for bug-gnu-emacs@gnu.org; Mon, 18 Feb 2013 11:07:34 -0500 Received: from numerus.lingfil.uu.se ([130.238.78.148]:52363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7TFT-00021T-JB for bug-gnu-emacs@gnu.org; Mon, 18 Feb 2013 11:07:23 -0500 Received: from numerus.lingfil.uu.se (numerus.lingfil.uu.se [130.238.78.148]) by numerus.lingfil.uu.se (8.14.4/8.14.4) with ESMTP id r1IG7CXC016433; Mon, 18 Feb 2013 17:07:15 +0100 From: starback@stp.lingfil.uu.se (Per =?iso-8859-1?Q?Starb=E4ck?=) To: bug-gnu-emacs@gnu.org Subject: glyphless-char-display-control doesn't work with acronym Date: Mon, 18 Feb 2013 17:07:12 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -5.0 (-----) In GNU Emacs 24.2.93.1 (i686-pc-linux-gnu, GTK+ Version 2.18.9), but it's not new in the pretests. (I think this bug has been present all the time since this feature was introduced in 24.1.) $ LANG=C src/emacs -Q M-x customize-option RET glyphless-char-display-control RET Activate c0-control and choose "Display acronym"; "Set for current session" Switch to some buffer and C-q RET It displays as "^M" but I expected a [CR] box. (Settings other than acronym work as intended.) === THE REASON === The code puts 'acronym in glyphless-char-display, but there should instead be the actual string to use. === FIX === $ diff -cp lisp/international/characters.el lisp/international/characters-fixed.el *** lisp/international/characters.el 2013-01-01 21:37:17.000000000 +0100 --- lisp/international/characters-fixed.el 2013-02-18 16:11:10.064000575 +0100 *************** This function updates the char-table `gl *** 1410,1425 **** (or (memq method '(zero-width thin-space empty-box acronym hex-code)) (error "Invalid glyphless character display method: %s" method)) (cond ((eq target 'c0-control) ! (set-char-table-range glyphless-char-display '(#x00 . #x1F) ! method) ;; Users will not expect their newlines and TABs be ;; displayed as anything but themselves, so exempt those ;; two characters from c0-control. (set-char-table-range glyphless-char-display #x9 nil) (set-char-table-range glyphless-char-display #xa nil)) ((eq target 'c1-control) ! (set-char-table-range glyphless-char-display '(#x80 . #x9F) ! method)) ((eq target 'format-control) (map-char-table #'(lambda (char category) --- 1410,1425 ---- (or (memq method '(zero-width thin-space empty-box acronym hex-code)) (error "Invalid glyphless character display method: %s" method)) (cond ((eq target 'c0-control) ! (glyphless-set-char-table-range glyphless-char-display ! #x00 #x1F method) ;; Users will not expect their newlines and TABs be ;; displayed as anything but themselves, so exempt those ;; two characters from c0-control. (set-char-table-range glyphless-char-display #x9 nil) (set-char-table-range glyphless-char-display #xa nil)) ((eq target 'c1-control) ! (glyphless-set-char-table-range glyphless-char-display ! #x80 #x9F method)) ((eq target 'format-control) (map-char-table #'(lambda (char category) *************** This function updates the char-table `gl *** 1443,1448 **** --- 1443,1456 ---- (t (error "Invalid glyphless character group: %s" target)))))) + (defun glyphless-set-char-table-range (chartable from to method) + (if (eq method 'acronym) + (let ((i from)) + (while (<= i to) + (set-char-table-range chartable i (aref char-acronym-table i)) + (setq i (1+ i)))) + (set-char-table-range chartable (cons from to) method))) + ;;; Control of displaying glyphless characters. (defcustom glyphless-char-display-control '((format-control . thin-space) ====================================================================== ------------=_1363024022-15567-1--