emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* add a table entry by org-remember template
@ 2010-06-17  7:20 zwz
  2010-06-17 10:45 ` Matt Lundin
  0 siblings, 1 reply; 5+ messages in thread
From: zwz @ 2010-06-17  7:20 UTC (permalink / raw)
  To: emacs-orgmode

AFAIK, it is now impossible to add a table entry by org-template.
But I think it is very useful. For example,
in my private.org, there is a section

* Contacts
  | name | tel. | email   | addr      |
  |------+------+---------+-----------|
  | A    |   12 | a@a.com | somewhere |
  

If it is feasible with such a template  
("Contact" ?c "| %^{Name} | %^{tel} | %^{email} | %^{addr} |\n"
"~/private.org" "Contacts")
to add new contacts, it would be very nice to organize (e.g. sort) all
the contacts based on org-table.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: add a table entry by org-remember template
  2010-06-17  7:20 add a table entry by org-remember template zwz
@ 2010-06-17 10:45 ` Matt Lundin
  2010-06-17 11:12   ` zwz
  0 siblings, 1 reply; 5+ messages in thread
From: Matt Lundin @ 2010-06-17 10:45 UTC (permalink / raw)
  To: zwz; +Cc: emacs-orgmode

zwz <zhangweize@gmail.com> writes:

> AFAIK, it is now impossible to add a table entry by org-template.
> But I think it is very useful. For example,
> in my private.org, there is a section
>
> * Contacts
>   | name | tel. | email   | addr      |
>   |------+------+---------+-----------|
>   | A    |   12 | a@a.com | somewhere |
>   
>
> If it is feasible with such a template  
> ("Contact" ?c "| %^{Name} | %^{tel} | %^{email} | %^{addr} |\n"
> "~/private.org" "Contacts")
> to add new contacts, it would be very nice to organize (e.g. sort) all
> the contacts based on org-table.

One solution would be to use properties to store contact information:

--8<---------------cut here---------------start------------->8---
* Name
  :PROPERTIES:
  :NAME:     A
  :TEL:      12
  :EMAIL:    a@a.com
  :ADDR:     somewhere
  :END:
--8<---------------cut here---------------end--------------->8---

It would be easy to set up a remember template to capture such
information. You could then sort all the headings in the contacts file
by property. And there are other advantages. You could view the
information in contact view or capture it (or a subset) in tables using
dblocks. You could add notes and additional metadata to each contact.
And you could access this data in other emacs modes by using org's
APIs.  

 - (info "(org) Using the property API")
 - (info "(org) Using the mapping API")

HTH,
Matt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: add a table entry by org-remember template
  2010-06-17 10:45 ` Matt Lundin
@ 2010-06-17 11:12   ` zwz
  2010-06-17 18:47     ` Matt Lundin
  0 siblings, 1 reply; 5+ messages in thread
From: zwz @ 2010-06-17 11:12 UTC (permalink / raw)
  To: emacs-orgmode

Matt Lundin <mdl@imapmail.org> writes:

> zwz <zhangweize@gmail.com> writes:
>
>> AFAIK, it is now impossible to add a table entry by org-template.
>> But I think it is very useful. For example,
>> in my private.org, there is a section
>>
>> * Contacts
>>   | name | tel. | email   | addr      |
>>   |------+------+---------+-----------|
>>   | A    |   12 | a@a.com | somewhere |
>>   
>>
>> If it is feasible with such a template  
>> ("Contact" ?c "| %^{Name} | %^{tel} | %^{email} | %^{addr} |\n"
>> "~/private.org" "Contacts")
>> to add new contacts, it would be very nice to organize (e.g. sort) all
>> the contacts based on org-table.
>
> One solution would be to use properties to store contact information:
>
> * Name
>   :PROPERTIES:
>   :NAME:     A
>   :TEL:      12
>   :EMAIL:    a@a.com
>   :ADDR:     somewhere
>   :END:
>
> It would be easy to set up a remember template to capture such
> information. You could then sort all the headings in the contacts file
> by property. And there are other advantages. You could view the
> information in contact view or capture it (or a subset) in tables using
> dblocks. You could add notes and additional metadata to each contact.
> And you could access this data in other emacs modes by using org's
> APIs.  
>
>  - (info "(org) Using the property API")
>  - (info "(org) Using the mapping API")
>
> HTH,
> Matt
>
Yes, this is how I am doing now.
I forgot the "column view" thing. :)

