From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michal Nazarewicz Newsgroups: gmane.emacs.bugs Subject: bug#18730: [PATCH] tildify.el: Add `auto-tildify' and `auto-tildify-mode'. Date: Thu, 16 Oct 2014 11:34:36 +0200 Organization: http://mina86.com/ Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1413452125 5479 80.91.229.3 (16 Oct 2014 09:35:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Oct 2014 09:35:25 +0000 (UTC) Cc: Milan Zamazal , 18730@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 16 11:35:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1XehSn-0003xU-OW for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Oct 2014 11:35:18 +0200 Original-Received: from localhost ([::1]:49416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XehSn-0006qO-87 for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Oct 2014 05:35:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XehSe-0006os-MK for bug-gnu-emacs@gnu.org; Thu, 16 Oct 2014 05:35:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XehSY-0006ES-Ut for bug-gnu-emacs@gnu.org; Thu, 16 Oct 2014 05:35:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XehSY-0006Dy-Rj for bug-gnu-emacs@gnu.org; Thu, 16 Oct 2014 05:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XehSY-0006SV-AX for bug-gnu-emacs@gnu.org; Thu, 16 Oct 2014 05:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michal Nazarewicz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Oct 2014 09:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18730 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 18730-submit@debbugs.gnu.org id=B18730.141345208424796 (code B ref 18730); Thu, 16 Oct 2014 09:35:02 +0000 Original-Received: (at 18730) by debbugs.gnu.org; 16 Oct 2014 09:34:44 +0000 Original-Received: from localhost ([127.0.0.1]:45260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XehSF-0006Rr-SI for submit@debbugs.gnu.org; Thu, 16 Oct 2014 05:34:44 -0400 Original-Received: from mail-wg0-f48.google.com ([74.125.82.48]:60905) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XehSC-0006Ri-Bn for 18730@debbugs.gnu.org; Thu, 16 Oct 2014 05:34:41 -0400 Original-Received: by mail-wg0-f48.google.com with SMTP id k14so3256355wgh.19 for <18730@debbugs.gnu.org>; Thu, 16 Oct 2014 02:34:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:organization:references :user-agent:face:date:message-id:mime-version:content-type :content-transfer-encoding; bh=bQTli/f67DOgIHe2QwdFdGKAwJnkXPhZnLHhuTFfwYk=; b=nJ5bN+vFNmytb8LQ5aUTS3GovHD1/MCBz0ffm+GDPpkRsq7y1Z/9ZrEada7rQtqxDr whJMkdEeyzOdTH0BIRIxqb2U/j+3x8RKKV2RsP1ItLQWJ73AKEuSPtGxE2Cv31wTO3/8 c45vdzJeWiaNFAXyK98Arh1oLkmzecu+r6vEKO5S7xlcGS3r7yfZk5w2WHQ/qg4XyqSP TugYGkLq+UkmCrDzs0E8z7doysyNR5bw7RfBZ7yW87ZxNjXoZhNozgvBumdqPNnaYC2x BfR354aMDSR/uK8ZtuTIgb1hh6m8zE/icn4iFMP0ePHONYR8JoQjA+SaCaEKOvszQI4R I2bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to :organization:references:user-agent:face:date:message-id :mime-version:content-type:content-transfer-encoding; bh=bQTli/f67DOgIHe2QwdFdGKAwJnkXPhZnLHhuTFfwYk=; b=mnTC0Oj+49q/ZB76DFCHuSU/4SXvI3RfxaiqJNOkvnwoeO5oiWd6wInVbJiawxIohS pdZP4IhIWCeFaytmEihWvORsuvKQnpV3z6nncInUMU0qU0i8eqJ1l3fPoYSzTxCwKDOK Vq14+e0CkL5AbwHuZgWo5x4r9bKQse+716wwAETjf+mjNF8yBQooQLz/mAMcp8TRBg1b cFOlbWFYjwB6KCsNBKJStyfthTnnxvwngratr384EL+1FzmL1HuGgIbdxnE/tPPtf7Dt jjk7WCz7iQHT1veZV1PhWXdmF6aip861UU0WHuZgaTi4GKYWD70XZP5SL91YtM5IEZVI xmWg== X-Gm-Message-State: ALoCoQlPajFGGWI9Mg189BTtsm6n0meCZkEbWr8OPmIjnBUJ/LBQrVwkLaWQNhUVbtcrwnzBn7O2 X-Received: by 10.194.249.34 with SMTP id yr2mr152561wjc.9.1413452079253; Thu, 16 Oct 2014 02:34:39 -0700 (PDT) Original-Received: from mpn-glaptop.roam.corp.google.com ([62.156.150.204]) by mx.google.com with ESMTPSA id om1sm26728791wjc.42.2014.10.16.02.34.37 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 16 Oct 2014 02:34:37 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fPniR 4iw5vJaw2nzSjfq2zffcE/GDjRC2dn0J0XwPAbDL84TvaFCJEU4Oml9pRyEUhR3Cl2t01AoEjRbs0sYugp14/4X5n4pU4EHHnMAAAAAElFTkSuQmCC X-PGP: 50751FF4 X-PGP-FP: AC1F 5F5C D418 88F8 CC84 5858 2060 4012 5075 1FF4 X-Hashcash: 1:20:141016:18730@debbugs.gnu.org::RuleQZORDDY7OD2J:00000000000000000000000000000000000000001s4u X-Hashcash: 1:20:141016:pdm@zamazal.org::EgAD80sblLnL9oio:004w0y X-Hashcash: 1:20:141016:monnier@iro.umontreal.ca::gKO/uWrwaxyQVtZS:0000000000000000000000000000000000000LWHu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:94590 >> It is configured via two new customize variables: >> `auto-tildify-pattern-alist' and `auto-tildify-check-envs'. On Wed, Oct 15 2014, Stefan Monnier wrote: > Could it use the existing tildify-pattern-alist? In the current implementation those two have to be a separate alists. tildify-pattern-alist assumes that the whole text is available so the patterns may check text before and after the soft space. Patterns in auto-tildify-pattern-alist can only look back before the space character. The implementation could be changed to use tildify-pattern-alist but: * It will be slower because it would have to match pattern after every inserted character (whereas currently the pattern is matched only if character at point is space and character before it is a word character). * It will be less intuitive because text =E2=80=9Cfar=E2=80=9D behind a cur= sor will change, e.g. (^ denotes point): Foo Bar a ^ and then after pressing =E2=80=9Cx=E2=80=9D (_ denotes hard space): Foo Bar a_x^ * Furthermore, it might be hard/impossible to manually replace hard space with a soft space if user desires to do so. >> +Breaking line after a single-character words are forbidden >> +by Czech and Polish typography (and may be discouraged in other >> +languages), so `auto-tildify-mode' makes it easier to create >> +a typographically-correct documents. > > Indeed, that's why we have fill-single-char-nobreak-p. You might like > to write the above text is such a way to make it clear what's the > difference between the two. Would this be better: ** `tildify-mode' automatically hardens spaces as one types the text. Breaking line after a single-character words is forbidden by Czech and Poli= sh typography. `auto-tildify-mode' makes creating a typographically-correct m= arkup in formats such as HTML, LaTeX, Markdown, etc. --=20 Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=3D./ `o ..o | Computer Science, Micha=C5=82 =E2=80=9Cmina86=E2=80=9D Nazarewicz = (o o) ooo +------ooO--(_)--Ooo--