unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r107826: (url-unhex-string): Add an optional CODING-SYSTEM parameter.
       [not found] <E1SHQe0-00022o-5Z@vcs.savannah.gnu.org>
@ 2012-04-10 13:06 ` Stefan Monnier
  2012-04-10 16:52   ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2012-04-10 13:06 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: emacs-devel

> -(defun url-unhex-string (str &optional allow-newlines)
> +(defun url-unhex-string (str &optional allow-newlines coding-system)
>    "Remove %XX embedded spaces, etc in a URL.
>  If optional second argument ALLOW-NEWLINES is non-nil, then allow the
>  decoding of carriage returns and line feeds in the string, which is normally
> -forbidden in URL encoding."
> +forbidden in URL encoding.
> +If CODING-SYSTEM is non-nil, interpret the unhexed string as
> +being encoded in that coding system."
>    (setq str (or str ""))
>    (let ((tmp "")
>  	(case-fold-search t))
> @@ -331,7 +333,9 @@
>  		    (t (byte-to-string code))))
>  	      str (substring str (match-end 0)))))
>      (setq tmp (concat tmp str))
> -    tmp))
> +    (if coding-system
> +	(decode-coding-string tmp coding-system)
> +      tmp)))
 
>  (defconst url-unreserved-chars
>    '(

Actually, I'd rather not do that: it's just as easy to call
decode-coding-string manually from the caller.


        Stefan



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r107826: (url-unhex-string): Add an optional CODING-SYSTEM parameter.
  2012-04-10 13:06 ` [Emacs-diffs] /srv/bzr/emacs/trunk r107826: (url-unhex-string): Add an optional CODING-SYSTEM parameter Stefan Monnier
@ 2012-04-10 16:52   ` Lars Magne Ingebrigtsen
  2012-04-10 16:56     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-10 16:52 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Actually, I'd rather not do that: it's just as easy to call
> decode-coding-string manually from the caller.

Yeah, that's true.  I'll revert.

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r107826: (url-unhex-string): Add an optional CODING-SYSTEM parameter.
  2012-04-10 16:52   ` Lars Magne Ingebrigtsen
@ 2012-04-10 16:56     ` Lars Magne Ingebrigtsen
  2012-04-10 17:56       ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-10 16:56 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Yeah, that's true.  I'll revert.

Which reminds me.  I've looked and looked, but is there no command from
the *vc-change-log* buffer (the one you get from `C-x v l') to revert a
commit?

`r' and `R' would be the obvious keystrokes to revert (respectively) the
diff you get with `d' and `D'.

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r107826: (url-unhex-string): Add an optional CODING-SYSTEM parameter.
  2012-04-10 16:56     ` Lars Magne Ingebrigtsen
@ 2012-04-10 17:56       ` Stefan Monnier
  2012-04-10 18:04         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2012-04-10 17:56 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: emacs-devel

>> Yeah, that's true.  I'll revert.
> Which reminds me.  I've looked and looked, but is there no command from
> the *vc-change-log* buffer (the one you get from `C-x v l') to revert a
> commit?
> `r' and `R' would be the obvious keystrokes to revert (respectively) the
> diff you get with `d' and `D'.

Looks like your message got truncated or maybe you forgot to attach the
actual patch.


        Stefan ;-)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r107826: (url-unhex-string): Add an optional CODING-SYSTEM parameter.
  2012-04-10 17:56       ` Stefan Monnier
@ 2012-04-10 18:04         ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-10 18:04 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> Looks like your message got truncated or maybe you forgot to attach the
> actual patch.

*cackle*

I actually peeked at the code, and it doesn't look that difficult to do?
Unless I'm missing something, which I probably am.

One would basically call `vc-diff-internal' in the same way that
`log-view-diff-changeset' does, only synchronously, and then just pipe
the output to "patch -R"?  Probably with a prompt in between, displaying
the reversed diff and saying "go ahead or what?"

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-04-10 18:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1SHQe0-00022o-5Z@vcs.savannah.gnu.org>
2012-04-10 13:06 ` [Emacs-diffs] /srv/bzr/emacs/trunk r107826: (url-unhex-string): Add an optional CODING-SYSTEM parameter Stefan Monnier
2012-04-10 16:52   ` Lars Magne Ingebrigtsen
2012-04-10 16:56     ` Lars Magne Ingebrigtsen
2012-04-10 17:56       ` Stefan Monnier
2012-04-10 18:04         ` Lars Magne Ingebrigtsen

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).