From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Easy insert of verbatim symbols Date: Tue, 19 Oct 2010 12:53:24 +0200 Message-ID: <80vd4ybgij.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello, I often find it tedious to add `=3D' signs before and after the words that = you want to be rendered in verbatim, moreover when you want to do that in your text, once it already has been written. Adding this to your =3D.emacs=3D: #+begin_src emacs-lisp (defun insert-one-equal-or-two () (interactive) (cond ((or (bolp) (not (looking-back "=3D"))) ;; insert just one =3D (self-insert-command 1)) ((save-excursion (backward-char) ;; Skip symbol backwards. (and (not (zerop (skip-syntax-backward "w_"))) (not (looking-back "=3D")) (or (insert-and-inherit "=3D") t)))) (t ;; insert =3D=3D around following symbol (delete-backward-char 1) (unless (looking-back "=3D") (insert-and-inherit "=3D")) (save-excursion (skip-syntax-forward "w_") (unless (looking-at "=3D") (insert-and-inherit "=3D")))))) (define-key org-mode-map (kbd "=3D") 'insert-one-equal-or-two) #+end_src allows you to add just an equal sign at the end of the word, and the one is front is automatically added... Best regards, Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode