From 9eff31aadafcdaed3793352f2583b452eef14070 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 24 Nov 2014 00:05:32 +0100 Subject: [PATCH] `org-edit-special' edits export blocks * lisp/org.el (org-edit-special): Allow to edit export blocks. * etc/ORG-NEWS: Document feature. --- etc/ORG-NEWS | 5 +++++ lisp/org.el | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 40561ddab..79d2a9539 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -103,6 +103,11 @@ default is =hline=. One can use a drawer without listing it in the =#+DRAWERS= keyword, which is now obsolete. As a consequence, this change also deprecates ~org-drawers~ variable. +*** ~org-edit-special~ can edit export blocks +Using C-c ' on an export block now opens a sub-editing buffer. Major +mode in that buffer is determined by export backend name (e.g., +"latex" \to "latex-mode"). You can define exceptions to this rule by +configuring ~org-src-lang-modes~, which see. *** Markdown export supports switches in source blocks For example, it is now possible to number lines using the =-n= switch in a source block. diff --git a/lisp/org.el b/lisp/org.el index 762ec207c..38c57262b 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -20661,6 +20661,7 @@ See the individual commands for more information." When at a table, call the formula editor with `org-table-edit-formulas'. When in a source code block, call `org-edit-src-code'. When in a fixed-width region, call `org-edit-fixed-width-region'. +When in an export block, call `org-edit-export-block'. When at an #+INCLUDE keyword, visit the included file. On a link, call `ffap' to visit the link at point. Otherwise, return a user error." @@ -20698,11 +20699,12 @@ Otherwise, return a user error." (user-error "No special environment to edit here"))) (table (if (eq (org-element-property :type element) 'table.el) - (org-edit-src-code) + (org-edit-table.el) (call-interactively 'org-table-edit-formulas))) ;; Only Org tables contain `table-row' type elements. (table-row (call-interactively 'org-table-edit-formulas)) - ((example-block export-block) (org-edit-src-code)) + ((example-block src-block) (org-edit-src-code)) + (export-block (org-edit-export-block)) (fixed-width (org-edit-fixed-width-region)) (otherwise ;; No notable element at point. Though, we may be at a link,