From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#24709: 26.0.50; Support for Markdown in electric-quote-mode Date: Sun, 09 Jul 2017 19:57:14 +0000 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1142db36094a430553e7e085" X-Trace: blaine.gmane.org 1499630293 3122 195.159.176.226 (9 Jul 2017 19:58:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 9 Jul 2017 19:58:13 +0000 (UTC) To: 24709@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 09 21:58:09 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUILJ-0000ZE-CX for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Jul 2017 21:58:09 +0200 Original-Received: from localhost ([::1]:37253 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUILO-0000T5-Sl for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Jul 2017 15:58:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUILG-0000Rc-I3 for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 15:58:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUILC-0008DH-M7 for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 15:58:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56505) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUILC-0008DC-Hd for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 15:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dUILC-0002i8-7d for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 15:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Jul 2017 19:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24709 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24709-submit@debbugs.gnu.org id=B24709.149963025210379 (code B ref 24709); Sun, 09 Jul 2017 19:58:02 +0000 Original-Received: (at 24709) by debbugs.gnu.org; 9 Jul 2017 19:57:32 +0000 Original-Received: from localhost ([127.0.0.1]:59182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUIKi-0002hL-7o for submit@debbugs.gnu.org; Sun, 09 Jul 2017 15:57:32 -0400 Original-Received: from mail-oi0-f48.google.com ([209.85.218.48]:34954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUIKg-0002h7-SO for 24709@debbugs.gnu.org; Sun, 09 Jul 2017 15:57:31 -0400 Original-Received: by mail-oi0-f48.google.com with SMTP id 191so60479683oii.2 for <24709@debbugs.gnu.org>; Sun, 09 Jul 2017 12:57:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=0q2sX8R3FpNTJ8DmIpQLHJX7jQ1HDOShcipeSBNXBNs=; b=EZU1Mq9NDDzkIzkFUgr2r8lY+oafPR5won+Ghag1ZR9Dpw6J4wQDpMErg+mHfcJFtO UZUCXAVImC837ngq7a4eXL2BR7BWJOG3ZVEpvOjLskscYqWueJvpbr/LFmUA7jq/l6wP UK2NApc82i3bciJ6pZXUqv+Fsritse1FH9ccRXP62L7cOsBw16vt0p/Tm7Rpw0J9AV60 dcTVqInceyRE4nRZ9cHK1VGxQP4eRtxRj/0CoSXD6/LXW0KtuSbJxNZEyMNkr/6NlEJC vDnyqO54amLZB0kt91Qz3krQDef1VJ1+YCTXCYAcZfKhM/ip1KvPfu9yCqJz7gDx8bwy cVLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=0q2sX8R3FpNTJ8DmIpQLHJX7jQ1HDOShcipeSBNXBNs=; b=rfbI7DiqazZ+1kVwQGuO4275kj9VaHjGxnfkOYe+i2E+celLgkKPWyf5Btwv8l0+Qj u8Jaww3hVXU3NhsADoPGhIzdrLl9ncLh4ejmgImSSfb+VZbnvs2U7UlCLC4nB8Vz4oHU QODqclU+GsYbyrUOee7pt4IoladqKersQZo+iCBRxp/WwGmW663HqKemdAW5FXTo/ptp sakrSA9lqSkXOXwLCmmMyn6goqrsy2/0sBVIwErOcguUz0zFum93sVPqNBnjlylu5FXQ qKao8CF+0sHJpNUTO0xui03dMNQif4Kvy3vAHuXRs7CAHtjxQgqp68kQOF4hYhhVVioK Qe3Q== X-Gm-Message-State: AIVw112SLBud2xWhYHa8lVaeudFmTxQpEdN19CFnRkcoPzjyfl6n3FPM 0H/vZrjxnbxYxXDILgYgMkALfvWlpK6M X-Received: by 10.202.108.15 with SMTP id h15mr5756950oic.12.1499630244807; Sun, 09 Jul 2017 12:57:24 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:134376 Archived-At: --001a1142db36094a430553e7e085 Content-Type: text/plain; charset="UTF-8" Philipp Stephani schrieb am So., 2. Juli 2017 um 18:19 Uhr: > Philipp Stephani schrieb am So., 2. Juli 2017 um > 17:49 Uhr: > >> Philipp Stephani schrieb am Mi., 28. Juni 2017 >> um 23:59 Uhr: >> >>> Philipp Stephani schrieb am So., 16. Okt. 2016 >>> um 19:22 Uhr: >>> >>>> >>>> When editing a Markdown document with electric-quote-mode enabled, the >>>> experience is not optimal because ` (backtick) in Markdown is a syntax >>>> element (for introducing code spans and blocks), but is converted by >>>> electric-quote-mode. Also ` and ' inside code spans and blocks continue >>>> to insert curly quotes where they shouldn't. I propose the following: >>>> >>>> - Provide an alternative behavior of electric-quote-mode where ` doesn't >>>> trigger replacement and ' can insert left or right curly quotes, >>>> depending on whether it follows a space or similar (newline, beginning >>>> of buffer, opening parenthesis). >>>> >>>> - Provide a way to disable electric-quote-mode for certain regions, >>>> effectively the inverse of the existing electric-quote-string etc. >>>> This could be in the form of syntactic elements or text properties. >>>> >>>> >>>> >>> I've attached a patch. It doesn't cover all cases, though; e.g. an >>> unterminated Markdown code span is not supported yet. >>> >> >> Pushed as 34d4720f83. >> > > Here are a couple more patches. > All pushed. --001a1142db36094a430553e7e085 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Philip= p Stephani <p.stephani2@gmail.c= om> schrieb am So., 2. Juli 2017 um 18:19=C2=A0Uhr:
Philipp Stephani <p.stephani2@gmail.com> schrieb am So., 2. Juli 2017 u= m 17:49=C2=A0Uhr:
=
Philipp Stephani <p.stephani2@gmail.com&= gt; schrieb am Mi., 28. Juni 2017 um 23:59=C2=A0Uhr:
Philipp Stephani <p.stephani2@gmail.com> schrieb am So., 16. Okt. 2016 um 19:= 22=C2=A0Uhr:

When editing a Markdown document with electric-quote-mode enabled, the
experience is not optimal because ` (backtick) in Markdown is a syntax
element (for introducing code spans and blocks), but is converted by
electric-quote-mode.=C2=A0 Also ` and ' inside code spans and blocks co= ntinue
to insert curly quotes where they shouldn't.=C2=A0 I propose the follow= ing:

- Provide an alternative behavior of electric-quote-mode where ` doesn'= t
=C2=A0 trigger replacement and ' can insert left or right curly quotes,=
=C2=A0 depending on whether it follows a space or similar (newline, beginni= ng
=C2=A0 of buffer, opening parenthesis).

- Provide a way to disable electric-quote-mode for certain regions,
=C2=A0 effectively the inverse of the existing electric-quote-string etc. =C2=A0 This could be in the form of syntactic elements or text properties.<= br>


I've attached a patch. It doesn't cover all c= ases, though; e.g. an unterminated Markdown code span is not supported yet.= =C2=A0

Pushed as 34d4720f83.=C2=A0

Here are a couple more patches.=C2=A0

All pushed.=C2=A0
--001a1142db36094a430553e7e085--