From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Using org-entities to escape symbols Date: Tue, 10 May 2016 20:33:36 +0000 Message-ID: References: <3f18c497-dae3-1cf4-8c48-d7efab07a766@autistici.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113d4e568710db053282d7f3 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0ELk-00023W-Nd for emacs-orgmode@gnu.org; Tue, 10 May 2016 16:33:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0ELj-0000Jm-Db for emacs-orgmode@gnu.org; Tue, 10 May 2016 16:33:48 -0400 Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:35513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0ELj-0000JP-7Z for emacs-orgmode@gnu.org; Tue, 10 May 2016 16:33:47 -0400 Received: by mail-oi0-x22e.google.com with SMTP id x19so35673651oix.2 for ; Tue, 10 May 2016 13:33:47 -0700 (PDT) In-Reply-To: <3f18c497-dae3-1cf4-8c48-d7efab07a766@autistici.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: drymer Cc: emacs-orgmode@gnu.org --001a113d4e568710db053282d7f3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, May 10, 2016 at 4:25 PM drymer wrote: > Hi > I didn't explain myself. It inserts four *, as it didn't find the > entity. I'm using emacs 24.5.3 and org-mode 8.34, which is the maint > branch. I've also tried with plain emacs without configuration. > Those emacs and org versions are fine. It could be one of two things: 1. You forgot to evaluate (advice-add 'org-self-insert-command :around #'modi/org-insert-org-entity-maybe) What do you see when you do C-h f org-self-insert-command after evaluating that whole code block? I see org-self-insert-command is an interactive compiled Lisp function in `org.el'. (org-self-insert-command N) For more information check the manuals. :before-until advice: =E2=80=98modi/org-insert-org-entity-maybe=E2=80=99 Like =E2=80=98self-insert-command=E2=80=99, use overwrite-mode for whitespa= ce in tables. If the cursor is in a table looking at whitespace, the whitespace is overwritten, and the table is not marked as requiring realignment. The ":before-until advice: =E2=80=98modi/org-insert-org-entity-maybe=E2=80= =99" part in there is important. Do you see the same? 2. If from above you see org-self-insert-command being advised correctly, then can you let me know what you get when you do M-: (modi/org-entity-get-name "*") You should get "ast" in return when you evaluate that. Also I am confused why you cannot recreate what I see in emacs -Q. Are you explicitly using "emacs -Q"? Note that that Q is capital (not emacs -q). --=20 --=20 Kaushal Modi --001a113d4e568710db053282d7f3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Tue, May 10= , 2016 at 4:25 PM drymer <drymer= @autistici.org> wrote:
Hi I didn't explain myself. It inserts four *, as it didn't find the entity. I'm using emacs 24.5.3 and org-mode 8.34, which is the maint branch. I've also tried with plain emacs without configuration.

Those emacs and org versions are fine.

It could be one of two things:
1. You forgot to= evaluate
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0=C2=A0(advic= e-add 'org-self-insert-command :around #'modi/org-insert-org-entity= -maybe)

=C2=A0 =C2=A0 What do you see when you do = C-h f org-self-insert-command after evaluating that whole code block?
=

I see

org-self-insert-com= mand is an interactive compiled Lisp function in `org.el'.
(org-self-insert-command N)

For more = information check the manuals.

:before-until advic= e: =E2=80=98modi/org-insert-org-entity-maybe=E2=80=99

<= div>Like =E2=80=98self-insert-command=E2=80=99, use overwrite-mode for whit= espace in tables.
If the cursor is in a table looking at whitespa= ce, the whitespace is
overwritten, and the table is not marked as= requiring realignment.

The ":before-until advice: =E2=80=98modi/org-insert-org-en= tity-maybe=E2=80=99" part in there is important. Do you see the same?<= /span>

2. If from above you see org-self-insert-co= mmand being advised correctly, then can you let me know what you get when y= ou do

M-:=C2=A0(modi/org-entity-get-name "*&q= uot;)

You should get "ast" in return whe= n you evaluate that.

Also I am confused why you ca= nnot recreate what I see in emacs -Q. Are you explicitly using "emacs = -Q"? Note that that Q is capital (not emacs -q).
--

--
Kaushal Modi

--001a113d4e568710db053282d7f3--