Skip to content

Commit

Permalink
docs(web,man): convert docs/format.rst to tags(5) man page
Browse files Browse the repository at this point in the history
Fixing many typoes are suggested by @k-takata.

Signed-off-by: Masatake YAMATO <[email protected]>
  • Loading branch information
masatake committed Sep 28, 2019
1 parent 981d64b commit 85af85b
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 37 deletions.
15 changes: 13 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ EXTRA_DIST = README.md autogen.sh \
win32/ctags_vs2013.sln \
win32/ctags_vs2013.vcxproj win32/ctags_vs2013.vcxproj.filters \
win32/gen-repoinfo.bat \
man/tags.5.rst \
$(PEG_INPUT) $(OPTLIB2C_INPUT)

bin_PROGRAMS = ctags
Expand Down Expand Up @@ -179,15 +180,25 @@ include $(top_srcdir)/makefiles/testing.mak
include $(top_srcdir)/makefiles/help.mak

if HAVE_RST2MAN
man_MANS = man/ctags.1 man/ctags-incompatibilities.7 man/ctags-optlib.7
man_MANS = \
man/ctags.1 \
\
man/tags.5 \
\
man/ctags-incompatibilities.7 \
man/ctags-optlib.7 \
\
$(NULL)
rst2man_verbose = $(rst2man_verbose_@AM_V@)
rst2man_verbose_ = $(rst2man_verbose_@AM_DEFAULT_V@)
rst2man_verbose_0 = @echo RST2MAN " $@";
SUFFIXES += .1.rst .1 .7.rst .7
SUFFIXES += .1.rst .1 .5.rst .5 .7.rst .7
# See man/Makefile
RST2MAN_OPTIONS=--syntax-highlight=none
.1.rst.1:
$(rst2man_verbose)$(RST2MAN) $(RST2MAN_OPTIONS) $< $@
.5.rst.5:
$(rst2man_verbose)$(RST2MAN) $(RST2MAN_OPTIONS) $< $@
.7.rst.7:
$(rst2man_verbose)$(RST2MAN) $(RST2MAN_OPTIONS) $< $@
endif
2 changes: 1 addition & 1 deletion docs/contributions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ following two areas.
Tag file compatibility with Exuberant-ctags
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We will not accept a patch that breaks the tags file format described
in "Proposal for extended Vi tags file format" a.k.a. FORMAT file.
in tags(5) man page.

TBW.

Expand Down
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,5 @@ This is a draft document. Proofreading and pull-requests are welcome!
extending.rst
tips.rst
other-projects.rst
format.rst
development-process.rst
developers.rst
3 changes: 3 additions & 0 deletions docs/output-format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ This section deals with individual output-format topics.

``--output-format=`` can be used for choosing an output format.

About the output format specified with ``e-ctags`` and ``u-ctags``,
see tags(5) man page.

.. toctree::
:maxdepth: 2

Expand Down
9 changes: 7 additions & 2 deletions man/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,19 @@ CONFIGURE_FLAGS =

.SUFFIXES: .rst .html .pdf .in

SOURCE_FILES = \
IN_SOURCE_FILES = \
ctags.1.rst.in \
ctags-optlib.7.rst.in \
ctags-incompatibilities.7.rst.in \
\
$(NULL)

rst_files = $(basename $(SOURCE_FILES))
SOURCE_FILES = \
tags.5.rst \
\
$(NULL)

rst_files = $(basename $(IN_SOURCE_FILES)) $(SOURCE_FILES)
man_pages = $(basename $(rst_files))
html_pages = $(addsuffix .html,$(man_pages))
pdf_pages = $(addsuffix .pdf,$(man_pages))
Expand Down
4 changes: 4 additions & 0 deletions man/ctags-incompatibilities.7.rst.in
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,7 @@ to follow the above rule.
* Ruby's "F" (singletonMethod) is changed to "S".

* SQL's "F" (field) is changed to "E".

SEE ALSO
--------
ctags(1) and tags(5).
4 changes: 2 additions & 2 deletions man/ctags-optlib.7.rst.in
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ OPTION ITEMS
message will be reported unless ``{placeholder}`` regex flag is
specified. An optional kind specifier for tags matching regexp may
follow *replacement*, which will determine what kind of tag is
reported in the "kind" extension field (see ctags-tags(5)).
reported in the "kind" extension field (see tags(5)).

