GNU bug report logs - #48657
Defvar delimiter for dired-copy-filename-as-kill

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Rodrigo Morales <moralesrodrigo1100@HIDDEN>; dated Tue, 25 May 2021 19:21:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 48657 <at> debbugs.gnu.org:


Received: (at 48657) by debbugs.gnu.org; 25 May 2021 19:44:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 25 15:44:20 2021
Received: from localhost ([127.0.0.1]:46927 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1llcyR-0006Lp-UG
	for submit <at> debbugs.gnu.org; Tue, 25 May 2021 15:44:20 -0400
Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:53196)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1llcyP-0006Lh-Hg
 for 48657 <at> debbugs.gnu.org; Tue, 25 May 2021 15:44:18 -0400
Received: from pps.filterd (m0246629.ppops.net [127.0.0.1])
 by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id
 14PJgMAn001590; Tue, 25 May 2021 19:44:16 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=from : to : subject :
 date : message-id : references : in-reply-to : content-type :
 content-transfer-encoding : mime-version; s=corp-2020-01-29;
 bh=XikFd1SvRAkECUNpSsYqPpTTGsP0TA1HaxKIrY451tQ=;
 b=JeFZfnhsTFCNPlIQRmJ0bFUCnf7NsCpqeozr6guO7SUKzlY/si0RxYz0ixHorL8yTumi
 c3A+7tiUSQUO7IQBZ2AZ/+0DHJYpw9uPH8OxKHa9+R2q5uAXqjejiFndW1cGVREjIMuN
 t/71BheRUE+p6JADF0RSr5cE4sBozTQbZvRPW+jK93aYRIC2Lwqv2tCwuWimmzMKN+Bf
 A0W96zd192yVn+i2gWgTWuT2oPJe5rxTpbSKAw7YQ3IWbLfcanezp4iPsJ74pIP0MgAk
 YX0xSqz4JbEWEo6IC5r2w3bbKSDaH4u5FQPeo70lHTVZuw2uoD8i66seanm3uwzwAtty cQ== 
Received: from oracle.com (aserp3020.oracle.com [141.146.126.70])
 by mx0b-00069f02.pphosted.com with ESMTP id 38r267rry3-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 25 May 2021 19:44:16 +0000
Received: from aserp3020.oracle.com (aserp3020.oracle.com [127.0.0.1])
 by pps.podrdrct (8.16.0.36/8.16.0.36) with SMTP id 14PJht8k110112;
 Tue, 25 May 2021 19:44:15 GMT
Received: from nam12-bn8-obe.outbound.protection.outlook.com
 (mail-bn8nam12lp2173.outbound.protection.outlook.com [104.47.55.173])
 by aserp3020.oracle.com with ESMTP id 38rehaw4ge-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 25 May 2021 19:44:15 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=ivwJ486eyGc3VD9oeOEKZj1ViwbJpzQSgoMd51gqzEhcuVkNetmvKjuGf6RSexVjuEFMhxragM2DGRBAgOTkp65BjcRhWgbhVu7X2OTGQGy7qoGP69PMEpUT6+zfT5PmehvoLgYsHcFhbdcPrufQIXunbowYAEgHN+f2HYkBoVmYO2zJMhf2EyKSQ1bXMaVLhxIdS3pOide4tvxi8c/OoLGeDhFgcrh3WZAKliuo7vgWH2xoUWosa3FhZcDApa150vSawL2EL60FzUGrn0qAcIqK/2k04DihEVkGR4zMOYUNxncrIeSAh0wJv0iXHRKCCi3G9l+KrlopgjwvP0nrbw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=XikFd1SvRAkECUNpSsYqPpTTGsP0TA1HaxKIrY451tQ=;
 b=Q/ENf2tTIrRWyi7q3EekbdUmA5a0THElHdptQ0TebVorKjNxg5EYavX58A+JvWsaJwtnxJjUwtQ50tiy50Xmw9VsCujsx/+kmj7eVNYUs0EMMfDLwWtmZJFbVTsPqCVqvkgzHLCVMcScUoIz85IA0JKAwh/5Clkw4MnGqIyG2BpekqSfdeWVpkwpiw3cdfBeSeRs+D8Ub45mDqmPr3fGvoaGgoK/UAX6YRANI2/q3x9eBirC1OLzDLrvOqP23+hesVnnFys3/d8zOE1pYlEvGoH1ZiTsyxglw/3NPLRO0pvImf8IFde1XilCQp/CvLT18QBSV77r3oXlMCTzsUyS1g==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
 dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=XikFd1SvRAkECUNpSsYqPpTTGsP0TA1HaxKIrY451tQ=;
 b=Pt5ENQsumRSi7Omrk38oelcmF6X2Obo6s4TOfeoCGD65AQnOe6U4n+hMkXBuoTijxFw9x7EUC5Bn566/Vi4Ptl4i9wr2J1FmdcoGHRdUJVv5BsN7FUxaEgQayE4CtJjciP8vnrVPRnEOPruU5RHiNfmVR/GzZGLft47F6z5SWkY=
Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15)
 by SA2PR10MB4570.namprd10.prod.outlook.com (2603:10b6:806:11e::9)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Tue, 25 May
 2021 19:44:13 +0000