BTW, how to sort the headings (names) by the properties?
and what is dblocks?
Are they mentioned in the manual?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: add a table entry by org-remember template
  2010-06-17 11:12   ` zwz
@ 2010-06-17 18:47     ` Matt Lundin
  2010-06-18 11:08       ` zwz
  0 siblings, 1 reply; 5+ messages in thread
From: Matt Lundin @ 2010-06-17 18:47 UTC (permalink / raw)
  To: zwz; +Cc: emacs-orgmode

zwz <zhangweize@gmail.com> writes:

> Matt Lundin <mdl@imapmail.org> writes:
>
>> zwz <zhangweize@gmail.com> writes:
>>
>>> AFAIK, it is now impossible to add a table entry by org-template.
>>> But I think it is very useful. For example,
>>> in my private.org, there is a section
>>>
>>> * Contacts
>>>   | name | tel. | email   | addr      |
>>>   |------+------+---------+-----------|
>>>   | A    |   12 | a@a.com | somewhere |
>>>   
>>>
>>> If it is feasible with such a template  
>>> ("Contact" ?c "| %^{Name} | %^{tel} | %^{email} | %^{addr} |\n"
>>> "~/private.org" "Contacts")
>>> to add new contacts, it would be very nice to organize (e.g. sort) all
>>> the contacts based on org-table.
>>
>> One solution would be to use properties to store contact information:
>
> Yes, this is how I am doing now.
> I forgot the "column view" thing. :)
>
> BTW, how to sort the headings (names) by the properties?

Typing C-c ^ r will prompt you for a property. If you are above the
first headline, all first level headlines will be sorted. If you are on
a headline, all subheadings will be sorted.

> and what is dblocks?

Sorry for the shorthand. Dynamic blocks can be used to refresh "dynamic"
information (such as a table generated from properties) within an org
file.

> Are they mentioned in the manual?

- (info "(org) Dynamic blocks")
- (info "(org) Capturing column view")

Best,
Matt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: add a table entry by org-remember template
  2010-06-17 18:47     ` Matt Lundin
@ 2010-06-18 11:08       ` zwz
  0 siblings, 0 replies; 5+ messages in thread
From: zwz @ 2010-06-18 11:08 UTC (permalink / raw)
  To: emacs-orgmode

Matt Lundin <mdl@imapmail.org> writes:

> zwz <zhangweize@gmail.com> writes:
>
>> Matt Lundin <mdl@imapmail.org> writes:
>>
>>> zwz <zhangweize@gmail.com> writes:
>>>
>>>> AFAIK, it is now impossible to add a table entry by org-template.
>>>> But I think it is very useful. For example,
>>>> in my private.org, there is a section
>>>>
>>>> * Contacts
>>>>   | name | tel. | email   | addr      |
>>>>   |------+------+---------+-----------|
>>>>   | A    |   12 | a@a.com | somewhere |
>>>>   
>>>>
>>>> If it is feasible with such a template  
>>>> ("Contact" ?c "| %^{Name} | %^{tel} | %^{email} | %^{addr} |\n"
>>>> "~/private.org" "Contacts")
>>>> to add new contacts, it would be very nice to organize (e.g. sort)
> all
>>>> the contacts based on org-table.
>>>
>>> One solution would be to use properties to store contact information:
>>
>> Yes, this is how I am doing now.
>> I forgot the "column view" thing. :)
>>
>> BTW, how to sort the headings (names) by the properties?
>
> Typing C-c ^ r will prompt you for a property. If you are above the
> first headline, all first level headlines will be sorted. If you are on
> a headline, all subheadings will be sorted.
>
>> and what is dblocks?
>
> Sorry for the shorthand. Dynamic blocks can be used to refresh "dynamic"
> information (such as a table generated from properties) within an org
> file.
>
>> Are they mentioned in the manual?
>
> - (info "(org) Dynamic blocks")
> - (info "(org) Capturing column view")
>
> Best,
> Matt
Thank you, Matt.
I have never tried dblocks before. But it is interesting.
I will learn to used it.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-06-18 11:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-17  7:20 add a table entry by org-remember template zwz
2010-06-17 10:45 ` Matt Lundin
2010-06-17 11:12   ` zwz
2010-06-17 18:47     ` Matt Lundin
2010-06-18 11:08       ` zwz

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