* mm-url.el undefines variable url-request-extra-headers
@ 2005-11-22 15:47 Klaus Straubinger
2005-11-23 5:15 ` Richard M. Stallman
0 siblings, 1 reply; 3+ messages in thread
From: Klaus Straubinger @ 2005-11-22 15:47 UTC (permalink / raw)
When calling in this sequence
(require 'mm-url)
(mm-url-insert-file-contents "http://www.gnu.org/")
(url-insert-file-contents "http://www.gnu.org/")
an error occurs with the message
Symbol's value as variable is void: url-request-extra-headers
The reason of this is that mm-url-insert-file-contents calls the
function mm-url-load-url which is supposed to load the URL library.
Unfortunately, mm-url-load-url calls only (require 'url-handlers) which
does no longer load any further parts of the URL library at run time.
(require 'url-parse) is only called at compile time. Therefore, the
variable url-request-extra-headers is still not defined when it gets
temporary bound within the function mm-url-insert-file-contents where
calling url-insert-file-contents indirectly causes the calling of
(require 'url-vars). At the end of the temporary binding the variable
is unbound again, leading to the error message given above.
My suggestion is to modify the function mm-url-load-url to really load
the URL library.
--
Klaus Straubinger
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mm-url.el undefines variable url-request-extra-headers
2005-11-22 15:47 mm-url.el undefines variable url-request-extra-headers Klaus Straubinger
@ 2005-11-23 5:15 ` Richard M. Stallman
2005-11-24 13:30 ` Klaus Straubinger
0 siblings, 1 reply; 3+ messages in thread
From: Richard M. Stallman @ 2005-11-23 5:15 UTC (permalink / raw)
Cc: emacs-devel
Does this fix it?
*** mm-url.el 05 Oct 2005 17:02:14 -0400 1.11
--- mm-url.el 22 Nov 2005 22:10:47 -0500
***************
*** 276,282 ****
(defun mm-url-load-url ()
"Load `url-insert-file-contents'."
(unless (condition-case ()
! (require 'url-handlers)
(error nil))
;; w3-4.0pre0.46 or earlier version.
(require 'w3-vars)
--- 276,285 ----
(defun mm-url-load-url ()
"Load `url-insert-file-contents'."
(unless (condition-case ()
! (progn
! (require 'url-handlers)
! (require 'url-parse)
! (require 'url-vars))
(error nil))
;; w3-4.0pre0.46 or earlier version.
(require 'w3-vars)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mm-url.el undefines variable url-request-extra-headers
2005-11-23 5:15 ` Richard M. Stallman
@ 2005-11-24 13:30 ` Klaus Straubinger
0 siblings, 0 replies; 3+ messages in thread
From: Klaus Straubinger @ 2005-11-24 13:30 UTC (permalink / raw)
> *** mm-url.el 05 Oct 2005 17:02:14 -0400 1.11
> --- mm-url.el 22 Nov 2005 22:10:47 -0500
> ***************
> *** 276,282 ****
> (defun mm-url-load-url ()
> "Load `url-insert-file-contents'."
> (unless (condition-case ()
> ! (require 'url-handlers)
> (error nil))
> ;; w3-4.0pre0.46 or earlier version.
> (require 'w3-vars)
> --- 276,285 ----
> (defun mm-url-load-url ()
> "Load `url-insert-file-contents'."
> (unless (condition-case ()
> ! (progn
> ! (require 'url-handlers)
> ! (require 'url-parse)
> ! (require 'url-vars))
> (error nil))
> ;; w3-4.0pre0.46 or earlier version.
> (require 'w3-vars)
With this correction, it works.
Currently, url-parse.el contains at the beginning (require 'url-vars),
so it is not necessary to repeat it here.
--
Klaus Straubinger
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-24 13:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-22 15:47 mm-url.el undefines variable url-request-extra-headers Klaus Straubinger
2005-11-23 5:15 ` Richard M. Stallman
2005-11-24 13:30 ` Klaus Straubinger
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.