Received: from SA2PR10MB4474.namprd10.prod.outlook.com
 ([fe80::2109:9725:fd4a:6494]) by SA2PR10MB4474.namprd10.prod.outlook.com
 ([fe80::2109:9725:fd4a:6494%6]) with mapi id 15.20.4150.027; Tue, 25 May 2021
 19:44:13 +0000
From: Drew Adams <drew.adams@HIDDEN>
To: Rodrigo Morales <moralesrodrigo1100@HIDDEN>, "48657 <at> debbugs.gnu.org"
 <48657 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#48657: Defvar delimiter for
 dired-copy-filename-as-kill
Thread-Topic: [External] : bug#48657: Defvar delimiter for
 dired-copy-filename-as-kill
Thread-Index: AQHXUZ5W5Au0M3Klg0qKiskkEbdvJQ==
Date: Tue, 25 May 2021 19:44:13 +0000
Message-ID: <SA2PR10MB4474A618910E52278406B5D1F3259@HIDDEN>
References: <87v97639x9.fsf@HIDDEN>
In-Reply-To: <87v97639x9.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=oracle.com;
x-originating-ip: [73.170.83.28]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 9983d649-3144-4740-03fd-08d91fb57974
x-ms-traffictypediagnostic: SA2PR10MB4570:
x-microsoft-antispam-prvs: <SA2PR10MB4570596FF41C5686BFA51254F3259@HIDDEN>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: tN14lFrGkggehakv0ePFt9XSnC8tcCeh5juPQpX/ElzAWuSB9NP5iCPcoGd66xAxERxvuXPbK7LqP6N9div3nRxZDzrdvD/KTuRGf0hrl+xJ2bHiSPRyr0yHbRcZMmEVEOihH0gY1TkB9hmvq7ue6UZbYubzOVLIl1T++nOeqBa0NliKbGUXMCXlMsWWT1WD65wUXEuY4DITosZZTTV+1QMjUhAW7i2Z4C1GyKDnnUTOcci8bTW2drGX+QFn5/uT6RCmRPcxIzs7i4D8GVLhFgo8Rv028lO9apll+W1SRvtUHxmsN9jSqmwtf9HMIzATGpIvUgVZAZEEk0RXxzMhlhP6NWDjtbVhZ+JvWfslz/mkf0L9cXe69Jz/cdddQS8mA86YOf1cqtV2X9uM8w18lI+jgqUfq4HlQYVJUSOsy8TCdjwIpc6oSIxYo9KlVx+x78qqjbL4mkOjR1v0L2HDrWT1hwQQLJDEQ9Yva1L/I8VdNuMB7Cdv6NTiSeRPzASItDupifa0VGs0xlFhZXgoGGj3akzKHih1G+ajzSFu0T9X+VX+taY23AWNfCpKMgP4jgrv6w5aLbf65UtGVxvQu1mFV51gm1Nt64WfM2CrqOw=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(346002)(136003)(396003)(376002)(366004)(39850400004)(71200400001)(122000001)(83380400001)(38100700002)(55016002)(44832011)(33656002)(186003)(52536014)(7696005)(6506007)(8676002)(26005)(76116006)(8936002)(66556008)(66946007)(64756008)(86362001)(110136005)(478600001)(5660300002)(66446008)(66476007)(316002)(9686003)(2906002);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata: =?us-ascii?Q?FwBhcc8Md5lR1ualUSmbXkSo0LiU06ftHk9CH6Rn4NDwpoVBmpNyvVE0bGW1?=
 =?us-ascii?Q?LwpG4GogfPTcbYVA7pOHhIpq4JQccoCGFdqZ9pjyBqBoAUkvwCDOJSEEBMhG?=
 =?us-ascii?Q?4kByudZJEsE5pza29Y4Lm1nvzHezqO70FyeQjLQeKQXO+fDIeuWqZO5CASCE?=
 =?us-ascii?Q?Y1QIEKJI7nFHTNPNL/NuYH9cP6NA8ieJgJbsrVOYCipt/meiWCnxVCMBkgzX?=
 =?us-ascii?Q?x0weNbuJ+n7n+lO+4fjik4qjV7br0o++xVJWIldVzDtzsWYZ6ky2iB+iDjMu?=
 =?us-ascii?Q?LdO8XhK0g5r2cBHNraxvKdWZfsT2P+Sj4CGN3sP19VLsyvRDazyk6f+dx5yB?=
 =?us-ascii?Q?pxT8ch44ALSdZ+D45gqclCQPlh1LQpXCe7mEw+D1HpA9eqA5FGo5xvdnZtXf?=
 =?us-ascii?Q?tNK2OyIzHFLmTu0o1nLIzTQElxRyNxYBpaYQzq7Y9TdoB707cbwzd7Lt2Ahw?=
 =?us-ascii?Q?rSYB1eK7UWjFF+QM5KSHQQDvYY7VbUrVqr7G4Kp/wmzOdDkym/1+McnZXR4a?=
 =?us-ascii?Q?OCNKFD11j1ska2OafF6Hy5Z+9u83V+eAjQBCJl6yKddW+V6gWqXiPFpVglot?=
 =?us-ascii?Q?gy1AW2TgyJf82Rlks/YpCFoemSwY57m0oNlmjxxYhfqA6/hZTB/k1L05nmUu?=
 =?us-ascii?Q?/AUEiChexXmV/sZVMJfSDjro2yamZSa5HhATunkzr7dyXTy7XLtJlN3gYCgF?=
 =?us-ascii?Q?Se33nw6YmLJ5RUOAx2dSfIKMytAK8BJOQfwqTaWFqwdht481ghcFha63+zaG?=
 =?us-ascii?Q?JfF4oGntZOYwJC2+TdsU6vDor2ifyD6GU67MWBzlnVg0kyRlPHOxafOpgrPk?=
 =?us-ascii?Q?L2Ckmxh81Lo4XL2M4r8TAW/9Pl0ujJsiafqyPTYg3umSjg3l7AJRaKyLw7A/?=
 =?us-ascii?Q?sC7Fquzmr9yjWIyMWvSNfGCQsi651+M342Im30EIdS+n2ISoIIZZnHdaEgJp?=
 =?us-ascii?Q?hGutZZbRUBRXSvFLspA/HsXtEEmvEahBzwxuPOkXZ2uSTmDZQQamelO32jbK?=
 =?us-ascii?Q?6A4hSMY8lOt4Dw45OzQU9C8jfyKQL2HueBBxa2X8agG9JNqGo+vgE5nDlWZd?=
 =?us-ascii?Q?XCLz++oXmjAzxOvI/A9pzMFHRrFoJKKng6tObal3RADcX289vPG83ueN9Ci3?=
 =?us-ascii?Q?qyfU27ZLNubyU/92fVRTw1LLvlFk1I8LumhWxPkkLEoyHMwU6RAttL8+pfU3?=
 =?us-ascii?Q?Wjbj1HWEV/742pz/4gEZVQiGlIw7fDKeSjQw8JBID73oOlVdiUKQAZso6r0X?=
 =?us-ascii?Q?MKnXfZqBqQ7lQN63D5NfD2/HA3+OH7jEyiVF5locq/bdqR1SmznK2z4le2nk?=
 =?us-ascii?Q?b7VP8gtT+JyMtRCb6ywdpvnb?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 9983d649-3144-4740-03fd-08d91fb57974
