From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: rec-mode Date: Sat, 07 Nov 2020 15:38:44 -0500 Message-ID: References: <8lm0yh4km1hr79.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33763"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "Jose E. Marchesi" , emacs-devel@gnu.org To: Antoine Kalmbach Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 07 21:39:31 2020 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 1kbUzj-0008g6-Nf for ged-emacs-devel@m.gmane-mx.org; Sat, 07 Nov 2020 21:39:31 +0100 Original-Received: from localhost ([::1]:56760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbUzi-0003Mh-Oz for ged-emacs-devel@m.gmane-mx.org; Sat, 07 Nov 2020 15:39:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbUz6-0002xP-6h for emacs-devel@gnu.org; Sat, 07 Nov 2020 15:38:52 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:8775) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbUz3-00074c-Km; Sat, 07 Nov 2020 15:38:51 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 378D61002FA; Sat, 7 Nov 2020 15:38:47 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id AA26C10025D; Sat, 7 Nov 2020 15:38:45 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604781525; bh=jzBE9cEnPtV+PJ4TkIbl4LwHMeNTyTR1fGt9FX2ZtOI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=G6d7PmISK8WsVTNQceQWh8WWDyR1jocW3gChhTwAfNAyjfGC8tsqYrxQC0NcnfYyK VxIUkB+saw9lhlBwDmro+BLJsrdeOh5z1x7UJo1rE/5tA7h04v+qyGqv0vfgMAvWGK DPHum//C9Dvoe+2srCOMDthrJS67KbYLTSTy+C5Rc7A/rZSK0iX1RQisRQOKKIWIOe eAd8VGx+oBK5X/xMdx/4pePa7F7MLlCs2irxgESS/1r8Xrx8Asmtni2NE3WXgupc7i yNaFWoFV12C/1E58BsMpmbAGc5bZ1FM+Q4AqzrNhXoyOGT2hF9nXHMqA6BmVVM9HyF Px/3kF3zzSkPQ== Original-Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 786B71202A8; Sat, 7 Nov 2020 15:38:45 -0500 (EST) In-Reply-To: <8lm0yh4km1hr79.fsf@iki.fi> (Antoine Kalmbach's message of "Sat, 07 Nov 2020 22:01:14 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/07 15:38:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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.23 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:258879 Archived-At: > 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)))