Bug#973667: Directory List /.../.../.../... titles puts "meat" too far to the right

2020-11-03 Thread Katsumi Yamaoka
On Tue, 03 Nov 2020 06:56:31 +0800, 積丹尼さん wrote:
> Let's say in emacs-w3m we are browsing the directory
> file:///home/jidanni/jidanni.org/geo/antipodes/programs/

> Well, perhaps the buffer name/title should be

>programs Directory list,
> or
>programs Directory list 
> (/home/jidanni/jidanni.org/geo/antipodes/programs/),
> instead of
>Directory list of /home/jidanni/jidanni.org/geo/antipodes/programs/

That's a good idea, but the title is what w3m says AFAIU;
emacs-w3m only copies it.  Though it would probably be possible to
make emacs-w3m modify it, I think doing it by w3m is much better.



Bug#973666: Cursor left at top when browsing directories

2020-11-03 Thread Katsumi Yamaoka
On Tue, 03 Nov 2020 06:39:29 +0800, 積丹尼さん wrote:
> $ w3m file:///home/jidanni/jidanni.org/geo/antipodes/programs/
> puts the cursor in the right spot.

> But in emacs-w3m, the cursor is left way at the top!

Fixed in the emacs-w3m git master.  Thanks.



Bug#969744: No such anchor

2020-09-08 Thread Katsumi Yamaoka
On Wed, 09 Sep 2020 09:33:50 +0900, Katsumi Yamaoka wrote:
> Note that there are *two* name anchors.  I guess emacs-w3m might
> possibly override the first found one by the second one.  But all
> of them should be fetched and held so to be referred to.

The actual emacs-w3m bug was not to hold some of fetched plural
name anchors that point to the same place.  I've changed again
the git master.  This would probably be the right fix.

Regards,



Bug#969744: No such anchor

2020-09-08 Thread Katsumi Yamaoka
On Wed, 09 Sep 2020 06:38:11 +0800, 積丹尼さん wrote:
> I'm saying that emacs-w3m might be following this rule:

>   https://en.wikipedia.org/wiki/URI_fragment#cite_ref-6
>   "Notably they cannot begin with a digit or hyphen."

> But nowadays it seems there are newer rules, so emacs-w3m should expect
> ones that do begin with a digit or hyphen.

BTW, I found a thing, that might be the root cause of this bug.
In the html source of the page you first brought up

the "36" section begins as follows:



  
  
  Message #36
  received at 968...@bugs.debian.org

Note that there are *two* name anchors.  I guess emacs-w3m might
possibly override the first found one by the second one.  But all
of them should be fetched and held so to be referred to.

Currently, for the last element "#36" of a url, if and only if
it is "\\`#[0-9]+\\'", i.e., "#" plus numeric letters, emacs-w3m
looks for the index "36", "bla36", "36bla", and "bla36bla",
where "bla" is an arbitrary string including no numeric
letters.  So, an index that begins with a digit or hyphen will
be found.

However, there is never a document that specifies such a rule
(i.e., the url fragment "#36" points to the index not only "36"
but also "msg36", etc.) isn't it?  I feel it too ambiguous.

Anyway I'm going to work on the emacs-w3m code again.

Thanks.



Bug#969744: No such anchor

2020-09-07 Thread Katsumi Yamaoka
On Tue, 08 Sep 2020 00:46:48 +0800, 積丹尼さん wrote:
> $ w3m https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968589#36
> Works fine. But
> $ emacs -q -f w3m
> for it, gives
> No such anchor: 36
[...]
> So maybe emacs-w3m needs #[a-z]36 instead of #36 in order for it to match.

I've done so in the emacs-w3m git master and confirmed it works
for the url in question.
Though I'm not quite sure if it is really a right solution.

Thanks.



Bug#969386: Resolve file: not just file:///

2020-09-03 Thread Katsumi Yamaoka
On Wed, 02 Sep 2020 08:05:26 +0900, Katsumi Yamaoka wrote:
> Well, for instance, probably we can modify emacs-w3m so to allow
> "file:bla.txt" things if and only if a user has specified
> `w3m-default-directory' (defaults to nil).

I've done it in the emacs-w3m git master as follows:

Allow url like "file:foo.txt" (bug#969386 of debian)
emacs-w3m assumes the file to be existent in `w3m-default-directory'
(if specified), the current directory, or the home directory.

* w3m.el (w3m-url-to-file-name): Allow url like "file:foo.txt",
that doesn't specify server and/or directory.

* w3m-util.el (w3m-url-local-p): Check also if the file really exists.



Bug#969386: Resolve file: not just file:///

2020-09-01 Thread Katsumi Yamaoka
On Wed, 02 Sep 2020 01:19:30 +0800, 積丹尼さん wrote:
> Real w3m can deal fine with file:bla.txt and does not always need
> file:///full/path/to/bla.txt .

