X-Loop: help-debbugs@HIDDEN Subject: bug#22980: Something looks fishy in prettify-symbols-default-compose-p (it depends on (point)) Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel <clement.pitclaudel@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 10 Mar 2016 17:31:02 +0000 Resent-Message-ID: <handler.22980.B.145763103523333 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 22980 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 22980 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.145763103523333 (code B ref -1); Thu, 10 Mar 2016 17:31:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Mar 2016 17:30:35 +0000 Received: from localhost ([127.0.0.1]:44042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ae4Pz-00064H-AO for submit <at> debbugs.gnu.org; Thu, 10 Mar 2016 12:30:35 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59353) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from <clement.pitclaudel@HIDDEN>) id 1ae4Py-000646-6Z for submit <at> debbugs.gnu.org; Thu, 10 Mar 2016 12:30:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <clement.pitclaudel@HIDDEN>) id 1ae4Ps-0002Od-4X for submit <at> debbugs.gnu.org; Thu, 10 Mar 2016 12:30:29 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <clement.pitclaudel@HIDDEN>) id 1ae4Ps-0002OZ-0y for submit <at> debbugs.gnu.org; Thu, 10 Mar 2016 12:30:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <clement.pitclaudel@HIDDEN>) id 1ae4Pq-0007V8-Qp for bug-gnu-emacs@HIDDEN; Thu, 10 Mar 2016 12:30:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <clement.pitclaudel@HIDDEN>) id 1ae4Pm-0002Nl-Q7 for bug-gnu-emacs@HIDDEN; Thu, 10 Mar 2016 12:30:26 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:65303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <clement.pitclaudel@HIDDEN>) id 1ae4Pm-0002NU-HA for bug-gnu-emacs@HIDDEN; Thu, 10 Mar 2016 12:30:22 -0500 Received: from [18.189.75.34] ([18.189.75.34]) by mrelayeu.kundenserver.de (mreue005) with ESMTPSA (Nemesis) id 0MBo1b-1aWbUJ4Ao3-00AmOe for <bug-gnu-emacs@HIDDEN>; Thu, 10 Mar 2016 18:30:21 +0100 From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel <clement.pitclaudel@HIDDEN> Message-ID: <56E1AF2B.2050902@HIDDEN> Date: Thu, 10 Mar 2016 12:30:19 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rlVke7HxlnO8VHcpI5kuSiR12lkSJmUTC" X-Provags-ID: V03:K0:0aSD8UIubuLmZRyqoPGvQ1tGppdJG94HIWDlgJ5j3YPQBBWwfuH 6hMLJ1niusGoX+9vQbxm3lqPXvqgDGqgF/NQqYWhD3zJO4Z2M9CjtUYd4o0C/6IsYPsTZhz C4jHsywq4D8uS972Bv5peDhipD0CjSHy0FSovSg1V0fkV4ZA0OvUQocZpNBXQiWgu11RDf/ gkIgRcvrnyZS+4YrfyfEQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:LJUULAGYcVM=:tl35tS9tJcWw5OgvMA0YPe IA1awQFlVxtzc2NuMzBA9WtbPEurqLq3dhqXRMjoexCktC2536a6yE+ir07JHo+VkJETYKEPk wKQpT9VE2R46JE4ebVDuQF19GqdaVXLV1FQxYr5H7UkSSe02e7FSJgX8wfmLFGs9EpU/zF4yb mHzue0lkAJNt0L7sQyF2ES2BKr+dP/TbsyKGH/0dSDE44qRInUiGn0Cm9pblVjS7Vs5GhnctQ gz1tyEhoJ66/HpyfOVmI7AboDzjyG0KAIBHHegS0PSyvmMODHyFmlQ/5OS8A2Cm82bMmPcwT5 sv6SUGqZAwEoRhn/ZFQxkWLETjBBIqBjKwJDqw1rz25GLiXkP3clV8IMkozC0BTzr7e+K+oQB YtpcX1fvybZJSBPMT/YMp8LcTvtpKAqyjviLJ0wQnOLl+mFFhJX9L6PUr2nf9UXezaCylVMa+ +w6AaIzs++L+SNZPnMkYxksk4f3hUZ7GcJ9iXcd90Z6PXQg0vF1twHdnryzrmYJH1NXtKub4K G54NTyqqK3RyXt7rEMt7sGuh+UXcgoSq5uZ6nTv73H+0/PMevwKXYL+npOXGHyuCsYjDMDqZH V/MZh8QcqgndI0z3R+c21Z7nr+tFJgw8BTiW9GrU3ijgRjCKGpaqKPeODmW/c3r75nKNlo2/6 at49VgumBnZOWzJIR/eQ+9xu0pe12opWGItTTuydZXRtECMYB+LsXv+b1ATE1W9iMovA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -4.0 (----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --rlVke7HxlnO8VHcpI5kuSiR12lkSJmUTC Content-Type: multipart/mixed; boundary="XrohNOT2o6Kh2qfagH1hreoO6Kaj6J5KC" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= <clement.pitclaudel@HIDDEN> To: bug-gnu-emacs@HIDDEN Message-ID: <56E1AF2B.2050902@HIDDEN> Subject: Something looks fishy in prettify-symbols-default-compose-p (it depends on (point)) --XrohNOT2o6Kh2qfagH1hreoO6Kaj6J5KC Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable The docs of prettify-symbols-default-compose-p and prettify-symbols-compo= se-predicate don't suggest that the function should depend on the point, = but it looks like it does: (defun prettify-symbols-default-compose-p (start end _match) "Return true iff the symbol MATCH should be composed. The symbol starts at position START and ends at position END. This is the default for `prettify-symbols-compose-predicate' which is suitable for most programming languages such as C or Lisp." ;; Check that the chars should really be composed into a symbol. (message "%S %S %S %S" (point) start end _match) (print (let* ((syntaxes-beg (if (memq (char-syntax (char-after star= t)) '(?w ?_)) '(?w ?_) '(?. ?\\))) (syntaxes-end (if (memq (char-syntax (char-before end= )) '(?w ?_)) '(?w ?_) '(?. ?\\)))) (not (or (print (memq (char-syntax (or (char-before start)= ?\s)) syntaxes-beg)) (print (memq (char-syntax (or (char-after end) ?\= s)) syntaxes-end)) (print (nth 8 (syntax-ppss)))))))) ^ here (defvar-local prettify-symbols-compose-predicate #'prettify-symbols-default-compose-p "A predicate for deciding if the currently matched symbol is to be = composed. The matched symbol is the car of one entry in `prettify-symbols-alist= '. The predicate receives the match's start and end positions as well as the match-string as arguments.") This means that calling (prettify-symbols-default-compose-p 1 2 nil) retu= rns nil or t in the following example returns nil or t depending on the p= oint in the following example: (* example *) ^ column 1 starts here This makes it unreliable to prettify =E2=80=98*=E2=80=99 as =E2=80=98=C3=97= =E2=80=99 in OCaml, for example. Fixing this issue is not entirely trivial: calling syntax-ppss on end wil= l work in some cases, and in other cases it would be better on beg. This = is because for a two-characters comment starter, syntax-ppss is inconsist= ent in what it call the =E2=80=9Cinside=E2=80=9D of the comment: (* comment *) ^ outside ^ inside This is a follow up to this ML thread: https://lists.gnu.org/archive/html= /emacs-devel/2016-03/msg00415.html --XrohNOT2o6Kh2qfagH1hreoO6Kaj6J5KC-- --rlVke7HxlnO8VHcpI5kuSiR12lkSJmUTC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJW4a8rAAoJEPqg+cTm90wjA1cQAIjt628P77x5vPfg8pz5TaGG ZLBz8q9NpG1jZk9GRvNnZwQzwqbja9UHlL7fBjMjmPqPgNE7HVfDcTZ5388eAO2d ASOgAor+A/xQJatRRKp0PitLXqTV3hb4Sb14DSKqLBlkuxKsgHOOaffg30GtJkyn IBGa1EBZd4TROHIeSkouE9wOzJ3k9iJSQS7f5mh9zbXKHRxksTHhYuY6aNIU3Syg A+bRfPZNGoCHbLV1sX2zG/mmwKldEf+sivpWjRGVlj6kJhoYutqDKJ7LZs5lIImx zJChUq13Nryb4Z3gpDs6RwqNkiIJUVNEfCpt33hQQU/Fp0NHXJQnZjnF0h6PA7yO KJiLcIeBwvRESLxqWUVMtUvfTPSBuEIB6mNRdebv6ZUYREQ+FIt0kDX4KwHKHWAv 03kbS2ZAkJ3aNEF73jsUevlDFjlDeruqaM7i40GTx1lynoNC1Iiiu2TIpNYFqlNr Wd2njIdy0XUm5RhnAVUwjosg5qzhEfH8bYcyPtGTUxJuWmUGNpvKvSOU9nqBsol3 Ed+75iaB0no9XYw8LeXq1TEfUs79pzfLErC/eZqCc3nIOniTCBLKokmIKmR0n+HI c1wnXfmMFwDmmvpXEaccU0Qjl5sEsymrH3Z93F5f11mBzm/QnMlG73HV0pCg7Hyw 1HiHU6XHpw313+kb+G9g =3sBa -----END PGP SIGNATURE----- --rlVke7HxlnO8VHcpI5kuSiR12lkSJmUTC--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel <clement.pitclaudel@HIDDEN> Subject: bug#22980: Acknowledgement (Something looks fishy in prettify-symbols-default-compose-p (it depends on (point))) Message-ID: <handler.22980.B.145763103523333.ack <at> debbugs.gnu.org> References: <56E1AF2B.2050902@HIDDEN> X-Gnu-PR-Message: ack 22980 X-Gnu-PR-Package: emacs Reply-To: 22980 <at> debbugs.gnu.org Date: Thu, 10 Mar 2016 17:31:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 22980 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 22980: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D22980 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.