From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Krehel Newsgroups: gmane.emacs.devel Subject: A simple solution to "Upcoming loss of usability ..." Date: Thu, 25 Jun 2015 16:59:16 +0200 Message-ID: <87egkzg7gb.fsf@gmail.com> 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 1435244771 14709 80.91.229.3 (25 Jun 2015 15:06:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Jun 2015 15:06:11 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 25 17:06:10 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 1Z88jB-0001Vm-Ar for ged-emacs-devel@m.gmane.org; Thu, 25 Jun 2015 17:06:09 +0200 Original-Received: from localhost ([::1]:56138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z88jA-00030X-Ln for ged-emacs-devel@m.gmane.org; Thu, 25 Jun 2015 11:06:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z88j6-0002yD-O7 for emacs-devel@gnu.org; Thu, 25 Jun 2015 11:06:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z88j2-0005w6-PX for emacs-devel@gnu.org; Thu, 25 Jun 2015 11:06:04 -0400 Original-Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:33141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z88j1-0005va-RX for emacs-devel@gnu.org; Thu, 25 Jun 2015 11:06:00 -0400 Original-Received: by wiwl6 with SMTP id l6so20894963wiw.0 for ; Thu, 25 Jun 2015 08:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=5n9GawL3eLQV0ousPxzShdxMR8bQLmxvxudQdosPxjg=; b=l/wsV25zJfugBtiEGgv+yx8gqIbFYOrmi+c3u19Dmq18AeKaRFa30UTYgfXOX0nj7Q 4+uw/aPiJaMsQcDQSd/0gMSFK6T84d/e//dKfpVqtJR2OGi6xQJbeWI78iGpioZ6BBPU XrRANcmvky7SB/QyWlGfo7AT00ZImIPFzUYuN8gr89pvtBCwejnbcHPbc50XGvxN6otW pZKgVSg4E0RjOC3l2p53Cx4Jb1JYSUrMKPa8/ScRAqadfhNruAhES/xLTbIr0hY18IWl 0NbuDmHpemz2HD1ZHXSQFMww7i0udAHu5AN7gPAqSZnAR9naZX08chTwG5NlbEa7rudw ZBPA== X-Received: by 10.194.178.225 with SMTP id db1mr82245232wjc.153.1435244759233; Thu, 25 Jun 2015 08:05:59 -0700 (PDT) Original-Received: from firefly (dyn069045.nbw.tue.nl. [131.155.69.45]) by mx.google.com with ESMTPSA id fo13sm8035384wic.0.2015.06.25.08.05.58 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 25 Jun 2015 08:05:58 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::236 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:187519 Archived-At: Hi all, It seems that even though many conservative people disagree, the "experiment" isn't going away. So I'm proposing the following change that could satisfy both Paul and the conservatives (myself included): (font-lock-add-keywords 'emacs-lisp-mode '(("\\(`\\)\\([a-zA-Z-0-9]+\\)\\('\\)" (0 (compose-region (match-beginning 1) (match-end 1) "=E2=80=98")) (0 (compose-region (match-beginning 3) (match-end 3) "=E2=80=99"))))) The above code can also be made part of `prettify-symbols-mode', and some customization can be added to turn things on or off. The above code is only a rough draft, it may not be optimal, which the experts could quickly fix. But it works for all Emacs versions installed on my system. The advantages of the above approach: 1. Paul's students get to see the pretty quotes. 2. The Emacs sources need not be changed, no new syntax definitions need to be introduced. 3. The pretty quotes are easy to input for Paul's students: they're right there on the standard issue keyboard, available with zero modifier keys: even the Shift modifier isn't necessary. 4. Zero problems in the terminal and with copy pasting: that part of `prettify-symbols-mode' could be just disabled for terminals that don't support Unicode. In addition, I can actually see the Unicode quotes fine in GNOME Terminal. They look garbled on a TTY, but again: the minor mode can be enabled/disabled conditionally. 5. The quotes stay what they are: markup, as they were intended to be. The markup can be rendered in many different ways, including as Unicode quotes, if the user prefers. regards, Oleh