emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Patch] Document org-capture-templates entry type default strings
@ 2020-03-31 21:46 No Wayman
  2020-05-24 13:28 ` Bastien
  0 siblings, 1 reply; 16+ messages in thread
From: No Wayman @ 2020-03-31 21:46 UTC (permalink / raw)
  To: emacs-orgmode


I've included the default entry type strings for each entry type 
in org-capture-tempalte's
docstring. Made a couple clarifying edits as well. IMO this is 
better than having the user hunt for the defaults in the source or 
experimenting by creating each type of template:


diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index d292defd6..ac4d633cb 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -159,14 +159,20 @@ description  A short string describing the 
template, will be shown during
 type         The type of entry.  Valid types are:
                entry       an Org node, with a headline.  Will be 
                filed
                            as the child of the target entry or as 
                            a
-                           top-level entry.
+                           top-level entry. Its default template 
is:
+                             \"* %?\n %a\"
                item        a plain list item, will be placed in 
                the
-                           first plain list at the target
-                           location.
+                           first plain list at the target 
location.
+                           Its default template is:
+                             \"- %?\"
                checkitem   a checkbox item.  This differs from 
                the
                            plain list item only in so far as it 
                            uses a
-                           different default template.
+                           different default template. Its 
default
+                           template is:
+                             \"- [ ] %?\"
                table-line  a new line in the first table at 
                target location.
+                           Its default template is:
+                             \"| %? |\"
                plain       text to be inserted as it is.

 target       Specification of where the captured item should be 
 placed.
@@ -214,9 +220,10 @@ target       Specification of where the 
captured item should be placed.
                 Most general way: write your own function which 
                 both visits
                 the file and moves point to the right location

-template     The template for creating the capture item.  If you 
 leave this
-             empty, an appropriate default template will be used. 
              See below
-             for more details.  Instead of a string, this may 
              also be one of
+template     The template for creating the capture item.
+             If it is an empty string or nil, a default template 
based on
+             the entry type will be used (see the \"type\" 
section above).
+             Instead of a string, this may also be one of:

                  (file \"/path/to/template-file\")
                  (function function-returning-the-template)


===File 
/mnt/data/programming/repos/org-mode/0001-Document-entry-type-default-template-strings.patch===
From 1b91f8ad184d191e1ee09e79e150d7f51c0c3b18 Mon Sep 17 00:00:00 
2001
From: Nicholas Vollmer <iarchivedmywholelife@gmail.com>
Subject: [PATCH] Document entry type default template strings

---
 lisp/org-capture.el | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index d292defd6..ac4d633cb 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -159,14 +159,20 @@ description  A short string describing the 
template, will be shown during
 type         The type of entry.  Valid types are:
                entry       an Org node, with a headline.  Will be 
                filed
                            as the child of the target entry or as 
                            a
-                           top-level entry.
+                           top-level entry. Its default template 
is:
+                             \"* %?\n %a\"
                item        a plain list item, will be placed in 
                the
-                           first plain list at the target
-                           location.
+                           first plain list at the target 
location.
+                           Its default template is:
+                             \"- %?\"
                checkitem   a checkbox item.  This differs from 
                the
                            plain list item only in so far as it 
                            uses a
-                           different default template.
+                           different default template. Its 
default
+                           template is:
+                             \"- [ ] %?\"
                table-line  a new line in the first table at 
                target location.
+                           Its default template is:
+                             \"| %? |\"
                plain       text to be inserted as it is.

 target       Specification of where the captured item should be 
 placed.
@@ -214,9 +220,10 @@ target       Specification of where the 
captured item should be placed.
                 Most general way: write your own function which 
                 both visits
                 the file and moves point to the right location

-template     The template for creating the capture item.  If you 
 leave this
-             empty, an appropriate default template will be used. 
              See below
-             for more details.  Instead of a string, this may 
              also be one of
+template     The template for creating the capture item.
+             If it is an empty string or nil, a default template 
based on
+             the entry type will be used (see the \"type\" 
section above).
+             Instead of a string, this may also be one of:

                  (file \"/path/to/template-file\")
                  (function function-returning-the-template)
--
2.26.0

============================================================

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

* Re: [Patch] Document org-capture-templates entry type default strings
@ 2020-05-04 16:18 No Wayman
  2020-05-04 17:07 ` No Wayman
  0 siblings, 1 reply; 16+ messages in thread
From: No Wayman @ 2020-05-04 16:18 UTC (permalink / raw)
  To: emacs-orgmode


Any interest in this patch?


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

* Re: [Patch] Document org-capture-templates entry type default strings
  2020-05-04 16:18 [Patch] Document org-capture-templates entry type default strings No Wayman
