GNU bug report logs - #44711
[PATCH] Add movement commands `tabulated-list-next-column' and `tabulated-list-previous-column'

Previous Next

Package: emacs;

Reported by: "Peter Feigl" <peter.feigl <at> nexoid.at>

Date: Tue, 17 Nov 2020 17:53:01 UTC

Severity: normal

Tags: 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 44711 in the body.
You can then email your comments to 44711 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#44711; Package emacs. (Tue, 17 Nov 2020 17:53:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Peter Feigl" <peter.feigl <at> nexoid.at>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 17 Nov 2020 17:53:02 GMT) Full text and rfc822 format available.

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

From: "Peter Feigl" <peter.feigl <at> nexoid.at>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Add movement commands `tabulated-list-next-column' and
 `tabulated-list-previous-column'
Date: Tue, 17 Nov 2020 18:52:23 +0100
[Message part 1 (text/plain, inline)]
The attached patch adds two movement commands,
`tabulated-list-next-column' and `tabulated-list-previous-column', by
default bound to "f" and "b" in `tabulated-list-mode'. They move to the
next/previous column respectively, and honour a numeric prefix argument.

I'd be happy to try to get my employer to sign the papers, please send
me the forms (in German, if that is relevant).

If possible, feel free to use this patch without papers signed.

Thanks and greetings,

Peter
[0001-Add-commands-to-move-to-next-previous-column-in-tabu.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44711; Package emacs. (Tue, 17 Nov 2020 18:37:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: "Peter Feigl" <peter.feigl <at> nexoid.at>
Cc: 44711 <at> debbugs.gnu.org
Subject: Re: bug#44711: [PATCH] Add movement commands
 `tabulated-list-next-column' and `tabulated-list-previous-column'
Date: Tue, 17 Nov 2020 18:35:52 +0000
"Peter Feigl" <peter.feigl <at> nexoid.at> writes:

> The attached patch adds two movement commands,

Thanks, just some minor comments from me.

