Me Myself and I | 6 Oct 12:36
Picon
Gravatar

Question about using w3c browser inside emacs.

I have gone ./configure; make; make install;

successfully with the w3c sourcecode publicised on the git server.

I try M -x url-

And it seems to halt at "making completion list...".

Admittedly, I needed a copy of url-vars.el

from the internet.

-Has this created a buggy configuration?  Where, url or otherwise,
can I find a recommended url-vars.el file?

-What M - x commands do I type from emacs to start browsing
in a new buffer (window)?  What are my options with w3c ?
_______________________________________________
W3-dev mailing list
W3-dev <at> gnu.org
https://lists.gnu.org/mailman/listinfo/w3-dev
Picon

[patch #7546] MacOS X w3 crashes on startup

URL:
  <http://savannah.gnu.org/patch/?7546>

                 Summary: MacOS X w3 crashes on startup
                 Project: w3
            Submitted by: devon
            Submitted on: Fri 27 May 2011 06:06:32 PM GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Here's the fix

--- w3-git-2011e-May-26-Thu/lisp/font.el	2011-05-26 15:31:52.000000000 -0400
+++ w3/lisp/font.el	2011-05-27 13:07:30.000000000 -0400
@@ -79,6 +79,7 @@
     (mswindows . (mswindows-font-create-name mswindows-font-create-object))
     (win32    . (x-font-create-name x-font-create-object))
     (w32      . (x-font-create-name x-font-create-object))
+    (ns        . (x-font-create-name x-font-create-object)) ; NextStep, MacOS
X
     (pm       . (x-font-create-name x-font-create-object)) ; Change? FIXME
     (tty      . (tty-font-create-plist tty-font-create-object)))
   "Alist mapping device types to functions.
@@ -430,7 +431,7 @@
       ;(weight		"\\(bold\\|demibold\\|medium\\|black\\)")
       (weight\?		"\\([^-]*\\)")
       ;(slant		"\\([ior]\\)")
-      (slant\?		"\\([^-]?\\)")
+      (slant\?		"\\([^-]*\\)")
       (swidth		"\\([^-]*\\)")
       (adstyle		"\\([^-]*\\)")
       (pixelsize	"\\(\\*\\|[0-9]+\\)")

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?7546>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/
Magnus Henoch | 13 Jul 11:54
Picon