@ 2020-05-04 17:07 ` No Wayman
  2020-05-04 18:08   ` Nicolas Goaziou
  0 siblings, 1 reply; 16+ messages in thread
From: No Wayman @ 2020-05-04 17:07 UTC (permalink / raw)
  To: No Wayman; +Cc: emacs-orgmode


No Wayman <iarchivedmywholelife@gmail.com> writes:

> Any interest in this patch?
Apologies, intended this to be a reply to: 
https://lists.gnu.org/archive/html/emacs-orgmode/2020-03/msg00317.html


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

* Re: [Patch] Document org-capture-templates entry type default strings
  2020-05-04 17:07 ` No Wayman
@ 2020-05-04 18:08   ` Nicolas Goaziou
  2020-05-05  0:34     ` Kyle Meyer
  2020-07-31 20:33     ` No Wayman
  0 siblings, 2 replies; 16+ messages in thread
From: Nicolas Goaziou @ 2020-05-04 18:08 UTC (permalink / raw)
  To: No Wayman; +Cc: emacs-orgmode

Hello,

No Wayman <iarchivedmywholelife@gmail.com> writes:

> No Wayman <iarchivedmywholelife@gmail.com> writes:
>
>> Any interest in this patch?
> Apologies, intended this to be a reply to:
> https://lists.gnu.org/archive/html/emacs-orgmode/2020-03/msg00317.html

It apparently felt through the cracks. We're missing reviewers these
days.

Could you send it again with a commit message more in line with our
habits (variable modified, etc), and two spaces at the end of sentences?

Thank you.

Regards,

-- 
Nicolas Goaziou


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

* Re: [Patch] Document org-capture-templates entry type default strings
  2020-05-04 18:08   ` Nicolas Goaziou
@ 2020-05-05  0:34     ` Kyle Meyer
  2020-05-05  0:48       ` No Wayman
  2020-07-31 20:33     ` No Wayman
  1 sibling, 1 reply; 16+ messages in thread
From: Kyle Meyer @ 2020-05-05  0:34 UTC (permalink / raw)
  To: No Wayman; +Cc: emacs-orgmode

Nicolas Goaziou writes:

> No Wayman <iarchivedmywholelife@gmail.com> writes:
>
>> No Wayman <iarchivedmywholelife@gmail.com> writes:
>>
>>> Any interest in this patch?
>> Apologies, intended this to be a reply to:
>> https://lists.gnu.org/archive/html/emacs-orgmode/2020-03/msg00317.html
>
> It apparently felt through the cracks. We're missing reviewers these
> days.
>
> Could you send it again with a commit message more in line with our
> habits (variable modified, etc), and two spaces at the end of sentences?

IIRC, when I reviewed another series, you were nearing a number of
changes at which we should make sure you've assigned copyright to the
FSF.  Assuming you haven't already, please consider doing so (see
<https://orgmode.org/worg/org-contribute.html#copyright-issues>).

Thanks.


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

* Re: [Patch] Document org-capture-templates entry type default strings
  2020-05-05  0:34     ` Kyle Meyer
@ 2020-05-05  0:48       ` No Wayman
  2020-05-05  0:59         ` Kyle Meyer
  2020-05-21  7:52         ` Bastien
  0 siblings, 2 replies; 16+ messages in thread
From: No Wayman @ 2020-05-05  0:48 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode, No Wayman


Kyle Meyer <kyle@kyleam.com> writes:

