GNU bug report logs - #23985
Emacs 25.0.94: FEATURE ADDITION: Texinfo environment movement commands

Previous Next

Package: emacs;

Reported by: rswgnu <at> gmail.com

Date: Thu, 14 Jul 2016 16:21:02 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23985 in the body.
You can then email your comments to 23985 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#23985; Package emacs. (Thu, 14 Jul 2016 16:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to rswgnu <at> gmail.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 14 Jul 2016 16:21:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Robert Weiner <rsw <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org, bug-texinfo <at> gnu.org
Subject: Emacs 25.0.94: FEATURE ADDITION: Texinfo environment movement commands
Date: Thu, 14 Jul 2016 12:19:46 -0400
[Message part 1 (text/plain, inline)]
The attached patch adds movement commands for texinfo-mode that move
between the start and end of single-level environments (things that
end with an @end line), e.g. @table.

    (define-key map "\C-c."        'texinfo-to-environment-bounds) -
when within an environment, moves between the start and end lines

    (define-key map "\C-c\C-c\C-f" 'texinfo-next-environment-end) -
from anywhere, moves to the next end line of an environment

    (define-key map "\C-c\C-c\C-b" 'texinfo-previous-environment-end)
- from anywhere, moves to the previous end line of an environment

    (define-key map "\C-c\C-c\C-n" 'texinfo-next-environment-start) -
from anywhere, moves to the next start line of an environment

    (define-key map "\C-c\C-c\C-p"
'texinfo-previous-environment-start) - from anywhere, moves to the
previous start line of an environment

See attached for the patch.
[texinfo.el.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23985; Package emacs. (Thu, 14 Jul 2016 16:53:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Clément Pit--Claudel <clement.pit <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#23985: Emacs 25.0.94: FEATURE ADDITION: Texinfo environment
 movement commands
Date: Thu, 14 Jul 2016 18:52:35 +0200
[Message part 1 (text/plain, inline)]
Neat! What about C-c C-f/b/n/p insteaf of C-c C-c C-f/b/n/p, though? Org-mode uses these, IIRC.

Clément.

On 2016-07-14 18:19, Robert Weiner wrote:
> The attached patch adds movement commands for texinfo-mode that move
> between the start and end of single-level environments (things that
> end with an @end line), e.g. @table.
> 
>     (define-key map "\C-c."        'texinfo-to-environment-bounds) -
> when within an environment, moves between the start and end lines
> 
>     (define-key map "\C-c\C-c\C-f" 'texinfo-next-environment-end) -
> from anywhere, moves to the next end line of an environment
> 
>     (define-key map "\C-c\C-c\C-b" 'texinfo-previous-environment-end)
> - from anywhere, moves to the previous end line of an environment
> 
>     (define-key map "\C-c\C-c\C-n" 'texinfo-next-environment-start) -
> from anywhere, moves to the next start line of an environment
> 
>     (define-key map "\C-c\C-c\C-p"
> 'texinfo-previous-environment-start) - from anywhere, moves to the
> previous start line of an environment
> 
> See attached for the patch.
> 

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23985; Package emacs. (Thu, 14 Jul 2016 19:21:01 GMT) Full text and rfc822 format available.

Message #11 received at 23985 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: rswgnu <at> gmail.com
Cc: 23985 <at> debbugs.gnu.org, bug-texinfo <at> gnu.org
Subject: Re: bug#23985: Emacs 25.0.94: FEATURE ADDITION: Texinfo environment
 movement commands
Date: Thu, 14 Jul 2016 22:19:54 +0300
> From: Robert Weiner <rsw <at> gnu.org>
> Date: Thu, 14 Jul 2016 12:19:46 -0400
> 
> The attached patch adds movement commands for texinfo-mode that move
> between the start and end of single-level environments (things that
> end with an @end line), e.g. @table.

Thanks.  Allow me a few comments.

> + ;;; Texinfo environment, e.g. @table, movement commands
> + ;; Author: Bob Weiner <rsw <at> gnu.org>, Orig-Date: 7/14/2016
> + ;; Copyright (C) 2016  Free Software Foundation, Inc.

We don't put such comments into the code, the log entry and AUTHORS
serve this purpose.

> + (defun texinfo-to-environment-bounds ()
> +   "If within a Texinfo environment with an @end, move point first to its starting line and then to its ending line.

The first line of a doc string should not be wider than 67 characters,
certainly not more than 78, and it should still be a complete sentence
that summarizes what the function does.

> + Do nothing when outside of an environment; this does not handle nested environments."

Other lines should also be broken at character 70.

I think these additions should be also reflected in NEWS.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23985; Package emacs. (Thu, 14 Jul 2016 19:45:02 GMT) Full text and rfc822 format available.

Message #14 received at 23985 <at> debbugs.gnu.org (full text, mbox):

From: Robert Weiner <rsw <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 23985 <at> debbugs.gnu.org, bug-texinfo <at> gnu.org
Subject: Re: bug#23985: Emacs 25.0.94: FEATURE ADDITION: Texinfo environment
 movement commands
Date: Thu, 14 Jul 2016 15:43:44 -0400
On Thu, Jul 14, 2016 at 3:19 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> Thanks.  Allow me a few comments.

Thanks for the feedback.

>
>> + ;;; Texinfo environment, e.g. @table, movement commands
>> + ;; Author: Bob Weiner <rsw <at> gnu.org>, Orig-Date: 7/14/2016
>> + ;; Copyright (C) 2016  Free Software Foundation, Inc.

>
> We don't put such comments into the code, the log entry and AUTHORS
> serve this purpose.

I just put that in there for the reference of whoever actually patches
the Emacs sources, not to be kept in there.

>
>> + (defun texinfo-to-environment-bounds ()
>> +   "If within a Texinfo environment with an @end, move point first to its starting line and then to its ending line.
>
> The first line of a doc string should not be wider than 67 characters,
> certainly not more than 78, and it should still be a complete sentence
> that summarizes what the function does.

It is a sentence and I always make the first line of a doc string
stand alone but often the complexity makes these first lines long.
I then wrap further lines at 78 or less.  I will keep this advice in
mind but will no doubt find it hard to be clear and complete with
in such a short space.

>
>> + Do nothing when outside of an environment; this does not handle nested environments."
>
> Other lines should also be broken at character 70.

Is that really done throughout Emacs?  With today's wider screens, I
would think some relaxation would be permitted.

> I think these additions should be also reflected in NEWS.

Yes.

Bob




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23985; Package emacs. (Thu, 14 Jul 2016 20:16:02 GMT) Full text and rfc822 format available.

Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Clément Pit--Claudel <clement.pit <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#23985: Emacs 25.0.94: FEATURE ADDITION: Texinfo environment
 movement commands
Date: Thu, 14 Jul 2016 22:15:35 +0200
[Message part 1 (text/plain, inline)]
On 2016-07-14 21:43, Robert Weiner wrote:
>>> >> + (defun texinfo-to-environment-bounds ()
>>> >> +   "If within a Texinfo environment with an @end, move point first to its starting line and then to its ending line.
>> >
>> > The first line of a doc string should not be wider than 67 characters,
>> > certainly not more than 78, and it should still be a complete sentence
>> > that summarizes what the function does.
>
> It is a sentence and I always make the first line of a doc string
> stand alone but often the complexity makes these first lines long.
> I then wrap further lines at 78 or less.  I will keep this advice in
> mind but will no doubt find it hard to be clear and complete with
> in such a short space.

What about ‘Move to first line of current environment, then to last.’? Does that describe the behaviour of the function accurately?

(In fact, there's even space for ‘Move to first line of current Texinfo environment, then to last.’)

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23985; Package emacs. (Fri, 15 Jul 2016 07:02:01 GMT) Full text and rfc822 format available.

Message #20 received at 23985 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: rswgnu <at> gmail.com
Cc: 23985 <at> debbugs.gnu.org
Subject: Re: bug#23985: Emacs 25.0.94: FEATURE ADDITION: Texinfo environment
 movement commands
Date: Fri, 15 Jul 2016 10:01:28 +0300
> From: Robert Weiner <rsw <at> gnu.org>
> Date: Thu, 14 Jul 2016 15:43:44 -0400
> Cc: 23985 <at> debbugs.gnu.org, bug-texinfo <at> gnu.org
> 
> On Thu, Jul 14, 2016 at 3:19 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Thanks.  Allow me a few comments.
> 
> Thanks for the feedback.
> 
> >
> >> + ;;; Texinfo environment, e.g. @table, movement commands
> >> + ;; Author: Bob Weiner <rsw <at> gnu.org>, Orig-Date: 7/14/2016
> >> + ;; Copyright (C) 2016  Free Software Foundation, Inc.
> 
> >
> > We don't put such comments into the code, the log entry and AUTHORS
> > serve this purpose.
> 
> I just put that in there for the reference of whoever actually patches
> the Emacs sources, not to be kept in there.

If you send the patch in the form of git-format-patch, those details
are taken care for you by Git.

> >> + (defun texinfo-to-environment-bounds ()
> >> +   "If within a Texinfo environment with an @end, move point first to its starting line and then to its ending line.
> >
> > The first line of a doc string should not be wider than 67 characters,
> > certainly not more than 78, and it should still be a complete sentence
> > that summarizes what the function does.
> 
> It is a sentence and I always make the first line of a doc string
> stand alone but often the complexity makes these first lines long.
> I then wrap further lines at 78 or less.  I will keep this advice in
> mind but will no doubt find it hard to be clear and complete with
> in such a short space.

Clément suggested a shorter wording that would fit.  I can suggest
another:

  Go to the beginning or @end of the current Texinfo environment.

You don't have to say it all in the first sentence, only the main
point of the function.  The details are described in the rest of the
doc string.

> > Other lines should also be broken at character 70.
> 
> Is that really done throughout Emacs?  With today's wider screens, I
> would think some relaxation would be permitted.

Maybe so, but the current guidelines still say the above.  Feel free
to raise this issue on emacs-devel.

Thanks.




Added tag(s) patch. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sun, 29 Sep 2019 05:21:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23985; Package emacs. (Tue, 11 Aug 2020 14:39:01 GMT) Full text and rfc822 format available.

Message #25 received at 23985 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Robert Weiner <rsw <at> gnu.org>
Cc: rswgnu <at> gmail.com, 23985 <at> debbugs.gnu.org, bug-texinfo <at> gnu.org
Subject: Re: bug#23985: Emacs 25.0.94: FEATURE ADDITION: Texinfo environment
 movement commands
Date: Tue, 11 Aug 2020 16:38:17 +0200
Robert Weiner <rsw <at> gnu.org> writes:

> The attached patch adds movement commands for texinfo-mode that move
> between the start and end of single-level environments (things that
> end with an @end line), e.g. @table.

Thanks; looks like quite useful commands to me, so I went ahead and
applied this to Emacs 28.  I adjusted the doc strings to adhere to the
normal style first.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 11 Aug 2020 14:39:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 23985 <at> debbugs.gnu.org and rswgnu <at> gmail.com Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 11 Aug 2020 14:39:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 09 Sep 2020 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.