X-MS-Exchange-CrossTenant-originalarrivaltime: 25 May 2021 19:44:13.5977 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: vytptOqv4smgqGyIKBMOnrye+Cg5dBLNOFDhXMDo7ldOkqnoXzg9JdC/JpHokZRjO1RZjIOg0Z44r7TgvIqPKw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4570
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9995
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 spamscore=0 adultscore=0
 mlxscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 bulkscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000
 definitions=main-2105250120
X-Proofpoint-ORIG-GUID: eUs6igPpEb8jaFPk7232CindShfjoQb4
X-Proofpoint-GUID: eUs6igPpEb8jaFPk7232CindShfjoQb4
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 48657
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Because the space is used as the delimiter for the
> copied filenames, it is difficult (nearly impossible) to know the
> beginning and end of the copied filenames.
>=20
> I looked at the source code of the function and found that the space
> character is hardcoded as the delimiter (see below)....
>=20
> I thought that it would be useful to have a defvar that allows
> specifying the delimiter for copied filenames through the mentioned
> function. Perhaps, its name could be "dired-copy-filename-delimiter".

Yes.  This was reported by a Dired+ user a while back.
Dired+ fixed it this way, FWIW: Added two defvars, and
updated the command to use one as the separator and the
other to hold the text that's copied to the kill ring.

