emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Insert a heading in every sibling


From: John Kitchin
Subject: Re: [O] Insert a heading in every sibling
Date: Tue, 29 Oct 2013 15:01:27 -0400

I worked out some emacs-lisp code that does some of what you want. It was a little tricky though to avoid some strange recursion loops. See this post:

http://jkitchin.github.io/blog/2013/10/29/Add-subheadings-to-all-headings-in-an-org-file-at-some-level/

j

John

-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Mon, Oct 28, 2013 at 12:08 PM, Scot Becker <address@hidden> wrote:
Thanks,  Seb and Marcin.  I didn't know about cloning.  That will do for those parts of the tree that I know about before I start filling in the data.  For afterwards, which is more the case I'm thinking about, I'll aim to write an Elisp function using org-insert-subheading.  That sample macro gives me something to go on. I'll experiment with keyboard macros, too, which might be fine for this application.

Thx.
 


On Mon, Oct 28, 2013 at 1:51 PM, Sebastien Vauban <address@hidden> wrote:
Marcin Borkowski wrote:
> Scot Becker <address@hidden> napisał(a):
>
>> I'm using org-mode to keep track of student grades.  How can I easily
>> add a bunch of identical headings at a certain level in my tree?
>> Specifically,I have a L2 heading for each student, and I want to put
>> a node (heading, with some properties) under each L2 student heading
>> for that class.
>
> Personally, I'd just write a small Elisp function to do that.  (It's
> easier than you might think - even I could do that;).)  Here's a thing
> that is (remotely) similar:
> http://mbork.pl/2013-09-23_Automatic_insertion_of_habit_templates_%28en%29
>
> Or, you could record a keyboard macro, and even save it as Elisp.

Other solutions include:

- using YASnippets, or

- writing a skeleton in the Org document and cloning it N times at once (see
  C-c C-x c).

Best regards,
  Seb

--
Sebastien Vauban





reply via email to

[Prev in Thread] Current Thread [Next in Thread]