On 10/16/23 05:36, Gavin Smith wrote:
On Sun, Oct 15, 2023 at 12:00:51PM -0700, Per Bothner wrote:
I'm far from a C++ expert these days, but some ideas:
* First of course you can define some helper methods:
class TargetElement {
Extra *extra;
Command *unit_command() { return extra
Command *unit_command;
}
if (auto te = dynamic_cast(target_element)) {
// te is target_element safely cast to TargetElementWithExtra*.
}
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
On 10/14/23 09:12, Patrice Dumas wrote:
On Thu, Oct 12, 2023 at 10:25:23AM -0700, Per Bothner wrote:
C++ has a more extensive and useful standard library than C.
I guess there is an hash map, but I am not sure that we would need much
more.
In addition to hash maps and maybe some other
Of course not. In C++ function are by default monomorphic (non-virtual).
In my domterm backend the keyword 'virtual' is not used at all.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
If I had started with C++, or if
I were more fluent in C++ than I am now, it would look different.
But the current hybrid is fine.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
er to make a large C++ program well-structured and maintainable:
Classes help immeasurably, as do namespaces.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
a mistake; switching to C
seems like it would be another mistake. But hey - I'm not the one doing the
work.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
/DomTerm/blob/master/doc/DomTerm.texi
I don't remember what changes if any I had to make - probably the js/info.js
around November 2022.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
-mapping table would be hidden if using JavaScript.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
deal with,
and I confess I don't understand what problem it is intended to solve.
I don't think it's the right logic for dealing with "window-title" messages.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
message.
I believe best practice is for the first line of a commit message
to be a self-contained short summary, followed by an empty line
and further details (if any). So some editing of a ChangeLog entry
is usually appropriate before using it as a commit message.
--
--Per Bothner
p..
or" is suggested, because there is an
index entry with that node as its target.
Could you try the attached patch?
I also implemented sub-entry handling while I was in that area.
Optionally, I suggest a wider width for the text-entr box - see the info.css
part of the patch.
--
--Per B
useful as an example.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
On 11/27/22 12:48, Per Bothner wrote:
On 11/27/22 12:24, Gavin Smith wrote:
The main other problem is updating the contents sidebar after an
index search. You can see it at
It would be good to have this fixed before the 7.0.1 bug-fix release.
I do not know if I will have time or be able
at it.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
ere is a new initial character.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
On 11/20/22 13:47, Patrice Dumas wrote:
On Sun, Nov 20, 2022 at 01:35:33PM -0800, Per Bothner wrote:
Before I do that, I suggest cleaning up the generated html a bit, as discussed:
- Get rid of the dummy table cells used for indentation.
The first column is the letter column
at least removing the class attribute. (Whichever is preferable may depend on
the line
is styled, such as when table borders are added.)
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
xtra space
between elements.
Margin (applied to ) doesn't seem to affect the size/spacing of table cells.
Specifically, the following doesn't work:
td.printindex-index-section { margin-left: 2em }
However, this works:
td.printindex-index-section a { margin-left: 2em }
--
--Per
as there is a clean well-defined structure:
It is easy to tell entries, subentries, and subsubentries apart,
and they're in the "obvious" order.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
ks = document.querySelectorAll ("div.printindex td a");
I don't know if this is the right thing - i.e. if it matches all the indices
we need.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
On 11/18/22 15:48, Patrice Dumas wrote:
On Fri, Nov 18, 2022 at 03:19:23PM -0800, Per Bothner wrote:
Before, when I converted the DomTerm manual to html the output contained:
DomTerm - a terminal emulator and console using DOM and
JavaScript
This is now gone.
Looks a change
lt to the title from
@settitle.
info.js looks for an element whose class contains "settitle".
Before, when I converted the DomTerm manual to html the output contained:
DomTerm - a terminal emulator and console using DOM and
JavaScript
This is now gone.
Looks a change in the gen
On 11/16/22 16:51, Per Bothner wrote:
For what it's work, I just updated to Fedora 37, which broke 'git pull'
from Savannah: ...
...
Same problem with GitLab, but GitHub works OK. Probably
some new keys need to be uploaded - but not today.
Actually, GitHub was also broken. Fixed
and the repository exists.
Same problem with GitLab, but GitHub works OK. Probably
some new keys need to be uploaded - but not today.
(I did do a 'git pull' before updating Fedora, so i do have a recent snapshot.)
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
;. However, figuring out
the right files isn't completely obvious, so we may leave it as-is for now.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
rks pretty well), though I have some things I'd like to change if/when I
get time.
However, the directory seems to have some old crud and could probably be
cleaned up.
Specifically, I don't think yarn.lock is needed or used at this point.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
be.)
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
tainly if we have to add a new option/switch to support overriding the
default output encoding then it is not worth it. Just switch the output
to utf8, change documentation, and rip out the old code.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
(char*) p - in;
out = challoc(in_size + 2 * bad_count + 1);
} else
*q = 0;
}
return out;
}
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
On 8/3/22 14:01, Patrice Dumas wrote:
On Wed, Aug 03, 2022 at 12:16:04PM -0700, Per Bothner wrote:
Again - why? More specifically: why are you putting the html/xhtml file in a
separate xhtml subdirectory? If you get rid of that, it seems you avoid the
problem.
No, the problem
/Internationalized_Resource_Identifier#Compatibility
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
On 8/3/22 11:48, Patrice Dumas wrote:
On Wed, Aug 03, 2022 at 09:13:31AM -0700, Per Bothner wrote:
On 8/3/22 05:22, Patrice Dumas wrote:
In EPUB, the images are copied to a directory, such as
my_manual_epub_package/EPUB/images/
The manual files are in
my_manual_epub_package/EPUB/xhtml
uri_escape_utf8 or uri_escape
depends on whether conversion to utf8 has already been done.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
using the docbook xsl stylesheets) contains:
mimetype
META-INF/
META-INF/container.xml
OEBPS/
OEBPS/index.html
OEBPS/Unicode.xhtml
OEBPS/Sequences.xhtml
...
OEBPS/images/
OEBPS/images/border-1.png
OEBPS/images/polygon-1.png
--
--Per Bothner
p
: I.e. the next @node command would
have to be followed by a sectioning comand at the same or higher level.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
automatically.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
associated to the section heading element.
It may require some change in the javascript, maybe?
I did a little testing, and found no problems.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
bit trickier:
We could *assume* there is a redirection page NAME.html and load that,
and count on redirection to take us to the correct page. However
I'm not sure how robust that is - plus it requires another round-trip.
Probably better to put an index in the top page.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
ct file and location.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
On 1/9/22 10:28, Gavin Smith wrote:
On Sun, Jan 09, 2022 at 09:32:38AM -0800, Per Bothner wrote:
An idea I've been mulling: Currently, we handle changes in node structure
by generating extra stub pages that redirect to the correct location.
This works, but it's a bit clunky. For one thing
ch" and
the latter would be the preferred ("perma-link") URL.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
On 1/9/22 09:45, Eli Zaretskii wrote:
Date: Sun, 9 Jan 2022 09:32:38 -0800
From: Per Bothner
A related change is that we should change how info node/anchor names are
mapped into URLs to use standard %-encoding. This would make URL cleaner
and more readable. For continuity, we could map
this before, I'm pretty sure, but I think it makes sense to
co-ordinate these changes, at least for a specific manual.)
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
On 12/27/21 12:39, Gavin Smith wrote:
On Mon, Dec 27, 2021 at 09:07:21AM -0800, Per Bothner wrote:
It seems unaware of and not making use
of info.js. Integration with info.js would be nice - at the very least disable
the latter's sidebar and other duplicated functionality.
Another detail
Integration with info.js would be nice - at the very least disable
the latter's sidebar and other duplicated functionality.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
h, etc etc. - though a few terminals do support images.)
Instead, an info-reading application that uses an embedded browser (such as
webkitgtk)
seems to make more sense.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
On 12/26/21 12:04, Patrice Dumas wrote:
On Sun, Dec 26, 2021 at 11:24:59AM -0800, Per Bothner wrote:
I believe putting the link on the sectioning command is slightly better (more
semantically meaningful and easier to work with) than putting it before
- and it is never worse.
I agree
On 12/25/21 22:48, Eli Zaretskii wrote:
Your comments are all on-point, but I'll just add a few notes.
Date: Sat, 25 Dec 2021 11:44:34 -0800
From: Per Bothner
Note that using eww-mode running in a terminal displays texi2any-generated
html work pretty decently, so that could potentially
On 12/26/21 10:29, Patrice Dumas wrote:
On Sun, Dec 26, 2021 at 10:08:50AM -0800, Per Bothner wrote:
I don't remember, and I don't see how it could be better for navigation..
It was some time ago, at least some people expected the link to point to
the start of the header
. For those
reasons, it still seems to me that is better than and
actually the best choice among elements.
Using this way makes me a little uncomfortable, but
I don't have a strong objection.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
On 12/26/21 09:30, Patrice Dumas wrote:
On Sat, Dec 25, 2021 at 02:10:29PM -0800, Per Bothner wrote:
Two requests:
(1) Don't generates the implicit id="Electron-1" when it immediately follows
an explicit id="Electron".
I do not think that it is a good idea, the @anchor
sents a
placeholder
for where a link might otherwise have been placed, if it had been relevant,
consisting of just the element's contents."
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a does not suggest or
give
any examples of using without an href attribute.
--
--Per
or easier post-processing,
such as by JavaScript or XSLT.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
info.js in
an epub document. You should be able to unzip an epub (or use a web server
that does so on-the-fly); if you then browse to the top page, you
should get an experience more-or-less the same as browsing plain html,
including using info.js if that was included.
--
--Per Bothner
p
ffer element after it got focus.
Seems to be fixed by adding a call to preventDefault on the keydown event.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
others). For more details, please see the WHATWG FAQ.
Work on this specification is also done at the WHATWG. The W3C HTML working
group actively pursues convergence with the WHATWG, as required by the W3C HTML
working group charter.
--
--Per Bothner
p...@bothner.com http
;) but faster in the USE_XML_SYNTAX case
(avoid the regex substitution), but neither likely to be measurable since I'm
also
guessing it's not called that frequently.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
/) for HTML5.
Maybe try the online version first: https://validator.w3.org/nu/
If it seems helpful you can download and build a local version.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
On 12/18/21 14:33, Patrice Dumas wrote:
On Wed, Dec 15, 2021 at 05:21:26PM -0800, Per Bothner wrote:
Emacs nxml mode should be sufficient to check well-formedness.
Is there documentation on how use nxml mode to check well-formedness
from the command line? I cannot find any information
know which elements have empty content (hr) and which don't (a).
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
hat nobody cares about anymore.
Does anybody object if I go and change texi2any to output this instead of
the HTML4 Transitional doctype?
I think it would make sense.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
/.mount_DomTerfjMAQ5/usr/ .
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
poposal is still reasonable:
https://lists.gnu.org/archive/html/bug-texinfo/2021-09/msg0.html
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
the Perl FindBin
module and the C whoami package exist.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
"../share/texinfo/foo.info" doesn't
work, since that is relative to $PWD *unless* there is logic to change
the effective $PWD. And how do figure out how what to change the $PWD to?
You do something like my example code - or use a library that does
something similar.
--
--Per Both
?
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
For DomTerm (https://domterm.org) whose main executable
is C/C++ I use whereami: https://github.com/gpakosz/whereami
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
reader out there that crashes
in this case.
There may be all kinds of buggy or obsolete readers. I would not
worry about them, especially with something so hypothetical.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
DIR/share/kawa/...
Then if you execute ANYDIR/bin/kawa directly, or via a symlink,
or if ANYDIR/bin (or a symlink) is on your PATH the script will set
$kawadir to ANYDIR. Given that it can find ANYDIR/lib/kawa.jar,
ANYDIR/share/kawa or other needed files.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
in 1.1).
I think that it would make sens to always use tbody.
Again, it's just a warning - but if it's easy to fix, we might as well.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
g step there.
Emacs nxml mode should be sufficient to check well-formedness.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
generating "polyglot" output (valid both as html and xml)
as an option (and perhaps in the future the default) for --html.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
t a
particular level on the hierarchy, but that is too inflexible: It makes
for a non-optimal browsing expeience.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
but it doesn't help for
traditional info and it doesn't solve the missing entries in the ToC.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
"xhtml" and "polyglot" modes we do:
(1) Don't uses named entities except the builtin XML ones.
(2) Close all tags. Where HTML prohibits separate closing tags,
use the XML shorthand, e.g. . This works everywhere I've tried it.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
On 8/30/21 3:44 PM, Gavin Smith wrote:
On Mon, Aug 30, 2021 at 10:00:51AM -0700, Per Bothner wrote:
What I'm looking for is:
(1) Be able to post-process html output with xml tools, such as xslt.
(2) Generate valid epub3 ebooks.
These seem like valid goals so would be happy to see patches
d almost universally
for Unicode, and decimal values are rarely used.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
is preferable, as that is much more common for Unicode values.
I.e. rather than for ©.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
accent markers.
It works fine also on Google Chrome, and on Epiphany (based on the
Safari/WebKit engine).
Just generate 'ooo' and be done with it.
(I would prefer using the hex value - one reason is it's easier to search for
its meaning.)
--
--Per Bothner
p...@bothner.com http
ox):
2021-06-22 Per Bothner
* js/info.css: Styling tweaks for js-info to make help scrollable.
diff --git a/js/info.css b/js/info.css
index d8d20e1723..14537b67ad 100644
--- a/js/info.css
+++ b/js/info.css
@@ -166,13 +166,12 @@ table#keyboard-shortcuts th {
display: none;
we're close to a release, but this seems fairly safe - plus it's in
an "experimental" feature. Ok to check in?
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
Another thing worth mentioning in the "Full news" section:
* texi2any
- changes to HTML output
- HTML is better structured and more modern, using elements
for nested sections, and 'id' attributes for references
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
that the 'description' is at least two bytes shorter
(to make room for final newline plus final null) than strlen(entry) ?
Probably, but there is no comment explaining why, and you'd have to look
caefully to make sure there no case that could risk overflow.
--
--Per Bothner
p...@bothner.com http
trlen (ptr);
- strncat (*description, ptr, length);
- ptr += length;
+ strcat (*description, ptr);
+ ptr += strlen (ptr);
}
}
/* Descriptions end in a new line. */
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
JavaScript "html-info" reader handles both index search and full-text
search (though that latter seems broken - haven't looked into it).
You can see a sample in action here:
https://per.bothner.com/tmp/Kawa-txjs/index.html
If JavaScript can do, Emacs-Lisp can do it.
--
--Per
to creating a new eww buffer.
We could call it "hinfo" mode, and describe it as "an experimental mode
for browsing HTML documents (especially ones generated from texinfo)
using info-style keybindings and behavior".
We just need a volunteer ...
--
--Per Bothner
p..
On 5/6/21 1:13 PM, Gavin Smith wrote:
On 5/6/21 12:36 PM, Gavin Smith wrote:
On Sat, May 01, 2021 at 07:07:28PM -0700, Per Bothner wrote:
It seems wrong to include inline css in generated html files,
especially when using the --ccs-ref or -C INFO_JS_DIR options.
The documentation
On 5/6/21 12:36 PM, Gavin Smith wrote:
On Sat, May 01, 2021 at 07:07:28PM -0700, Per Bothner wrote:
It seems wrong to include inline css in generated html files,
especially when using the --ccs-ref or -C INFO_JS_DIR options.
The documentation is complicated. The advice to use !important
e CSS".
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
achieved with a small
bit of JavaScript and CSS magic.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
g Constructors",
but it doesn't do anything.
Not sure if that is a bug. These subsections are not nodes - i.e. in kawa.texi
they only have a @subsection command but no @node commands.
Note that the '[' and ']' commands work for these subsections.
Tell me what you would like to happen and I'll see if it c
On 5/2/21 10:10 AM, Gavin Smith wrote:
I saw that you've commited a change to this but it is not reflected for
me at
https://per.bothner.com/tmp/Kawa-txjs-plain/style/info.js
in the on_message function.
I'm confused about what happened, but should be fixed now.
--
--Per Bothner
p
On 4/30/21 4:06 AM, Per Bothner wrote:
On 4/29/21 9:40 AM, Gavin Smith wrote:
Another problem: Navigate to
https://per.bothner.com/tmp/Kawa-txjs-plain/index.html
type "i" then "constant-fold", select the option in the menu, then press
Return.
Then the page
https:/
ult rules. Or an entirely new option.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
d' attributes as a list (that in turn we can use
when searching the ToC for a match).
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
ut I would like to drop that dependency
at some point.
On 4/27/21 3:19 PM, Per Bothner wrote:
Supppage I have an image file images/paint-circ-1.png .
Consider the following k.texi program processed thus:
makeinfo k.texi --html -o /tmp
\input texinfo
@settitle k-test
@example
$ echo
the input fields. Not a priority or blocker, I think.
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
It has an index. The 'i' command works seems to work nicely
(after fixing one minor typo).
--
--Per Bothner
p...@bothner.com http://per.bothner.com/
1 - 100 of 323 matches
Mail list logo