tag:blogger.com,1999:blog-12753102.post8008560883841792141..comments2024-03-28T15:41:37.170-04:00Comments on Ben's Journal: Handy Emacs Function: url-decode-regionBen Simonhttp://www.blogger.com/profile/09833753747177544979noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-12753102.post-53360400968474566592013-06-27T00:22:20.310-04:002013-06-27T00:22:20.310-04:00nice! saved me a tonne of time updating some urls ...nice! saved me a tonne of time updating some urls that i did not encode properlyDarrell Dupashttps://www.blogger.com/profile/03924378025803010337noreply@blogger.comtag:blogger.com,1999:blog-12753102.post-73605569856478671292012-05-31T14:09:11.615-04:002012-05-31T14:09:11.615-04:00Thank you!Thank you!Iannoreply@blogger.comtag:blogger.com,1999:blog-12753102.post-3063319798661009652011-10-07T17:49:45.463-04:002011-10-07T17:49:45.463-04:00Thank you, although I added a second parameter of ...Thank you, although I added a second parameter of t to url-unhex-string so it would handle newlines.<br /><br />And here is the inverse function:<br /><br />(defun url-encode-region (start end)<br /> "Replace a region with the same contents, only URL encoded."<br /> (interactive "r")<br /> (let ((text (url-hexify-string (buffer-substring start end))))<br /> (delete-region start end)<br /> (insert text)))Jerryhttps://www.blogger.com/profile/17900153415330101220noreply@blogger.com