فهرست منبع

Document %i prefix in capture templates

* doc/org-manual.org (Template expansion): Fix documentation.
* lisp/org-capture.el (org-capture-templates): Fix docstring.
Allen Li 6 سال پیش
والد
کامیت
601f373e3f
2فایلهای تغییر یافته به همراه7 افزوده شده و 4 حذف شده
  1. 3 2
      doc/org-manual.org
  2. 4 2
      lisp/org-capture.el

+ 3 - 2
doc/org-manual.org

@@ -7390,8 +7390,9 @@ here:
 - =%i= ::
 - =%i= ::
 
 
      Initial content, the region when capture is called while the
      Initial content, the region when capture is called while the
-     region is active.  The entire text will be indented like ~%i~
-     itself.
+     region is active.  If there is text before =%i= on the same line,
+     such as indentation, and =%i= is not inside a =%(exp)= form, that
+     prefix is added before every line in the inserted text.
 
 
 - =%a= ::
 - =%a= ::
 
 

+ 4 - 2
lisp/org-capture.el

@@ -287,8 +287,10 @@ be replaced with content and expanded:
               with `org-capture-use-agenda-date' set.
               with `org-capture-use-agenda-date' set.
   %T          Time stamp as above, with date and time.
   %T          Time stamp as above, with date and time.
   %u, %U      Like the above, but inactive time stamps.
   %u, %U      Like the above, but inactive time stamps.
-  %i          Initial content, copied from the active region.  If %i is
-              indented, the entire inserted text will be indented as well.
+  %i          Initial content, copied from the active region.  If
+              there is text before %i on the same line, such as
+              indentation, and %i is not inside a %(sexp), that prefix
+              will be added before every line in the inserted text.
   %a          Annotation, normally the link created with `org-store-link'.
   %a          Annotation, normally the link created with `org-store-link'.
   %A          Like %a, but prompt for the description part.
   %A          Like %a, but prompt for the description part.
   %l          Like %a, but only insert the literal link.
   %l          Like %a, but only insert the literal link.