w3m visits the file `pwd`/bla.txt .  That's a good feature as a
user knows where the current directory is (in other words a user
knows the file bla.txt exists in the current directory).  But
does a Chrome/Firefox/Safari/emacs-w3m user know where one is?
In emacs-w3m the current directory (i.e., `default-directory')
defaults to ~/.w3m for years, but there may be no file of interest.

Well, for instance, probably we can modify emacs-w3m so to allow
"file:bla.txt" things if and only if a user has specified
`w3m-default-directory' (defaults to nil).
Otherwise how about using `w3m-find-file' instead?

> But emacs-w3m says
> w3m--goto-url--valid-url: Wrong type argument: stringp, nil

Ending up with an error is bad in that situatuion anyway.  I think
we should improve it so to issue something other than an error.

Thanks.



Bug#953768: text-scale-adjust causes lines to go off the edge

2020-03-16 Thread Katsumi Yamaoka
Done.
Note that this change does not mean `w3m-redisplay-this-page' to
be improved to fold lines longer than the visible window width
(because the return value of `window-width' is unchanged even if
text is scaled).



Bug#953768: text-scale-adjust causes lines to go off the edge

2020-03-16 Thread Katsumi Yamaoka
On Fri, 13 Mar 2020 16:59:36 +0800, 積丹尼さん wrote:
> $ emacs -q -f w3m
> and browse https://www.wired.com/story/5g-vulnerabilities-downgrade-attacks/

> Now do C-x C-+ C-+ C-+

> Notice how the lines are now extend off of the screen, and we are no
> longer able to read the last part of each line.

I realized what is the cause at last.  It is that emacs-w3m sets
`auto-hscroll-mode' to nil and uses the `w3m-auto-show' feature
for horizontal scrolling instead in its buffers.  That feature
was made in the era when Emacs doesn't support automatic hscroll,
but probably the time has come to drop it.  I will work on it...



Bug#953631: Hyperlinks should be underlined, else blanks break them

2020-03-12 Thread Katsumi Yamaoka
On Thu, 12 Mar 2020 18:56:01 +0800, 積丹尼さん wrote:
> OK. I hope all the defaults get changed.

Agreed and changed.  By default, now the link faces are bold and
underlined, and use wavy underline when point is.

Thanks.



Bug#953631: Hyperlinks should be underlined, else blanks break them

2020-03-11 Thread Katsumi Yamaoka
On Wed, 11 Mar 2020 20:35:22 +0800, 積丹尼さん wrote:
> looking at the line
> "台灣體育運動大學 National Taiwan University of Sport 體育館"
> the user cannot tell if he is looking at one hyperlink, three
> hyperlinks, or even seven hyperlinks.

How about changing the `w3m-anchor' face so to be your taste?

> I am not asking for a workaround just for me.

This answer is not just for you. :)

> Sure, bold + underline is OK too.

Well, the `w3m-current-anchor' face[1] is bold and underlined by
default, and the `w3m-arrived-anchor' face[2] is underlined by
default, so you may want to change the other attributes for the
`w3m-anchor' face, or change all of them.

[1] w3m-current-anchor
Face used to highlight the anchor where point is.
[2] w3m-arrived-anchor
Face used to highlight the anchor you've ever visited.



Bug#953033: bug#39901: Emacs needs to update window-width when the user updates the text size

2020-03-04 Thread Katsumi Yamaoka
Thanks Drew.  Jidanni, try the following two advices if interest.
Probably this would be what you want `text-scale-adjust' to do.
The first one tweaks the `window-width' function so to return
a value based on the text scaling, and the second one makes the
`text-scale-adjust' function redisplay an emacs-w3m page.  It's
only a quick hack, so I don't want to imprement it in emacs-w3m.

(defadvice w3m-redisplay-this-page (around adjust-window-width activate)
  "Adjust window-width value according to `face-remapping-alist'."
  (current-buffer)
  (let ((height (ignore-errors
  (cadr (assq :height
  (assq 'default face-remapping-alist))
(if height
(let ((ofn (symbol-function 'window-width)))
  (fset 'window-width (lambda (&rest args)
(floor (/ (funcall ofn) height
  (unwind-protect
  ad-do-it
(fset 'window-width ofn)))
  ad-do-it)))

(defadvice text-scale-adjust (after redisplay-w3m-page activate)
  "Redisplay w3m page after scaling text."
  (when (eq major-mode 'w3m-mode)
(let ((w3m-message-silent t))
  (w3m-redisplay-this-page



Bug#953033: Not ready for text-scale-adjust

2020-03-03 Thread Katsumi Yamaoka
On Tue, 03 Mar 2020 23:51:58 +0800, 積丹尼さん wrote:
> Package: w3m-el-snapshot
> X-Debbugs-Cc: yama...@jpl.org
> Version: 1.4.632+0.20191218.2243.cef0c7e-1

> $ emacs -q -f w3m
>  C-x C-= [text-scale-adjust]
>  C-= [anonymous-command]

> Here the lines get cut off.
> They should fold, staying on the screen as the text zooms.

In that case the window width, i.e., the return value of
(window-width) is unchanged, so we have no clue for the point
where to fold text lines.  We have no solution for it, I think.



Bug#948029: splitting windows sometimes zaps images

2020-01-06 Thread Katsumi Yamaoka
> C-h l
>  T [w3m-toggle-inline-images]
>  C-x 3 [split-window-right] Zaps the images. Need to turn them on again.
>  T [w3m-toggle-inline-images]
>  C-x 1 [delete-other-windows] Zaps the images again.

> By the way, C-x 2 doesn't zap the images.

What url where did you do it?  Unreproducible so far.



Bug#948028: w3m-reload-this-page should respect the current image toggle state

2020-01-06 Thread Katsumi Yamaoka
On Fri, 03 Jan 2020 21:17:14 +0800, 積丹尼さん wrote:
> But doing
> T then
> R
> then needs a second
> T
> to make the page look fine again.

Hmm, doesn't it work as you expected, does it?  I tried it in

and others without the second T.



Bug#944574: w3m-download-this-url vs. zero byte file:///s

2019-11-11 Thread Katsumi Yamaoka
On Tue, 12 Nov 2019 09:39:11 +0800, 積丹尼さん wrote:
> X-Debbugs-Cc: yama...@jpl.org
> Package: w3m-el-snapshot
> Version: 1.4.632+0.20190920.1116.c9cdb7e-1
> Severity: wishlist

> If I try to download a zero byte local file,
> file:///tmp/somezerobytefile I get a failure.

> It works if the file has at least one byte.

> But it really should, yes, work with zero byte empty files.

Fixed in emacs-w3m git master.  Thanks.



Bug#944519: w3m-download-this-url gives -dump_extra: command not found

2019-11-11 Thread Katsumi Yamaoka
On Tue, 12 Nov 2019 10:52:58 +0800, 積丹尼さん wrote:
> Great! I'll trust you.

Thanks.  Finally I've installed only this change in emacs-w3m git.
diff --git a/w3m.el b/w3m.el
index e25ef940..4653589f 100644
--- a/w3m.el
+++ b/w3m.el
@@ -5829,7 +5829,7 @@ NO-CACHE is ignored (always download)."
   (w3m-goto-ftp-url url filename)
 (let ((args (concat (mapconcat
 			 #'(lambda (x) (replace-regexp-in-string
-	"\\([\t ]\\)" "\\1" x))
+	"\\([\t ;]\\)" "\\1" x))
 			 `(,w3m-command
 			   ,@w3m-command-arguments
 			   ,@(w3m-w3m-expand-arguments


Bug#944519: w3m-download-this-url gives -dump_extra: command not found

2019-11-11 Thread Katsumi Yamaoka
On Tue, 12 Nov 2019 09:53:13 +0800, 積丹尼さん wrote:
> "But I don't even have a ~/bin".
> Anyway, the problem turns out to be in
> ~/.w3m/config . But which line?

> accept_language en;q=1.0

That is it!  I see that the ";" in the operand causes a malfunction
of w3m-download.  Could you try this patch?
--- w3m.el~	2019-11-11 06:37:28.350304300 +
+++ w3m.el	2019-11-12 02:41:33.719297300 +
@@ -834,8 +834,9 @@
 	(insert-file-contents file)
 	(goto-char (point-min))
 	(when (re-search-forward "^accept_language[\t ]+\\(.+\\)$" nil t)
-	  (delete "" (split-string (match-string 1)
-   "[ \t\r\f\n]*,[ \t\r\f\n]*")
+	  (delete "" (split-string
+			  (replace-regexp-in-string ";.*" "" (match-string 1))
+			  "[ \t\r\f\n]*,[ \t\r\f\n]*")
 	(when (string= w3m-language "Japanese")
 	  '("ja" "en"
   "List of acceptable languages in descending order of priority.


Bug#944519: w3m-download-this-url gives -dump_extra: command not found

2019-11-11 Thread Katsumi Yamaoka
On Mon, 11 Nov 2019 18:19:42 +0800, 積丹尼さん wrote:
> Package: w3m-el-snapshot
> Version: 1.4.632+0.20190920.1116.c9cdb7e-1
> X-Debbugs-Cc: yama...@jpl.org

> 1. Go to https://ftp.gnu.org/gnu/tramp/?C=M;O=D
> 2. hit "d" on tramp-2.4.2.tar.gz .

> /bin/bash: -dump_extra: command not found

This seems to be the case where the value for the `w3m-command'
variable is "", though I cannnot imagine why it goes so.  It
should be set automatically if the w3m executable is found in
`exec-path'.  What is the value for it?  Otherwise, what does
evaluating the form (w3m-which-command "w3m") return?  If it is
not the right one, you can add the directory name where the w3m
executable exists to `exec-path', for example:

(add-to-list 'exec-path "/home/jidanni/bin")

Of course you may instead set `w3m-command' directly as follows:

(setq w3m-command "/home/jidanni/bin/w3m")

How about it?



Bug#933371: An error occurred. Error was: No bug number

2019-07-29 Thread Katsumi Yamaoka
Fixed in the emacs-w3m git master.

On Tue, 30 Jul 2019 08:02:18 +0900, Katsumi Yamaoka wrote:
> Probably it would be necessary to have an exception list for the
> strip-query feature of emacs-w3m, and it should include at least
> a regexp for the debian bugreports.

Hmm, it was perhaps an over anxiety.  Instead, I've fixed the one
looking like a typo as follows:

--- a/w3m.el
+++ b/w3m.el
@@ -5448,7 +5448,7 @@ It will put the retrieved contents into the current 
buffer.  See
 (defun w3m--retrieve-1--handler-function (url post-data referer no-cache
  counter handler temp-file attr)
   (when (nth 6 attr)
-(setf (nth 6 attr) (w3m-url-strip-query (nth 6 attr
+(setf (nth 6 attr) (w3m--url-strip-queries (nth 6 attr
   (and temp-file
(file-exists-p temp-file)
(delete-file temp-file))



Bug#933371: An error occurred. Error was: No bug number

2019-07-29 Thread Katsumi Yamaoka
On Tue, 30 Jul 2019 03:20:38 +0800, 積丹尼さん wrote:
> X-debbugs-Cc: yama...@jpl.org
> Package: w3m-el-snapshot
> Version: 1.4.632+0.20190719-1

> (w3m-goto-url "http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30587"; nil nil)

> says:
> Location: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30587
> An error occurred. Error was: No bug number

> So one needs

>R runs the command w3m-reload-this-page (found in w3m-mode-map)

> to make it work.

I'll fix it asap.  This is caused by the side effect of PR#47 in
emacs-w3m: 
Probably it would be necessary to have an exception list for the
strip-query feature of emacs-w3m, and it should include at least
a regexp for the debian bugreports.  Thanks for bringing it up.

Regards,



Bug#889788: w3m-el-snapshot conflict with TRAMP

2018-02-06 Thread Katsumi Yamaoka
On Wed, 07 Feb 2018 04:04:56 +0800, Dan Jacobson wrote:
> # su - nobody -c 'HOME=/tmp/ff  emacs'& #Total clean environment.
> M-x w3m

> At this point a connection to "about:" is caught by TRAMP.

At that time emacs-w3m is about to access the url "about:", and
runs (file-exist-p "about:") at first in order to check whether
"about:" is a local file.  But IIUC, it should not trigger TRAMP;
only a thing like "/about:" will trigger TRAMP.  I can reproduce
the same error with (file-exist-p "/about:") and a similar error
with (w3m "/about:"), though such ones should not happen.  Funny.



Bug#738121: try file.html not "file.html?" for local files

2014-02-09 Thread Katsumi Yamaoka
In [emacs-w3m : No.12287] Dan Jacobson wrote:
> X-Debbugs-Cc: emacs-...@namazu.org
> Package: lynx-cur
> Version: 2.8.8pre4-1
> File: /usr/bin/lynx

> $ ls
> er.html zaokeng.html
> $ cat er.html
> 
> clicking gets e.g., in emacs-w3m
> Cannot retrieve URL: file:///.../zaokeng.html? (http status: 200)
> Similar with lynx.

> w3m, Midori, chromium, firefox all know to try zaokeng.html not (or in
> addition to) "zaokeng.html?" for local files.

> emacs-w3m and lynx fail.

Emacs-w3m now should have been fixed in the CVS trunk.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#728501: w3m-el: mew-w3m-region & multiple blockquote

2013-12-03 Thread Katsumi Yamaoka
In [emacs-w3m : No.12236] Tatsuya Kinoshita wrote:
> 2013-12-03  Tatsuya Kinoshita  

>   * mew-w3m.el (mew-w3m-region): Set point to the end of  tag to
>   prevent infinite loop.

Indeed.  I've applied your patch.  Thanks.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#728501: w3m-el: mew-w3m-region & multiple blockquote

2013-12-01 Thread Katsumi Yamaoka
In [emacs-w3m : No.12231] Tatsuya Kinoshita wrote:
> 2013-12-01  Tatsuya Kinoshita  

>   * mew-w3m.el (mew-w3m-region): Set point to minimum for
>   `mew-w3m-cite-blockquote' to work.

Thanks for verifying and fixing it.  I've installed the version.

In [emacs-w3m : No.12232] christophe.troest...@umons.ac.be wrote:
> As an alternative solution, I have been using the replacement of
> `mew-w3m-region` below.  Comments are welcome.  I had no time to try
> the proposed patch yet.

Thank you for contributing the imporvements.  But I'm not capable
to test your proposal since I'm not a Mew user, so please provide
a patch against the present CVS version and the ChangeLog entry
when you have time.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#728501: w3m-el: mew-w3m-region & multiple blockquote

2013-11-04 Thread Katsumi Yamaoka
In [emacs-w3m : No.12209] Kinoshita-san wrote:
> Forwarding from Debian Bug:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=728501

> On November 2, 2013 at 12:00AM +0100, Christophe.Troestler (at
> umons.ac.be) wrote:
>> Package: w3m-el
>> Version: 1.4.483+0.20120614-3
>> Severity: normal
>>
>> Dear Maintainer,
>>
>> The function `mew-w3m-region` in mew-w3m.el does not work with a
>> blockquote inside another blockquote (this may happen when citations
>> are inside other citations in emails).  I guess one must use
>> `w3m-end-of-tag` instead of `w3m-search-tag` to locate the closing
>> tag.
>>
>> Also,  start new lines ― which must be quoted ― but one has to be
>> careful that , ,... only produce a single
>> new line.
>>
>> It will be appreciated that these problems be fixed.
>>
>> Best,
>> C.

I tried improving `mew-w3m-region' (I'm not a Mew user though).
Does the attached patch make it do what you think right?
If not, could you send me an html example?

--- mew-w3m.el~	2010-01-13 00:59:40.0 +
+++ mew-w3m.el	2013-11-05 03:31:53.844275200 +
@@ -161,56 +161,102 @@
 	  (mew-w3m-add-text-properties `(w3m-images ,(not image)))
 	  (set-buffer-modified-p nil)))
 
+(defun mew-w3m-cite-blockquote (&optional inside-blockquote)
+  "Quote paragraphs in ... with the citation mark.
+The variable `mew-w3m-region-cite-mark' specifies the citation mark."
+  (let ((case-fold-search t))
+(while (and (re-search-forward "\
+\[\t\n ]*<[\t\n ]*blockquote\\(?:[\t\n ]*>\\|[\t\n ]+[^>]+>\\)" nil t)
+		(w3m-end-of-tag "blockquote" t))
+  (save-restriction
+	(narrow-to-region (match-beginning 0) (match-end 0))
+	(delete-region (goto-char (match-end 3)) (match-end 0))
+	(insert "\n")
+	(delete-region (goto-char (point-min)) (match-beginning 3))
+	(insert "\n")
+	(while (and (re-search-forward
+		 "<[\t\n ]*pre\\(?:[\t\n ]*>\\|[\t\n ]+[^>]+>\\)" nil t)
+		(w3m-end-of-tag "pre" t))
+	  (delete-region (goto-char (match-end 2)) (match-end 0))
+	  (if (bolp)
+	  (when (looking-at "\n+") (replace-match ""))
+	(insert "\n"))
+	  (delete-region (goto-char (match-beginning 0)) (match-beginning 2))
+	  (if (bolp)
+	  (when (looking-at "\n+") (replace-match ""))
+	(insert "\n")))
+	(goto-char (point-min))
+	(mew-w3m-cite-blockquote 'inside-blockquote)
+	(goto-char (point-min))
+	(while (re-search-forward
+		"[\t\n ]*\\|[\t\n ]+[^>]+>\\)" nil t)
+	  (replace-match "\n"))
+	(goto-char (point-min))
+	(while (and (re-search-forward
+		 "[\t\n ]*\\|[\t\n ]+[^>]+>\\)" nil t)
+		(w3m-end-of-tag "div"))
+	  (goto-char (match-end 0))
+	  (insert "\n")
+	  (goto-char (match-beginning 0))
+	  (insert "\n"))
+	(goto-char (point-min))
+	(while (re-search-forward "^[\t <>]+$" nil t)
+	  (replace-match ""))
+	(goto-char (point-min))
+	(while (re-search-forward "\n\n\n+" nil t)
+	  (replace-match "\n\n"))
+	(goto-char (point-min))
+	(when mew-w3m-region-cite-mark
+	  (goto-char (point-min))
+	  (while (re-search-forward "[^\t\n ]" nil t)
+	(beginning-of-line)
+	(if (looking-at "[\t ]+")
+		(replace-match mew-w3m-region-cite-mark)
+	  (insert mew-w3m-region-cite-mark))
+	(end-of-line)))
+	(unless inside-blockquote
+	  ; "> > > " --> ">>> "
+	  (when (and mew-w3m-region-cite-mark
+		 (string-match " \\'" mew-w3m-region-cite-mark))
+	(let ((base (substring mew-w3m-region-cite-mark
+   0 (match-beginning 0)))
+		  (regexp (regexp-quote mew-w3m-region-cite-mark)))
+	  (setq regexp (concat "^" regexp "\\(?:" regexp "\\)+"))
+	  (goto-char (point-min))
+	  (while (re-search-forward regexp nil t)
+		(dotimes (i (prog1
+(/ (- (match-end 0) (match-beginning 0))
+   (length mew-w3m-region-cite-mark))
+			  (delete-region (match-beginning 0)
+	 (match-end 0
+		  (insert base))
+		(insert " "
+	  (goto-char (point-min))
+	  (insert "")
+	  (goto-char (point-max))
+	  (insert "\n"))
+
 (defun mew-w3m-region (start end &optional url charset)
   "w3m-region with inserting the cite mark."
   (if (null mew-w3m-region-cite-mark)
   (w3m-region start end url charset)
 (save-restriction
   (narrow-to-region start end)
-  (let ((case-fold-search t)
-	pos lines tagbeg0 tagend0 tagbeg1 tagend1)
-	(goto-char (point-min))
-	(while (w3m-search-tag "blockquote")
-	  (setq tagbeg0 (match-beginning 0))
-	  (setq tagend0 (match-end 0))
-	  (when (w3m-search-tag "/blockquote")
-	(setq tagbeg1 (match-beginning 0))
-	(setq tagend1 (match-end 0))
-	(setq lines (buffer-substring tagend0 tagbeg1))
-	(delete-region tagbeg0 tagend1)
-	(insert (with-temp-buffer
-		  (insert lines)
-		  (goto-char (point-min))
-		  (if (and (w3m-search-tag "pre")
-			   (setq tagbeg0 (match-beginning 0))
-			   (setq tagend0 (match-end 0))
-			   (w3m-search-tag "/pre")
-			   (setq tagbeg1 (match-beginning 0))
-			   (setq tagend1 (match-end 0)))
-			  (progn
-			(delete-region tagbeg1 tagend1)
-			(d

Bug#419647: w3m-el should not silently reject cookies by default

2013-06-25 Thread Katsumi Yamaoka
In [emacs-w3m : No.12056] Tatsuya Kinoshita wrote:
> Could you please reconsider setting w3m-use-cookies to t by default
> for the next release?

Done.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#677431: Symbol's function definition is void: --post-body--70277

2012-06-13 Thread Katsumi Yamaoka
In [emacs-w3m : No.11855] jida...@jidanni.org wrote:
> X-debbugs-Cc: emacs-...@namazu.org
> Package: w3m-el-snapshot
> Version: 1.4.482+0.20120609-1
> Severity: grave

> Browsing any site gives
> error in process sentinel: w3m-process-sentinel: Symbol's function
> definition is void: --post-body--70277

Download the most recent emacs-w3m from the CVS server and rebuild
it from scratch.  This problem is due to Emacs' cl package having
changed recently but it's not Emacs' bug I believe.  See also:

http://news.gmane.org/group/gmane.emacs.devel/thread%3D150897



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#657424: can't jump to some links anymore

2012-01-26 Thread Katsumi Yamaoka
In [emacs-w3m : No.11744] jida...@jidanni.org wrote:
> X-debbugs-Cc: emacs-...@namazu.org
> Package: w3m-el-snapshot
> Version: 1.4.463+0.20120113-1

> Upon upgrading from
> 1.4.442+0.20110729-1 to
> 1.4.463+0.20120113-1
> browsing e.g.,
> http://code.google.com/apis/maps/documentation/javascript/reference.html
> and then clicking on the link to #Circle does no longer take me there.
> The cursor doesn't move.  But it will move for you:
> of course the bug is only observable if one loads my
> http://jidanni.org/comp/configuration/
> something in which is not compatible with the new version or something.

I've made a change in the emacs-w3m CVS so as to work for name
anchors again.

> Also if I save the file to disk and then browse it, the bug doesn't occur.

Hmm, I don't know why.  Here's a diff of what I did:

--8<---cut here---start->8---
--- w3m.el~ 2012-01-13 08:21:42.28125 +
+++ w3m.el  2012-01-26 10:13:26.35175 +
@@ -9159,8 +9159,9 @@
   (unless (or (w3m-url-local-p url)
  (string-match "\\`about:" url))
 (w3m-string-match-url-components url)
-(setq url (concat (w3m-url-transfer-encode-string
-  (substring url 0 (match-beginning 8)))
+(setq url (concat (save-match-data
+   (w3m-url-transfer-encode-string
+(substring url 0 (match-beginning 8
  (if (match-beginning 8)
  (concat "#" (match-string 9 url))
""
--8<---cut here---end--->8---



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#591094: multipart part does not have valid content-type

2010-08-09 Thread Katsumi Yamaoka
jida...@jidanni.org wrote:

> Dear Gnus team, I sent http://jidanni.org/test/591094.mbox.txt using
> gnus-version "Gnus v5.13" with http://jidanni.org/comp/configuration/ and
> then regarding http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591094
>> "DA" == Don Armstrong  writes:

DA> Your MUA is sending a multipart message with a part that doesn't have
DA> a valid content-type; because the only content-type that is specified
DA> is an image, and there isn't text content, one of our rules finds it
DA> and discards it. [Various viruses do this, and we procmail them out
DA> specifically.]

DA> Please fix your MUA to set a Content-Type on all parts of a multipart
DA> message. [While this is not strictly required by the RFC 1521, there's
DA> no reason not to have one, and almost all MUAs have them.]

(setq mml-insert-mime-headers-always t)

and you will be able to verify that the Content-Type header is
inserted in each text/plain part by typing `C-u C-c C-m P' before
sending a multipart message to such a brain-damaged MUA.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#582677: w3m-el-snapshot: w3m-cookie-reject-domains doesn't work

2010-05-23 Thread Katsumi Yamaoka
> Fedor Khod'kov wrote:
[...]
>> I set up w3m-cookie-reject-domains, adding "google.com" and
>> ".google.com" but google.com still installs its cookies.  After checking
>> w3m-cookie.el I found that problem might be in w3m-cookie-trusted-host-p
>> function; lines 291-294
>>
>>> ((eq (string-to-char (car reject)) ?.)
>>>  (setq regexp (concat (regexp-quote (car reject)) "$")))
>>> (t (setq regexp (concat "^" (regexp-quote (car reject)) "$"
>>>  (when (string-match (concat regexp "$") host)
>>
>> Here host (for example, ".google.com" is compared with
>>> (concat (concat (regexp-quote ".google.com") "$") "$")
>> which gives "\\.google\\.com$$"; string-match returns nil because of
>> double $ in the end of regexp.
>>
>> If last concat is removed, all seems to be right:

The patch looks reasonable.  Thank you for pointing it out.
Fixed in the emacs-w3m CVS trunk.

Regards,



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#384190: develock-el: Bad highlighting in Perl mode

2008-08-06 Thread Katsumi Yamaoka
Hi,

> [EMAIL PROTECTED] wrote:

> Wow, that's really an old bug report :)
> To be sure that nothing from me "disturb" emacs, I have removed my .emacs.

> I have currently the last ubuntu stable version : hardy.
> The bug is still present like you can see on the attached screenshot.

I confirmed that the wrong fontification you've pointed to appears
in Emacs 21.4 and older.  It seems to have been solved in Emacs 22.1.
What version are you using? -> `M-x emacs-version RET'

(I don't know what version of Emacs Debian or Ubuntu bundles since
 I'm a Fedora user.)

Anyway I believe it's not a Develock issue because there is no
minor mode flag that indicates ``Develock'' in the snapshot (it
should appear in the mode line if Develock is enabled).  I have
no idea what is the cause if you use Emacs 22.1 or greater.

Regards,



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#475468: Fwd: [emacs-w3m:10074] Bug#475468: no w3m -o fold_line for HTML

2008-04-10 Thread Katsumi Yamaoka
Hi w3m developers,

The bug report concerning w3m has been posted to the emacs-w3m list.
Could someone please look into it?  In addition, please let us know
the proper e-mail address which is open to the public to post such
messages?  (The w3m-dev list is not, isn't it?)

 Start of forwarded message 
Delivered-To: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Date: Fri, 11 Apr 2008 06:26:34 +0800
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: [emacs-w3m:10074] Bug#475468: no w3m -o fold_line for HTML
To: [EMAIL PROTECTED]
Message-Id: <[EMAIL PROTECTED]>
X-ML-Name: emacs-w3m
X-Mail-Count: 10074

X-debbugs-Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
Package: w3m
Version: 0.5.1-5.1+b1

I have a problem using w3m in xterm that does not occur when using it
in emacs.

E.g.,
$ w3m http://forum.brighthand.com/showthread.php?t=15918

Too wide. It goes off the screen, to the right.

One has to use w3m in emacs: w3m.el to see them correctly. In just a
plain xterm they extend off the screen. How frustrating.
What does one need to do to make w3m not go off the edge in xterm?

There is only
-o fold_line= Fold lines of plain text file
But there is no way to
Fold lines of rendered HTML file
 End of forwarded message 



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#457909: Changes + to space in URLs

2008-01-07 Thread Katsumi Yamaoka
> Trent W. Buck wrote:

> I regularly use y (w3m-print-current-url) to display the URL at point
> in the echo area.  I then use Screen's C-a [ (copy) to copy-and-paste
> the URL into a non-Emacs window running, say, wget.

> I noticed that for URLs like

> https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.15/+bug/54419

> ...the +'s are replaced with spaces, resulting in a *wrong* URL.

The behavior of the function in question (w3m-url-decode-string)
has never changed basically since it was introduced in August,
2001.  I'm not sure whether replacing +'s with spaces is wrong
but I believe it is done for a user to view with the eyes, not
for copying a url.  The function does not only replacing +'s
with spaces but also decoding characters that are represented in
the hexadecimal form.  In the later case, it might fail in
copying a url displayed in the echo area to the other client
because of non-ASCII characters.  Therefore, I think the best
way for you is to not decode urls that are displayed in the echo
area.  To do that:

(setq w3m-show-decoded-url nil)



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#457115: show-trailing-whitespace

2007-12-19 Thread Katsumi Yamaoka
> [EMAIL PROTECTED] wrote:

> Package: w3m-el-snapshot
> Version: 1.4.250+0.20071206-1
> Severity: minor

> Please do e.g.,
> $ emacs -q --eval '(setq-default show-trailing-whitespace t)' -f w3m \
>   http://www.mediawiki.org/wiki/Manual:Wiki_family
> to see all the wasted whitespace in w3m-el-snapshot.
> (The solution of course is _not_ to just ask users to turn off
> show-trailing-whitespace.)

Fixed in emacs-w3m CVS.  Thanks for pointing it out.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#419647: w3m-el should not silently reject cookies by default

2007-04-17 Thread Katsumi Yamaoka
>>>>> In [emacs-w3m : No.09382] Jason Spiro wrote:

> On 4/17/07, Katsumi Yamaoka <[EMAIL PROTECTED]> wrote:
> ...
>> Have you tried setting the `w3m-use-cookies' variable to t?
>>
>> This makes emacs-w3m behave like `1'.

> Yes; I found out about the option about a week ago when I used M-x
> customize on w3m.  The problem: w3m-use-cookies is off by default.

>> It is still incomplete even in the CVS version (i.e., is under
>> development), though.  If you have an interest in the upstream
>> emacs-w3m, you can get it from:

> It works fine for me on gmail and Wikipedia, though I must admit I
> didn't try the "Keep me logged in forever" checkbox option on those
> websites yet.

You will perhaps find some defects that prevent emacs-w3m from
working with cookies. :-<

> Why don't you enable the option by default?

It might be because no one has never requested it. ;-)
Otherwise, no developer might have wanted to enable it since it
is still experimental.  Anyway, we will need much time and
effort to complete the feature.

Regards,


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#419647: w3m-el should not silently reject cookies by default

2007-04-17 Thread Katsumi Yamaoka
Hi,

> In [emacs-w3m : No.09379] Jason Spiro wrote:

> Package: w3m-el
> Version: 1.4.4-3
> Severity: wishlist
> Usertags: usability
> X-Debbugs-CC: [EMAIL PROTECTED]

> Thank you for w3m-el, it is the best web browser I have ever used.

I'm glad to hear of it.  Thanks.

> But, for the first month I used w3m-el, I didn't realize it supported
> cookies.  I wish I had known sooner.  To fix this, I suggest that
> w3m-el should not silently reject all cookies by default; it should do
> one of these things instead:

Have you tried setting the `w3m-use-cookies' variable to t?

(info "(emacs-w3m)Trouble FAQ")
,
| * Q. Why can't I browse pages which require cookies?
|
|   (This is still an experimental feature.)
|
|   Make sure the `w3m-use-cookies' variable is set to a value other
|   than `nil'.
`

This makes emacs-w3m behave like `1'.

> 1.  Accept all cookies and save them to disk permanently.  This would
> be the best option.  It would work just like Firefox and other popular
> browsers.  Or:

It is still incomplete even in the CVS version (i.e., is under
development), though.  If you have an interest in the upstream
emacs-w3m, you can get it from:

http://cvs.namazu.org/emacs-w3m.tar.gz?view=tar

Regards,


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#367886: w3m-el: add `w3m-bookmark-view-new-session'

2006-05-18 Thread Katsumi Yamaoka
> In [emacs-w3m : No.08693] Luca Capello wrote:

> Package: w3m-el
> Version: 1.4.4-1
> Severity: wishlist
> Tags: patch

> Hello,

> the title says all, the attached patch add the above function,
> updating the menu and the info key-map (I don't know which key would
> be OK for the lynx one).

> Please considere for inclusion, TIA.

> Thx, bye,
> Gismo / Luca

> PS, cc:ed to the emacs-w3m mailing list :-)

Thank you very much for the contribution.
The `w3m-bookmark-view-new-session' command would be useful,
however, we've implemented a similar feature in the upstream
recently.  It is available in the top of the menu which appears
when you click tabs using the right mouse button.  You can try
it with the CVS version[1] of emacs-w3m.  So, I'm not very
positive to apply your patch.

Anyway, contributions (and/or bug fixes) to emacs-w3m are always
welcome.  I recommend you send such mails directly to the
emacs-w3m community using <[EMAIL PROTECTED]>, which is open
to everyone and is gatewayed to the gmane.emacs.w3m newsgroup.

Best regards,

[1] http://emacs-w3m.namazu.org/index-en.html#download
or http://cvs.namazu.org/emacs-w3m.tar.gz?view=tar


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]