emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bruno BEAUFILS <bruno@boulgour.com>
To: emacs-orgmode@gnu.org
Cc: Bruno BEAUFILS <bruno@boulgour.com>
Subject: org-tempo question
Date: Thu, 24 Sep 2020 15:30:52 +0200	[thread overview]
Message-ID: <20200924133052.ooqvgnnjqy7v3xt7@localhost.localdomain> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 87 bytes --]

Does anyone have any idea where I can look to understand that?

-- 
Bruno BEAUFILS

[-- Attachment #1.2: Type: message/rfc822, Size: 6330 bytes --]

[-- Attachment #1.2.1.1: Type: text/plain, Size: 1778 bytes --]

Let us imagine this simple org file :

#+NAME: first
#+begin_src org
- an item
  - subitem

#+end_src

If the cursor is at the last line and I want to insert an org block,
let's say an example, using org-tempo feature, I can type =<e=
followed by tabulation.

In that case I get something like 

#+NAME: second
#+begin_src org
- an item
  - subitem
#+begin_example

#+end_example
#+end_src

However if I get indentation role (for instance in exports) well I do
not expect that but instead something like:

#+NAME: third
#+begin_src org
- an item
  - subitem
    #+begin_example

    #+end_example
#+end_src

Are my expectations (and thus my use of indentation by org-mode
understandings) wrong or is it a bug?


In the same spirit if before trying that I type tabulation then =<e=
then tabulation again, nothing is inserted, aka org-tempo seems to work
only when cursor is at the beginning of line.

Am I right? Is it a feature or a bug?

I expected that the example block would have been inserted /correctly/
indented as in my third example above.


The only solution I found for getting things right is to type spaces
instead of tabulation to let my cursor go to the right column.

Let us consider this snippet.

#+NAME: fourth
#+begin_src org
- an item
  - subitem
    H
#+end_src

If the cursor is in the =H= position, then if I type =<e= then
tabulation everything seems right and I get the same result as in
<<third>>.

Any help would appreciated.

I use GNU Emacs 26.3 from Debian GNU bullseye (testing) and what I
think is the last org-mode version from ELPA.

#+begin_src 
Org mode version 9.3.7 (9.3.7-55-gba2405-elpa @ /home/bruno/.emacs.d/elpa/org-20200907/)
#+end_src

-- 
Bruno BEAUFILS

[-- Attachment #1.2.1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2020-09-24 13:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 13:30 Bruno BEAUFILS [this message]
2020-09-24 16:54 ` Nick Dokos
2020-09-24 18:18   ` Jeremie Juste
2020-09-24 17:17 ` Jeremie Juste

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=20200924133052.ooqvgnnjqy7v3xt7@localhost.localdomain \
    --to=bruno@boulgour.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: org-tempo question' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).