From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SGoKAixhkmF8TQAAgWs5BA (envelope-from ) for ; Mon, 15 Nov 2021 14:31:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id kGlKOSthkmGKGAAAB5/wlQ (envelope-from ) for ; Mon, 15 Nov 2021 13:31:23 +0000 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 E419C2A64A for ; Mon, 15 Nov 2021 14:31:22 +0100 (CET) Received: from localhost ([::1]:42248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmc4u-0003j1-P1 for larch@yhetil.org; Mon, 15 Nov 2021 08:31:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmc2p-0003gw-Cl for emacs-orgmode@gnu.org; Mon, 15 Nov 2021 08:29:13 -0500 Received: from [2607:f8b0:4864:20::f30] (port=38783 helo=mail-qv1-xf30.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmc2m-0002YT-Dp for emacs-orgmode@gnu.org; Mon, 15 Nov 2021 08:29:11 -0500 Received: by mail-qv1-xf30.google.com with SMTP id a24so11282075qvb.5 for ; Mon, 15 Nov 2021 05:29:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=fC1QUrNqZNDLo/z7ayGoBfXi6NGxA6C9MMDJ5KjxjOM=; b=j3S5224ThcB3L3pZR+hJoCJ7X/oyqXDh5ivrwbBx3CBwuc6L0MFwXp3x3m4n4TAbK+ s1In+6MdNlptTknrbbaqx4c0rOAsl5l4OExzc2DMuVw81pq63D8AUlBZBAU99pnluNXr UT6C/ELCixH/QUIjF+OH+iiqz/h0jmQv6fHUrGJy6AvVD4Cf2ijt0NThq0CKT6xZyQvz c7vqMzQDzt30NreCy7oBcYRtGGz8GoSfueIRAouU2fjP5JoxiR0I7s8kdbKJXhAJy+6V bmP/aTZhWXkTNHy+euAxk+qzBH+jHI6wDcdIFeM+4Sj4v9tDihSbz7V28i3touCFb6Wi Ofew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=fC1QUrNqZNDLo/z7ayGoBfXi6NGxA6C9MMDJ5KjxjOM=; b=SDc7yM7FdXf7J6lXGbsJvK5BOgadGxsn+UXxVTJukIxve/lNuwDSZO5AO0em401nHk CDQup3hfg7w2JKFRjvx+XotqWySnYLHfZ12Nbd4uEes1VS0jUzuDyRT6aQDSlSihk+JC IZFQe6qQu00MrdmOg/1O+TIv9fRP0j6ypZn7q1+tobko+5reTXtazwHjAZV1GkAAFQEY TMBnhKh3ACy+DqkmoJDRQG3TgSlkPZ6h8pZ+cGu5Nih99B8ngspi6CMJ4ltthrJIhPca UWtmV1edaG3z5aP03XENDA+V02lPXQIMe4gRjd+YlM2wtP/o4uAlKKUXq1uHwbTp4dOq ZaNA== X-Gm-Message-State: AOAM533w/c2nyAn6w0rcXO8281qvDtUi3KRAJj1RNBUdxrOCRmiEi30S xmVBmPgtYaPRgGCzdSiuA2xt6LiSmJtERnn+KLPFuYJCibTbDQ== X-Google-Smtp-Source: ABdhPJyXtR1BsXZCatmT9BZR4d+GCGiKoT3e666aCIN6l1eyiK8IHJsYQSPYDxnAqpVwx7KSLni2KHE7HntHW++OE58= X-Received: by 2002:a05:6102:370:: with SMTP id f16mr10404621vsa.33.1636982586372; Mon, 15 Nov 2021 05:23:06 -0800 (PST) MIME-Version: 1.0 From: Matt Price Date: Mon, 15 Nov 2021 08:22:55 -0500 Message-ID: Subject: [PATCH] org-attach-attach: fix symlinks To: Org Mode Content-Type: multipart/mixed; boundary="00000000000090835705d0d3b5bd" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::f30 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::f30; envelope-from=moptop99@gmail.com; helo=mail-qv1-xf30.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636983082; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=z1BgXrh9iUWnVVGXw7XTapDFvbeoQN5Xmm4Fb4joz8I=; b=dj/LEkjajlCKMXB1pW+4Wi+9Pk3Rt2x1t5wRQmdaYBv/9exFO4q+mTBbgZU7sghsSzXluD HnGMkW58l2F/PkGTtnZYLMCmdIGoI1+tMeTLhKEN6DK/EtE/ORB7/O+tn7bFvBrVovih1e Ha42i8+2q8cYlkKZc3xhlPDKGdX+EkwVaftB5X+5SwBCUCLX6SHf/oaax0bPaxg9qThxXd 5N68k47ekrQ/TBFHU6HYdEzdP1zz4j/pRzVnd/nMCFntQHj5AnzO8fsw2wGaMu1DqMzRnv 6sBYY7cbLHMjXTq12BZKov63DqpYqWevT64rYIDa49w+mCKIQ1w7n+b5/HsW0A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636983082; a=rsa-sha256; cv=none; b=g1Wy6R67gJ1rDKGXYT9uTKAze5jvvQGPi5fwaCyQUcZ/zHU+8IlzjPzPOtHwsfRTyh7T7M 7ZlxYMW7MW72byjnY/djgdmc5OFvFbcWhmOP6bnt6nHQu6wFDR8uUk5N338Lv6SEkSKLNd lEdB7VLhKvHIdmAqIY5RD3qzdt/JZS3URBsqhLiHOR0nmSdD2avJmAwxOTq2zjs40g7r1Z +b4GUtn+KBcu6/R07izvPZw2fxJ3xpozjmI3YKDzdtTUX/LL8YYCf2eg3jHybfs/wQRaUz j7cm9/hwQOqcefImiV3xsSVWh4Tai3r2RwnjHsfgjAtenInPIU5hlA54Uvn1IQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=j3S5224T; 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: -0.74 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=j3S5224T; 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: E419C2A64A X-Spam-Score: -0.74 X-Migadu-Scanner: scn0.migadu.com X-TUID: KmnUKbWKnCQu --00000000000090835705d0d3b5bd Content-Type: multipart/alternative; boundary="00000000000090835505d0d3b5bb" --00000000000090835505d0d3b5bb Content-Type: text/plain; charset="UTF-8" I'm having trouble with org-attach-attach if my current buffer is visiting a filepath starting with "~/". This trivial patch fixes the problem for me by running (expand-file-name) on the file before attaching. I always use the 'lns method, so I don't know whether it might be better to expand-file-name before running any of the methods. Alternatively, it might actually be better to use a *relative* file path where possible (e.g. to ensure that project directories are fully portable), but I'm not sure how best to do that. This should be a tinychange, but also I have signed FSF paperwork. --00000000000090835505d0d3b5bb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm having trouble with org-attach-attach if my c= urrent buffer is visiting a filepath starting with "~/". This tri= vial patch fixes the problem for me by running (expand-file-name) on the fi= le before attaching. I always use the 'lns method, so I don't know = whether it might be better to expand-file-name before running any of the me= thods.

Alternatively, it might actually be be= tter to use a *relative* file path where possible (e.g. to ensure that proj= ect directories are fully portable), but I'm=C2=A0 not sure how best to= do that.=C2=A0

This should be a tinychange, but a= lso I have signed FSF paperwork.
--00000000000090835505d0d3b5bb-- --00000000000090835705d0d3b5bd Content-Type: text/x-patch; charset="US-ASCII"; name="0001-org-attach-attach-expand-file-names-before-linking.patch" Content-Disposition: attachment; filename="0001-org-attach-attach-expand-file-names-before-linking.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kw0p5ne70 RnJvbSBmNjE4ZmI1MTJlNjJjY2IyZTcwMDI0MmE3Njc4ZGFjYmMyYjAyNWUyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXR0IFByaWNlIDxtYXR0LnByaWNlQHV0b3JvbnRvLmNhPgpE YXRlOiBNb24sIDE1IE5vdiAyMDI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