From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 188f657: Fix false negatives in tex--prettify-symbols-compose-p. Date: Tue, 29 Sep 2015 14:31:01 +0200 Message-ID: <8737xxjtkq.fsf@gnu.org> References: <20150925210512.18505.12538@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1443575562 30105 80.91.229.3 (30 Sep 2015 01:12:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Sep 2015 01:12:42 +0000 (UTC) Cc: emacs-devel To: Artur Malabarba Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 30 03:12:32 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zh5wd-0000gM-R0 for ged-emacs-devel@m.gmane.org; Wed, 30 Sep 2015 03:12:31 +0200 Original-Received: from localhost ([::1]:56165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zh5wd-0003J4-Bv for ged-emacs-devel@m.gmane.org; Tue, 29 Sep 2015 21:12:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zgu3o-0000W9-Ho for emacs-devel@gnu.org; Tue, 29 Sep 2015 08:31:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zgu3l-0007GI-CL for emacs-devel@gnu.org; Tue, 29 Sep 2015 08:31:08 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:59391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zgu3l-0007G5-6z for emacs-devel@gnu.org; Tue, 29 Sep 2015 08:31:05 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id BE78720867 for ; Tue, 29 Sep 2015 08:31:04 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Tue, 29 Sep 2015 08:31:04 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=Wv1ONTalbv285Ho0bKl4Q8j/VWY=; b=N0mRq vMt6K/0UkT5Mq1/xhfSlH0YypttiNF4R7/VzOpC/HrSV/EY7MoBLJpNxTD5Hb/yI FTbW5D2FK8uPCQWPRvj8DDp6144X9fJFMLWe3/zT7TcX3SO7PkeWjFMmqL5AU5RK 0ZqDfjnIaD8qom5uiyxRfJCCKpLTzeJSjSk5IQ= X-Sasl-enc: bjV0aaY/8PaE7zImBfTi6aDKQ02FOL4g0m1TAN6ubQQD 1443529864 Original-Received: from thinkpad-t440p (unknown [2.162.29.221]) by mail.messagingengine.com (Postfix) with ESMTPA id BC0C3C0001D; Tue, 29 Sep 2015 08:31:03 -0400 (EDT) Mail-Followup-To: Artur Malabarba , emacs-devel In-Reply-To: (Artur Malabarba's message of "Tue, 29 Sep 2015 12:29:55 +0100") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.27 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:190480 Archived-At: Artur Malabarba writes: > Would it be possible to also use `tex--prettify-symbols-compose-p' to > avoid composing the symbol-at-point? (perhaps by checking window-point > or something). That would toggleable by a user-option, of course. You mean, when point enters a prettified symbol the original text would be shown? Indeed, that sounds like a neat idea. If I think about it, I don't use prettification in LaTeX exactly because there are so many prettified symbols which partly overlap and then editing becomes cumbersome, e.g., when deleting a char from the prettified integral \int you'll get the prettification of the set membership relation \in. > Or maybe that feature should be implemented in `prettify-symbols-mode' > itself. Yes, I think the only thing to be done would be to change the (if (funcall prettify-symbols-compose-predicate start end match) ... in `prettify-symbols--compose-symbol' to (if (and (or prettify-symbols-compose-at-point (< (window-point) start) (> (window-point) end)) (funcall prettify-symbols-compose-predicate start end match))) where `prettify-symbols-compose-at-point' would be the user option. I'll try that out when I find some time. If you want, you can of course give it a shot yourself. Bye, Tassilo > 2015-09-25 22:05 GMT+01:00 Tassilo Horn : >> branch: master >> commit 188f657a827b04d72376f8b483c7d4b678e96fac >> Author: Tassilo Horn >> Commit: Tassilo Horn >> >> Fix false negatives in tex--prettify-symbols-compose-p. >> >> * lisp/textmodes/tex-mode.el (tex--prettify-symbols-compose-p): Fix some >> false negatives.