Org-mode mailing list
 help / color / Atom feed
From: No Wayman <iarchivedmywholelife@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org, No Wayman <iarchivedmywholelife@gmail.com>
Subject: Re: [Patch] Document org-capture-templates entry type default strings
Date: Fri, 31 Jul 2020 16:33:04 -0400
Message-ID: <87mu3f2znj.fsf@gmail.com> (raw)
In-Reply-To: <87mu6n375l.fsf@nicolasgoaziou.fr>

[-- 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


  parent reply index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 16:18 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 [this message]
  -- 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://orgmode.org

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mu3f2znj.fsf@gmail.com \
    --to=iarchivedmywholelife@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Org-mode mailing list

Archives are clonable:
	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git