It's working! Thank you very much for your time, this will be very useful. Kaushal Modi: > On Tue, May 10, 2016 at 6:51 PM Kaushal Modi wrote: > >> I will see if I can find a workaround for it on 24.5. >> > > Here's a final try .. > > Please replace the advising function with this one: > > (defun modi/org-insert-org-entity-maybe (orig-fun &rest args) > "When the universal prefix C-u is used before entering any character, > insert the character's `org-entity' name if available." > (let ((pressed-key (char-to-string (elt (this-single-command-keys) 0))) > entity-name) > (when (and (listp args) (eq 4 (car args))) > (setq entity-name (modi/org-entity-get-name pressed-key)) > (when entity-name > (setq entity-name (concat "\\" entity-name "{}")) > (insert entity-name) > (message (concat "Inserted `org-entity' " > (propertize entity-name > 'face 'font-lock-function-name-face) > " for the symbol " > (propertize pressed-key > 'face 'font-lock-function-name-face) > ".")))) > (when (null entity-name) > (apply orig-fun args)))) > > The only change is in this line: > > (let ((pressed-key (char-to-string (elt (this-single-command-keys) 0))) > > I have quickly verified it to work the same in both emacs 24.5 and emacs > 25.x. > > Let me know. Thanks for testing the code. >