From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id iPSsJkWJFmUhPQEAG6o9tA:P1 (envelope-from ) for ; Fri, 29 Sep 2023 10:22:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id iPSsJkWJFmUhPQEAG6o9tA (envelope-from ) for ; Fri, 29 Sep 2023 10:22:29 +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 520C958752 for ; Fri, 29 Sep 2023 10:22:29 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=DJUj6ixD; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695975749; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=X1yZ2pPkwq6VyB+ys16YCp0LpYECaLpJWrm+cWsstAU=; b=kYGGCIw2cIDMQaMIzOoJns1G/0W2HHariNUqw9JQbdhvvtewXGKkUJPHjnHHyrxACLXMIW 2K36Xkt2MwIJimRCplhQo3LNqUX+AWPzocoLQqLro1C/BS3b8GJBUnUDnd7mykwU1cBQfN R1gH1sG1qlGiWBNc5CtrEzUjRVtkKjUSsMM9nw97IANqXEwnC3twK38j0Aqrde+68RIksg BZMxqhAJbzBXrak95EZWKFu3CXBqzsPbrZ4HT003j6V0eYJJEoiy0zLiE+CTAxvLnw2HyM Mr8/+5CQVDs0mb5Q9Kbn3ceAqeJwMcHnJj6DKQxcGPizV19pOAthpNila8qmOg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695975749; a=rsa-sha256; cv=none; b=BFlOlxToc6NDJ1DjGZoZlCVRLo1USpIqk7IHaYKZt2Q6Wkom5M5cxh2J+nbHlZggLW4cgy nWM8gNqt4PSiQehbaMo5UIj05GEDdXbK3XnmFQcGCpBdub10FkHTZdSmnOHkC/D369pkWp wLEyNLwP19sjDu3sFIzH0O0iqsRLO5cmomCj0z1mYiEk140y4FAxN71TrpA6CX87T19FsI xxUV9svhZ/nEtlxxJKnh0tnJ1nzA2foFrrY6KCsIOsHbTXO6PIwXbSU4Esp60shZrpLAUw /5OWGqG/8KFsLFF+PzUAx8wA78zr18ksC91LRvDuBap9o2V6NyUhkKjbFug9eg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=DJUj6ixD; 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"; dmarc=pass (policy=none) header.from=gmail.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm8kM-0003j5-AL; Fri, 29 Sep 2023 04:21:14 -0400 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 1qm8kK-0003ip-Jh for emacs-orgmode@gnu.org; Fri, 29 Sep 2023 04:21:12 -0400 Received: from mail-ua1-x933.google.com ([2607:f8b0:4864:20::933]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qm8kJ-00073b-81 for emacs-orgmode@gnu.org; Fri, 29 Sep 2023 04:21:12 -0400 Received: by mail-ua1-x933.google.com with SMTP id a1e0cc1a2514c-7a7e11a53c3so284158241.1 for ; Fri, 29 Sep 2023 01:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695975670; x=1696580470; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=X1yZ2pPkwq6VyB+ys16YCp0LpYECaLpJWrm+cWsstAU=; b=DJUj6ixDzGQhjikVW0BBSuyIu39TDQUfI/gxFi+qkVucjMWzNIN/P9SPL/VgNBUihq vZTaORl/IMJtFBKp5RGNUVaoybVNq41RBRCZr9pOy0jdVtb8f/1JbwXhHMAsGVgesYky 5khI2IWKrKndLZ9tdDYcliYRF5DDbqMHLiMKtF+kPBwcq82uW91xBzAADPAnL/EMCcuD yXFhhWtCzcNbvbOBBVgSVnTQ3l4p8PxeOinRWxfayKKbRFmZMY+v50d6TT2f0AKfQ3S4 wu4tNYrvcs9eBM5JPp0yrThzGB7gCBDie+OxVa+kLqKsPaE5S3g4bHzFRDGXHgTJrwkG UMRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695975670; x=1696580470; h=content-transfer-encoding:cc:to:subject:message-id:date:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=X1yZ2pPkwq6VyB+ys16YCp0LpYECaLpJWrm+cWsstAU=; b=XO4M78EEee4ancqt06lQqtXEf0Nd68ln15fzRn2u7yv+wEwEjSLjm61+IRFgQAlzfI s9K3KvE6q3V6mWKVV+D6B56N2U2z8bV4tBGfiE5YHalm9X8gGZYQRrhQcdoU7XePqr6N 6nq6dMHEUjZftSpUOBum66Yn8ow4ZuuCtDF3yHFfeqZrAYHOmSPWJwfNqsBqY7ENTRl8 5htQDv4mNoTmNrtL5+MpJmb5MCsyc1GpACrZDGV2WFpFqjBOVgCRfPSLJQnO/hEv7Xhp jvuKclEXCtTLyOtW4d17VYStXcvvAPRlfgACfRcpkC0qXnFzisOcAc8eISJsEnX+Cqki QHRQ== X-Gm-Message-State: AOJu0Yxr4SlkyH5on73zaO3lRozk8A4z0BvQJWxeSBKzprZUXELuj7MN sDdK5oCrLMBLbfgLQwuzDhrhTDiBd7gT1Ea8D1E= X-Google-Smtp-Source: AGHT+IFX7qlGOBbMsT7iRyu93RCB5IX/0KKLxp/3t2Buho4a6OfavKicbinZAibMbIVLbgUxMs8r7dDh1akq7MdW9rY= X-Received: by 2002:a05:6102:5e8e:b0:452:6478:3e24 with SMTP id ij14-20020a0561025e8e00b0045264783e24mr1863611vsb.12.1695975669703; Fri, 29 Sep 2023 01:21:09 -0700 (PDT) MIME-Version: 1.0 From: Liu Hui Date: Fri, 29 Sep 2023 16:20:58 +0800 Message-ID: Subject: Re: [BUG] [PATCH] Add yank-media and DND handler [9.6.7 (9.6.7-g6eb773 @ /home/viz/lib/emacs/straight/build/org/)] To: Visuwesh , Ihor Radchenko Cc: Max Nikulin , emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::933; envelope-from=liuhui1610@gmail.com; helo=mail-ua1-x933.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -6.00 X-Migadu-Spam-Score: -6.00 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Queue-Id: 520C958752 X-TUID: /bS4txDtbMDD Hi, =E5=9C=A8 2023/9/27 16:29, Visuwesh =E5=86=99=E9=81=93: > +*** Files and images can be attached by dropping onto Emacs > + > +Attachment method other than ~org-attach-method~ for dropped files can > +be specified using ~org-dnd-default-attach-method~. > +(defcustom org-dnd-default-attach-method nil > + "Default attach method to use when DND action is unspecified. > +This attach method is used when the DND action is `private'. > +This is also used when `org-yank-image-save-type' is nil. > +When nil, use `org-attach-method'." I think the dnd feature should not be restricted to org-attach. I have often used it for opening file and inserting file link. How about supporting them and adding a new variable, such as org-dnd-default-method? > + ('ask (caddr (org-mks > + '(("c" "Copy" cp) > + ("m" "Move" mv) > + ("l" "Hard link" ln) > + ("s" "Symbolic link" lns)) > + "How to attach?" > + "Attach using method"))) It is better to pop up a menu that allows users to proceed with the mouse, e.g. that in `dired-dnd-do-ask-action'. Options like 'open'/'file link' could be added too. Thanks for your work.