From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: csv2ledger Date: Mon, 20 May 2024 14:06:51 +0200 Message-ID: <86ttisd6w4.fsf@fastmail.fm> References: <86frug1ppt.fsf@fastmail.fm> <87seydm0eh.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1144"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 20 14:07:57 2024 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 1s91o4-000Aam-Eq for ged-emacs-devel@m.gmane-mx.org; Mon, 20 May 2024 14:07:57 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s91nH-0000xW-FC; Mon, 20 May 2024 08:07:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s91nF-0000xH-SI for emacs-devel@gnu.org; Mon, 20 May 2024 08:07:05 -0400 Original-Received: from wfhigh8-smtp.messagingengine.com ([64.147.123.159]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s91nD-0003Er-7n for emacs-devel@gnu.org; Mon, 20 May 2024 08:07:05 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.west.internal (Postfix) with ESMTP id A69141800137; Mon, 20 May 2024 08:06:59 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 20 May 2024 08:06:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1716206819; x=1716293219; bh=gHvkibhpEu 28s1LTFSDD+Ntelfd2e7IwvDz1u9LmE6I=; b=iPTZXkjWousMY1Ny519NrtdWPN FeSZE8+QCJBtQfcJHtxlsm/ybq2hhsCPBG7hmU76e1IwtJXYFnciUgZ2ift59mKw QN9OF8JEQFrHEaMPjJnWbcS1P3118fdl/SnHrEVnhrAl7mmkX7sDNHxm7axmmlyQ uAYwKVJjpIpWw/txUZwliIrRiYDLMnxWazCL1/B1m/paYfbLp5ChzrR2qxbCcWXp 1LDkgjm108dK47iyxLj6fbs9pGw7dbmR35re5jWR6H3kRyZOM9xACP1uHs+r8BRQ 3978DO0CXjE3DWZFGUHEnZxHxhymLKcycwR8aruLLGcQ+3nxIaldVo3ElKig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1716206819; x=1716293219; bh=gHvkibhpEu28s1LTFSDD+Ntelfd2 e7IwvDz1u9LmE6I=; b=lK7EobVFSrxv8sstO/aklYfh6HHvavGnvNVfRAmkR2d5 6iKdzKUVoX5sscSurm8o8iPpZSRIb4urIKpgYRVWn/fiUeMJobP5Xu3OjoHuDqeb 0xsod1XkUD1wPxAzWrLT69lRMdEUFFSDIB1uZ+DgIVg8nenTJWIv6V0YAhbhqCpX 63uZ4mSjNgXiHVLCJWYkTN+icEQxX8ZUqpZXCwzhEnnedWVU0bbQAu/ILJI4nc7w wdVIOqZNHP+MSA7SlZBdovcEsmBDfzrZeo0b2raAdFwICg1pkjq4/tEoUn22G0cr CyD7BvUccp+vTunstLHsSULAVbGC+qDVVS4NAfG+cQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeitddgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujghffffkgggtsehttdertddttddtnecuhfhrohhmpeflohhoshht ucfmrhgvmhgvrhhsuceojhhoohhsthhkrhgvmhgvrhhssehfrghsthhmrghilhdrfhhmqe enucggtffrrghtthgvrhhnpefhleegvdegvddtfeettdelgfdtleelffeigeehgfefudeu keevveetueejuefffeenucffohhmrghinheptghouggvsggvrhhgrdhorhhgnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhoohhsthhkrhgv mhgvrhhssehfrghsthhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: ie15541ac:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 May 2024 08:06:57 -0400 (EDT) In-Reply-To: <87seydm0eh.fsf@posteo.net> (Philip Kaludercic's message of "Mon, 20 May 2024 07:02:14 +0000") Received-SPF: pass client-ip=64.147.123.159; envelope-from=joostkremers@fastmail.fm; helo=wfhigh8-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:319410 Archived-At: Hi Philip, On Mon, May 20 2024, Philip Kaludercic wrote: > Joost Kremers writes: >> https://codeberg.org/joostkremers/csv2ledger > > I don't have the time for a proper review of the package for now, but > that shouldn't block adding the package. I'll try to come back to you > later with a few comments (e.g. getting rid of the dash dependency). Is dash a real problem? I mean, it's on GNU ELPA, and I specifically made sure to target the version there. I can remove dash if you prefer, though. There are two dash functions I use that don't seem to have a direct built-in equivalent (as far as I can tell): `-compose` and `-zip-pair`. I'm sure I can deal with them. >> There are already many solutions to do this conversion, not the least Ledger >> itself, which provides a `convert` command. None of these are Emacs-based, >> however, and none that I know of offer the customisability that I needed >> myself. > > Can you elaborate on what you mean by "Emacs-based"? Conveniently integrated into Emacs. You're right, of course, that any CLI-based solution can be integrated into Emacs with some glue code. It's just that I'm not aware that anyone has written such glue code. (Though I might have missed something, of course). >> I'm proposing this package for inclusion into Non-GNU ELPA, not GNU ELPA, >> because it depends on a package that's only available on MELPA, >> `parse-csv`.[3] (If that is a problem, please let me know. I'm assuming it's >> a problem for GNU ELPA, but not for Non-GNU ELPA.)[4] > That is a blocker for both repositories. OK. Makes sense, actually. > A quick peak at the package reveals it to be more or less a single > function. Can you check of the csv-mode on ELPA provides anything you > need? It seems like something that could be replicated in that package. Yes, it's just one single function, `parse-csv-string`. I've taken a closer look at csv-mode and just found the function `csv--collect-fields`, which seems to do basically the same as `parse-csv-string`, but a) it's an internal function; and b) it doesn't strip quotes from field values. Neither seems unsolvable, I guess. I would be interested in your opinion, though, as to what would be better: add a public function to csv-mode.el that strips the quotes, or call `csv--collect-fields` from csv2ledger.el and strip the quotes there? -- Joost Kremers Life has its moments