From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Leo <sdl.web@gmail.com>
Cc: 7680@debbugs.gnu.org
Subject: bug#7680: 23.2.91; [PATCH] dnd-get-local-file-name bug
Date: Mon, 20 Dec 2010 08:07:55 +0100 [thread overview]
Message-ID: <4D0F00CB.1090301@swipnet.se> (raw)
In-Reply-To: <m1pqsxsv3n.fsf@cam.ac.uk>
To conform to the policy in
http://lists.gnu.org/archive/html/emacs-devel/2006-05/msg01060.html we should
also decode it with the file name coding system when must-exist is nil.
AFAIK, dnd-get-local-file-name is only called with must-exist t.
Jan D.
Leo skrev 2010-12-19 15.19:
>
> I just noticed the return value of dnd-get-local-file-name may contain
> %20 etc. The patch fixes this.
>
> commit 8d987eb074d6ff8282ce3fdc19f00cdb82fdfa28 (HEAD, refs/heads/leo-main)
> Date: Sun Dec 19 14:12:55 2010 +0000
>
> Unhex file name should always be performed
>
> in dnd-get-local-file-name.
> ---
> lisp/dnd.el | 14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)
>
> Modified lisp/dnd.el
> diff --git a/lisp/dnd.el b/lisp/dnd.el
> index aadfad6..e6e3190 100644
> --- a/lisp/dnd.el
> +++ b/lisp/dnd.el
> @@ -143,14 +143,14 @@ Return nil if URI is not a local file."
> (substring uri (1- (match-end 0))))
> ((string-match "^file:" uri) ; Old KDE, Motif, Sun
> (substring uri (match-end 0))))))
> + (and f (setq f (replace-regexp-in-string
> + "%[A-Fa-f0-9][A-Fa-f0-9]"
> + (lambda (arg)
> + (let ((str (make-string 1 0)))
> + (aset str 0 (string-to-number (substring arg 1) 16))
> + str))
> + f t t)))
> (when (and f must-exist)
> - (setq f (replace-regexp-in-string
> - "%[A-Fa-f0-9][A-Fa-f0-9]"
> - (lambda (arg)
> - (let ((str (make-string 1 0)))
> - (aset str 0 (string-to-number (substring arg 1) 16))
> - str))
> - f t t))
> (let* ((decoded-f (decode-coding-string
> f
> (or file-name-coding-system
>
>
>
next prev parent reply other threads:[~2010-12-20 7:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-19 14:19 bug#7680: 23.2.91; [PATCH] dnd-get-local-file-name bug Leo
2010-12-20 7:07 ` Jan Djärv [this message]
2010-12-20 8:56 ` Leo
2010-12-20 20:11 ` Jan Djärv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D0F00CB.1090301@swipnet.se \
--to=jan.h.d@swipnet.se \
--cc=7680@debbugs.gnu.org \
--cc=sdl.web@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).