The second defvar is there so you can obtain the text
even after the kill ring is modified.  For example,
command `diredp-yank-files' uses the value of that var,
not whatever is currently at the head of the kill ring.
And `diredp-move-files-named-in-kill-ring' uses it to
move files to the current dir.

(`dired-yank-files' yanks files to a directory.  It
looks first for files via `interprogram-paste-function',
then it looks in that defvar.)
___

(defvar diredp-last-copied-filenames ()
  "String list of file names last copied to the `kill-ring'.
Copying is done by `dired-copy-filename-as-kill' and related commands.")

(defvar diredp-filename-separator (copy-sequence "\000") ; "^@"
  ;; Should contain only chars that are invalid in a file name.
  "String used to separate file names in a `kill-ring' entry.")





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48657; Package emacs. Full text available.

Message received at 48657 <at> debbugs.gnu.org:


Received: (at 48657) by debbugs.gnu.org; 25 May 2021 19:34:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 25 15:34:28 2021
Received: from localhost ([127.0.0.1]:46899 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1llcot-00065s-US
	for submit <at> debbugs.gnu.org; Tue, 25 May 2021 15:34:28 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41944)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1llcos-00065f-6g
 for 48657 <at> debbugs.gnu.org; Tue, 25 May 2021 15:34:27 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:60554)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1llcom-0000Hs-Up; Tue, 25 May 2021 15:34:20 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3244
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1llcom-000740-FQ; Tue, 25 May 2021 15:34:20 -0400
Date: Tue, 25 May 2021 22:34:18 +0300
Message-Id: <83bl8yboat.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Rodrigo Morales <moralesrodrigo1100@HIDDEN>
In-Reply-To: <87v97639x9.fsf@HIDDEN> (message from Rodrigo Morales on Tue, 
 25 May 2021 14:12:02 -0500)
