From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dalanicolai Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: toc-mode Date: Sun, 25 Sep 2022 18:57:01 +0200 Message-ID: References: <874jwvsmp8.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000658d3805e9834d43" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7585"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs Devel To: Visuwesh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 25 18:58:10 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ocUxF-0001ns-8I for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Sep 2022 18:58:09 +0200 Original-Received: from localhost ([::1]:38704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocUxE-0002bl-4c for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Sep 2022 12:58:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocUwN-0001Bv-Pt for emacs-devel@gnu.org; Sun, 25 Sep 2022 12:57:15 -0400 Original-Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:43848) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocUwL-0002vC-Fx for emacs-devel@gnu.org; Sun, 25 Sep 2022 12:57:15 -0400 Original-Received: by mail-ed1-x531.google.com with SMTP id y8so6156346edc.10 for ; Sun, 25 Sep 2022 09:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=BsA6JU65yyH4JWfQNHIYyihCj7og29ZYxoZ966dVtrM=; b=HBoNybhkymJXmaZSbOrm//qXKU6Juht5oC/rjEyDoYotzzHMqU/z1xxZ+g30FtexlP jCnCEulB6Ynrc7SgcxdKNrE0Alo5YyWITSTj+fta5jL0Kfq4WYOYISkgeY/x8YZLJYnf 1hbd91VE0l8JOpJrrq4Iz+asA0mhaCgepJMsxXaYieACFyOQ3IDzxl1zLSdsGxBZYHCS Ht0h2LyBFauRKtLVljraxgpcNcHHPifXGOLKAIkpu+pC1Td9ihEAjsb3JKd8yRfNnwhG 5XNt3Iv6AHehO4qmw5Q3lpTy2BRXSnRk+BzjnIaVEtxMz4Ek9fCX7J3s9UuN8YzhTXnd d8mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=BsA6JU65yyH4JWfQNHIYyihCj7og29ZYxoZ966dVtrM=; b=X+OdWalzXI4qpOu6bO53t6Hfemne56lsu3lon+GQlTJ8kNQ8SLLP552KLvxEUddN9b qiolCHVnvA0oX8qL7eTQJAkACVZpDiTZewAmatyIDhY9mCiX6gJZQu7/BYhwWeLd0IRV q+Rvn8sLoGVvouZ1fPg8AX1trqniUa1SXi0hqb2JzmJr2+O7fHdsYeMl5u+IsoZ/qtBq XvpkBT7fEb1Cavz7hxmNVPKvaPt0j8LgmOS7VbnyvzNWcVKheLRqXByUX2PTloRPqh+e q0oD5FGHGtTtjJuWB7m4T0DpgbZFMBz4yOjdGY7+ushzJozgU8VkH4dWsAsAFUuoH5Au NURw== X-Gm-Message-State: ACrzQf3kY4rrT5u7wrR/udAvNvvqREOvA/AhI9gCAk/sQdDbgiMcfYeV Q6H+I3Tj+kEG8hlfOpZCW6f8JSXgQyyDq9Cb3Xw= X-Google-Smtp-Source: AMsMyM7rCf+jlYyu2ekZf8+bcfllAENj7pKXOiQJRh0iGrmX3lXYtZkP91rBoCIUc3drQNIs3abKzDUZB6Rw3WP2EjA= X-Received: by 2002:a05:6402:11cd:b0:452:199e:7cf6 with SMTP id j13-20020a05640211cd00b00452199e7cf6mr18856067edw.366.1664125032040; Sun, 25 Sep 2022 09:57:12 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=dalanicolai@gmail.com; helo=mail-ed1-x531.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:296226 Archived-At: --000000000000658d3805e9834d43 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I guess it does no harm to explicitly mention it again here (it is also in the usage instructions )... If you have a scanned pdf, then it is strongly recommended to use the pdf.tocgen functionality. Using that, then in most cases, you can really extract the TOC and add it to the document in a (few) minute(s). On Sun, 25 Sept 2022 at 18:47, dalanicolai wrote: > Thanks for the feedback! > > However, I am not sure if I understand every point correctly. > > For point 1, I would say just keeping (S)- pressed works so > fast, that I think > it is not necessary to set the page number by reading from the user > (b.t.w. I think, > generally, C- are the most useful keys in tabular-mode). As > mentioned in > the instructions for the tabular mode > > the contents of every field in tabular mode can be > updated by reading from the user through placing the cursor on the field > and then pressing > C-r. I see now, that the phrasing of that instruction could be a improved= . > > For point 2, the answer again is that you can press C-r on the field to > update it. However, > the tabular-mode should mainly be used for adjusting the page numbers. > Cleaning up, and > setting levels, should preferably be done in the 'cleanup' stage > . > > As far as I know, the most use keybindings are major-mode keybindings, an= d > automatically > listed when checking the mode documentation using C-h m, as mentioned in > the first section of the usage instructions > . Or are you thinking > about something else? > > Of course if you see any improvement, then patches are welcome (although = I > prefer pull > requests, but all is fine). > > On Sun, 25 Sept 2022 at 13:44, Visuwesh wrote: > >> [=E0=AE=9A=E0=AF=86=E0=AE=B5=E0=AF=8D=E0=AE=B5=E0=AE=BE=E0=AE=AF=E0=AF= =8D =E0=AE=9A=E0=AF=86=E0=AE=AA=E0=AF=8D=E0=AE=9F=E0=AE=AE=E0=AF=8D=E0=AE= =AA=E0=AE=B0=E0=AF=8D 20, 2022] dalanicolai wrote: >> >> > This package has been for a while on MELPA now, but it would be nice i= f >> it >> > could be moved to ELPA. The source can be found at >> > https://github.com/dalanicolai/toc-mode. >> > >> > I would like to mention that the PDF functionalities largely depend on >> > pdf-tools, which is not on >> > ELPA of course (doc-view unfortunately does not provide the right >> > features). I am not sure >> > if that somehow is a problem. >> > >> > [...] >> >> Thanks for this package, it simplified adding TOC to a pdf file >> immensely but I had a couple hiccups when using it: >> >> 1. Can we have a command that sets the page number of an outline >> item by reading it from the user? I.e., if I say M-x >> toc-set-page-number RET 20, it would set the heading's page >> number to 20, and a respective -remaining command. This would be >> a very nice complement to and S- that we already >> have. Equivalently, we could also accept a numeric argument for >> and S-. >> 2. AFAICT, there is no way to edit the outline level from the >> tabular buffer? Is this possible, I figured out the way to >> adjust the level is to edit the spaces in the first buffer, but >> that took some trying to figure out. >> 3. Finally, can you put the commonly used keybinding in the >> major-mode's documentation? >> >> If you would like to have these as patches instead, then I can try to >> shoot some in two weeks time. >> > --000000000000658d3805e9834d43 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I guess it does no harm to explicitly mention it agai= n here (it is also in the us= age instructions)...

