unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: dalanicolai <dalanicolai@gmail.com>
To: 57854@debbugs.gnu.org
Subject: bug#57854: some extra info from inspecting the `pdftocio` package
Date: Fri, 16 Sep 2022 12:00:09 +0200	[thread overview]
Message-ID: <CACJP=3nePV7J4=7UKf7459601B3WbNFhb8Nwr4RN=Z00UCVtDQ@mail.gmail.com> (raw)
In-Reply-To: <CACJP=3nYUawxhZVkjLEqOB=zmgTr7w=_T24mbzSMhgzq=CrABw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]

When looking into the `pdftocio` package I find the following piece of code

```
    try:
        with open_pdf(path_in) as doc:
            if toc_file.isatty() or print_toc:
                # no input from user, switch to output mode and extract the
toc
                # of pdf
                toc = read_toc(doc)
                if len(toc) == 0:
                    print("error: no table of contents found",
file=sys.stderr)
                    sys.exit(1)

                if readable:
                    print(pprint_toc(toc))
                else:
                    print(dump_toc(toc), end="")
                sys.exit(0)

            # an input is given, so switch to input mode
            toc = parse_toc(toc_file)
            write_toc(doc, toc)
```

As from using `shell-command-to-string` we find that `len(toc)` must be 0
(it returns an empty string), so then it is probably the case that python
determines that some input has been given.

So maybe, even though in the `call-process` the INFILE command is set to
`nil`, still python might
determine that some kind of input is given.

[-- Attachment #2: Type: text/html, Size: 1457 bytes --]

  reply	other threads:[~2022-09-16 10:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16  9:39 bug#57854: 29.0.50; Different exit code in Emacs and terminal for identical process dalanicolai
2022-09-16 10:00 ` dalanicolai [this message]
2022-09-16 10:39   ` bug#57854: some extra info from inspecting the `pdftocio` package Eli Zaretskii
2022-09-16 19:16     ` dalanicolai
2022-09-16 11:00   ` bug#57854: 29.0.50; Different exit code in Emacs and terminal for identical process Eli Zaretskii
2022-09-16 19:29     ` dalanicolai
2022-09-16 19:44       ` dalanicolai
2022-09-17  6:10       ` Eli Zaretskii
2022-09-17 13:37         ` dalanicolai
2022-09-17 13:56           ` Eli Zaretskii
2022-09-17 14:16             ` dalanicolai
2022-09-17 14:42               ` Eli Zaretskii
2022-09-16 10:05 ` bug#57854: Test result to previous suggestion dalanicolai
2022-09-16 10:12 ` bug#57854: good to know dalanicolai
2022-09-16 10:46   ` bug#57854: 29.0.50; Different exit code in Emacs and terminal for identical process Eli Zaretskii
2022-09-16 10:35 ` Eli Zaretskii
     [not found]   ` <CACJP=3k9N5u1vY9Q2sM9angpcLEA7NMeLiFbvPdFAZfX+XbGYg@mail.gmail.com>
2022-09-17  6:05     ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACJP=3nePV7J4=7UKf7459601B3WbNFhb8Nwr4RN=Z00UCVtDQ@mail.gmail.com' \
    --to=dalanicolai@gmail.com \
    --cc=57854@debbugs.gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).