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:47:50 +0200 Message-ID: References: <874jwvsmp8.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000956b5205e9832c60" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7184"; 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:49:14 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 1ocUob-0001in-Ux for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Sep 2022 18:49:14 +0200 Original-Received: from localhost ([::1]:33568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocUoa-0007f3-7E for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Sep 2022 12:49:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocUnV-0006yT-Sl for emacs-devel@gnu.org; Sun, 25 Sep 2022 12:48:06 -0400 Original-Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:37789) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocUnT-0001iG-G7 for emacs-devel@gnu.org; Sun, 25 Sep 2022 12:48:05 -0400 Original-Received: by mail-ej1-x631.google.com with SMTP id a26so9715838ejc.4 for ; Sun, 25 Sep 2022 09:48:02 -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=3XRFP8gzLiL13UucbZ/YHUPygmGSqtok+RA8pfwEduE=; b=IApa7921NUGfntbQNUymHb2C3ew14hYAKRUQmGEnAf8pULTi1LzLCrFGv8g2qkl2LJ buXI7SWAvlrEmW3eBCNig4C09SElm7+6fvINJ4dy96WDo6m3P/PNKssuFu114uqHA4PA e7ODKDA64LS4rnCWOy06jADMpbIK2opp1qfieSiy8Mffzox0jCol63ljMNvHQSI7kRxQ PZ/AghPwx+a2oz/ch2JfR5k7OV/ejqsdvY5Ij8obI4SuTj0s30LLkYVSUw2yNorN4PeI +PsRgFNicweQZvyTvF184BDNi0PANGVadTixe2c9U4ftrznx7EjMhLMt3e2kTMPLnAGE CnJQ== 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=3XRFP8gzLiL13UucbZ/YHUPygmGSqtok+RA8pfwEduE=; b=pW3rveJUrBz1GxxvFv4NTsLaXwpHJl5uEgxV/climRVz6H4lQvLbfIQpo3+QXL5wjR IYcq1bnUmQ7zWh4NsGBoLDzed01G2VHdv49oubs1LRNLWolfa503s+szxc7p5do+iocB sFeX8dZ1VqiZKkrWno/NlQ2OZlwU9xkYkhHFwLwsmsa6xoyKRErRT8eRBZ2b7wxqmVmO MW/aXhZWkIn6dDwI0hDw5/DHnLal3tiZ5FO/4wKl4BnZR0VTaUjBH3/SyzvHS8ZNKJCC U43afVniEWqC/cqMAxtcdOf7yjW32KrUuJOlxC6JgbQRgh/PyHpaVHo8/KkufQWmx3uc y5nw== X-Gm-Message-State: ACrzQf1cfh+QKx3s0Zf92/Oq/ICDzRb1Y0lUsyENhYFXc5YmJQJwHDTw Vnx5YJJht/fpp2XWTT73ri36y29nMdKrR+nxx+I= X-Google-Smtp-Source: AMsMyM4FeX5e3y6H1/jji1TC3KX6Vz+0DF+pCI9QP8CsSW4edyhxCxYn/a/UnCx8lXYt6LKgfas6G45lMx11HHTAbkI= X-Received: by 2002:a17:906:cc4b:b0:772:3844:6ab2 with SMTP id mm11-20020a170906cc4b00b0077238446ab2mr14559439ejb.211.1664124481529; Sun, 25 Sep 2022 09:48:01 -0700 (PDT) In-Reply-To: <874jwvsmp8.fsf@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=dalanicolai@gmail.com; helo=mail-ej1-x631.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:296224 Archived-At: --000000000000956b5205e9832c60 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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, and 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 if > 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. > --000000000000956b5205e9832c60 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for the feedback!

How= ever, I am not sure if I understand every point correctly.

For point 1, I would say just keeping (S)-<left/right> press= ed works so fast, that I think
it is not necessary to set the pag= e number by reading from the user (b.t.w. I think,
generally, C-&= lt;left/right> are the most useful keys in tabular-mode). As mentioned i= n
the instructions for the tabular mode the content= s of every field in tabular mode can be
updated by reading from t= he 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 pre= ss C-r on the field to update it. However,
the tabular-mode shoul= d 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-mo= de keybindings, and automatically
listed when checking the mode d= ocumentation using C-h m, as mentioned in
the first section of the usage instructi= ons. 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 <visuwes= hm@gmail.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.
--000000000000956b5205e9832c60--