If you have a scanned pdf= , then it is strongly recommended to use the pdf.tocgen functionality.
Using that, then= in most cases, you can really extract the TOC and add it to the document i= n
a (few) minute(s).

On Sun, 25 Sept 2022 at 18:47, dala= nicolai <dalanicolai@gmail.com<= /a>> wrote:
<= div dir=3D"ltr">
Thanks for the feedback!

Howe= ver, I am not sure if I understand every point correctly.

For point 1, I would say just keeping (S)-<left/right> presse= d works so fast, that I think
it is not necessary to set the page= number by reading from the user (b.t.w. I think,
generally, C-&l= t;left/right> are the most useful keys in tabular-mode). As mentioned in=
the instructions for the tabular mod= e the contents of every field in tabular mode can be
updated = by reading from the user through placing the cursor on the field and then p= ressing
C-r. I see now, that the phrasing of that instruction cou= ld be a improved.

For point 2, the answer again is= that you can press C-r on the field to update it. However,
the t= abular-mode should mainly be used for adjusting the page numbers. Cleaning = up, and
setting levels, should preferably be done in the= 'cleanup' stage.

As far as I know, th= e most use keybindings are major-mode keybindings, and automatically
<= div>listed when checking the mode documentation using C-h m, as mentioned i= n
the first section of the usage instructions. Or are you th= inking about something else?

Of course if you see = any improvement, then patches are welcome (although I prefer pull
requests, but all is fine).

=
On Sun, 25 Sept 2022 at 13:44, Visuwe= sh <visuweshm@g= mail.com> wrote:
[=E0=AE=9A=E0=AF=86=E0=AE=B5=E0=AF=8D=E0=AE=B5=E0=AE=BE=E0=AE=AF=E0= =AF=8D =E0=AE=9A=E0=AF=86=E0=AE=AA=E0=AF=8D=E0=AE=9F=E0=AE=AE=E0=AF=8D=E0= =AE=AA=E0=AE=B0=E0=AF=8D 20, 2022] dalanicolai wrote:

> This package has been for a while on MELPA now, but it would be nice i= f it
> could be moved to ELPA. The source can be found at
> https://github.com/dalanicolai/toc-mode.
>
> I would like to mention that the PDF functionalities largely depend on=
> pdf-tools, which is not on
> ELPA of course (doc-view unfortunately does not provide the right
> features). I am not sure
> if that somehow is a problem.
>
> [...]

Thanks for this package, it simplified adding TOC to a pdf file
immensely but I had a couple hiccups when using it:

=C2=A0 =C2=A0 1. Can we have a command that sets the page number of an outl= ine
=C2=A0 =C2=A0 =C2=A0 =C2=A0item by reading it from the user?=C2=A0 I.e., if= I say M-x
=C2=A0 =C2=A0 =C2=A0 =C2=A0toc-set-page-number RET 20, it would set the hea= ding's page
=C2=A0 =C2=A0 =C2=A0 =C2=A0number to 20, and a respective -remaining comman= d.=C2=A0 This would be
=C2=A0 =C2=A0 =C2=A0 =C2=A0a very nice complement to <right> and S-&l= t;right> that we already
=C2=A0 =C2=A0 =C2=A0 =C2=A0have.=C2=A0 Equivalently, we could also accept a= numeric argument for
=C2=A0 =C2=A0 =C2=A0 =C2=A0<right> and S-<right>.
=C2=A0 =C2=A0 2. AFAICT, there is no way to edit the outline level from the=
=C2=A0 =C2=A0 =C2=A0 =C2=A0tabular buffer?=C2=A0 Is this possible, I figure= d out the way to
=C2=A0 =C2=A0 =C2=A0 =C2=A0adjust the level is to edit the spaces in the fi= rst buffer, but
=C2=A0 =C2=A0 =C2=A0 =C2=A0that took some trying to figure out.
=C2=A0 =C2=A0 3. Finally, can you put the commonly used keybinding in the =C2=A0 =C2=A0 =C2=A0 =C2=A0major-mode's documentation?

If you would like to have these as patches instead, then I can try to
shoot some in two weeks time.
--000000000000658d3805e9834d43--