From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KI/aLPK3d2JfcwAAbAwnHQ (envelope-from ) for ; Sun, 08 May 2022 14:30:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id wJ/hLPK3d2I4awAAauVa8A (envelope-from ) for ; Sun, 08 May 2022 14:30:42 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3D613AC5C for ; Sun, 8 May 2022 14:30:42 +0200 (CEST) Received: from localhost ([::1]:58078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nng3d-0006jw-Dw for larch@yhetil.org; Sun, 08 May 2022 08:30:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nng2q-0006fj-U1 for emacs-orgmode@gnu.org; Sun, 08 May 2022 08:29:52 -0400 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:36510) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nng2o-0001Zl-H5 for emacs-orgmode@gnu.org; Sun, 08 May 2022 08:29:51 -0400 Received: by mail-pg1-x535.google.com with SMTP id g3so9861788pgg.3 for ; Sun, 08 May 2022 05:29:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=1DQR7zyg1up+Pn7uIql641mjjGkJ2nO0yfRxrBTUDrQ=; b=N5psWWDr00wuIq+WRfAKBAjF8a7ewLc16ZRP75pae9dcUwMuGsFg6f0TQ9P6PZ5rP0 iUR32C1M6/I7w6sVDgmceMZanfknqWZJS47gKR0NYfQNFft8zIMCFsPOoc0C8nX8N2YO 5ufzmBE0/JwiTmER0JvJcxlDRA8ql16bpWHAX3eTd6dsOcL305RuKGHpuvCAXGCHHpQt KnwIm8iAgWnmx/SlTPrtid7rPXVYYo0Oo/xp5PZRusAQDOxMEOrhIIRsBe5RBxiBoYQd mLKcHOOOnXnuy4L5yMB/0RaVLzI81c0E6bjtGO1BmVfRPucm6PYb27da3R6BAbGFR34u OqNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=1DQR7zyg1up+Pn7uIql641mjjGkJ2nO0yfRxrBTUDrQ=; b=j0lUY6OGasofCOdpFuYSt+tzwiFLameCOg24JS2t8X+oAszhonc9cKI0SR2tdRA93F v609a6SYY3TesuY0BdgQa8LVpgElUTHXMVJPEIGQeV3c9J+m7Bm3EC2X38zHfILuCrbz ISE3A01F9/udY6s5F5D8GAD0ek7AYz0sGZ3Fx9hpeFGNY0IdxmxyHOe6AKsparpChETt xJ3dEt/DWqRc0JU/E+W8ENbdxm1gnLgNSD6gNbgfWgjL/0XUStxq5t4en0o9KNk/vqSy Z4Y5hCSNZgWuRUfEGgf3RxR+WvxUI+I1hGLNU8oI+HvUoox7vow9Eg2LZPJISpl4p4G4 yHaA== X-Gm-Message-State: AOAM530P/qofDHIlr9ij0Xcv3AtFiDjoqVKjvwrryEYayftwPA3RZt2a ry7j9YZqwy4uBUPfP3Ur4AI= X-Google-Smtp-Source: ABdhPJyppPH47agModhWw2qnH1CFJMkfqNyQYNkTjjMQBm6mtrh23mCFILYiVUfmoospyLcKcF1zdg== X-Received: by 2002:a63:8ac1:0:b0:3ab:199:cbdf with SMTP id y184-20020a638ac1000000b003ab0199cbdfmr9324875pgd.466.1652012989101; Sun, 08 May 2022 05:29:49 -0700 (PDT) Received: from localhost ([66.154.104.4]) by smtp.gmail.com with ESMTPSA id f5-20020a170902ab8500b0015e8d4eb1c4sm5056768plr.14.2022.05.08.05.29.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 05:29:48 -0700 (PDT) From: Ihor Radchenko To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Cc: orgmode Subject: Re: [PATCH] org-attach: Attach current Gnus article parts In-Reply-To: <87y1zdwh1k.fsf@posteo.net> References: <87y1zdwh1k.fsf@posteo.net> Date: Sun, 08 May 2022 20:30:32 +0800 Message-ID: <87pmkoqk9j.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=yantar92@gmail.com; helo=mail-pg1-x535.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652013042; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=1DQR7zyg1up+Pn7uIql641mjjGkJ2nO0yfRxrBTUDrQ=; b=SYvXP5Sk7LmA/1ZOPcvNW/ZT20u6N+fHo4WyJ0eZDzLkeFlGY2TZMzQP+4j6IH6jen+y0x zygHVvdUy600kRwjP8FGx4wuAymBGZF1YxAcD/LfDBH0VTwUu3gSlM5bSxW2/7wBD4OkgM z3f4eBSa+n7TPLSd+Mngoe0kQ8z3FOU55YlyXeDpF/EHxBZNMOn07FiMhwU6qlCqTx4ENy lZCCn3n9mASFUcjXmnpMSGkeDjYPB0HzdwTcx2T6E0fkHValHa8CQQZ52sBGFTO1XPJ6kZ 2YbcjdRJtVpmRdpYy63Cto0X5bv6IS3YxT5J88XWXxV4BRYr/0DC0f29h3yZlw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652013042; a=rsa-sha256; cv=none; b=TpkdxiPmXpI/H7p1KV91wYHXS7LFZWAQVzuuz9sypDxmMRZe2e8SSTSF24/KiBBSTVseGN i46JX9QxEhr2WsH7f3SNPYuG7e2AamWqRVVQ+94zA8ioVLL1+fgImas/ezTdM25FJ8E5Cc ps9VoMe9UcX6hfYB1gc6izZORj9s3X0d1XYGvo3k3UotTgyVxrNNNeDZUXIolYbbgUJnsh mhSng7rjKbhCANbz30XoRbRGlnQfUvAK/RD0rDQI6eQv0TbQlbEZGYSScTiZbrsaKXqz57 YYTKyvd11gQ7sT0GhT4doElac2DvGbJSXHoIys49gx3wHGU/nicPXZkdu0t/nA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=N5psWWDr; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.81 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=N5psWWDr; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 3D613AC5C X-Spam-Score: -4.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: SdPqb976GUZV Juan Manuel Mac=C3=ADas writes: > In the attached patch I add a new command for org-attach: save *all* > attachments from the current Gnus article to the current org-attach-dir. > > (Sorry for repeating the word "attach" so much :-)) > > NB: > > 1. If no Gnus article is open, it returns an error message. > > 2. I've only tested it on Emacs 28. I don't know if it can cause any > problems on earlier Emacs/Gnus versions. > > 3. Although there are several alternatives to Gnus, I have chosen Gnus > specifically because it is part of GNU Emacs. > > 4. I think an option could be added to save only certain types of files > (pdf, png, jpg, docx, etc.). I think that supporting only Gnus is too specific. Not all the people use Gnus as mail reader. And the extra menu option you propose will only eat up space for people not using Gnus. I'd prefer a more generic approach working in any kind of email reader, be it rmail, gnus, mu4e, notmuch, or wunderlust. The approach can probably making use of message-mode or MML libraries from Emacs core. Also, I do not like adding yet another menu option even if it is working for other mail readers. Instead, it would be more consistent to follow what we do for dired. See interactive spec in org-attach-attach. Best, Ihor