From mboxrd@z Thu Jan 1 00:00:00 1970 From: Federico Beffa Subject: proposal for improved integration of cdlatex Date: Fri, 25 Jul 2014 18:31:26 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAiP5-0005hZ-MU for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 12:31:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XAiP1-0008TX-ME for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 12:31:31 -0400 Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]:38313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAiP1-0008Si-EB for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 12:31:27 -0400 Received: by mail-lb0-f169.google.com with SMTP id s7so3663617lbd.28 for ; Fri, 25 Jul 2014 09:31:26 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, when you enable org-cdlatex and insert a LaTeX environment by pressing M-{, the new environment is inserted ignoring indentation. To correct for that it is not enough to press TAB as TAB is locally bound to cdlatex-tab and moves the cursor to the next "interesting" part of the environment. For this reason I would like to propose an improved default binding to the org-cdlatex-mode-map M-{ as follows: ----------------------------------------------------------------------------------- (defun org-cdlatex-environment-indent (&optional environment item) (interactive) (cdlatex-environment environment item) (save-excursion (org-mark-element) (org-indent-region (point) (mark)))) (org-defkey org-cdlatex-mode-map "\C-c{" 'org-cdlatex-environment-indent) ----------------------------------------------------------------------------------- Regards, Fede