* indentation following yas snippet insert
@ 2012-10-24 4:36 tony day
2012-12-22 17:53 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: tony day @ 2012-10-24 4:36 UTC (permalink / raw)
To: orgmode
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: indentation following yas snippet insert
2012-10-24 4:36 indentation following yas snippet insert tony day
@ 2012-12-22 17:53 ` Bastien
0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2012-12-22 17:53 UTC (permalink / raw)
To: tony day; +Cc: orgmode
Hi Tony,
tony day <tonyday567@gmail.com> writes:
> #+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.
Within source code blocks, and with (setq org-src-tab-acts-natively t)
just tab on a line to indent.
Otherwise C-c ' C-x h C-M-\ C-c ' should do.
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-22 23:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-24 4:36 indentation following yas snippet insert tony day
2012-12-22 17:53 ` Bastien
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).