From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id GDEMAEKCGWWJbgEAG6o9tA:P1 (envelope-from ) for ; Sun, 01 Oct 2023 16:29:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GDEMAEKCGWWJbgEAG6o9tA (envelope-from ) for ; Sun, 01 Oct 2023 16:29:22 +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 BCA3E46518 for ; Sun, 1 Oct 2023 16:29:21 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=MjbTyyTd; 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=1696170561; 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=Uhbcu9UZremX4C7JYZj+gbDPtYSCs+p6sqDiAxXszcM=; b=nxspjwYcYieMS3wQioUB/75toOqy7ivy4Ns87I0V1SjX7F32gpnskT1dapnMr/yqHm4VDh upUPzJipCgdYY1JRgfS+LEfHSRTOK8bwzOaP6xzxz8wPzRpiJyvFsykj9z3XUgVkA20Q2L 1afUKBhf4A2E+l5SqEvzrtSeNLa0LvaGS9yF8c0gS9QQb6Qochhgwh1SZCGcMkDFyzXCaY 6kySilu6EeRmNOBP8KW+8ExKM6chMXSOysmxJHOuW/5gLU9Zq8VCXu0qgmaOrR3nUoHJn/ Kph4IF5OCdw0wMIaXMVF2bROHMhcIXJe2SfnD5bhLJl+9hzNGLt9R/YqVoMh/Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696170561; a=rsa-sha256; cv=none; b=ZlB5jVe5vT2LaPkV2zSXCHsJt/d+1UTVkcV3Nj/9VNpQ7hPDbpjroj6X6sq/cy/HFpb0id 7ZI7kE9MVgQWlsOIQtwk0/MszcmGKkRMvL9DTnZc6iGXok2Glp9U1Wnf6jP6BmqRewVtqL JK7hijfM65klYlLJPmyKNcJ/1QIqwWMVrLd8uDVhS3FSb9z2sRy86znDYTFmHjgr6lAQCw scE5YO43vJv/sHU7eVLQxLGHC+U9QH6SpJEQmoSq6y+TtFjQL4qMBzpVeiUCJ8SMPCOaQd YtscuJQPRl1HQjXsvdNJaXE/uWhjpeKsIOo5JCZhDIvNdApdnEi+5dIHyEUW2w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=MjbTyyTd; 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 1qmxQn-0004gB-KL; Sun, 01 Oct 2023 10:28:25 -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 1qmxQm-0004g3-RT for emacs-orgmode@gnu.org; Sun, 01 Oct 2023 10:28:24 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qmxQl-0007zx-8d for emacs-orgmode@gnu.org; Sun, 01 Oct 2023 10:28:24 -0400 Received: by mail-pl1-x641.google.com with SMTP id d9443c01a7336-1c60cec8041so82374605ad.3 for ; Sun, 01 Oct 2023 07:28:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696170501; x=1696775301; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Uhbcu9UZremX4C7JYZj+gbDPtYSCs+p6sqDiAxXszcM=; b=MjbTyyTdUXIsqOUbJ+vzfaMeQ0Ro8Fre1f+aEUUR0YkQ9WH9ofuZRZLn1+fKjFRaX6 KxoT7F2x5eAx4keFEgZf5SWjOym14SFP2Y+BPvtZLwZnI2Z00qs316NrpiQG9uQBT+Qc 3kuPHC6oNi+7sm4tJa8RkX57Lri5PCCxGgyetweIxAa/yVi7LHidSkEatAjRKwgOwLco TNKarmoUOFYW8FEw85vqrnchYeDuT8AId/aLpxX2L7RMnZv3C0Aa89C8p7vr6WHdmZWb jlaHEJc3Qwo9HyQ19O/qae82JNz0jEDs5IgXsVc11yhY4vYGfcl+6Eq7n3TQDAyTrmoL i/zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696170501; x=1696775301; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Uhbcu9UZremX4C7JYZj+gbDPtYSCs+p6sqDiAxXszcM=; b=ps8xy2D03lqGRmn9pJuchkLaeYz7q1J13rPfMNlIA0SQHmkB/vPAXntdr3CjXqZqYd 2FkGgJYgoYPLMnDhRwkax2kl9H/FT/7spgxAO/J1KPIj9GYyYAaxrWKF09U0FgU/tq8+ ZzS1rsm8kFnh3kmOZ0i/2PUs0OGuyFZlOgRZGX8YuABKT49Y0yoobJyZUN8+ha5DyWd1 l5DA6ZS8/UiszoANnnwPFvEmey8D/evP7P57O/yN4LyAypM+8gQwI9hklc0vZZDnv427 dsI0nY7iW7XDctWeS/WJPpZiPfxo9EPOPIPnCMTjj5SUjRzy7rQnrxoiwDKdDsQC05IG iJEQ== X-Gm-Message-State: AOJu0YwsjLbKFNtqEZD77NayP3VCGHOCuMeknxEjUla1BPNV85c8/BCm Yn48LbJ+V+rYkhu9ulusD7k= X-Google-Smtp-Source: AGHT+IExD6UUDNNEU6BN24GkZVa/zOPKWmDiebiJbaitptgRQkq2UdT5MMK3nrJx4+SRppmjsiQCjg== X-Received: by 2002:a17:902:ed01:b0:1c6:1611:e53c with SMTP id b1-20020a170902ed0100b001c61611e53cmr6667432pld.32.1696170501175; Sun, 01 Oct 2023 07:28:21 -0700 (PDT) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id c4-20020a170902c1c400b001bf8779e051sm12095836plc.289.2023.10.01.07.28.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 07:28:20 -0700 (PDT) From: Visuwesh To: Liu Hui Cc: Ihor Radchenko , Max Nikulin , emacs-orgmode@gnu.org Subject: Re: [BUG] [PATCH] Add yank-media and DND handler [9.6.7 (9.6.7-g6eb773 @ /home/viz/lib/emacs/straight/build/org/)] In-Reply-To: (Liu Hui's message of "Fri, 29 Sep 2023 16:20:58 +0800") References: Date: Sun, 01 Oct 2023 19:58:18 +0530 Message-ID: <87il7qifi5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) 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::641; envelope-from=visuweshm@gmail.com; helo=mail-pl1-x641.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -8.51 X-Spam-Score: -8.51 X-Migadu-Queue-Id: BCA3E46518 X-TUID: y3FzxArq1Zux [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=9A=E0=AF=86= =E0=AE=AA=E0=AF=8D=E0=AE=9F=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 29= , 2023] Liu Hui wrote: > 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? Thanks for your feedback. Do you think asking during the time of drop would be a viable option too? I'm thinking of adding the defcustom org-dnd-default-method with options such as . attach -- as implemented here . open -- open file . file-link -- insert file links . ask -- ask what to do after drop I think the `ask' option would be nice to have too. Perhaps, even as the default? >> + ('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, I will go back to using rmc then. It shows a nice dialog box when you use the mouse. > Thanks for your work.