From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rodrigo Morales Newsgroups: gmane.emacs.bugs Subject: bug#48657: Defvar delimiter for dired-copy-filename-as-kill Date: Tue, 25 May 2021 14:12:02 -0500 Message-ID: <87v97639x9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38143"; mail-complaints-to="usenet@ciao.gmane.io" To: 48657@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 25 21:21:14 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llcc5-0009lW-Vu for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 May 2021 21:21:13 +0200 Original-Received: from localhost ([::1]:55114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llcc5-0002x7-1z for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 May 2021 15:21:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llcby-0002wv-9z for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 15:21:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35303) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llcbu-0000Ge-Hr for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 15:21:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1llcbu-0003Vw-DY for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 15:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rodrigo Morales Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 May 2021 19:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48657 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162197043613451 (code B ref -1); Tue, 25 May 2021 19:21:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 May 2021 19:20:36 +0000 Original-Received: from localhost ([127.0.0.1]:46849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llcbU-0003Ut-4H for submit@debbugs.gnu.org; Tue, 25 May 2021 15:20:36 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:41678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llcYs-0003Q5-L8 for submit@debbugs.gnu.org; Tue, 25 May 2021 15:17:56 -0400 Original-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 ) id 1llcYs-00023S-Ge for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 15:17:54 -0400 Original-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 ) id 1llcYq-0006XG-U2 for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 15:17:54 -0400 Original-Received: by mail-qk1-x731.google.com with SMTP id j184so9508164qkd.6 for ; 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) Original-Received: from r1 ([190.239.232.58]) by smtp.gmail.com with ESMTPSA id m4sm73001qtg.21.2021.05.25.12.17.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 May 2021 12:17:50 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::731; envelope-from=moralesrodrigo1100@gmail.com; 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-Mailman-Approved-At: Tue, 25 May 2021 15:20:35 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:207237 Archived-At: 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.