> +(defun tabulated-list-next-column (&optional arg)
> +  "Go to the start of the next column after point on the current line.
> +If ARG is provided, move that many columns."
> +  (interactive "p")
> +  (dotimes (c (or arg 1))
               ^
The names of unused lexical variables should start with (or consist only
of) an underscore, e.g. '_' or '_c'.  (The byte-compiler should
otherwise complain.)

> +    (let ((next (or (next-single-property-change (point) 'tabulated-list-column-name) (point-max))))

This line is a bit long; suggest breaking the function call across two
lines.  More importantly, why scan all the way to the end of the buffer
if we're only interested in the current line?

> +      (unless (>= next (line-end-position))
> +        (goto-char next)))))

Given my suggestion to limit the search to the current line, this could
be modified along the following lines:

  (dotimes (_ (or arg 1))
    (let* ((eol (line-end-position))
           (next (next-single-property-change
                  (point) 'tabulated-list-column-name nil (1+ eol))))
      (when (< next eol)
        (goto-char next))))

But there's a subtle issue here: some tabulated lists
(e.g. list-buffers) can have an empty final column (e.g. with
non-file-visiting buffers such as *scratch*), but the (< next eol) guard
will not allow point to reach this final empty column, because that
position is at the end of the line.

So I suggest either augmenting the guard to check whether the current
(last) column is empty, or unconditionally allowing point to reach the
end of the line, even if point was already originally in the final
column.

> +(defun tabulated-list-previous-column (&optional arg)

Ditto.

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44711; Package emacs. (Tue, 17 Nov 2020 19:51:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: "Peter Feigl" <peter.feigl <at> nexoid.at>
Cc: 44711 <at> debbugs.gnu.org
Subject: Re: bug#44711: [PATCH] Add movement commands
 `tabulated-list-next-column' and `tabulated-list-previous-column'
Date: Tue, 17 Nov 2020 21:48:37 +0200
> The attached patch adds two movement commands,
> `tabulated-list-next-column' and `tabulated-list-previous-column', by
> default bound to "f" and "b" in `tabulated-list-mode'. They move to the
> next/previous column respectively, and honour a numeric prefix argument.

Many packages such as 'ses' and 'org-table' for moving to the next/previous
column use keys TAB and S-TAB.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44711; Package emacs. (Tue, 24 Nov 2020 08:09:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Peter Feigl" <peter.feigl <at> nexoid.at>
Cc: 44711 <at> debbugs.gnu.org
Subject: Re: bug#44711: [PATCH] Add movement commands
 `tabulated-list-next-column' and `tabulated-list-previous-column'
Date: Tue, 24 Nov 2020 09:08:41 +0100
"Peter Feigl" <peter.feigl <at> nexoid.at> writes:

> I'd be happy to try to get my employer to sign the papers, please send
> me the forms (in German, if that is relevant).
>
> If possible, feel free to use this patch without papers signed.

This looks useful, but the patch is indeed to big to apply without
paperwork.

Here's the form to get started:

-------

Please email the following information to assign <at> gnu.org, and we
will send you the assignment form for your past and future changes.

Please use your full legal name (in ASCII characters) as the subject
line of the message.
----------------------------------------------------------------------
REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES

[What is the name of the program or package you're contributing to?]
Emacs

[Did you copy any files or text written by someone else in these changes?
Even if that material is free software, we need to know about it.]

[Do you have an employer who might have a basis to claim to own
your changes?  Do you attend a school which might make such a claim?]

[For the copyright registration, what country are you a citizen of?]

[What year were you born?]

[Please write your email address here.]

[Please write your postal address here.]

[Which files have you changed so far, and which new files have you written
so far?]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44711; Package emacs. (Thu, 13 May 2021 11:37:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Peter Feigl" <peter.feigl <at> nexoid.at>
Cc: 44711 <at> debbugs.gnu.org
Subject: Re: bug#44711: [PATCH] Add movement commands
 `tabulated-list-next-column' and `tabulated-list-previous-column'
Date: Thu, 13 May 2021 13:36:25 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> This looks useful, but the patch is indeed to big to apply without
> paperwork.

Peter, has there been any progress with the copyright assignment
paperwork?

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




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 13 May 2021 11:37:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44711; Package emacs. (Thu, 13 May 2021 18:09:02 GMT) Full text and rfc822 format available.

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

From: "Peter Feigl" <peter.feigl <at> nexoid.at>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 44711 <at> debbugs.gnu.org
Subject: Re: bug#44711: [PATCH] Add movement commands
 `tabulated-list-next-column' and `tabulated-list-previous-column'
Date: Thu, 13 May 2021 20:08:34 +0200
> Peter, has there been any progress with the copyright assignment
> paperwork?

Sorry, I'll get to this on Monday, I've reworked the patch according to
the suggestions, but haven't had the papers signed yet.

Thanks for the patience,
Peter




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44711; Package emacs. (Sat, 12 Jun 2021 12:14:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Peter Feigl" <peter.feigl <at> nexoid.at>
Cc: 44711 <at> debbugs.gnu.org
Subject: Re: bug#44711: [PATCH] Add movement commands
 `tabulated-list-next-column' and `tabulated-list-previous-column'
Date: Sat, 12 Jun 2021 14:12:58 +0200
"Peter Feigl" <peter.feigl <at> nexoid.at> writes:

> Sorry, I'll get to this on Monday, I've reworked the patch according to
> the suggestions, but haven't had the papers signed yet.

(This was a month ago.)

As far as I can tell, the paperwork hasn't gone through yet?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44711; Package emacs. (Sun, 13 Jun 2021 03:20:02 GMT) Full text and rfc822 format available.

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

From: Richard Stallman <rms <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: peter.feigl <at> nexoid.at, 44711 <at> debbugs.gnu.org
Subject: Re: bug#44711: [PATCH] Add movement commands
 `tabulated-list-next-column' and `tabulated-list-previous-column'
Date: Sat, 12 Jun 2021 23:19:29 -0400
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Talking with people at the employer, and with the FSF staff, and
encouraging them talk with each other, could enable them to unblock
it.  Some companies' lawyers look at the issue in a very narrow way,
and the FSF staff could help them see a solution.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Added tag(s) pending. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 12 Jul 2021 15:13:02 GMT) Full text and rfc822 format available.

Removed tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 12 Jul 2021 15:13:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44711; Package emacs. (Wed, 21 Jul 2021 12:09:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Peter Feigl" <peter.feigl <at> nexoid.at>
Cc: copyright-clerk <at> fsf.org, 44711 <at> debbugs.gnu.org
Subject: Re: bug#44711: [PATCH] Add movement commands
 `tabulated-list-next-column' and `tabulated-list-previous-column'
Date: Wed, 21 Jul 2021 14:08:25 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> "Peter Feigl" <peter.feigl <at> nexoid.at> writes:
>
>> Sorry, I'll get to this on Monday, I've reworked the patch according to
>> the suggestions, but haven't had the papers signed yet.
>
> (This was a month ago.)
>
> As far as I can tell, the paperwork hasn't gone through yet?

I see that the assignment is on file, but there's a note in the
copyright assignment file about awaiting further data.  Has there been
any movement on that?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44711; Package emacs. (Wed, 21 Jul 2021 19:47:01 GMT) Full text and rfc822 format available.

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

From: "Peter Feigl" <peter.feigl <at> nexoid.at>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: copyright-clerk <at> fsf.org, 44711 <at> debbugs.gnu.org
Subject: Re: bug#44711: [PATCH] Add movement commands
 `tabulated-list-next-column' and `tabulated-list-previous-column'
Date: Wed, 21 Jul 2021 21:46:31 +0200
> I see that the assignment is on file, but there's a note in the
> copyright assignment file about awaiting further data.  Has there been
> any movement on that?

I'm not sure what that is about, I've sent a clarification about the
name (which was hard to read), but I haven't heard anything since :-/

Thanks for looking into it!

Greetings, Peter




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44711; Package emacs. (Sun, 25 Jul 2021 07:19:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Peter Feigl" <peter.feigl <at> nexoid.at>
Cc: 44711 <at> debbugs.gnu.org
Subject: Re: bug#44711: [PATCH] Add movement commands
 `tabulated-list-next-column' and `tabulated-list-previous-column'
Date: Sun, 25 Jul 2021 09:18:33 +0200
"Peter Feigl" <peter.feigl <at> nexoid.at> writes:

> I'm not sure what that is about, I've sent a clarification about the
> name (which was hard to read), but I haven't heard anything since :-/

It turned out to be a misunderstanding.  I've now applied your patch to
Emacs 28, taking the various comments into consideration.

I moved the bindings to M-left/right, though, since f/b were taken in
many modes that use tabulated-list-mode.  (And TAB, too.)  If somebody
has a better idea for key bindings, feel free to adjust.

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




bug marked as fixed in version 28.1, send any further explanations to 44711 <at> debbugs.gnu.org and "Peter Feigl" <peter.feigl <at> nexoid.at> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 25 Jul 2021 07:19: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. (Sun, 22 Aug 2021 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 248 days ago.

Previous Next


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