*kind-spec* has two forms: letter only form and full form. The
letter form assumes using ``--regex-<LANG>`` option with
Expand Down Expand Up @@ -421,7 +421,7 @@ The official Universal-ctags web site at:

https://ctags.io/

ctags(1), regex(5,7), egrep(1)
ctags(1), tags(5), regex(5,7), egrep(1)

AUTHOR
------
Expand Down
2 changes: 2 additions & 0 deletions man/ctags.1.rst.in
Original file line number Diff line number Diff line change
Expand Up @@ -1795,6 +1795,8 @@ SEE ALSO
See ctags-optlib(7) for defining (or extending) a parser
in a configuration file.

See tags(5) for the format of tag files.

The official Universal-ctags web site at:

https://ctags.io/
Expand Down
65 changes: 36 additions & 29 deletions docs/format.rst → man/tags.5.rst
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
===================================================================
Proposal for extended Vi tags file format
===================================================================

.. note::

The contents of next section is a copy of FORMAT file in exuberant
ctags source code in its subversion repository at sourceforge.net.

We have made some modifications:

* Exceptions introduced in Universal-ctags are explained with
"EXCEPTION" marker.
.. _tags(5):

==============================================================
tags
==============================================================
--------------------------------------------------------------
Vi tags file format extended in ctags projects
--------------------------------------------------------------
:Version: 2+
:Manual group: Universal-ctags
:Manual section: 5

DESCRIPTION
-----------

* `Exceptions in Universal-ctags`_ subsction summarizes the exceptions.
The contents of next section is a copy of FORMAT file in exuberant
ctags source code in its subversion repository at sourceforge.net.

.. contents:: `Table of contents`
:depth: 3
:local:
Exceptions introduced in Universal-ctags are explained inline with
"EXCEPTION" marker.

----

:Version: 0.06 DRAFT
:Date: 1998 Feb 8
:Author: Bram Moolenaar <Bram at vim.org> and Darren Hiebert <dhiebert at users.sourceforge.net>
Proposal for extended Vi tags file format
-----------------------------------------

| Version: 0.06 DRAFT
| Date: 1998 Feb 8
| Author: Bram Moolenaar <Bram at vim.org> and Darren Hiebert <dhiebert at users.sourceforge.net>
Introduction
---------------------------------------------------------------------
~~~~~~~~~~~~

The file format for the "tags" file, as used by Vi and many of its
descendants, has limited capabilities.
Expand All @@ -48,7 +51,7 @@ This additional functionality is desired:


From proposal to standard
-------------------------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~

To make this proposal into a standard for tags files, it needs to be supported
by most people working on versions of Vi, ctags, etc.. Currently this
Expand Down Expand Up @@ -88,7 +91,7 @@ FTE


Backwards compatibility
---------------------------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~

A tags file that is generated in the new format should still be usable by Vi.
This makes it possible to distribute tags files that are usable by all
Expand Down Expand Up @@ -148,7 +151,7 @@ from this.


Security
------------------------------------------------------------------
~~~~~~~~

Vi allows the use of any Ex command in a tags file. This has the potential of
a trojan horse security leak.
Expand Down Expand Up @@ -194,7 +197,7 @@ position the cursor in a certain column.


Goals
--------
~~~~~

Now the usage of the comment text has to be defined. The following is aimed
at:
Expand All @@ -217,7 +220,7 @@ at:
* It should be possible to treat a tags file like any normal text file.

Proposal
-----------
~~~~~~~~

Use a comment after the {tagaddress} field. The format would be::

Expand Down Expand Up @@ -470,14 +473,14 @@ file, and provided solely for documentation purposes::
!_TAG_PROGRAM_VERSION {version-id} /optional comment/

Exceptions in Universal-ctags
--------------------------------
--------------------------------------------

Universal-ctags supports this proposal with some
exceptions.


Exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~

#. {tagname} in tags file generated by Universal-ctags may contain
spaces and several escape sequences. Parsers for documents like Tex and
Expand All @@ -494,7 +497,7 @@ Exceptions
.. _compat-output:

Compatible output and weakness
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. NOT REVIEWED YET

Expand All @@ -505,3 +508,7 @@ format as Exuberant-ctags. However, ``--output-format=e-ctags`` throws
away a tag entry which name includes a space or a tab
character. ``TAG_OUTPUT_MODE`` pseudo tag tells which format is
used when ctags generating tags file.

SEE ALSO
--------
ctags(1), ctags-incompatibilities(7)

0 comments on commit 85af85b

Please sign in to comment.