{"action":"closed","issue":{"url":"https://api.github.com/repos/latex3/svn-mirror/issues/244","labels_url":"https://api.github.com/repos/latex3/svn-mirror/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/latex3/svn-mirror/issues/244/comments","events_url":"https://api.github.com/repos/latex3/svn-mirror/issues/244/events","html_url":"https://github.com/latex3/svn-mirror/issues/244","id":98697979,"number":244,"title":"First line in `\\iow_wrap:nnnN` is shortened by run-on text","user":{"login":"blefloch","id":722786,"avatar_url":"https://avatars.githubusercontent.com/u/722786?v=3","gravatar_id":"","url":"https://api.github.com/users/blefloch","html_url":"https://github.com/blefloch","followers_url":"https://api.github.com/users/blefloch/followers","following_url":"https://api.github.com/users/blefloch/following{/other_user}","gists_url":"https://api.github.com/users/blefloch/gists{/gist_id}","starred_url":"https://api.github.com/users/blefloch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blefloch/subscriptions","organizations_url":"https://api.github.com/users/blefloch/orgs","repos_url":"https://api.github.com/users/blefloch/repos","events_url":"https://api.github.com/users/blefloch/events{/privacy}","received_events_url":"https://api.github.com/users/blefloch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/latex3/svn-mirror/labels/bug","name":"bug","color":"eb6420"},{"url":"https://api.github.com/repos/latex3/svn-mirror/labels/expl3","name":"expl3","color":"5319e7"}],"state":"closed","locked":false,"assignee":{"login":"blefloch","id":722786,"avatar_url":"https://avatars.githubusercontent.com/u/722786?v=3","gravatar_id":"","url":"https://api.github.com/users/blefloch","html_url":"https://github.com/blefloch","followers_url":"https://api.github.com/users/blefloch/followers","following_url":"https://api.github.com/users/blefloch/following{/other_user}","gists_url":"https://api.github.com/users/blefloch/gists{/gist_id}","starred_url":"https://api.github.com/users/blefloch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blefloch/subscriptions","organizations_url":"https://api.github.com/users/blefloch/orgs","repos_url":"https://api.github.com/users/blefloch/repos","events_url":"https://api.github.com/users/blefloch/events{/privacy}","received_events_url":"https://api.github.com/users/blefloch/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-08-03T08:41:34Z","updated_at":"2015-08-05T16:24:36Z","closed_at":"2015-08-05T16:24:36Z","body":"I'm not sure how to fix the following problem with `\\msg_term:n` (and `\\msg_log:n`).\r\n\r\n    \\msg_term:n { \\prg_replicate:nn { 160 } { B~ } }\r\n\r\ngives\r\n\r\n    *************************************************\r\n    * B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B\r\n    * B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B\r\n    * B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B\r\n    * B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B\r\n    * B B B B B B B B B \r\n    *************************************************\r\n\r\nUnder the hood,\r\n\r\n    \\iow_wrap:nnnN { * ~ #1} { * ~ } { } \\iow_term:n\r\n\r\nis callled.  This computes the line length to be 78-2=76 characters (subtracting the length of the run-on text), then wraps everything (`* B B B B B B B ... B ` with 160 `B `'s) to that length, then adds the run-on text to all except the first line.  The first line is thus 2 characters shorter than the width of the terminal.\r\n\r\nTwo possible fixes.  Pass `#1` to `\\iow_wrap:nnnN` and add the leading `*~` afterwards (replace `\\iow_term:n`).  Or change `\\iow_wrap:nnnN` so that it makes the first line 78 chars long regardless of the run-on text.\r\n\r\nAnother example is that\r\n\r\n    \\iow_wrap:nnnN\r\n      { \\prg_replicate:nn { 100 } { a ~ } }\r\n      { \\prg_replicate:nn { 40 } { . } }\r\n      { }\r\n      \\iow_term:n\r\n\r\ngives\r\n\r\n    a a a a a a a a a a a a a a a a a a a\r\n    ........................................a a a a a a a a a a a a a a a a a a a\r\n    ........................................a a a a a a a a a a a a a a a a a a a\r\n    ........................................a a a a a a a a a a a a a a a a a a a\r\n    ........................................a a a a a a a a a a a a a a a a a a a\r\n    ........................................a a a a a \r\n\r\nBasically, I think it would make more sense if `\\iow_wrap:nnnN` gave\r\n\r\n    a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a\r\n    ........................................a a a a a a a a a a a a a a a a a a a\r\n    ........................................a a a a a a a a a a a a a a a a a a a\r\n    ........................................a a a a a a a a a a a a a a a a a a a\r\n    ........................................a a a a \r\n\r\nThat's (probably) not too hard to achieve."}}