GNU bug report logs - #24709
26.0.50; Support for Markdown in electric-quote-mode

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Sun, 16 Oct 2016 17:22:02 UTC

Severity: wishlist

Found in version 26.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24709 in the body.
You can then email your comments to 24709 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24709; Package emacs. (Sun, 16 Oct 2016 17:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Philipp Stephani <p.stephani2 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 16 Oct 2016 17:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; Support for Markdown in electric-quote-mode
Date: Sun, 16 Oct 2016 19:19:12 +0200
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.


In GNU Emacs 26.0.50.4 (x86_64-apple-darwin16.0.0, NS appkit-1504.00 Version 10.12 (Build 16A323))
 of 2016-10-16 built on p
Repository revision: cf566b46a6cf85c6d54d0b0db80e32ed6ae8d1ca
Windowing system distributor 'Apple', version 10.3.1504
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --with-modules --enable-checking
 --enable-check-lisp-object-type --without-xml2'

Configured features:
RSVG IMAGEMAGICK DBUS NOTIFY ACL GNUTLS ZLIB TOOLKIT_SCROLL_BARS NS
MODULES

Important settings:
  value of $LANG: de_DE.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message subr-x puny seq byte-opt gv
bytecomp byte-compile cl-extra help-mode cconv cl-loaddefs pcase cl-lib
dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec
password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize term/common-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 206733 10576)
 (symbols 48 20333 0)
 (miscs 40 43 151)
 (strings 32 18363 6592)
 (string-bytes 1 593794)
 (vectors 16 35285)
 (vector-slots 8 676063 5565)
 (floats 8 183 55)
 (intervals 56 207 0)
 (buffers 976 11))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24709; Package emacs. (Wed, 19 Oct 2016 11:11:02 GMT) Full text and rfc822 format available.

Message #8 received at 24709 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 24709 <at> debbugs.gnu.org
Subject: Re: bug#24709: 26.0.50; Support for Markdown in electric-quote-mode
Date: Wed, 19 Oct 2016 12:10:35 +0100
On Sun, Oct 16, 2016 at 07:19:12PM +0200, Philipp Stephani wrote:
> - 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).

I wrote a minor mode that does this, sort of. The defaults are probably
not what you want, but it should be easy to modify:

https://gist.github.com/alanthird/b758d3fb45b0e863f8a4

-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24709; Package emacs. (Wed, 28 Jun 2017 22:01:01 GMT) Full text and rfc822 format available.

Message #11 received at 24709 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: 24709 <at> debbugs.gnu.org
Subject: Re: bug#24709: 26.0.50; Support for Markdown in electric-quote-mode
Date: Wed, 28 Jun 2017 21:59:52 +0000
[Message part 1 (text/plain, inline)]
Philipp Stephani <p.stephani2 <at> gmail.com> 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.
[Message part 2 (text/html, inline)]
[0001-Electric-quotes-Improve-support-for-Markdown-mode-Bug-.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24709; Package emacs. (Sun, 02 Jul 2017 15:50:02 GMT) Full text and rfc822 format available.

Message #14 received at 24709 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: 24709 <at> debbugs.gnu.org
Subject: Re: bug#24709: 26.0.50; Support for Markdown in electric-quote-mode
Date: Sun, 02 Jul 2017 15:49:13 +0000
[Message part 1 (text/plain, inline)]
Philipp Stephani <p.stephani2 <at> gmail.com> schrieb am Mi., 28. Juni 2017 um
23:59 Uhr:

> Philipp Stephani <p.stephani2 <at> gmail.com> 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.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24709; Package emacs. (Sun, 02 Jul 2017 16:21:01 GMT) Full text and rfc822 format available.

Message #17 received at 24709 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: 24709 <at> debbugs.gnu.org
Subject: Re: bug#24709: 26.0.50; Support for Markdown in electric-quote-mode
Date: Sun, 02 Jul 2017 16:20:00 +0000
[Message part 1 (text/plain, inline)]
Philipp Stephani <p.stephani2 <at> gmail.com> schrieb am So., 2. Juli 2017 um
17:49 Uhr:

> Philipp Stephani <p.stephani2 <at> gmail.com> schrieb am Mi., 28. Juni 2017 um
> 23:59 Uhr:
>
>> Philipp Stephani <p.stephani2 <at> gmail.com> 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.
[Message part 2 (text/html, inline)]
[0001-Refactor-electric-quote-mode.txt (text/plain, attachment)]
[0003-Further-improve-electric-quote-support-for-Markdown-Bu.txt (text/plain, attachment)]
[0002-Remove-pointless-code-in-electric-quote-mode.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24709; Package emacs. (Sun, 09 Jul 2017 19:58:02 GMT) Full text and rfc822 format available.

Message #20 received at 24709 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: 24709 <at> debbugs.gnu.org
Subject: Re: bug#24709: 26.0.50; Support for Markdown in electric-quote-mode
Date: Sun, 09 Jul 2017 19:57:14 +0000
[Message part 1 (text/plain, inline)]
Philipp Stephani <p.stephani2 <at> gmail.com> schrieb am So., 2. Juli 2017 um
18:19 Uhr:

> Philipp Stephani <p.stephani2 <at> gmail.com> schrieb am So., 2. Juli 2017 um
> 17:49 Uhr:
>
>> Philipp Stephani <p.stephani2 <at> gmail.com> schrieb am Mi., 28. Juni 2017
>> um 23:59 Uhr:
>>
>>> Philipp Stephani <p.stephani2 <at> gmail.com> 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.
[Message part 2 (text/html, inline)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Fri, 14 Jul 2017 12:37:02 GMT) Full text and rfc822 format available.

Notification sent to Philipp Stephani <p.stephani2 <at> gmail.com>:
bug acknowledged by developer. (Fri, 14 Jul 2017 12:37:02 GMT) Full text and rfc822 format available.

Message #25 received at 24709-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 24709-done <at> debbugs.gnu.org
Subject: Re: bug#24709: 26.0.50; Support for Markdown in electric-quote-mode
Date: Fri, 14 Jul 2017 05:36:00 -0700
As the bug appears to be fixed, I'm taking the liberty of closing the bug report.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 12 Aug 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 7 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.