From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0HGJAjbWLWM/kwAAbAwnHQ (envelope-from ) for ; Fri, 23 Sep 2022 17:52:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mJiLAjbWLWO5bQAAauVa8A (envelope-from ) for ; Fri, 23 Sep 2022 17:52:22 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 84886B4A8 for ; Fri, 23 Sep 2022 17:52:21 +0200 (CEST) Received: from localhost ([::1]:49088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obkyS-0005gn-DF for larch@yhetil.org; Fri, 23 Sep 2022 11:52:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obYg8-0002Zr-7J for emacs-orgmode@gnu.org; Thu, 22 Sep 2022 22:44:36 -0400 Received: from ms11p00im-qufo17291801.me.com ([17.58.38.47]:55762) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obYg6-0003EY-Hm for emacs-orgmode@gnu.org; Thu, 22 Sep 2022 22:44:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akirakyle.com; s=sig1; t=1663901072; bh=9j2IRVRnN7baKWzuau12lnGeWfXI3FFlBS+TMcaqH88=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=cs9gAed4Ph3BPrDWDLR+KOOxjeZBAP70OnNOH+IVqSUZc57dgAgv2eBLfmzxd1hnK yjsx8puVGKrLcu8zey9ABQTAZu92aiUjO9dDuQK3h0RQ7hwJPAUyTYhW4fT51Gf/9y Il+c4VoVbSzkTFYTQ/7lIR7Rd5AR9xt8J1IvKEI9YLCljdNrd6xGDcQt2WnkcqRKPN 4S3eJ/Q6APXGTu/t5CbaZtRt6RXU2FCy1XkXp7QhMYVbaAUy3fY+rnYsEJw2+F3kGO 7JNMOoPBWlNflkKWv35IiHRkDECXYQEbYRE5Ag8Ba2zxxpcAuiiso11hNE7LRE8lka LYkHbdbPhtp9g== Received: from data (ms11p00im-dlb-asmtpmailmevip.me.com [17.57.154.19]) by ms11p00im-qufo17291801.me.com (Postfix) with ESMTPSA id 8C4C35001FA for ; Fri, 23 Sep 2022 02:44:32 +0000 (UTC) User-agent: mu4e 1.6.11; emacs 29.0.50 From: Akira Kyle 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 Message-ID: <878rmag67k.fsf@akirakyle.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Proofpoint-GUID: 9vAcEUugLs7n-OygFlnRJKjD36u1fIia X-Proofpoint-ORIG-GUID: 9vAcEUugLs7n-OygFlnRJKjD36u1fIia X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.816,17.0.605.474.0000000_definitions?= =?UTF-8?Q?=3D2022-01-18=5F01:2022-01-14=5F01,2022-01-18=5F01,2020-01-23?= =?UTF-8?Q?=5F02_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 mlxscore=0 bulkscore=0 clxscore=1030 mlxlogscore=376 adultscore=2 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2209230015 Received-SPF: pass client-ip=17.58.38.47; envelope-from=akira@akirakyle.com; helo=ms11p00im-qufo17291801.me.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 23 Sep 2022 11:45:48 -0400 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663948341; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=9j2IRVRnN7baKWzuau12lnGeWfXI3FFlBS+TMcaqH88=; b=C90L70tuwAfEn8F4bKx3ka1oB3dp+//r++EP0zwjWDJjJE3YNGEvSYgA61uCZXNFgmjYqx KkLWeiR42kK1zRh1qCi1UkSLvd2GRu0jQxRNQlpgZs8TKbcitVzznZguoOa5ctCESjSaI1 SIBk6YIaunJBMlgzZ8PPiAWa+CIRAeSMJDVEN7q8zgAXmGrLL+m+jXQtf+KCwPGWmQ9HLe QyvjwmvSe8UWJFs+CP9zQ2RhBBQIdYbSo0fxsFJDoqeDlDaHffqUKIBOvgdhoAksqxDLPc 5oY2415oTpCTaQl0hYctd49OiRqx6F+MqV5CSxNDPdQ99bBPemx1+Z4LxJ5Ecg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663948341; a=rsa-sha256; cv=none; b=aMDHKJgZFSSyLKaoHtVhAqndgqvsu8UzSGlT/VF43io9FrNKEQaKK0gLjMZ3+/gmgpizQE xFqwZmXIJ9RwGLU+7roBbCD/urB/zhwp1SrOyCHFXr4t9/Xq8ogszLT0S1L7KDljupDLyj 5n2HLF0HkBxb/RJ7K6wqVHp4zocqozSnMYJz4qGKjr+NS4xa98r7DiZO8R7BRWi7jIrADJ 3iPb5cl6ccKXn5ywvx7puTI3OY7KQ/CkMAL7rrAwSYSSYhbgnHzLRKWaTk4fBRLxPi/K8C 5aU47hlRYEPbjBQ0Kv/NqsSZJGEdVpYB036gy80B27TK8wPGIaub3HvOy3WMzg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=akirakyle.com header.s=sig1 header.b=cs9gAed4; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.45 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=akirakyle.com header.s=sig1 header.b=cs9gAed4; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 84886B4A8 X-Spam-Score: -3.45 X-Migadu-Scanner: scn1.migadu.com X-TUID: egSadlYzvFxZ 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 ~org-latex-preview~? - 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 'latex-environment)) (org-latex-preview)))) (add-hook 'org-ctrl-c-ctrl-c-final-hook 'my-org-ctrl-c-ctrl-c-latex-preview-hook) #+end_src