> IIRC, when I reviewed another series, you were nearing a number 
> of
> changes at which we should make sure you've assigned copyright 
> to the
> FSF.  Assuming you haven't already, please consider doing so 
> (see
> <https://orgmode.org/worg/org-contribute.html#copyright-issues>).
>
> Thanks.

Appreciate the reminder, Kyle. I emailed the form per the 
directions in that link roughly two weeks ago.
Still waiting on the assignment contract.


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

* Re: [Patch] Document org-capture-templates entry type default strings
  2020-05-05  0:48       ` No Wayman
@ 2020-05-05  0:59         ` Kyle Meyer
  2020-05-21  7:52         ` Bastien
  1 sibling, 0 replies; 16+ messages in thread
From: Kyle Meyer @ 2020-05-05  0:59 UTC (permalink / raw)
  To: No Wayman; +Cc: emacs-orgmode

No Wayman writes:

> Appreciate the reminder, Kyle. I emailed the form per the 
> directions in that link roughly two weeks ago.

Ah, great!  Thanks (and sorry for the noise).


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

* Re: [Patch] Document org-capture-templates entry type default strings
  2020-05-05  0:48       ` No Wayman
  2020-05-05  0:59         ` Kyle Meyer
@ 2020-05-21  7:52         ` Bastien
  2020-05-21 19:35           ` No Wayman
  1 sibling, 1 reply; 16+ messages in thread
From: Bastien @ 2020-05-21  7:52 UTC (permalink / raw)
  To: No Wayman; +Cc: emacs-orgmode

Hi,

No Wayman <iarchivedmywholelife@gmail.com> writes:

> Appreciate the reminder, Kyle. I emailed the form per the directions
> in that link roughly two weeks ago.

Thanks for doing so.

> Still waiting on the assignment contract.

People at the FSF may be having difficulties with processing these
requests due to the current situation.

If you don't get an answer within a week, I'll send an email to see
what delays we can reasonably expect.

-- 
 Bastien


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

* Re: [Patch] Document org-capture-templates entry type default strings
  2020-05-21  7:52         ` Bastien
@ 2020-05-21 19:35           ` No Wayman
  2020-05-22 15:37             ` Bastien
  0 siblings, 1 reply; 16+ messages in thread
From: No Wayman @ 2020-05-21 19:35 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode


Bastien <bzg@gnu.org> writes:

> People at the FSF may be having difficulties with processing 
> these
> requests due to the current situation.
>
> If you don't get an answer within a week, I'll send an email to 
> see
> what delays we can reasonably expect.

Thanks, Bastien. You're probably right re current situation 
slowing things down.
However, things are moving along.
I received the assingment form on 05/06.
Had a bit of a delay on my end with signing.
Sent digitally signed form on the 17th.
I assume I'll receive some sort of confirmation from FSF when 
everything is processed?

I have a couple of outstanding patches Nicolas requested changes 
on.
I will submit revisions once paperwork goes through.


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

* Re: [Patch] Document org-capture-templates entry type default strings
  2020-05-21 19:35           ` No Wayman
@ 2020-05-22 15:37             ` Bastien
  2020-06-04  5:21               ` No Wayman
  0 siblings, 1 reply; 16+ messages in thread
From: Bastien @ 2020-05-22 15:37 UTC (permalink / raw)
  To: No Wayman; +Cc: emacs-orgmode

Hi,

No Wayman <iarchivedmywholelife@gmail.com> writes:

> I assume I'll receive some sort of confirmation from FSF when
> everything is processed?

Yes, you should receive a confirmation - if not within a week or so,
let me know, sometimes asking again helps.

Best,

-- 
 Bastien


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

* Re: [Patch] Document org-capture-templates entry type default strings
  2020-03-31 21:46 No Wayman
@ 2020-05-24 13:28 ` Bastien
  2020-05-24 16:30   ` Kyle Meyer
  0 siblings, 1 reply; 16+ messages in thread
From: Bastien @ 2020-05-24 13:28 UTC (permalink / raw)
  To: No Wayman; +Cc: emacs-orgmode

Hi,

No Wayman <iarchivedmywholelife@gmail.com> writes:

> I've included the default entry type strings for each entry type in
> org-capture-tempalte's docstring.

Thanks for the patch.  The lines are wrapped and it is not easy to
read it in my client.  Can you resend it as an attachement and update
it as a proper patch, with a changelog entry in the commit message?

Thanks,

-- 
 Bastien


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

* Re: [Patch] Document org-capture-templates entry type default strings
  2020-05-24 13:28 ` Bastien
@ 2020-05-24 16:30   ` Kyle Meyer
  0 siblings, 0 replies; 16+ messages in thread
From: Kyle Meyer @ 2020-05-24 16:30 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, No Wayman

Bastien writes:

> No Wayman <iarchivedmywholelife@gmail.com> writes:
>
>> I've included the default entry type strings for each entry type in
>> org-capture-tempalte's docstring.
>
> Thanks for the patch.  The lines are wrapped and it is not easy to
> read it in my client.  Can you resend it as an attachement and update
> it as a proper patch, with a changelog entry in the commit message?

This is the same patch as the one at
<https://yhetil.org/orgmode/87wo5rwu60.fsf@gmail.com>.  The In-reply-to
was unintentionally dropped.


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

* Re: [Patch] Document org-capture-templates entry type default strings
  2020-05-22 15:37             ` Bastien
@ 2020-06-04  5:21               ` No Wayman
  2020-06-04  5:57                 ` Bastien
  0 siblings, 1 reply; 16+ messages in thread
From: No Wayman @ 2020-06-04  5:21 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode


Bastien <bzg@gnu.org> writes:

> Hi,
>
> No Wayman <iarchivedmywholelife@gmail.com> writes:
>
>> I assume I'll receive some sort of confirmation from FSF when
>> everything is processed?
>
> Yes, you should receive a confirmation - if not within a week or 
> so,
> let me know, sometimes asking again helps.
>
> Best,

Received confirmation. I will submit revisions to open patches 
ASAP.


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

* Re: [Patch] Document org-capture-templates entry type default strings
  2020-06-04  5:21               ` No Wayman
@ 2020-06-04  5:57                 ` Bastien
  0 siblings, 0 replies; 16+ messages in thread
From: Bastien @ 2020-06-04  5:57 UTC (permalink / raw)
  To: No Wayman; +Cc: emacs-orgmode

No Wayman <iarchivedmywholelife@gmail.com> writes:

> Received confirmation. I will submit revisions to open patches ASAP.

I've add your name to https://orgmode.org/worg/org-contribute.html

Thanks!

-- 
 Bastien


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

* Re: [Patch] Document org-capture-templates entry type default strings
  2020-05-04 18:08   ` Nicolas Goaziou
  2020-05-05  0:34     ` Kyle Meyer
@ 2020-07-31 20:33     ` No Wayman
  2020-09-04  9:35       ` Bastien
  1 sibling, 1 reply; 16+ messages in thread
From: No Wayman @ 2020-07-31 20:33 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode, No Wayman

[-- Attachment #1: Type: text/plain, Size: 253 bytes --]


Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Could you send it again with a commit message more in line with 
> our
> habits (variable modified, etc), and two spaces at the end of 
> sentences?

Sorry for the delay.
I've reformatted the patch.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: document default template strings --]
[-- Type: text/x-patch, Size: 2858 bytes --]

From cf52a18e4f2ca3c5138975c790fb6baec08d5c87 Mon Sep 17 00:00:00 2001
From: Nicholas Vollmer <iarchivedmywholelife@gmail.com>
Date: Tue, 31 Mar 2020 17:39:51 -0400
Subject: [PATCH] capture: Document defualt template strings

* lisp/org-capture.el (org-capture-templates): Document default entry
type template strings.
---
 lisp/org-capture.el | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 2cc1ce394..0ca75c772 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -159,14 +159,20 @@ description  A short string describing the template, will be shown during
 type         The type of entry.  Valid types are:
                entry       an Org node, with a headline.  Will be filed
                            as the child of the target entry or as a
-                           top-level entry.
+                           top-level entry.  Its default template is:
+                             \"* %?\n %a\"
                item        a plain list item, will be placed in the
-                           first plain list at the target
-                           location.
+                           first plain list at the target location.
+                           Its default template is:
+                             \"- %?\"
                checkitem   a checkbox item.  This differs from the
                            plain list item only in so far as it uses a
-                           different default template.
+                           different default template.  Its default
+                           template is:
+                             \"- [ ] %?\"
                table-line  a new line in the first table at target location.
+                           Its default template is:
+                             \"| %? |\"
                plain       text to be inserted as it is.
 
 target       Specification of where the captured item should be placed.
@@ -214,9 +220,10 @@ target       Specification of where the captured item should be placed.
                 Most general way: write your own function which both visits
                 the file and moves point to the right location
 
-template     The template for creating the capture item.  If you leave this
-             empty, an appropriate default template will be used.  See below
-             for more details.  Instead of a string, this may also be one of
+template     The template for creating the capture item.
+             If it is an empty string or nil, a default template based on
+             the entry type will be used (see the \"type\" section above).
+             Instead of a string, this may also be one of:
 
                  (file \"/path/to/template-file\")
                  (function function-returning-the-template)
-- 
2.27.0


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

* Re: [Patch] Document org-capture-templates entry type default strings
  2020-07-31 20:33     ` No Wayman
@ 2020-09-04  9:35       ` Bastien
  0 siblings, 0 replies; 16+ messages in thread
From: Bastien @ 2020-09-04  9:35 UTC (permalink / raw)
  To: No Wayman; +Cc: emacs-orgmode, Nicolas Goaziou

No Wayman <iarchivedmywholelife@gmail.com> writes:

> I've reformatted the patch.

Applied, thanks!

-- 
 Bastien


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

end of thread, other threads:[~2020-09-04  9:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-04 16:18 [Patch] Document org-capture-templates entry type default strings No Wayman
2020-05-04 17:07 ` No Wayman
2020-05-04 18:08   ` Nicolas Goaziou
2020-05-05  0:34     ` Kyle Meyer
2020-05-05  0:48       ` No Wayman
2020-05-05  0:59         ` Kyle Meyer
2020-05-21  7:52         ` Bastien
2020-05-21 19:35           ` No Wayman
2020-05-22 15:37             ` Bastien
2020-06-04  5:21               ` No Wayman
2020-06-04  5:57                 ` Bastien
2020-07-31 20:33     ` No Wayman
2020-09-04  9:35       ` Bastien
  -- strict thread matches above, loose matches on Subject: below --
2020-03-31 21:46 No Wayman
2020-05-24 13:28 ` Bastien
2020-05-24 16:30   ` Kyle Meyer

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