zsh-workers
 help / color / mirror / code / Atom feed
* Fix zshmodule.1 syntax
@ 2014-11-21 22:06 Baptiste Daroussin
       [not found] ` <141121220737.ZM13875@torch.brasslantern.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Baptiste Daroussin @ 2014-11-21 22:06 UTC (permalink / raw)
  To: Zsh workers

Hi,

Using mandoc -Tlint -Werror on the generated zshmodule.1 showed a
syntax error the following patch fixes it:

https://people.freebsd.org/~bapt/0001-Do-not-close-twice-the-index.patch

Regards,
Bapt


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fix zshmodule.1 syntax
       [not found] ` <141121220737.ZM13875@torch.brasslantern.com>
@ 2014-11-22 12:26   ` Baptiste Daroussin
  2014-11-22 22:28     ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Baptiste Daroussin @ 2014-11-22 12:26 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Zsh workers

2014-11-22 7:07 GMT+01:00 Bart Schaefer <schaefer@brasslantern.com>:
> On Nov 21, 11:06pm, Baptiste Daroussin wrote:
> }
> } Using mandoc -Tlint -Werror on the generated zshmodule.1 showed a
> } syntax error the following patch fixes it:
> }
> } https://people.freebsd.org/~bapt/0001-Do-not-close-twice-the-index.patch
>
> Thanks, but this can't be all there is to it.  There are two startitem()
> calls, so there need to be two enditem() calls.
>
> There are several other places where startitem() is nested this way.  Do
> you also get a syntax error on (for example) zshzle.1 or zshparams.1 ?

The startitem() is closed 2 lines after, I checked the other manpages
and the don't have the problem, checking at them they do not close
twice startitem()

regards,
Bapt


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fix zshmodule.1 syntax
  2014-11-22 12:26   ` Baptiste Daroussin
@ 2014-11-22 22:28     ` Bart Schaefer
  2014-11-22 22:45       ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2014-11-22 22:28 UTC (permalink / raw)
  To: Baptiste Daroussin; +Cc: Zsh workers

On Nov 22,  1:26pm, Baptiste Daroussin wrote:
} Subject: Re: Fix zshmodule.1 syntax
}
} 2014-11-22 7:07 GMT+01:00 Bart Schaefer <schaefer@brasslantern.com>:
} > On Nov 21, 11:06pm, Baptiste Daroussin wrote:
} > }
} > } Using mandoc -Tlint -Werror on the generated zshmodule.1 showed a
} > } syntax error the following patch fixes it:
} > }
} > } https://people.freebsd.org/~bapt/0001-Do-not-close-twice-the-index.patch
} >
} > Thanks, but this can't be all there is to it.  There are two startitem()
} > calls, so there need to be two enditem() calls.
} 
} The startitem() is closed 2 lines after

Hmm.

8 lines matching "\\(start\\|end\\)item" in buffer mod_system.yo.
      9:startitem()
     63:startitem()
     89:enditem()
    161:enditem()
    165:startitem()
    181:startitem()
    191:enditem()
    193:enditem()

Your diff would remove the enditem() at line 191, leaving line 181 with
no matching end.  I can believe the generated manual page is wrong, but
the yodl source is not as far as I can tell.

Looking at zshmodules.1 from my latest build I see:

       sysparams
              A readonly associative array.  The keys are:
       pid    Returns the process ID of the current  process,  even  in  sub-
              shells.   Compare  $$, which returns the process ID of the main
              shell process.

       ppid   Returns the process ID of the parent of  the  current  process,
              even in subshells.  Compare $PPID, which returns the process ID
              of the parent of the main shell process.

Here "pid" and "ppid" are meant to be indented an extra level, but
are not.  The nesting works in zle.yo -> zshzle.1 for bindkey:

       bindkey [ options ] [ in-string ]
              bindkey's  options can be divided into three categories: keymap
              selection for the current  command,  operation  selection,  and
              others.  The keymap selection options are:

              -e     Selects keymap 'emacs' for any operations by the current
                     command, and also links 'emacs' to 'main' so that it  is
                     selected by default the next time the editor starts.

So there's something subtle going on in mod_system.yo.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fix zshmodule.1 syntax
  2014-11-22 22:28     ` Bart Schaefer
@ 2014-11-22 22:45       ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2014-11-22 22:45 UTC (permalink / raw)
  To: Baptiste Daroussin; +Cc: Zsh workers

On Nov 22,  2:28pm, Bart Schaefer wrote:
}
} So there's something subtle going on in mod_system.yo.

And indeed, adding a blank line produces the desired zshmodules.1:


diff --git a/Doc/Zsh/mod_system.yo b/Doc/Zsh/mod_system.yo
index dce0717..d6b3765 100644
--- a/Doc/Zsh/mod_system.yo
+++ b/Doc/Zsh/mod_system.yo
@@ -178,6 +178,7 @@ used.
 vindex(sysparams)
 item(tt(sysparams))(
 A readonly associative array.  The keys are:
+
 startitem()
 item(tt(pid))(
 Returns the process ID of the current process, even in subshells.  Compare


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-22 22:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-21 22:06 Fix zshmodule.1 syntax Baptiste Daroussin
     [not found] ` <141121220737.ZM13875@torch.brasslantern.com>
2014-11-22 12:26   ` Baptiste Daroussin
2014-11-22 22:28     ` Bart Schaefer
2014-11-22 22:45       ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).