all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Antoine Kalmbach <ane@iki.fi>
Cc: "Jose E. Marchesi" <jemarch@gnu.org>, emacs-devel@gnu.org
Subject: Re: [ELPA] New package: rec-mode
Date: Sat, 07 Nov 2020 15:38:44 -0500	[thread overview]
Message-ID: <jwvft5k9at4.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8lm0yh4km1hr79.fsf@iki.fi> (Antoine Kalmbach's message of "Sat,  07 Nov 2020 22:01:14 +0200")

> The major mode, rec-mode[1], is currently distributed as a part of the main
> recutils tarball.  It makes sense also to offer this package via ELPA as
> well.  The source code for this package is available on Savannah[2].

Sounds good.

> The major mode would most likely be maintained as either a subtree or
> external,

Nowadays we prefer `external`.

> a development version will anyway be hosted in the
> recutils.git repository.

That's going to be inconvenient unless you keep it in a separate branch
(otherwise, you can't just push/pull between elpa.git and recutils.git,
so you end up fighting to convince Git to keep the history of
rec-mode.el without bringing along all the history of recutils, plus
ignore all the other files plus remember that `etc/rec-mode.el` in one
is just `rec-mode.el` in the other, etc...).

> Some minor things that need to be addressed before the package can be
> submitted formally, but these are fairly trivial to address:
>
>   * Use of `cl' rather than `cl-lib'
>   * Adding required package.el headers for the major mode

Actually, we can fix those afterwards.  If you want help with that, just
ask (but beware that I'll also change it to lexical-binding and won't
be able to resist making various other cosmetic changes like using
`define-derived-mode`).

> Then it comes down to copyright assignment: we need to check if
> committers to rec-mode.el have given copyright assignment to FSF for
> GNU Emacs.

Actually it doesn't have to be "for GNU Emacs", but rather for their
contribution (i.e. it could be covered by another assignment such as one
for the recutils package, tho AFAIK there are no such assignments).

> This is true for authors Jose E. Marchesi (maintainer of
> GNU Recutils), Daiki Ueno, and yours truly.  Author Julio C. M. Ramirez
> does not have Emacs copyright assignment.  The question remains, is the
> change in his commit[3] small enough to be considered trivial?  I would
> say so.

The patch is mostly reindentation (find below its
`diff-ignore-whitespace` rendering), so it's definitely trivial enough.

Side question: Can we fold ob-rec.el into rec-mode.el?
(I'm not familiar with org-babel's way of working, but it would seem
like a natural arrangement, just like major modes contain support code
for font-lock, imenu, indentation, completion, ...)

diff --git a/etc/rec-mode.el b/etc/rec-mode.el
index aa24849..65d1e61 100644
--- a/etc/rec-mode.el
+++ b/etc/rec-mode.el
@@ -1860,12 +1860,14 @@
       (rec-beginning-of-record))
     (rec-goto-next-field)))
 
-(defun rec-cmd-goto-next-rec ()
+(defun rec-cmd-goto-next-rec (&optional n)
   "Move the pointer to the beginning of the next record in the
 file.  Interactive version."
-  (interactive)
+  (interactive "P")
+  (when (null n) (setq n 1))
   (widen)
   (let ((record-type (rec-record-type)))
+    (dotimes (i n)
     (if (save-excursion
           (and (rec-goto-next-rec)
                (equal (rec-record-type) record-type)
@@ -1877,16 +1879,18 @@
       (if (not (rec-record-type))
           (message "No more records")
         (message "%s" (concat "No more records of type "
-                              (rec-record-type))))))
+				(rec-record-type)))))))
   (unless rec-editing
     (rec-show-record)))
 
-(defun rec-cmd-goto-previous-rec ()
+(defun rec-cmd-goto-previous-rec (&optional n)
   "Move the pointer to the beginning of the previous record in
 the file.  Interactive version."
-  (interactive)
+  (interactive "P")
+  (when (null n) (setq n 1))
   (widen)
   (let ((record-type (rec-record-type)))
+    (dotimes (i n)
     (if (save-excursion
           (and (rec-goto-previous-rec)
                (equal (rec-record-type) record-type)
@@ -1898,7 +1902,7 @@
       (if (not (rec-record-type))
           (message "No more records")
         (message "%s" (concat "No more records of type "
-                              (rec-record-type))))))
+				(rec-record-type)))))))
   (unless rec-editing
     (rec-show-record)))
 




  reply	other threads:[~2020-11-07 20:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-07 20:01 [ELPA] New package: rec-mode Antoine Kalmbach
2020-11-07 20:38 ` Stefan Monnier [this message]
2020-11-08 10:56   ` Antoine Kalmbach
2020-11-08 14:02     ` Stefan Monnier
2020-11-12 12:06       ` Antoine Kalmbach
2020-11-12 18:38         ` Stefan Monnier
2020-11-13 15:27           ` Antoine Kalmbach
2020-11-13 15:39             ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=jwvft5k9at4.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=ane@iki.fi \
    --cc=emacs-devel@gnu.org \
    --cc=jemarch@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.