[bug #30428] Crash when viewing any page on nextstep


URL:
  <http://savannah.gnu.org/bugs/?30428>

                 Summary: Crash when viewing any page on nextstep
                 Project: w3
            Submitted by: legoscia
            Submitted on: Tue Jul 13 11:54:53 2010
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: legoscia
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

In the nextstep port of emacs (e.g. on Mac OS X), font.el crashes with
"font-default-size-for-device: Wrong type argument: arrayp, nil" when trying
to display any page.  This is because 'ns is an unknown device type.

The attached patch makes this problem go away; however the text is insanely
big. The proper solution is probably more involved.

    _______________________________________________________

File Attachments:

-------------------------------------------------------
Date: Tue Jul 13 11:54:53 2010  Name: font.el.diff  Size: 581B   By: legoscia
Treat nextstep fonts as X fonts
<http://savannah.gnu.org/bugs/download.php?file_id=20952>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?30428>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/
Colin Williams | 25 Nov 16:53
Picon

Default size of header tags

Currently h1 is smaller than the normal text on the page, which is
more certainly incorrect.  There are suggested default values in
appendix D of the css 2 spec (http://www.w3.org/TR/CSS21/sample.html),
which seem to work much better for h1-h6:

           }

 @media multifont {
-      h1  { font-size : +12pt }
-      h2  { font-size : +6pt  }
-      h3  { font-size : +4pt  }
-      h5  { font-size : -2pt  }
-      h6  { font-size : -4pt  }
+      h1  { font-size : 2em; margin: .67em 0 }
+      h2  { font-size : 1.5em; margin: .75em 0 }
+      h3  { font-size : 1.17em; margin: .83em 0 }
+      h5  { font-size : .83em; margin: 1.5em 0 }
+      h6  { font-size : .67em; margin: 1.67em 0 }
 }

 /* This causes problems with Emacs 19 */
Colin Williams | 25 Nov 16:47
Picon

List Item Margins

Back in July, I submitted a bug fix to address the fact that the
margin preceding list items is converting pixel width to a space each.
 The fix I proposed at the time was far too aggressive, so I am
proposing an alternate solution:

@@ -624,7 +624,7 @@ If the face already exists, it is unmodified."
 	     (beginning-of-line)
 	     (case list-style
 	       ((disc circle square)
-		(insert (format (format "%%%dc" margin)
+		(insert (format (format "%%%dc" (/ margin (frame-char-width)))
 				(or (cdr-safe (assq list-style w3-bullets))
 				    ?o))))
 	       ((decimal lower-roman upper-roman lower-alpha upper-alpha)
Stephen Henry | 15 Nov 22:29
Picon

Wrong type argument: arrayp, nil

Hi, 


I've downloaded the latest revision in the git repo and I'm having some difficulty getting w3 to run on emacs 23.1.1 (on Mac OS X). When I attempt to run it, it terminates prematurely with the error "Wrong type argument: arrayp, nil"

I've attached the backtrace. It looks that w3 is breaking at the point where it is attempting to set the default font size. It appears that the 'device' variable is nil. I'm maybe doing something wrong, but it'd be good to know how to fix it.

Kind regards,

Stephen
Attachment (backtrace): application/octet-stream, 18 KiB
_______________________________________________
W3-dev mailing list
W3-dev <at> gnu.org
http://lists.gnu.org/mailman/listinfo/w3-dev
Colin Williams | 21 Jul 04:05
Picon

Suggest change to css-expand-length

I don't think this is exactly correct, but I think it will work better than what's there.

((string-match "\\([+-]?\\([0-9]+\\|[0-9]*\\.[0-9]+\\)\\)e[mx]" spec)
    ;; Character based
    ;; XXX: should be relative to font size of enclosing element
    (string-to-number (match-string 1 spec)))

Basically, each "em" unit should be the size of two spaces (or lines).  Currently the function uses font-spatial-to-canonical, which returns the number of points for the number of pixels.  Somehow, this number of points gets turned into the number of spaces, which is definitely wrong.

If you can think of a better way to address the issue, this was just an idea.  It was pretty much just a hack to make a page not look totally ridiculous, just thought it would help the project.

Colin

_______________________________________________
W3-dev mailing list
W3-dev <at> gnu.org
http://lists.gnu.org/mailman/listinfo/w3-dev
Steinar Bang | 22 Feb 12:47
Picon
Picon
Favicon

Putting Emacs/W3 in ELPA?

Hi,

I would like Emacs/W3 to be uploaded to ELPA (Emacs Lisp Package
Archive) http://tromey.com/elpa/ 

This is because ELPA makes it very easy to quickly install the packages
I want on different emacsen, on different platforms.

I just do `M-x package-list-packages RET' to open a dired-like buffer,
listing all emacs lisp packages on offer at ELPA, then mark the packages
you'd like to install with `i' and then finally `x' to install them.

I've already prepared an ELPA package and sendt to Tom Tromey, the
maintainer of ELPA.  But he prefers to have upstream approval, and also
that the upstream maintainers upload new version directly to ELPA.

To ease that task, I'm enclosing some diffs to the current git repo for
ELPA.  The diffs are originally from Tom Tromey, but I've modified them
to make them run on debian etch (and lenny).

The diffs make it possible to just do:
 make elpa
to get a w3-$VERSION.tar file in the w3 directory that can be uploaded
to ELPA.

An ELPA package consists of a directory with all .el files and all info
files, and a *-pkg.el file, containing package meta-info.  It must be
possible to byte compile all of the .el files by making load-path
include the package directory.

My modifications to Tom's original Makefile.in diffs, are:
 - Don't depend on .elc for building elpa
 - Use ginstall-info rather than install-info to create a dir.info file,
   since install-info on debian is a different version with different
   arguments, that's a part of the dpkg package
 - Generate a w3-pkg.el file
 - Added an elpaclean target that will delete the w3-pkg.el, the ELPA
   package, and any staging directories, and made clean also do
   elpaclean 

The w3.el change is, according to Tom, to make w3 adjust to the
different directory layout it finds in ELPA.

Here are the git diffs:

diff --git a/Makefile.in b/Makefile.in
index 449d657..42098f8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -31,9 +31,12 @@ distclean: clean
 	for x in $(SUBDIRS); do ( cd $$x && $(MAKE) $@ ); done
 	$(RM) config.* Makefile

-clean:
+clean: elpaclean
 	for x in $(SUBDIRS); do ( cd $$x && $(MAKE) $@ ); done

+elpaclean:
+	$(RM) $(ELPA_PACKAGE_DEF) $(DIRNAME).tar
+
 dotemacs:
 	@if (grep ";;; Emacs/W3 Configuration" $(DOTEMACS) 2>&1) >/dev/null; then \
 		echo Emacs/W3 setup already exists in $(DOTEMACS);	\
@@ -102,3 +105,28 @@ _pkg.el: Makefile
 	@echo ";;;###autoload" > _pkg.el
 	@echo "(package-provide '$(PACKAGE)" >> pkg.el
 	@echo "		:version $(VERSION)" >> pkg.el
+
+###############################################################################
+# ELPA
+###############################################################################
+ELPA_PACKAGE_DEF=lisp/w3-pkg.el
+
+elpa: info $(ELPA_PACKAGE_DEF)
+	rm -fr /tmp/$(DIRNAME)
+	mkdir /tmp/$(DIRNAME)
+	cp $(srcdir)/lisp/*.el /tmp/$(DIRNAME)
+	rm -f /tmp/$(DIRNAME)/docomp.el
+	rm -f /tmp/$(DIRNAME)/custom-load.el
+	rm -f /tmp/$(DIRNAME)/auto-autoloads.el
+	cp texi/*.info /tmp/$(DIRNAME)/
+	tar cf - etc | (cd /tmp/$(DIRNAME); tar xf -)
+	rm -f /tmp/$(DIRNAME)/etc/Makefile
+	rm -f /tmp/$(DIRNAME)/etc/Makefile.in
+	ginstall-info /tmp/$(DIRNAME)/w3.info /tmp/$(DIRNAME)/dir
+	ginstall-info /tmp/$(DIRNAME)/w3-faq.info /tmp/$(DIRNAME)/dir
+	rm -f /tmp/$(DIRNAME)/dir.old
+	( cd /tmp; tar cf - $(DIRNAME) ) | cat > $(DIRNAME).tar
+	rm -fr /tmp/$(DIRNAME)
+
+$(ELPA_PACKAGE_DEF):
+	echo "(define-package \"w3\" \"$(VERSION)\" \"A web browser written entirely in Emacs Lisp\")" > $(ELPA_PACKAGE_DEF)
diff --git a/lisp/w3.el b/lisp/w3.el
index b33623d..387600b 100644
--- a/lisp/w3.el
+++ b/lisp/w3.el
@@ -5,7 +5,7 @@
 ;; Keywords: faces, help, comm, news, mail, processes, mouse, hypermedia

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Copyright (c) 1996, 97, 98, 99, 2001, 2007, 2008 Free Software Foundation, Inc.
+;;; Copyright (c) 1996, 97, 98, 99, 2001, 2007, 2008, 2009 Free Software Foundation, Inc.
 ;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry <at> cs.indiana.edu>
 ;;;
 ;;; This file is part of GNU Emacs.
@@ -1710,6 +1710,9 @@ BUFFER, the end of BUFFER, nil, and (current-buffer), respectively."
 		       (if (fboundp 'locate-data-directory)
 			   (locate-data-directory "w3"))
 		       data-directory
+		       ;; For ELPA.
+ 		       (expand-file-name "etc" w3-lisp)
+
 		       (concat data-directory "w3/")
 		       (expand-file-name "../../w3" data-directory)
 		       w3-lisp
Christian Cheng | 18 Sep 20:21
Picon

Compiling for CarbonEmacs on Mac OS X Tiger

Trying to get W3 working with CarbonEmacs in Tiger.  First, I put the path to the CarbonEmacs emacs executable up front in my $PATH env var.  Then, I ran configure successfully using

./configure --with-lispdir='${prefix}'/site-lisp --with-gnus='${prefix}'/lisp/gnus

Here's the output:

creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking for texi2html... texi2html
checking for xemacs... emacs
checking for makeinfo... makeinfo
checking for install-info... install-info
checking if emacs is really XEmacs... no
checking prefix for your Emacs... /Applications/Emacs.app/Contents
checking where .elc files should go... ${prefix}/site-lisp
checking for emacs version... 22.2
checking for acceptable custom library... /Applications/Emacs.app/Contents/Resources/lisp/
checking for recent gnus version... ${prefix}/lisp/gnus
checking how to rebuild custom autoloads... $(EMACS) $(BATCHFLAGS) $(DEPS) -f emacs-batch-build-custom-load $(srcdir)
creating ./config.status
creating Makefile
creating etc/Makefile
creating texi/Makefile
creating lisp/Makefile
creating lisp/w3-cfg.el
 
Sucessfully configured Emacs/W3
Using custom package installed in: /Applications/Emacs.app/Contents/Resources/lisp/
Emacs/W3 will be compiled with: emacs
 
To finish building Emacs/W3 type 'make' now.
To install Emacs/W3 type 'make install'.
To create autoloads in '/Users/xxx/.emacs' type 'make dotemacs'

So, I figured that went well enough so I went ahead with make:

cd lisp && make w3
GNUSDIR=/Applications/Emacs.app/Contents/lisp/gnus WIDGETDIR=/Applications/Emacs.app/Contents/Resources/lisp/ W3SRCDIR=. emacs -batch -q -no-site-file -l ./docomp.el -l ./url-vars.el -l ./w3-vars.el -f batch-byte-compile mule-sysdp.el
Loading /Applications/Emacs.app/Contents/Resources/site-lisp/extra-autoloads.el (source)...
Loading /Applications/Emacs.app/Contents/Resources/site-lisp/haskell-mode/haskell-site-file.el (source)...
!! File w3-sysdp uses old-style backquotes !!
!! File font uses old-style backquotes !!
!! File css uses old-style backquotes !!
!! File url-vars uses old-style backquotes !!
!! File url-parse uses old-style backquotes !!
!! File w3-cus uses old-style backquotes !!
!! File w3-widget uses old-style backquotes !!
!! File w3-imap uses old-style backquotes !!
!! File w3-display uses old-style backquotes !!
!! File w3-parse uses old-style backquotes !!
Cannot open load file: w3-e22
make[1]: *** [mule-sysdp.elc] Error 255
make: *** [w3] Error 2

Any ideas anyone?  Is this related to http://bugs.gentoo.org/show_bug.cgi?id=92244?

Some version info:

sw_vers gives:

ProductName:    Mac OS X
ProductVersion: 10.4.11
BuildVersion:   8S165

Then, M-x version gives:

GNU Emacs 22.2.1 (powerpc-apple-darwin.8.11.0, Carbon Version 1.6.0) of 2008-04-05 on g5.tokyo.stp.isas.jaxa.jp
n
_______________________________________________
W3-dev mailing list
W3-dev <at> gnu.org
http://lists.gnu.org/mailman/listinfo/w3-dev
Tim Cross | 27 May 11:43
Picon

Introduction

Hi All,

I've just joined the list. 
I use to use w3 a lot back in the late 90s, but then stopped using it due
to a number of issues. I'd like to get back to using it now and as there is
a chance I may have some spare coding cycles coming up, thought I might try
to contribute by fixing some of the problems I've encountered. 

By way of providing some background.....

I've been using emacs for just over 10 years. My background is as an
analyst/programmer, but with not much lisp/elisp experience (just enough to
be dangerous). I'm also blind and make extensive use of emacspeak (one of
the reasons I'd like to see w3 move forward as it has a lot of good support
and integration for emacspeak users). 

Over the last few days, I've been playing with w3 again. I've run into one
problem I need to resolve. It appears that w3 is not handling font colors
correctly. While I'm legally categorised as blind, I do have a very small
amount of light perception. If I use a high contrast display with a black
background and light font, while I cannot read the font, I can make a
little out. I cannot use white background as this causes something similar
to snow blindness and is actually painful to look at. 

Currently, I'm running into numerous pages wehre w3 is rendering the
content with black and near black fonts on a black background. This is the
first issue I need to resolve. While I can hear the text, when I sometimes
ask someone to describe what they see on the page, I run into trouble
because they can't see it at all. The easiest example I can think of to
show this is with using google. 

If you go to google and enter a simple search term - for example, iota. You
get back a lot of results, but nearly all the text is either black on black
background or a very dark blue on a black background. 

I've disabled the use of document style sheets and honoring of document
color requests and have tried various options in the default CSS setting,
but with no luck. A little debugging appears to indicate that if background
and foreground colours are not defined for the element being rendered, a
default rgb setting of 0, 0, 0 is used for the foreground and 'nil' for the
background. 

My guess is that reasonable defaults are not being set and that this has
not been identified because the majority of users are using a white
background (whereby rgb 0, 0, 0 would be fine as it would be black text on
white background). 

I'm not asking for others to solve this problem and am quite happy to try
and track it down and fix it. However, I'm finding the code and layout of
w3 a bit confusing. Its not clear to me where the defaults are supposed to
be set and therefore where I should be fixing the problem. Unfortunately,
many of the functions and variables are not documented. Rather than just
hack at ths system and likely fix it in an incorrect way, I was hoping
someone could point me in the right direction. My guess is that this
information is controlled either by functions in w3-display.el, font.el or
css.el. If anyone has any rough docs they have put together during their
own attempts to understand the system, I would certainly appreciate them as
they may help me to get my head wrapped around how it all hangs together.

This raises another question. I've seen criticisms of w3 because it has not
used consistent package prefixes on function/variable names (i.e. css.el
rather than w3-css.el, font.el rather than w3-font.el). Is it worthwhile
beginning to change these or is the whole code base going to be totally
re-worked eventually and we would be better off just leaving things until
then? Also, are we still attempting to maintain xemacs compatibility? I
can't run xemacs and this could be an issue. 

finally, I tend to run CVS versions of emacs. Will this be an issue? I do
have emacs22 installed, but haven't run it for quite some time. However, if
necessary I could test with it as well. Just wondering what everyone's
feelings are with respect to emacs versions - particularly as emacs 23 has
substantially re-worked support for utf-8 and other non-ascii character
sets (possibly making working with different encodings a lot simpler?)

Looking forward to being able to contribute and hearing from other
developers rregarding what they are doing to move w3 forward.

regards,

Tim
John Paul Wallington | 15 May 21:40
X-Face
Picon
Favicon

change w3-default-homepage

Ahoy,

The existing w3-default-homepage is a 404 at cs.indiana.edu.
How about making it w3's page at www.gnu.org?

2008-05-15  John Paul Wallington  <jpw <at> pobox.com>

	* lisp/w3.el (w3-do-setup): Fall back to
	http://www.gnu.org/software/w3/ instead of
	http://www.cs.indiana.edu/elisp/w3/docs.html when setting
	`w3-default-homepage'.

diff --git a/lisp/w3.el b/lisp/w3.el
index a23131f..a4c2d5b 100644
--- a/lisp/w3.el
+++ b/lisp/w3.el
@@ -1852,11 +1852,11 @@ Emacs."
     (or w3-hotlist (w3-parse-hotlist))

     ;; Set the default home page, honoring their defaults, then the
-    ;; standard WWW_HOME, then default to the documentation @ IU
+    ;; standard WWW_HOME, then default to the www.gnu.org w3 Project Page
     (or w3-default-homepage
 	(setq w3-default-homepage
 	      (or (getenv "WWW_HOME")
-		  "http://www.cs.indiana.edu/elisp/w3/docs.html")))
+		  "http://www.gnu.org/software/w3/")))

     (run-hooks 'w3-load-hook)))

Gmane