emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Akira Kyle <akira@akirakyle.com>
To: emacs-orgmode@gnu.org
Subject: Suggestion: add org-latex-preview to org-ctrl-c-ctrl-c
Date: Thu, 22 Sep 2022 20:38:10 -0600	[thread overview]
Message-ID: <878rmag67k.fsf@akirakyle.com> (raw)

I recently thought to add ~org-latex-preview~ to 
~org-ctrl-c-ctrl-c~ and it has been quite the productivity 
booster! Two arguments as to why this should be done:
- ~org-ctrl-c-ctrl-c~ currently does nothing when inside 
  latex-fragment or latex-environment so why not make it 
- This intuitively matches my muscle memory from using 
  babel. LaTeX is code after all, and I'm often making mistakes, 
  so I want the fastest "edit-compile-edit" loop possible.

Here's what I currently have to achieve this in case anyone wants 
to give it a try right now :)

#+begin_src emacs-lisp
(defun my-org-ctrl-c-ctrl-c-latex-preview-hook ()
  (let ((element (car (org-element-context))))
    (if (or (eq element 'latex-fragment) (eq element 

(add-hook 'org-ctrl-c-ctrl-c-final-hook

             reply	other threads:[~2022-09-23 15:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23  2:38 Akira Kyle [this message]
2022-09-24  2:04 ` Suggestion: add org-latex-preview to org-ctrl-c-ctrl-c Ihor Radchenko

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:

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=878rmag67k.fsf@akirakyle.com \
    --to=akira@akirakyle.com \
    --cc=emacs-orgmode@gnu.org \


* 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 public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).