From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 mHPPEOzfI2XrYgEA9RJhRA:P1 (envelope-from ) for ; Mon, 09 Oct 2023 13:11:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mHPPEOzfI2XrYgEA9RJhRA (envelope-from ) for ; Mon, 09 Oct 2023 13:11:40 +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 F0FF25813F for ; Mon, 9 Oct 2023 13:11:39 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=iXMmA2rq; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1696849900; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=3MntLaL/Mgo17o2RHlJaQiAsVrFT89jxLHNxBeNDccI=; b=dMLk/W/oH5nKSLGhE5FKaHGv/+68k5+gyTCWUoM/9qf8Oy534pBDBF8REtRcjq6zlMMLp0 0E7kJ0VFH9VK9VwL1fTHzRb/dFr+y54aQvMvYR0Wdi9iFCW7I5rp7JAyZldm7K/QVgGche PT1DtKii/Y3r2W+p21rCwNEV2VKchvRfTVRoGdlbcmbd4yi3HxL0UHXtt+8xTguH0TKfTV nsRwBd0Tmw78jpTWGjFRTXmtH3kbOxhEhwnY8m8QUJLqgsJb8apNXeshGCeMNFWxBLO0uD ttUGWNCo86k9CXY1altLtMhnym7BwpLPQpDlD5ipCmFfwXXZi3qiNDqbUVgyEQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=iXMmA2rq; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696849900; a=rsa-sha256; cv=none; b=KSqM1yPCdJpYZLY7pxpQKsG6Bn3EDlFtAv8X8rOcYQwbHTz1TjWeLKOsW6so+XjH9UzToJ 33hVp6vshn6gCKi82/UkExNihQCdA9mWyboM44jub28Q0FwEwNalL9gLv+kecL4UoLl0cU dYQPAyzMdS8WLDhtKPxUxJ//Cf6JBdf/lFHSQSR35L/RVaDvYES3BcOGc/AuU5XYs8vyeV JoZYMf/ZbDRXg/lEggK+VWrF8D2wnAwvww5qF4cRILux+UN6rNUKuY8GahPXV74WU8X7E2 A767munssherZ94FZL5RMab4KKnLdI29yEswUUKA8RnHennS3jVKBwn8yXYJdg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpo9q-0007Et-VU; Mon, 09 Oct 2023 07:10:43 -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 1qpo9g-0007EG-VX for emacs-orgmode@gnu.org; Mon, 09 Oct 2023 07:10:33 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpo9e-0005hL-GG for emacs-orgmode@gnu.org; Mon, 09 Oct 2023 07:10:32 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 60549240027 for ; Mon, 9 Oct 2023 13:10:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1696849827; bh=zveSwEL15HdbzPiWVs7KjdtMtfWIzQ3wg1hgnVjGG5A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=iXMmA2rqAEfJbXqrx2KXkN7OXAhZR3X5UEzjS32PBo1ia4GM7iJx+zK7QBOrpRN9I BUyY5s+wLkP4Wsz7oc+xiXScBqDfP4v2VTRWuCWueYxtzkqv6aZY3uBiZDuw/FU4+o Eg1OmqTtiNb2JPfGwTbKfl3gDHIE125+MSp4bVSRgyiqVYbfyP62ECAMfQVCKBcUpj 9E4Vuf4eSxzXJwVmO3b548Pvx5I08awEbtlLk25O1k6gERikXN90KHwy0/i94KEK8s HpnfALhFBfr7OUDQadp/YXqqaG1FM1CFyXP+7cjpoUTiGLNK7PuLDGp72bTHU8PXIh 4wr7L5hDwlyBg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4S3xCQ5yfsz6tym; Mon, 9 Oct 2023 13:10:26 +0200 (CEST) From: Ihor Radchenko To: Visuwesh Cc: 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: <87v8bhpdg8.fsf@gmail.com> References: <87jzsintv0.fsf@gmail.com> <87lecx2nff.fsf@localhost> <87bkdsomm2.fsf@gmail.com> <87a5tamm3j.fsf@gmail.com> <877cnyzlda.fsf@localhost> <87a5sur51r.fsf@gmail.com> <875y3ir0lu.fsf@gmail.com> <87ttr1pild.fsf@localhost> <87v8bhpdg8.fsf@gmail.com> Date: Mon, 09 Oct 2023 11:12:05 +0000 Message-ID: <87edi4m4my.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-Migadu-Queue-Id: F0FF25813F X-Spam-Score: -8.71 X-Migadu-Spam-Score: -8.71 X-Migadu-Scanner: mx1.migadu.com X-TUID: nrez51bLayVN Thanks! > +(defun org--dnd-attach-file (url action) > ... > + (insert > + (org-link-make-string > + (concat (if separatep > + "file:" > + "attachment:") > + (if separatep > + (expand-file-name (file-name-nondirectory filename) > + org-yank-image-save-type) > + (file-name-nondirectory filename)))) > + "\n") > + 'private)) > + (pcase org--dnd-xds-method > + (`attach (insert (org-link-make-string > + (concat "attachment:" (file-name-nondirectory filename))) > + (`file-link (insert (org-link-make-string (concat "file:" filename)) > + "\n")) Is there any particular reason why you insert a newline after the image link? Also, we might want to add a subsection describing the new customization to 17 Miscellaneous section of the manual. Otherwise, users might have difficulties discovering relevant settings to customize dnd and yank behavior. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at