From: Alex Branham <alex.branham@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 21074@debbugs.gnu.org, mbork@mbork.pl
Subject: bug#21074: [PATCH] Add docs for two tabulated-list functions
Date: Tue, 05 Feb 2019 14:08:50 -0600 [thread overview]
Message-ID: <874l9i6lrh.fsf@gmail.com> (raw)
In-Reply-To: <83ef8qvze2.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 4114 bytes --]
On Sat 02 Feb 2019 at 12:06, Eli Zaretskii <eliz@gnu.org> wrote:
>> >> +delete entry and @var{cols} is a vector of its column descriptors.
>> > ^
>> > And here.
>>
>> I don't think a comma is needed here. It's a list of two entries, not
>> three, so no comma, right?
>
> Hmm.. I guess I was confused by the "delete entry" -- you meant
> "deleted", right?
Whoops, yes I meant "deleted." Fixed in the attached patch.
> Otherwise OK.
Great! Should I push this to master, then, or do you want to?
Thanks,
Alex
From 3460d745215bbbf24350786753602bf06c23e139 Mon Sep 17 00:00:00 2001
From: Alex Branham <alex.branham@gmail.com>
Date: Sat, 2 Feb 2019 09:59:21 -0600
Subject: [PATCH] Add documentation for tabulated-list functions in the elisp
manual
* doc/lispref/modes.texi: Add documentation for
'tabulated-list-delete-entry', 'tabulated-list-get-id',
'tabulated-list-get-entry', 'tabulated-list-header-overlay-p',
'tabulated-list-put-tag', and 'tabulated-list-set-col'.
Bug#21074
---
doc/lispref/modes.texi | 59 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 143cc7c582..6349dec98b 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -1121,6 +1121,65 @@ that tags placed via @code{tabulated-list-put-tag} will not be removed
from entries that haven't changed (normally all tags are removed).
@end defun
+@defun tabulated-list-delete-entry
+This function deletes the entry at point.
+
+It returns a list @code{(@var{id} @var{cols})}, where @var{id} is the
+ID of the deleted entry and @var{cols} is a vector of its column
+descriptors. It moves point to the beginning of the current line. It
+returns @code{nil} if there is no entry at point.
+
+Note that this function only changes the buffer contents; it does not
+alter @code{tabulated-list-entries}.
+@end defun
+
+@defun tabulated-list-get-id &optional pos
+This @code{defsubst} returns the ID object from
+@code{tabulated-list-entries} (if that is a list) or from the list
+returned by @code{tabulated-list-entries} (if it is a function). If
+omitted or @code{nil}, @var{pos} defaults to point.
+@end defun
+
+@defun tabulated-list-get-entry &optional pos
+This @code{defsubst} returns the entry object from
+@code{tabulated-list-entries} (if that is a list) or from the list
+returned by @code{tabulated-list-entries} (if it is a function). This
+will be a vector for the ID at @var{pos}. If there is no entry at
+@var{pos}, then the function returns @code{nil}.
+@end defun
+
+@vindex tabulated-list-use-header-line
+@defun tabulated-list-header-overlay-p &optional POS
+This @code{defsubst} returns non-nil if there is a fake header at
+@var{pos}. A fake header is used if
+@code{tabulated-list-use-header-line} is @code{nil} to put the column
+names at the beginning of the buffer. If omitted or @code{nil},
+@var{pos} defaults to @code{point-min}.
+@end defun
+
+@vindex tabulated-list-padding
+@defun tabulated-list-put-tag tag &optional advance
+This function puts @var{tag} in the padding area of the current line.
+The padding area can be empty space at the beginning of the line, the
+width of which is governed by @code{tabulated-list-padding}.
+@var{tag} should be a string, with a length less than or equal to
+@code{tabulated-list-padding}. If @var{advance} is non-nil, this
+function advances point by one line.
+@end defun
+
+@defun tabulated-list-set-col col desc &optional change-entry-data
+This function changes the tabulated list entry at point, setting
+@var{col} to @var{desc}. @var{col} is the column number to change, or
+the name of the column to change. @var{desc} is the new column
+descriptor, which is inserted via @code{tabulated-list-print-col}.
+
+If @var{change-entry-data} is non-nil, this function modifies the
+underlying data (usually the column descriptor in the list
+@code{tabulated-list-entries}) by setting the column descriptor of the
+vector to @code{desc}.
+@end defun
+
+
@node Generic Modes
@subsection Generic Modes
@cindex generic mode
--
2.19.2
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-documentation-for-tabulated-list-functions-in-th.patch --]
[-- Type: text/x-patch, Size: 3583 bytes --]
From 3460d745215bbbf24350786753602bf06c23e139 Mon Sep 17 00:00:00 2001
From: Alex Branham <alex.branham@gmail.com>
Date: Sat, 2 Feb 2019 09:59:21 -0600
Subject: [PATCH] Add documentation for tabulated-list functions in the elisp
manual
* doc/lispref/modes.texi: Add documentation for
'tabulated-list-delete-entry', 'tabulated-list-get-id',
'tabulated-list-get-entry', 'tabulated-list-header-overlay-p',
'tabulated-list-put-tag', and 'tabulated-list-set-col'.
Bug#21074
---
doc/lispref/modes.texi | 59 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 143cc7c582..6349dec98b 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -1121,6 +1121,65 @@ that tags placed via @code{tabulated-list-put-tag} will not be removed
from entries that haven't changed (normally all tags are removed).
@end defun
+@defun tabulated-list-delete-entry
+This function deletes the entry at point.
+
+It returns a list @code{(@var{id} @var{cols})}, where @var{id} is the
+ID of the deleted entry and @var{cols} is a vector of its column
+descriptors. It moves point to the beginning of the current line. It
+returns @code{nil} if there is no entry at point.
+
+Note that this function only changes the buffer contents; it does not
+alter @code{tabulated-list-entries}.
+@end defun
+
+@defun tabulated-list-get-id &optional pos
+This @code{defsubst} returns the ID object from
+@code{tabulated-list-entries} (if that is a list) or from the list
+returned by @code{tabulated-list-entries} (if it is a function). If
+omitted or @code{nil}, @var{pos} defaults to point.
+@end defun
+
+@defun tabulated-list-get-entry &optional pos
+This @code{defsubst} returns the entry object from
+@code{tabulated-list-entries} (if that is a list) or from the list
+returned by @code{tabulated-list-entries} (if it is a function). This
+will be a vector for the ID at @var{pos}. If there is no entry at
+@var{pos}, then the function returns @code{nil}.
+@end defun
+
+@vindex tabulated-list-use-header-line
+@defun tabulated-list-header-overlay-p &optional POS
+This @code{defsubst} returns non-nil if there is a fake header at
+@var{pos}. A fake header is used if
+@code{tabulated-list-use-header-line} is @code{nil} to put the column
+names at the beginning of the buffer. If omitted or @code{nil},
+@var{pos} defaults to @code{point-min}.
+@end defun
+
+@vindex tabulated-list-padding
+@defun tabulated-list-put-tag tag &optional advance
+This function puts @var{tag} in the padding area of the current line.
+The padding area can be empty space at the beginning of the line, the
+width of which is governed by @code{tabulated-list-padding}.
+@var{tag} should be a string, with a length less than or equal to
+@code{tabulated-list-padding}. If @var{advance} is non-nil, this
+function advances point by one line.
+@end defun
+
+@defun tabulated-list-set-col col desc &optional change-entry-data
+This function changes the tabulated list entry at point, setting
+@var{col} to @var{desc}. @var{col} is the column number to change, or
+the name of the column to change. @var{desc} is the new column
+descriptor, which is inserted via @code{tabulated-list-print-col}.
+
+If @var{change-entry-data} is non-nil, this function modifies the
+underlying data (usually the column descriptor in the list
+@code{tabulated-list-entries}) by setting the column descriptor of the
+vector to @code{desc}.
+@end defun
+
+
@node Generic Modes
@subsection Generic Modes
@cindex generic mode
--
2.19.2
next prev parent reply other threads:[~2019-02-05 20:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 9:05 bug#21074: 25.0.50; Incomplete docs for tabulated-list-mode Marcin Borkowski
2019-01-15 18:19 ` bug#21074: [PATCH] Add docs for two tabulated-list functions Alex Branham
2019-01-15 19:06 ` Eli Zaretskii
2019-01-15 19:41 ` Alex Branham
2019-01-19 8:25 ` Eli Zaretskii
2019-01-21 16:12 ` Alex Branham
2019-01-21 16:32 ` Eli Zaretskii
2019-01-22 21:03 ` Alex Branham
2019-02-01 9:28 ` Eli Zaretskii
2019-02-02 16:03 ` Alex Branham
2019-02-02 16:33 ` Eli Zaretskii
2019-02-02 17:28 ` Alex Branham
2019-02-02 18:06 ` Eli Zaretskii
2019-02-05 20:08 ` Alex Branham [this message]
2019-02-05 20:26 ` Eli Zaretskii
2019-02-05 20:50 ` Alex Branham
2019-02-06 3:32 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874l9i6lrh.fsf@gmail.com \
--to=alex.branham@gmail.com \
--cc=21074@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=mbork@mbork.pl \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.