|
@@ -2878,30 +2878,34 @@ The key binding @kbd{C-c l} is only a suggestion - see @ref{Installation}.
|
|
|
@cindex inserting links
|
|
|
@item C-c C-l
|
|
|
@vindex org-keep-stored-link-after-insertion
|
|
|
-Insert a link. This prompts for a link to be inserted into the buffer. You
|
|
|
-can just type a link, using text for an internal link, or one of the link
|
|
|
-type prefixes mentioned in the examples above. All links stored during the
|
|
|
-current session are part of the history for this prompt, so you can access
|
|
|
-them with @key{up} and @key{down} (or @kbd{M-p/n}). Completion, on the other
|
|
|
-hand, will help you to insert valid link prefixes like @samp{http:} or
|
|
|
-@samp{ftp:}, including the prefixes defined through link abbreviations
|
|
|
-(@pxref{Link abbreviations}). The link will be inserted into the
|
|
|
-buffer@footnote{After insertion of a stored link, the link will be removed
|
|
|
-from the list of stored links. To keep it in the list later use, use a
|
|
|
-triple @kbd{C-u} prefix argument to @kbd{C-c C-l}, or configure the option
|
|
|
+Insert a link@footnote{ Note that you don't have to use this command to
|
|
|
+insert a link. Links in Org are plain text, and you can type or paste them
|
|
|
+straight into the buffer. By using this command, the links are automatically
|
|
|
+enclosed in double brackets, and you will be asked for the optional
|
|
|
+descriptive text.}. This prompts for a link to be inserted into the buffer.
|
|
|
+You can just type a link, using text for an internal link, or one of the link
|
|
|
+type prefixes mentioned in the examples above. The link will be inserted
|
|
|
+into the buffer@footnote{After insertion of a stored link, the link will be
|
|
|
+removed from the list of stored links. To keep it in the list later use, use
|
|
|
+a triple @kbd{C-u} prefix argument to @kbd{C-c C-l}, or configure the option
|
|
|
@code{org-keep-stored-link-after-insertion}.}, along with a descriptive text.
|
|
|
If some text was selected when this command is called, the selected text
|
|
|
-becomes the default description.@* Note that you don't have to use this
|
|
|
-command to insert a link. Links in Org are plain text, and you can type
|
|
|
-or paste them straight into the buffer. By using this command, the links are
|
|
|
-automatically enclosed in double brackets, and you will be asked for the
|
|
|
-optional descriptive text.
|
|
|
-@c
|
|
|
-@c If the link is a @samp{file:} link and
|
|
|
-@c the linked file is located in the same directory as the current file or
|
|
|
-@c a subdirectory of it, the path of the file will be inserted relative to
|
|
|
-@c the current directory.
|
|
|
-@c
|
|
|
+becomes the default description.
|
|
|
+
|
|
|
+@b{Inserting stored links}@*
|
|
|
+All links stored during the
|
|
|
+current session are part of the history for this prompt, so you can access
|
|
|
+them with @key{up} and @key{down} (or @kbd{M-p/n}).
|
|
|
+
|
|
|
+@b{Completion support}@* Completion with @key{TAB} will help you to insert
|
|
|
+valid link prefixes like @samp{http:} or @samp{ftp:}, including the prefixes
|
|
|
+defined through link abbreviations (@pxref{Link abbreviations}). If you
|
|
|
+press @key{RET} after inserting only the @var{prefix}, Org will offer
|
|
|
+specific completion support for some link types@footnote{This works by
|
|
|
+calling a special function @code{org-PREFIX-complete-link}.} For
|
|
|
+example, if you type @kbd{file @key{RET}}, file name completion (alternative
|
|
|
+access: @kbd{C-u C-c C-l}, see below) will be offered, and after @kbd{bbdb
|
|
|
+@key{RET}} you can complete contact names.
|
|
|
@kindex C-u C-c C-l
|
|
|
@cindex file name completion
|
|
|
@cindex completion, of file names
|
|
@@ -3045,7 +3049,10 @@ can define them in the file with
|
|
|
|
|
|
@noindent
|
|
|
In-buffer completion @pxref{Completion} can be used after @samp{[} to
|
|
|
-complete link abbreviations.
|
|
|
+complete link abbreviations. You may also define a function
|
|
|
+@code{org-PREFIX-complete-link} that implements special (e.g. completion)
|
|
|
+support for inserting such a link with @kbd{C-c C-l}. Such a function should
|
|
|
+not accept any arguments, and return the full link with prefix.
|
|
|
|
|
|
@node Search options, Custom searches, Link abbreviations, Hyperlinks
|
|
|
@section Search options in file links
|
|
@@ -10367,6 +10374,11 @@ can also set the @code{:description} property to provide a default for
|
|
|
the link description when the link is later inserted into an Org
|
|
|
buffer with @kbd{C-c C-l}.
|
|
|
|
|
|
+When is makes sense for your new link type, You may also define a function
|
|
|
+@code{org-PREFIX-complete-link} that implements special (e.g. completion)
|
|
|
+support for inserting such a link with @kbd{C-c C-l}. Such a function should
|
|
|
+not accept any arguments, and return the full link with prefix.
|
|
|
+
|
|
|
@node Context-sensitive commands, Tables in arbitrary syntax, Adding hyperlink types, Hacking
|
|
|
@section Context-sensitive commands
|
|
|
@cindex context-sensitive commands, hooks
|