Subject: Re: bug#48657: Defvar delimiter for dired-copy-filename-as-kill
References: <87v97639x9.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48657
Cc: 48657 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Rodrigo Morales <moralesrodrigo1100@HIDDEN>
> Date: Tue, 25 May 2021 14:12:02 -0500
> 
> (defun dired-copy-filename-as-kill (&optional arg)
> ...
>              (mapconcat #'identity
>                         (if arg
>                             (cond ((zerop (prefix-numeric-value arg))
>                                    (dired-get-marked-files))
>                                   ((consp arg)
>                                    (dired-get-marked-files t))
>                                   (t
>                                    (dired-get-marked-files
> 				    'no-dir (prefix-numeric-value arg))))
>                           (dired-get-marked-files 'no-dir))
>                         " ") ;; <---- [[[ Here's the hardcoded delimiter ]]]
> ...)
> #+END_SRC
> 
> I thought that it would be useful to have a defvar that allows
> specifying the delimiter for copied filenames through the mentioned
> function. Perhaps, its name could be "dired-copy-filename-delimiter".

The only sane value for a reliable delimiter is the null byte, so
maybe it doesn't make much sense to customize it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48657; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 May 2021 19:20:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 25 15:20:36 2021
Received: from localhost ([127.0.0.1]:46849 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1llcbU-0003Ut-4H
	for submit <at> debbugs.gnu.org; Tue, 25 May 2021 15:20:36 -0400
Received: from lists.gnu.org ([209.51.188.17]:41678)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <moralesrodrigo1100@HIDDEN>) id 1llcYs-0003Q5-L8
 for submit <at> debbugs.gnu.org; Tue, 25 May 2021 15:17:56 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:60236)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <moralesrodrigo1100@HIDDEN>)
 id 1llcYs-00023S-Ge
 for bug-gnu-emacs@HIDDEN; Tue, 25 May 2021 15:17:54 -0400
Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]:39868)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <moralesrodrigo1100@HIDDEN>)
 id 1llcYq-0006XG-U2
 for bug-gnu-emacs@HIDDEN; Tue, 25 May 2021 15:17:54 -0400
Received: by mail-qk1-x731.google.com with SMTP id j184so9508164qkd.6
 for <bug-gnu-emacs@HIDDEN>; Tue, 25 May 2021 12:17:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:subject:date:message-id:mime-version;
 bh=Kb5uwK8yv20Bd2h+O5rDxSKLc6q6T6aEqomnxtjopcI=;
 b=CMz0KkFtNMp1EkmqLXZjcAlsl3WZm6Z1yI6KpWLooDpRDSpyBfnNiDrlaYxnmXJUAJ
 wj03h49dkwxeEfOdSnVnaJhgCMSnD6c8WCpObyRPOcCyVpl6ANxzdTenL8LLMiWrKu6l
 eCHWsDOQ3X+OGokaOrNnpz2EHf6kP9TbzUcAlDhkrNmzYuZE1mjlmqmlkGjy3K8PqH7x
 lBBQ1oE/p/tdffo8jXLA+1L0cGVy7+fqWW7jGBqFLZ6MU+RWJYuWwEg9XyjG9MjoGfgD
 JViOJ7e7uabyOSvLEAiIcKQ9mfsEdfCySyzu30PXkhGhddN7iOYkf3MjoozuM+wrpBWz
 wwsA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=Kb5uwK8yv20Bd2h+O5rDxSKLc6q6T6aEqomnxtjopcI=;
 b=nr50Tvg8e42zo97QgledFjQ0zTmDiSPjSvKev1t49AQ8/isstDS+AvTeCqkGve3eNB
 7ILPU7QQLVXsrN/jK95QJ0yGt0kWJxIfwrUtjverh2RvJvqTOOjr8fNYswrkoar/gO+l
 pEkIQppl8JoJzQpoZNQCEvUuf0dJJTICS0G+l13UTtcmsQrpwbr4alpq8s6i53J0gmW8
 fJ5CY51VeJWxhf2fwq59Kaks91rA1/u2a/Kjj8hCivVBtvCbFnc1kzGVv1ED1Fwf+Dnd
 Up9VBeT/a4zgyhFT5eStEfMQ9zMEnzC6P7/10J7n0ioXwtPmIvi9fsLeERHyopB+wNPa
 rEeA==
X-Gm-Message-State: AOAM533ljKn7QzafQX+O8a/D44ALBZxxNxpQY7vlEl/nV4V60DGfKrmf
 Z7jMEG8sRftrOF/GbviYXCdU5/TuubBMWA==
X-Google-Smtp-Source: ABdhPJywZJOmWYIrEbIBdOwCbtJIXWdJj/hfpCNzRjcpztYt3GIIjo94aXNEIOB6yJcWxkonIfcKfA==
X-Received: by 2002:a37:a683:: with SMTP id
 p125mr35600291qke.332.1621970271033; 
 Tue, 25 May 2021 12:17:51 -0700 (PDT)
Received: from r1 ([190.239.232.58])
 by smtp.gmail.com with ESMTPSA id m4sm73001qtg.21.2021.05.25.12.17.49
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 25 May 2021 12:17:50 -0700 (PDT)
From: Rodrigo Morales <moralesrodrigo1100@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Defvar delimiter for dired-copy-filename-as-kill
Date: Tue, 25 May 2021 14:12:02 -0500
Message-ID: <87v97639x9.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2607:f8b0:4864:20::731;
 envelope-from=moralesrodrigo1100@HIDDEN; helo=mail-qk1-x731.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-Spam-Score: -1.1 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 25 May 2021 15:20:35 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)


I regularly use "dired-copy-filename-as-kill" (by default, it is mapped
to " w") for inserting filenames to the kill ring when being in a dired
buffer.

I'm having the following issue when interacting with filenames that
contain spaces: Because the space is used as the delimiter for the
copied filenames, it is difficult (nearly impossible) to know the
beginning and end of the copied filenames.

I looked at the source code of the function and found that the space
character is hardcoded as the delimiter (see below).

#+BEGIN_SRC emacs-lisp
(defun dired-copy-filename-as-kill (&optional arg)
...
             (mapconcat #'identity
                        (if arg
                            (cond ((zerop (prefix-numeric-value arg))
                                   (dired-get-marked-files))
                                  ((consp arg)
                                   (dired-get-marked-files t))
                                  (t
                                   (dired-get-marked-files
				    'no-dir (prefix-numeric-value arg))))
                          (dired-get-marked-files 'no-dir))
                        " ") ;; <---- [[[ Here's the hardcoded delimiter ]]]
...)
#+END_SRC

I thought that it would be useful to have a defvar that allows
specifying the delimiter for copied filenames through the mentioned
function. Perhaps, its name could be "dired-copy-filename-delimiter".

P.S. This is my first time interacting with this mailing list; forgive
me if I did something wrong.




Acknowledgement sent to Rodrigo Morales <moralesrodrigo1100@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#48657; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 25 May 2021 20:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.