* Insert a heading in every sibling
@ 2013-10-28 1:13 Scot Becker
2013-10-28 6:13 ` Marcin Borkowski
2013-12-21 6:04 ` Yasushi SHOJI
0 siblings, 2 replies; 6+ messages in thread
From: Scot Becker @ 2013-10-28 1:13 UTC (permalink / raw)
To: Org-mode ml
[-- Attachment #1: Type: text/plain, Size: 767 bytes --]
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.
* Class One
** Sarah Adams
*** Essay One
Here is my comment to the student on their essay. The grade/mark itself
will be stored as a property or priority.
<<<<<<<<<<<<<<HERE I'd like to add a node for "Essay Two"
** John Smith
*** Essay One
Comment on John's essay.
<<<<<<<<<<<<<< I to add the same node skeleton here, automatically
** Sally Lovelace
*** Essay One
Comment on Sally's essay.
<<<<<<<<<<<<<< And here.
* Class Two
** Ralph Friendly
** Sam Hudson
Thanks,
Scot
[-- Attachment #2: Type: text/html, Size: 1191 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Insert a heading in every sibling
2013-10-28 1:13 Insert a heading in every sibling Scot Becker
@ 2013-10-28 6:13 ` Marcin Borkowski
2013-10-28 8:51 ` Sebastien Vauban
2013-12-21 6:04 ` Yasushi SHOJI
1 sibling, 1 reply; 6+ messages in thread
From: Marcin Borkowski @ 2013-10-28 6:13 UTC (permalink / raw)
To: emacs-orgmode
Dnia 2013-10-28, o godz. 06:13:21
Scot Becker <scot.becker@gmail.com> 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.
Hth,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Insert a heading in every sibling
2013-10-28 6:13 ` Marcin Borkowski
@ 2013-10-28 8:51 ` Sebastien Vauban
2013-10-28 16:08 ` Scot Becker
0 siblings, 1 reply; 6+ messages in thread
From: Sebastien Vauban @ 2013-10-28 8:51 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Marcin Borkowski wrote:
> Scot Becker <scot.becker-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Insert a heading in every sibling
2013-10-28 8:51 ` Sebastien Vauban
@ 2013-10-28 16:08 ` Scot Becker
2013-10-29 19:01 ` John Kitchin
0 siblings, 1 reply; 6+ messages in thread
From: Scot Becker @ 2013-10-28 16:08 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: Org-mode ml
[-- Attachment #1: Type: text/plain, Size: 1497 bytes --]
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
<sva-news@mygooglest.com>wrote:
> Marcin Borkowski wrote:
> > Scot Becker <scot.becker@gmail.com> 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
>
>
>
[-- Attachment #2: Type: text/html, Size: 2219 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Insert a heading in every sibling
2013-10-28 16:08 ` Scot Becker
@ 2013-10-29 19:01 ` John Kitchin
0 siblings, 0 replies; 6+ messages in thread
From: John Kitchin @ 2013-10-29 19:01 UTC (permalink / raw)
To: Scot Becker; +Cc: Sebastien Vauban, Org-mode ml
[-- Attachment #1: Type: text/plain, Size: 2146 bytes --]
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 <scot.becker@gmail.com> 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 <sva-news@mygooglest.com
> > wrote:
>
>> Marcin Borkowski wrote:
>> > Scot Becker <scot.becker@gmail.com> 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
>>
>>
>>
>
[-- Attachment #2: Type: text/html, Size: 3416 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Insert a heading in every sibling
2013-10-28 1:13 Insert a heading in every sibling Scot Becker
2013-10-28 6:13 ` Marcin Borkowski
@ 2013-12-21 6:04 ` Yasushi SHOJI
1 sibling, 0 replies; 6+ messages in thread
From: Yasushi SHOJI @ 2013-12-21 6:04 UTC (permalink / raw)
To: emacs-orgmode
Hi,
At Mon, 28 Oct 2013 06:13:21 +0500,
Scot Becker wrote:
>
> 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.
It is not a org solution but I'd recommend using multiple cursor by
Magnar Sveen of Emacs rocks.
- http://emacsrocks.com/e13.html
- https://github.com/magnars/multiple-cursors.el
> * Class One
> ** Sarah Adams
> *** Essay One
> Here is my comment to the student on their essay. The grade/mark itself
> will be stored as a property or priority.
[...]
In the case of above, do the following after properly installed mc:
1. mark `Essay One'
2. call `mc/mark-all-like-this'
3. C-<Enter>
4. Type 'Essay Two'
Viola! Now you have new `Essay Two' entries even if you already have
one. ;-p
My two cents,
--
yashi
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-12-21 6:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-28 1:13 Insert a heading in every sibling Scot Becker
2013-10-28 6:13 ` Marcin Borkowski
2013-10-28 8:51 ` Sebastien Vauban
2013-10-28 16:08 ` Scot Becker
2013-10-29 19:01 ` John Kitchin
2013-12-21 6:04 ` Yasushi SHOJI
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).