all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Patrick Graf <pgraf39@gmail.com>
To: "João Távora" <joaotavora@gmail.com>, 32076@debbugs.gnu.org
Subject: bug#32076: 24.5; Electric behavior of dollar sign using AUCTeX
Date: Tue, 10 Jul 2018 07:32:34 +0200	[thread overview]
Message-ID: <CAF+5eV=8d+Di_nmzM-MC+hV68c2c9KbQddbXtPc379S+M2jApA@mail.gmail.com> (raw)
In-Reply-To: <87601pztde.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 804 bytes --]

Hi João,
sorry for not being self-contained. This was my first GNU bug report ;-)
Concerning the fix, I tried texmathp today and indeed it works fine. I have
in mind something like the following snippet (to be run whenever $ is hit):

  (interactive)
  (if (texmathp)
    (if (looking-at-p "[$]")
      (forward-char 1)
      (insert "$"))
    (insert "$$")
    (backward-char 1)))

This also takes care of the issue that when I delete the closing $ by
hitting backspace and then type $ again, a new pair used to be inserted.
A minor drawback is that this only works for $...$ specifically and it
requires AUCTeX, which not everybody may be using. But $...$ is good enough
for me and if I understand you correctly, one could include texmathp.el in
the Emacs source.
Cheers,
Patrick

[-- Attachment #2: Type: text/html, Size: 991 bytes --]

      reply	other threads:[~2018-07-10  5:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-06 22:56 bug#32076: 24.5; Electric behavior of dollar sign using AUCTeX Patrick
2018-07-08 14:37 ` João Távora
2018-07-10  5:32   ` Patrick Graf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAF+5eV=8d+Di_nmzM-MC+hV68c2c9KbQddbXtPc379S+M2jApA@mail.gmail.com' \
    --to=pgraf39@gmail.com \
    --cc=32076@debbugs.gnu.org \
    --cc=joaotavora@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.