From mboxrd@z Thu Jan 1 00:00:00 1970 From: William Henney Subject: Two bugs in org-indent (plus a fix to correct one of them) Date: Sat, 12 Jun 2010 21:44:47 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=34541 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ONdDt-0003h5-FU for emacs-orgmode@gnu.org; Sat, 12 Jun 2010 22:46:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ONdBp-0005qi-6l for emacs-orgmode@gnu.org; Sat, 12 Jun 2010 22:44:50 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:58357) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ONdBp-0005qa-3m for emacs-orgmode@gnu.org; Sat, 12 Jun 2010 22:44:49 -0400 Received: by iwn1 with SMTP id 1so2948984iwn.0 for ; Sat, 12 Jun 2010 19:44:47 -0700 (PDT) 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@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-org Hi all I have recently started using org-indent (together with word-wrap) for new org files. In general, I love it. But there are a couple of small problems: 1. If one sets org-indent-indentation-per-level to any value other than the default of 2, then the indentation of lines following a heading is not correct. I seem to have managed to fix this by changing line 231 of org-indent.el from n (* (or level 0) org-indent-indentation-per-level)))))))) to n (+ 2 (* (1- (or level 0)) org-indent-indentation-per-level))))))))) Tested with org-indent-indentation-per-level =3D 0, 1, 2, and 3. 2. org-indent fails to play nicely with org-inlinetask in two ways i) It destroys the special fontification of the inline task's leading stars, even if org-indent-mode-turns-on-hiding-stars is set to nil ii) Any text after an inline task's END statement is soft-indented as though it were part of the inline task, whereas the indentation should ideally return to what it was before the inline task. Of course, this is also a problem when org-indent is turned off, if you try to automatically hard-indent using TAB. However, in that case you can adjust by hand the indentation of the first line after the inline task, and then all the following lines will indent correctly. With org-indent the problem is much worse since there is no way of adjusting the soft indents by hand. Cheers Will P.S. Has anyone successfully converted a pre-existing org file to a form suitable for use with org-indent? By which I mean that the pre-existing file was written with hard line breaks and hard indents. The task is not trivial since one needs to remove the hard indents due to the nesting of the org headings, but to leave alone the hard indents due to the nesting of plain lists. --=20 Dr William Henney, Centro de Radioastronom=EDa y Astrof=EDsica, Universidad Nacional Aut=F3noma de M=E9xico, Campus Morelia