I'll try the other approach if we can't make this work, because I like it more x) I've evaluated all of it, even re-opened emacs. Uh, in my description of that function it doesn't say the same, it's the regular one. I've executed toggle-debug-on-error and re-evaluated and nothing. It seems that is not being evaluated. Kaushal Modi: > 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: ‘modi/org-insert-org-entity-maybe’ > > Like ‘self-insert-command’, use overwrite-mode for whitespace 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: ‘modi/org-insert-org-entity-maybe’" 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). >