[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bongo-devel] Re: Missing x-get-selection, m3u wish
From: |
Dieter Deyke |
Subject: |
Re: [bongo-devel] Re: Missing x-get-selection, m3u wish |
Date: |
Sun, 04 Feb 2007 09:03:28 -0700 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (windows-nt) |
Daniel Brockman <address@hidden> writes:
> Dieter Deyke <address@hidden> writes:
>
>> address@hidden (Daniel Jensen) writes:
>>
>>> Dieter Deyke <address@hidden> writes:
>>>
>>>> I am trying to use bongo-insert-uri on my emacs running natively on
>>>> Windows XP, but do get a missing function error for x-get-selection.
>>>> Could it be that the code using it is X windows specific?
>>>
>>> I think I found the bug, but I cannot test it myself. On MS Windows,
>>> x-get-selection is redefined, but x-get-clipboard is not. Does this
>>> patch fix the problem for you?
>>>
>>> --- bongo-old/bongo.el 2007-01-15 14:15:44.000000000 +0100
>>> +++ bongo-new/bongo.el 2007-02-03 11:53:21.000000000 +0100
>>> @@ -6171,7 +6171,7 @@
>>> (let ((primary (x-get-selection)))
>>> (and (bongo-uri-p primary) primary)))
>>> (and (x-selection-exists-p 'CLIPBOARD)
>>> - (let ((clipboard (x-get-clipboard)))
>>> + (let ((clipboard (x-get-selection 'CLIPBOARD)))
>>> (and (bongo-uri-p clipboard) clipboard)))))
>>> (uri
>>> (read-string (concat "Insert URI"
>>>
>
> [...]
>
>> The patch now generates a different error:
>>
>> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>>
>> string-match("\\(?:\\`\\([a-zA-Z]\\(?:\\(?:address@hidden&!*\"'(),]\\)\\|\\(?:%[[:xdigit:]]\\{2\\}\\)\\)+\\):\\)"
>> nil)
>> (if (string-match (eval-when-compile ...) file-name) (progn (match-string
>> 1 file-name)))
>> (when (string-match (eval-when-compile ...) file-name) (match-string 1
>> file-name))
>> bongo-uri-scheme(nil)
>> (null (bongo-uri-scheme file-name))
>> (not (null (bongo-uri-scheme file-name)))
>> bongo-uri-p(nil)
>> (and (bongo-uri-p clipboard) clipboard)
>
> [...]
>
> Thank you. I have installed the following patch:
>
> diff -rN -u old-bongo/bongo.el new-bongo/bongo.el
> --- old-bongo/bongo.el 2007-02-03 19:15:30.000000000 +0100
> +++ new-bongo/bongo.el 2007-02-03 19:15:30.000000000 +0100
> @@ -1771,8 +1771,9 @@
> (match-string 1 file-name)))
>
> (defun bongo-uri-p (file-name)
> - "Return non-nil if FILE-NAME is a URI."
> - (not (null (bongo-uri-scheme file-name))))
> + "Return non-nil if FILE-NAME is a URI.
> +As a special case, return nil if FILE-NAME is nil."
> + (and file-name (not (null (bongo-uri-scheme file-name)))))
>
> (defun bongo-unescape-uri (uri)
> "Replace all occurences of `%HH' in URI by the character HH."
> @@ -6192,7 +6193,9 @@
> (let ((primary (x-get-selection)))
> (and (bongo-uri-p primary) primary)))
> (and (x-selection-exists-p 'CLIPBOARD)
> - (let ((clipboard (x-get-clipboard)))
> + (let ((clipboard (if (fboundp 'x-get-clipboard)
> + (x-get-clipboard)
> + (x-get-selection 'CLIPBOARD))))
> (and (bongo-uri-p clipboard) clipboard)))))
> (uri
> (read-string (concat "Insert URI"
>
> Please verify that this fixes your problem.
>
> --
> Daniel Brockman <address@hidden>
Sorry, but this patch results in showing the original error:
Debugger entered--Lisp error: (void-function x-get-selection-internal)
x-get-selection-internal(CLIPBOARD STRING)
x-get-clipboard()
(if (fboundp (quote x-get-clipboard)) (x-get-clipboard) (x-get-selection
(quote CLIPBOARD)))
(let ((clipboard ...)) (and (bongo-uri-p clipboard) clipboard))
(and (x-selection-exists-p (quote CLIPBOARD)) (let (...) (and ... clipboard)))
(or (and (x-selection-exists-p) (let ... ...)) (and (x-selection-exists-p
...) (let ... ...)))
(let* ((default-uri ...) (uri ...) (title ...)) (list uri title))
call-interactively(bongo-insert-uri)
x-get-clipboard is defined in select.el as:
(defun x-get-clipboard ()
"Return text pasted to the clipboard."
(x-get-selection-internal 'CLIPBOARD 'STRING))
but I cannot find a definition of x-get-selection-internal. This
might be an emacs error, not a bongo error, but I do not know how to
reproduce it without bongo.
--
Dieter Deyke
mailto:address@hidden mailto:address@hidden mailto:address@hidden
Vs lbh pna ernq guvf, lbh unir jnl gbb zhpu gvzr.
- [bongo-devel] Missing x-get-selection, m3u wish, Dieter Deyke, 2007/02/02
- [bongo-devel] Re: Missing x-get-selection, m3u wish, Dieter Deyke, 2007/02/02
- [bongo-devel] Re: Missing x-get-selection, m3u wish, Daniel Jensen, 2007/02/03
- [bongo-devel] Re: Missing x-get-selection, m3u wish, Dieter Deyke, 2007/02/03
- Re: [bongo-devel] Re: Missing x-get-selection, m3u wish, Daniel Brockman, 2007/02/03
- Re: [bongo-devel] Re: Missing x-get-selection, m3u wish,
Dieter Deyke <=
- Re: [bongo-devel] Re: Missing x-get-selection, m3u wish, Daniel Brockman, 2007/02/04
- Re: [bongo-devel] Re: Missing x-get-selection, m3u wish, Dieter Deyke, 2007/02/04
- Re: [bongo-devel] Re: Missing x-get-selection, m3u wish, Daniel Brockman, 2007/02/04
- [bongo-devel] Re: Missing x-get-selection, m3u wish, Daniel Jensen, 2007/02/05
- Re: [bongo-devel] Re: Missing x-get-selection, m3u wish, Daniel Brockman, 2007/02/05
- [bongo-devel] Re: Missing x-get-selection, m3u wish, Dieter Deyke, 2007/02/05
- Re: [bongo-devel] Re: Missing x-get-selection, m3u wish, Daniel Brockman, 2007/02/05
- Re: [bongo-devel] Re: Missing x-get-selection, m3u wish, Dieter Deyke, 2007/02/05
- [bongo-devel] Re: Missing x-get-selection, m3u wish, Dieter Deyke, 2007/02/05
- [bongo-devel] Re: Missing x-get-selection, m3u wish, Daniel Jensen, 2007/02/05