emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: tony day <tonyday567@gmail.com>
To: orgmode <emacs-orgmode@gnu.org>
Subject: indentation following yas snippet insert
Date: Wed, 24 Oct 2012 15:36:43 +1100	[thread overview]
Message-ID: <61CD95DB-FE26-4200-86FF-DCF587ABE1F8@gmail.com> (raw)

Inserting a yas snippet consisting of a code block is a very common occurence in my work flow.  Now I have the right yas settings to make it all happen I think.

#+begin_src emacs-lisp
  (setq yas/also-auto-indent-first-line t)
  (setq yas/indent-line t)
#+end_src

But on insertion, it isnt indented.  Until now I've been inserting a space on the begin_src line then hitting backspace.  That tends to kick org in the guts somehow and it then coughs up the right indentation.

What I also often find myself doing unconsciously is hitting C-c C-c (just outside the source block) and it it says "C-c C-c can do nothing useful in this spot".  O yes it can!  It can refresh the indentation is what it can do for me.  Would anyone else agree that C-c C-c would be useful to work on a normal line in this way?

But on to my main question which is is there actually an "org-refresh-indentation-around-point" command?  

I've looked and looked and the closest I can find is org-indent-indent-buffer.  But this seems a little over-the-topish for the task.

Tony

             reply	other threads:[~2012-10-24  4:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-24  4:36 tony day [this message]
2012-12-22 17:53 ` indentation following yas snippet insert Bastien

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=61CD95DB-FE26-4200-86FF-DCF587ABE1F8@gmail.com \
    --to=tonyday567@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).