GNU bug report logs - #22912
url-util: add url-hexify-region, url-unhex-region

Previous Next

Package: emacs;

Reported by: Ivan Shmakov <ivan <at> siamics.net>

Date: Fri, 4 Mar 2016 20:41:01 UTC

Severity: wishlist

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22912 in the body.
You can then email your comments to 22912 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#22912; Package emacs. (Fri, 04 Mar 2016 20:41:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ivan Shmakov <ivan <at> siamics.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 04 Mar 2016 20:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: submit <at> debbugs.gnu.org
Subject: url-util: add url-hexify-region, url-unhex-region 
Date: Fri, 04 Mar 2016 20:40:31 +0000
[Message part 1 (text/plain, inline)]
Package:  emacs
Severity: wishlist

	Just like there’s, say, encode-coding-region, interactive
	url-unhex-region and its inverse come handy at times.  Say, one
	may stumble upon a URI like [1], which is hardly legible without
	applying url-unhex-region first.

	Please thus consider adding functions like those MIMEd to
	url-util.el.

[1] https://ru.wikipedia.org/wiki/%D0%A4%D0%BE%D0%BD%D0%B4_%D1%81%D0%B2%D0%BE%D0%B1%D0%BE%D0%B4%D0%BD%D0%BE%D0%B3%D0%BE_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%BD%D0%BE%D0%B3%D0%BE_%D0%BE%D0%B1%D0%B5%D1%81%D0%BF%D0%B5%D1%87%D0%B5%D0%BD%D0%B8%D1%8F

-- 
FSF associate member #7257  http://am-1.org/~ivan/      … 3013 B6A0 230E 334A
[Message part 2 (text/emacs-lisp, inline)]
(defun url-hexify-region (from to &optional coding)
  "URI-encode the current region.
If the region contains multibyte characters, they are first converted to
UTF-8, or to CODING-SYSTEM if non-nil."
  (interactive "r")
  (insert (prog1
              (url-hexify-string
               (encode-coding-string
                (buffer-substring from to)
                (or coding 'utf-8)))
            (delete-region from to))))

(defun url-unhex-region (from to &optional coding)
  "URI-decode the current region.
If CODING is non-nil, use it as the coding system to decode from.
Otherwise, use UTF-8."
  (interactive "r")
  (insert (prog1
              (decode-coding-string
               (url-unhex-string
                (buffer-substring from to))
               (or coding 'utf-8))
            (delete-region from to))))

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22912; Package emacs. (Sun, 15 Apr 2018 19:54:02 GMT) Full text and rfc822 format available.

Message #8 received at 22912 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 22912 <at> debbugs.gnu.org
Subject: Re: bug#22912: url-util: add url-hexify-region, url-unhex-region
Date: Sun, 15 Apr 2018 21:52:52 +0200
Ivan Shmakov <ivan <at> siamics.net> writes:

> Package:  emacs
> Severity: wishlist
>
> 	Just like there’s, say, encode-coding-region, interactive
> 	url-unhex-region and its inverse come handy at times.  Say, one
> 	may stumble upon a URI like [1], which is hardly legible without
> 	applying url-unhex-region first.
>
> 	Please thus consider adding functions like those MIMEd to
> 	url-util.el.

There's url-unhex-string and url-hexify-string already in url-util, so
these seem superfluous.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 22912 <at> debbugs.gnu.org and Ivan Shmakov <ivan <at> siamics.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 15 Apr 2018 19:54:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 14 May 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 32 days ago.

Previous Next


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