pax_global_header00006660000000000000000000000064143437500210014511gustar00rootroot0000000000000052 comment=4f278108c0d88fc8d7bc93beb5e283b98fff6efe emacs-w3m-emacs-w3m-4f27810/000077500000000000000000000000001434375002100153545ustar00rootroot00000000000000emacs-w3m-emacs-w3m-4f27810/.dir-locals.el000066400000000000000000000001251434375002100200030ustar00rootroot00000000000000((nil . ((indent-tabs-mode . t)))) ;; Local Variables: ;; no-byte-compile: t ;; End: emacs-w3m-emacs-w3m-4f27810/.gitignore000066400000000000000000000004521434375002100173450ustar00rootroot00000000000000*~ *.elc \#*# /Makefile /autom4te.cache /confdefs.h /config.cache /config.log /config.status* /configure /emacs-w3m-*.tar.gz /w3m-kwds.el /w3m-load.el /doc/Makefile /doc/emacs-w3m*.dvi /doc/emacs-w3m*.info /doc/emacs-w3m*.info-[0-9]* /doc/missfont.log /doc/version.texi /shimbun/shimbun-servers.el emacs-w3m-emacs-w3m-4f27810/.travis.yml000066400000000000000000000075731434375002100175010ustar00rootroot00000000000000# .travis.yml for emacs-w3m (http://github.com/emacs-w3m/emacs-w3m/) ## cache could be a time-saver for ## + apel/flim for all emacsen ## + but how to do it? #cache: # - directories: # - "$HOME/emacs/" matrix: include: - os: linux dist: xenial env: EMACS=emacs26 - os: linux dist: xenial env: EMACS=emacs27 - os: linux dist: xenial env: EMACS=emacs-snapshot - os: osx osx_image: xcode10.1 env: EMACS=emacs26 - os: osx osx_image: xcode10.1 env: EMACS=emacs27 - os: osx osx_image: xcode10.1 env: EMACS=emacs-snapshot # - os: osx # osx_image: xcode10.1 # env: EMACS=aquamacs allow_failures: - os: osx # - os: linux # dist: xenial # env: EMACS=emacs27 # - os: osx # osx_image: xcode10.1 # env: EMACS=emacs27 # - os: osx # osx_image: xcode10.1 # env: EMACS=emacs-snapshot ## - env: EMACS=aquamacs install: - if [ "$TRAVIS_OS_NAME--${EMACS}" = 'linux--emacs26' ]; then export EMACS_EXE=emacs26; sudo add-apt-repository -y ppa:kelleyk/emacs && sudo apt-get -qq update && sudo apt-get -qq -f install && sudo apt-get -qq install emacs26 emacs26-el; fi - if [ "$TRAVIS_OS_NAME--${EMACS}" = 'linux--emacs27' ]; then export EMACS_EXE=emacs27; sudo add-apt-repository -y ppa:kelleyk/emacs && sudo apt-get -qq update && sudo apt-get -qq -f install && sudo apt-get -qq install emacs27 emacs27-el; fi - if [ "$TRAVIS_OS_NAME--${EMACS}" = 'linux--emacs-snapshot' ]; then export EMACS_EXE=emacs-snapshot; sudo add-apt-repository -y ppa:ubuntu-elisp/ppa && sudo apt-get -qq update && sudo apt-get -qq -f install && sudo apt-get -qq install emacs-snapshot emacs-snapshot-el; fi - if [ "$TRAVIS_OS_NAME--${EMACS}" = 'osx--emacs26' ]; then export EMACS_EXE=emacs26; brew install w3m && wget https://emacsformacosx.com/emacs-builds/Emacs-26.3-universal.dmg && hdiutil attach Emacs-26.3-universal.dmg && sudo ln -s /Volumes/Emacs/Emacs.app/Contents/MacOS/Emacs /usr/local/bin/${EMACS_EXE}; fi - if [ "$TRAVIS_OS_NAME--${EMACS}" = 'osx--emacs27' ]; then export EMACS_EXE=emacs; brew install emacs && brew install w3m; fi - if [ "$TRAVIS_OS_NAME--${EMACS}" = 'osx--emacs-snapshot' ]; then export EMACS_EXE=emacs; brew install emacs --HEAD && brew install w3m; fi # - if [ "$TRAVIS_OS_NAME--${EMACS}" = 'osx--aquamacs' ]; then # export EMACS_EXE=aquamacs; # download_path=$(curl -s "https://api.github.com/repos/davidswelt/aquamacs-emacs/releases/latest" | grep 'browser_' | sed 's/.* .//;s/.$//') && # echo "${download_path}" && # wget "${download_path}" && # hdiutil attach "$(basename ${download_path})" && # ls /Volumes/A* && # sudo ln -s /Volumes/Aquamacs/Aquamacs.app/Contents/MacOS/Aquamacs /usr/local/bin/${EMACS_EXE}; # fi before_script: - autoconf --version - automake --version - gcc --version - make --version - w3m -version - echo EMACS_EXE=${EMACS_EXE} - which ${EMACS_EXE} - file $(which ${EMACS_EXE}) - ${EMACS_EXE} -Q --batch --eval=' (progn (message "%s" emacs-version) (require (quote package)) (push (cons "melpa" "http://melpa.org/packages/") package-archives) (package-refresh-contents) (package-initialize) (package-install (quote apel)) (package-install (quote flim)) )' 2>&1 - export good_msg="\n\nconfiguration and make successfully completed\n\n"; - export bad_msg="\n\nconfiguration and make failed;\nattempting w3m-hack install\n\n"; script: if autoconf && ./configure --with-emacs=${EMACS_EXE} && make ; then printf "$good_msg"; elif [ "$TRAVIS_OS_NAME" = 'osx' ]; then printf "$bad_msg" && ${EMACS_EXE} -Q --batch -l w3mhack.el NONE -f w3mhack-nonunix-install ; fi emacs-w3m-emacs-w3m-4f27810/BUGS.ja000066400000000000000000000067701434375002100164420ustar00rootroot00000000000000$Date$ ■ TODOs stopping release --> URL の encode 問題の解決 [emacs-w3m:05387], [emacs-w3m:05576] --> 各種 form 用の face の変更 [emacs-w3m:05490] --> xml.el のインストーラの完成 [emacs-w3m:05353] ■ TODOs --> 開発ポリシーの合意事項一覧を作成する.できれば英訳も. --> rendering 速度の改善 --> w3mnav.el 相当の処理ができるように w3m-relationship-estimate-rules を見直す.[emacs-w3m:06211] --> WiKi 用の拡張を入れる [emacs-w3m:06841] --> w3m-correct-charset-alist と w3m-charset-coding-system-alist の整 理.[emacs-w3m:06109] --> 意図しない字形の変換を避けるため,できるだけ元のページの文字コー ドのままで処理を行うようにする. [emacs-w3m:06674], [emacs-w3m:06701] --> ucs_conv=0 オプションが利用できない環境がある http://emacs-w3m.namazu.org/ml/msg06787.html --> w3m-safe-* コマンドの整理.「安全」を定義する必要あり. [emacs-w3m:06240] --> shimbun の配布パッケージの分割 [emacs-w3m:05607] --> w3m-copy-buffer() で,history に格納されている buffer-local properties (form data などを含む) を捨てずにコピーする.--ky --> about: で始まる url のページを既存の history とは別扱いにする. [emacs-w3m:05670] -- ky --> https なページの閲覧に関わる諸問題の解明と対策. [emacs-w3m:04901, 04857] --> file-name- 系の関数を url 文字列の処理に使うのは問題あり. [emacs-w3m:04799] --> 変数/関数の docstring と comment の英語の整備.-- ky --> frame 対応 --> ソースコード中の FIXME を直す --> エラーチェックが手抜きなのを直す ■ Known BUGs (1) XEmacs で ">" "," すると,カーソルが隠れる時がある. XEmacs で w3m-horizontal-shift-columns の値を char-width より小さく すると,"," が動かないときがある.XEmacs は表示幅が異なる文字が混在 している場合の制御が未完成なので,仕方が無いのだが. (2) という書式で指定されたアンカーにジャンプできない. [emacs-w3m:05816] (3) w3m-antenna-sites の customize がうまく動かない.[emacs-w3m:06213] (4) プロセスが同時に大量に呼び出されてエラーになることがある. [emacs-w3m:06896], [emacs-w3m:06901] ■ Known LIMITATIONs (1) w3m の制限により Del/Strikeの打ち消し線がテーブルを跨がる. ■ Wishlist and Idea Notes --> keybind の整理 [emacs-w3m:06253] --> メニューの整理 [emacs-w3m:06254] --> Fontify pages display text/plain sources. source code の text/plain なページを閲覧しているときは font-lock してくれると嬉しいかもしれない. --> Info / man 閲覧機能の追加 --> Bookmark と BBDB or LSDB の連携などが出来たら嬉しいかも知れない. --> キャッシュ機構の整理と永続コンテンツ [emacs-w3m:01076] --> ソースの整理 --> 説明文書の整備 --> [emacs-w3m:00011] などのメーリングリストのヘッダ文字列を自動的に URL に変換してジャンプする機能がほしい. --> [emacs-w3m:05901] 406 Not Accetable & Alternates なページを閲覧す る方法が欲しい. --> [emacs-w3m:06103] widget-based antenna editor --> configure 時に --with-icondir=... で指定した値を自動的に w3m-icon-directory の初期値として反映してほしい.[emacs-w3m:03912] --> shimbun --> ML archive の検索エンジンとの連動 --> 掲示板などの場合は post も出来るようにならないか? ■ How to access our mailing list archive [emacs-w3m:#####] のようにメーリングリストの記事が指定されている場合 は,以下のような記事番号を含む URI のページにアクセスすると,その記事 を見つけることが出来ます. http://emacs-w3m.namazu.org/ml/##### Local Variables: mode: indented-text coding: euc-japan-unix fill-column: 72 End: emacs-w3m-emacs-w3m-4f27810/COPYING000066400000000000000000000431261434375002100164150ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. emacs-w3m-emacs-w3m-4f27810/ChangeLog000066400000000000000000017751411434375002100171460ustar00rootroot000000000000002022-12-07 Katsumi Yamaoka Silence warnings when compiling w3m.el individually ([emacs-w3m:13914]) * w3m.el (toplevel): Always require tab-line for tab-line-exclude-modes; require w3m-fb-mode before it is referenced. 2022-11-29 Katsumi Yamaoka Support Emacs 30 * aclocal.m4 (AC_PATH_EMACS): Support Emacs 30. 2022-11-17 Tatsuya Kinoshita Avoid non-lexbind dotimes (PR#116) * w3m-util.el (w3m-puny-encode1): Avoid non-lexbind dotimes. cf. 2022-11-16 Katsumi Yamaoka Make unsafe url warning text customizable (issue #115) * w3m.el (w3m-unsafe-url-warning-default-function): New function. (w3m-unsafe-url-warning): New user option and face. (w3m-fontify-anchors): Use them. 2022-11-08 Katsumi Yamaoka Remove let-binding of inhibit-point-motion-hooks that's been obsoleted * w3m-bug.el (report-emacs-w3m-bug): * w3m.el (w3m-horizontal-scroll, w3m-horizontal-recenter) (w3m-end-of-line): Remove let-binding of inhibit-point-motion-hooks. 2022-11-07 Katsumi Yamaoka Work for pages compressed by brotli reported by chipschap (issue #112) * w3m.el (w3m-decoder-alist, w3m-encoding-alist): Add brotli. 2022-10-27 Katsumi Yamaoka * aclocal.m4, configure.ac: Use `grep -E' instead of egrep. 2022-09-02 Katsumi Yamaoka Silence the byte compiler * w3mhack.el (w3mhack-generate-load-file): Use loaddefs-gen.el rather than autoload.el that has been marked obsolete in Emacs 29. * mew-w3m.el (mew-mime-text/html-w3m): Silence Emacs 29's byte compiler. ([emacs-w3m:13880]). 2022-08-23 Katsumi Yamaoka * w3m-bookmark.el, w3m-form.el, w3m-hist.el, w3m-search.el, w3m.el: * w3mhack.el: Use line-beginning-position and line-end-position instead of point-at-bol and point-at-eol marked obsolete in Emacs 29.1. 2022-08-05 Katsumi Yamaoka * w3m.el (w3m-fontify-anchors): Warn suspicious links (as shr does). 2022-07-29 Katsumi Yamaoka Simplify tab-line stuff * w3m.el (w3m-use-tab, w3m-use-tab-line, w3m-restore-tab-line) (w3m-display-mode): Simplify them as tab-line-format is always existent and tab-line.el provides tab-line-exclude-modes. 2022-07-21 Michael Heerdegen * w3m-search.el (w3m-search-engine-alist): Update wikipedia search urls ([emacs-w3m:13872]). 2022-06-06 Katsumi Yamaoka Fix unquoted single quotation marks in docstrings * w3m-dtree.el, w3m-mail.el, w3m-session.el, w3m.el 2022-05-06 Thierry Volpiatto * w3m-form.el (w3m-form-p): Correct argument order in call to aref (issue #110). 2022-04-26 Katsumi Yamaoka Work for Emacs 29.1 that implemented new timestamp format * w3m-antenna.el (w3m-antenna-check-rss, w3m-antenna-site-update): * w3m-form.el (w3m-form-make-form-data): * w3m-session.el (w3m-session-save, w3m-session-automatic-save) (w3m-session-deleted-save, w3m-session-crash-recovery-save) (w3m-session-select-copy): * w3m.el (w3m--retrieve-and-render--handler-function) (w3m-retrieve-and-render): Use old timestamp format. * w3m-util.el (w3m-time-newer-p, w3m-time-lapse-seconds): Refactor. 2022-04-05 Katsumi Yamaoka Make the builder work for autoconf 2.70 and up as well * aclocal.m4 (AC_CACHE_VAL): Replace AC_FD_CC with AS_MESSAGE_LOG_FD. * configure.ac: Rename from configure.in; run autoupdate. * Makefile.in (configure): Replace configure.in with configure.ac. 2022-04-05 Katsumi Yamaoka Drop Emacs 26 support * aclocal.m4, mime-w3m.el, w3m-util.el, w3m.el, shimbun/shimbun.el Drop Emacs 26 support because of Emacs 28.1 having been released. 2021-11-22 Katsumi Yamaoka Conceal warnings for the case SEMI is absent (issue #108) * mime-w3m.el: Silence the byte compiler. 2021-10-09 Katsumi Yamaoka Use rfc6068.el if possible instead of rfc2368.el (issue #109) * w3m.el (w3m-goto-mailto-url): Use rfc6068.el for newer Emacsen. 2021-09-22 Katsumi Yamaoka * w3m-filter.el (w3m-filter-configuration): Make Custom-set work. * w3m-bookmark.el (w3m-bookmark-menubar-update): Add a workaround to avoid a miscellaneous error. 2021-09-17 Katsumi Yamaoka Treat application/emacs-lisp as text/plain ([emacs-w3m:13845]) * w3m.el (w3m-content-type-alist): Add application/emacs-lisp so to be treated as text/plain. 2021-09-03 Boruch Baum user-agents: bugfix, update, improve friendliness (PR#106) * w3m.el (w3m-user-agent-alist): Update values. (w3m-user-agent-site-specific): New feature: Allow referencing to elements in variable w3m-user-agent-alist. (w3m-user-agent-site-specific-alist): Update definition for new feature. 2021-09-03 Boruch Baum * w3m.el (w3m-user-agent-default-alist): Fix macro element. 2021-09-02 Boruch Baum New and improved filter for github (PR#105) * w3m-filter.el (w3m-filter-github-repo-main-page): Delete obsolete function. (w3m-filter-github, w3m-filter-configuration): Replace with new one. 2021-08-17 Katsumi Yamaoka Add timeout to w3m-download * w3m.el (w3m-download-timeout): New function. (w3m-download): Use it. 2021-08-16 Katsumi Yamaoka Hard-code the shell used in `w3m-download' with "sh" ([emacs-w3m:13826]) * w3m.el (w3m-download): Replace `shell-file-name' with "sh". 2021-08-05 Boruch Baum Replace (progn (defvar VAR VAL "DOC") (make-variable-buffer-local 'VAR)) with (defvar-local VAR VAL "DOC") --- (PR#101) * w3m.el: Do it. 2021-08-02 Boruch Baum Bugfix: db-history single-page advances point too far (PR#100) * w3m.el (w3m--goto-url--handler-function): Do. 2021-07-29 Boruch Baum * w3m.el (w3m--goto-url--handler-function): Position point on the first entry in the db history; add a docstring. (PR#99) 2021-07-28 Boruch Baum force-wide-display (PR#98) * w3m.el (w3m--ignore-fill-column, w3m-force-wide-list): New variables. (w3m-create-page, w3m-display-width): Use them. (w3m-display-width): Logic bug fixes. (w3m-about-db-history): Reverse layout so time/date are on left side. Manually force variable w3m-fill-column to -1. 2021-06-15 Victor J. Orlikowski Bugfix: make w3m-select-buffer-toggle-style work properly (PR#95) * w3m.el (w3m--setup-popup-window): Run selected-window each time because it varies during the process (PR#95). 2021-05-07 Katsumi Yamaoka Move w3m-queries-log-file from w3m-util.el to w3m.el * w3m-util.el (w3m-queries-log-file): Move it to w3m.el. * w3m.el (w3m-queries-log-file): Move it from w3m-util.el. 2021-05-06 Boruch Baum * w3m-util.el (w3m-queries-log-file): Use expand-file-name for variable default definition. 2021-05-04 Boruch Baum Tweaks to handling url query parts (PR#94) * w3m-util.el (w3m-queries-log-file): Improve defcustom. (w3m--url-get-queries): New function. (w3m--url-strip-unwanted-queries): Improve name of function. was w3m--url-strip-queries. * w3m.el (w3m--retrieve-1--handler-function) (w3m--goto-url--valid-url): Apply new function name. 2021-04-13 Boruch Baum * w3m.el (w3m-external-view): When a w3m buffer is created for the sole purpose of opening a URI in an external program, delete the unnecessary w3m buffer (PR#92). 2021-04-09 Boruch Baum Revert last change that made `w3m-process-stop' do kill page buffer * w3m-proc.el (w3m-process-stop): Revert. * w3m.el (w3m--goto-url--valid-url): Revert. 2021-04-08 Boruch Baum Fixes for w3m-current-url = NIL, loading images from ext program (PR#92) * w3m-proc.el (w3m-process-stop): Add optional arg to kill the current buffer. * w3m.el (w3m--goto-url--valid-url): Use it. (w3m-toggle-inline-images): Don't let user-error start a backtrace when toggle-debug-on-error is set. (w3m-image-page-displayed-p, w3m-view-previous-page) (w3m--goto-url--handler-function): when w3m-current-url is NIL, don't perform string operations on it. (w3m-delete-buffer-if-empty): Only operate on live buffers. 2021-03-29 Katsumi Yamaoka Delete useless history warning * w3m-hist.el (w3m-history-add-properties): Don't warn about null hist. 2021-03-21 Katsumi Yamaoka Silence the byte compiler on Emacs 28 * mew-w3m.el (mew-w3m-ext-url-fetch): * w3m-proc.el (w3m-process-with-null-handler): Init let-bound var `handler' to nil explicitly. 2021-02-26 Katsumi Yamaoka Don't show a backstage while performing `text-scale-adjust' * w3m.el (w3m-text-scale-adjust): Don't show a halfway of redisplay. 2021-02-24 Katsumi Yamaoka Make text-scale-adjust work * w3m.el (w3m-with-text-scale-mode): Fix way to refer remapped face. Reported by Dan Jacobson. 2021-02-01 Katsumi Yamaoka Docfix so not to be wider than 80 chars * w3m-filter.el (w3m-toggle-filtering): * w3m-lnum.el (w3m-lnum-universal): Docfix. * w3mhack.el (w3mhack-generate-load-file): Fold long `\(fn ' lines. 2021-02-01 Katsumi Yamaoka Bugfix 'w3m-previous-image doesn't work' ([emacs-w3m:13747]) * w3m.el (w3m-search-for-next-image-boundary) (w3m-search-for-previous-image-boundary): Make it work for an image on the bottom edge or the top edge of the page. (w3m-goto-next-image): Refactor. (w3m-next-image): Don't miss an image on the top edge of the page. (w3m-goto-previous-image): Make sure an image exists at the position to go to. 2021-01-05 Katsumi Yamaoka * w3m.el (w3m-download): Add option to w3m so to work for downloading any kinds of contents ([emacs-w3m:13731]). Thanks to Kinoshita-san. 2021-01-03 Boruch Baum * w3m.el (w3m-view-previous-page): When currently in an "about://" url, return to the calling url (PR#89 for upstream). * w3m-hist.el (w3m-history-push): Don't put "about://" pages in the history (PR#89 for upstream). 2020-12-28 Boruch Baum * w3m.el (w3m-select-buffer-mode): * w3m-session.el (w3m-session-select-mode): Set variable buffer-quit-function (PR#88). 2020-12-22 Boruch Baum * w3m-filter.el (w3m-filter-stackexchange): Update filter and correct bound errors (PR#87). 2020-10-27 Boruch Baum Protect against the nil value for a history plist [emacs-w3m:13716] Note: as the cause of it is not made clear yet, the one that should be fixed might be in another place. * w3m-hist.el (w3m-history-set-plist, w3m-history-modify-properties): Protect against the nil value for a history plist. 2020-11-29 Katsumi Yamaoka * w3m.el: Display error that occurs when loading w3m-init-file. 2020-11-26 Katsumi Yamaoka * w3mhack.el (w3mhack-generate-load-file): Quote "Local Variables". 2020-11-26 Katsumi Yamaoka Silence the byte compiler * w3m-util.el (w3m-easy-menu-add): New compat macro. * w3m-bookmark.el (w3m-setup-bookmark-menu): Use it. * w3m-session.el (w3m-setup-session-menu): Use it. * w3m-tabmenu.el (w3m-setup-tab-menu): Use it. * w3m.el (w3m-setup-menu): Use it. * w3mhack.el (Local Variables): Set no-byte-compile and others. 2020-11-03 Katsumi Yamaoka Move cursor to target dir when browsing local dir (bug#973666 of debian) * w3m.el (w3m--goto-url--handler-function): Move cursor to target dir. 2020-10-31 Boruch Baum * w3m-search.el (w3m-search-engine-alist): Update wikipedia search urls. 2020-10-29 Boruch Baum * w3m-util.el (w3m-remove-face-property): Work as it should do. ([emacs-w3m:13684]) 2020-10-21 Tsuyoshi CHO File author Tsuyoshi CHO's email address updated. Old was non-reach to the latest. * w3m.el: File author Tsuyoshi CHO's email address updated. 2020-09-16 Katsumi Yamaoka Remove youtube filter that no longer works as it has gotten to use javascript ([emacs-w3m:13676] Boruch Baum). * w3m-filter.el (w3m-filter-configuration): Remove youtube entry. (w3m-filter-youtube): Remove. 2020-09-09 Katsumi Yamaoka * w3m-ems.el (w3m-tab-move-right, w3m-tab-move-left): Do nothing if no room to move for given prefix argument. (w3m-tab-make-keymap): Pass prefix arg to w3m-tab-move-right/left. 2020-09-09 Boruch Baum * w3m-ems.el (w3m-tab-move-right, w3m-tab-move-left): BUGFIX: moving with prefix-arg > 1 was swapping tab positions instead of adjusting all tab numbers in between (PR#82). 2020-09-09 Katsumi Yamaoka Real fix to bug#969744 of debian * w3m.el (w3m--get-page-anchors): Don't miss some of plural name anchors that point to the same place. (w3m-search-name-anchor): Revert. 2020-09-08 Katsumi Yamaoka Work for a url like "...#36" (bug#969744 of debian) but "#36" is a part of the url, not the name, and acutually the name anchor is specified as "msg36" in the html source. cf. * w3m.el (w3m-search-name-anchor): Allow url as mentioned above. 2020-09-03 Katsumi Yamaoka 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. 2020-08-18 Katsumi Yamaoka * w3m-save.el (w3m-save-buffer-directory): Abolish. 2020-08-17 Boruch Baum * w3m-save.el (w3m-save-buffer-directory): Mark variable as deprecated in favor of `w3m-default-save-directory'. (w3m-save-buffer): Replace deprecated variable, and use function `w3m-read-file-name' instead of `read-file-name'. This has the consequence of updating a session's default save directory to the most recent used save diretory. Update docstring. * w3m.el (w3m-read-file-name): Rename and re-order args to be consistent with underlying emacs function `read-file-name', and update docstring. (w3m-download): Remove unnecessary `condition-case' (w3m-download, w3m-goto-ftp-url): update args for new version of `w3m-read-file-name' 2020-08-16 Katsumi Yamaoka * .travis.yml (allow_failures): Temporarily add builds on emacs27 that doesn't seem to be available on Travis CI at this time. (before_script): Fix melpa url. 2020-08-13 Katsumi Yamaoka Drop Emacs 25 support * .travis.yml, aclocal.m4, w3m-ems.el, w3m-hist.el, w3m-proc.el, * w3m-rss.el, w3m-save.el, w3m-search.el, w3m-session.el, w3m.el: Drop Emacs 25 support because of Emacs 27.1 having been released. 2020-07-13 Katsumi Yamaoka Automatic refilling page according to `text-scale-mode' * w3m.el (w3m-with-text-scale-mode): New macro. (w3m-create-text-page): Use it. (w3m-text-scale-adjust): New command that overrides text-scale-adjust. (w3m-redisplay-this-page): Don't show progress message. 2020-07-01 Boruch Baum * w3m-search.el (w3m-search-engine-alist): Update url for duckduckgo. 2020-06-29 Katsumi Yamaoka * w3m.el (w3m-search-for-next-image-boundary): Fix a bug that it tried to find only the `w3m-image-hseq' property ([emacs-w3m:13624]). (w3m-fix-melpa-installation): Find the git revision hash in w3m-pkg.el precedently than archive-contents. 2020-03-25 Katsumi Yamaoka * w3mhack.el (w3mhack-makeinfo): Override texinfo-do-itemize. 2020-03-18 Kazuhiro Ito * doc/emacs-w3m-ja.texi (Installing Emacs-w3m): Add dropped @samp command for --without-compress-install option. 2020-03-18 Katsumi Yamaoka Make w3m-toggle-inline-image work properly when region is active * w3m.el (w3m-search-for-previous-image-boundary): Refactor. (w3m-toggle-inline-image): Work properly when region is active. 2020-03-17 Katsumi Yamaoka Fix how it works at just the image boundary (issue #76) * w3m.el (w3m-search-for-next-image-boundary) (w3m-search-for-previous-image-boundary): Rename from w3m-search-for-next-image and w3m-search-for-previous-image. (w3m-search-for-previous-image-boundary): Don't search for the one previous image if it is at just the boundary position. (w3m-toggle-inline-image): Turn off a single image, not all. 2020-03-17 Katsumi Yamaoka Abolish own horizontal scrolling stuff (bug#953768 of debian) * w3m.el (w3m-auto-show, w3m-horizontal-on-screen): Abolish. (w3m-after-cursor-move-hook): Remove w3m-auto-show. (w3m-auto-show, w3m-horizontal-scroll-division) (w3m-next-anchor, w3m-previous-anchor, w3m-next-form) (w3m-previous-form, w3m-next-image, w3m-previous-image): Don't run w3m-horizontal-on-screen. (w3m-mode): Don't modify auto-hscroll-mode. (w3m-horizontal-scroll): No need to move point. 2020-03-15 Katsumi Yamaoka Distinguish two or more consecutive same images (issue #76) * w3m.el (w3m-fontify-images): Mark an image with seq#. (w3m-search-for-next-image, w3m-search-for-previous-image): New functions that use seq# for searching for an image boundary. (w3m-toggle-inline-images-internal, w3m-toggle-inline-image) (w3m-toggle-inline-image, w3m-resize-inline-image-internal) (w3m-goto-next-image, w3m-goto-previous-image): Use them. (w3m-next-image, w3m-previous-image): Simplify. 2020-03-12 Katsumi Yamaoka * w3m.el (w3m-anchor, w3m-arrived-anchor, w3m-current-anchor): Improve the links visivility (bug#953631 of debian). 2020-01-11 Hideyuki SHIRAI Work for ([emacs-w3m:13583]) cf. * mew-w3m.el (mew-w3m-safe-url-regexp): Add data:; make customizable. * w3m.el (w3m-toggle-inline-images): Fix position to fetch safe-url. 2020-01-05 Katsumi Yamaoka New user option w3m-redisplay-pages-automatically-p (issue #75) * w3m.el (w3m-redisplay-pages-automatically-p): New user option. (w3m-mode): Don't modify window-configuration-change-hook and window-size-change-functions if it is nil (issue #75). (w3m-use-tab): Eval-and-compile. 2020-01-04 Katsumi Yamaoka * w3m.el (w3m-download): Temporarily add a url string that a query part is not stripped to file-name-history (M-p command shows it); create destination directory if not exists. 2019-12-25 Katsumi Yamaoka * w3m.el (w3m-download): Decompress downloaded file according to Content-Encoding header. 2019-12-18 Boruch Baum Bugfix for changes to PR#50 * w3m.el (w3m-select-buffer-show-this-line): BUGFIX: Revert commit 69064d1e6e and 6dfac56d92 to prevent buffers being marked 'seen' when performing fly-by scroll in select-buffer window. 2019-11-28 Katsumi Yamaoka Miscellaneous fixes * w3m.el (w3m--prompt-for-unknown-content-type): Don't use keyboard-quit as it causes "error in process sentinel: Quit". (w3m-create-page): Noop if it does quit. (w3m-redisplay-pages-automatically): Silence w3m-redisplay-this-page. 2019-11-27 Katsumi Yamaoka Improve unknown content-type handling * w3m.el (w3m--prompt-for-unknown-content-type): Restore the page view if the one of which the content-type is unknown tried to view; return a cons of content-type and urls, where urls is a cons of a url to have been restored and a url to download or external-view. (w3m-create-page): Restore url and title after trying to view url of unknown content-type. (w3m-view-previous-page, w3m-redisplay-this-page): Don't store window positions to history if the new arg `no-store-pos' is given. 2019-11-26 Katsumi Yamaoka * w3m.el (w3m-create-page): Check if image type is valid as well. 2019-11-25 Katsumi Yamaoka See major-mode rather than buffer name to test if it is in w3m-mode * w3m-sesseion.el (w3m-session-goto-session): Test major-mode; bind w3m-pop-up-windows and w3m-pop-up-frames to nil. 2019-11-25 Foo Bar <4829djaskdfj@gmail.com> Make regexp match buffer name that is arbitrary but begins with *w3m * w3m-sesseion.el (w3m-session-goto-session): Fix regex used to detect if there are visible w3m windows. Used when restoring a w3m session (PR#74). 2019-11-22 Katsumi Yamaoka Enable image/webp, etc. to display * w3m.el (w3m-image-type-alist): Build default value from image-types; use defvar instead of defconst. (w3m-image-type): Refer to ImageMagick variables; return `imagemagick', `image-convert' or `convert' if image wants to be converted. * w3m-ems.el (w3m-create-image, w3m-create-resized-image): * w3m.el (w3m-create-image-page): Don't use w3m-image-type-available-p redundantly with w3m-image-type. * w3m-ems.el (w3m-create-image): Convert image if necessary, or pass content-type to create-image when using image-convert. 2019-11-19 Katsumi Yamaoka * w3m.el (w3m-download): Check for downloading status. 2019-11-12 Katsumi Yamaoka Work for downloading empty file (bug#944574 of debian) * w3m.el (w3m-download): Make awk create a file even if it is empty. 2019-11-12 Katsumi Yamaoka Quote lang spec defined in w3m-accept-languages (bug#944519 of debian) Language specifications defined with the "accept_language" entry in the ~/.w3m/config file may possibly be the one like "en;q=1.0", of which ";" will break a shell command. This fix makes it quote such a letter with `\'. * w3m.el (w3m-download): Quote ; as well as whitespace in shell command. 2019-11-11 Katsumi Yamaoka Make it fast to load w3m.elc (issue #73) Change the way to update the value of `w3m-content-type-alist' so to do on demand instead of updating it fully according to `mailcap-mime-data' at the startup. For example, the initial viewing method for the content type "image/jpeg" is `(mailcap-mime-info "image/jpeg")', but when viewing a jpeg image for the first time it will be replaced with `("real-viewer" file)'. * w3m.el (w3m-content-type-alist): Don't parse mailcap-mime-data. (w3m-external-view): Parse mailcap-mime-data and update w3m-content-type-alist. 2019-11-05 Katsumi Yamaoka Fix a bug that has been standing for 13.5 years * w3m.el (w3m-reload-all-pages): Pass arg to w3m-reload-this-page. 2019-11-05 Katsumi Yamaoka Restore tab-line if it is broken * w3m.el (w3m-restore-tab-line): New function. (w3m-reload-this-page, w3m-redisplay-this-page): Use it. 2019-10-30 Katsumi Yamaoka Add w3m-mode to tab-line-exclude-modes when necessary * w3m.el (w3m-use-tab, w3m-use-tab-line, w3m-display-mode): Add w3m-mode to or remove it from tab-line-exclude-modes. 2019-10-27 Spenser Truex Improve perldoc with customizable variable, and saner default (PR#72) * w3m-util.el (w3m-ensure-slash): New function. * w3m-perldoc.el (w3m-perldoc-base-url): New user option. (w3m-perldoc-pretty): New function. (w3m-perldoc): Use them. 2019-10-02 Katsumi Yamaoka Abolish w3m-max-anchor-sequence (issue #71) * w3m.el (w3m-max-anchor-sequence): Abolish. * w3m-form.el (w3m-form-parse-and-fontify): * w3m.el (w3m-clear-local-variables, w3m-copy-local-variables) (w3m-fontify-anchors, w3m-next-anchor, w3m-previous-anchor): Don't handle/use w3m-max-anchor-sequence. 2019-10-01 Katsumi Yamaoka w3m-next-anchor and w3m-previous-anchor return t if success (issue #71) * w3m.el (w3m-next-anchor, w3m-previous-anchor): Return t if success. 2019-09-30 Katsumi Yamaoka Improve TAB command behavior in Gnus article * w3m.el (w3m-make-help-echo): Truncate message so to fit window width if backward-button or forward-button calls this function. (w3m-fontify-anchors): Add a button widget to only the first anchor. (w3m-next-anchor, w3m-previous-anchor): Rewrite. (w3m-goto-next-anchor, w3m-goto-previous-anchor): Abolish. 2019-09-25 Katsumi Yamaoka Prevent echo area from being enlarged when a url is shown unintendedly * w3m.el (w3m-print-this-url): Set message-truncate-lines if this function is called non-interactively. (w3m-fix-melpa-installation): Restore c9cdb7e change. 2019-09-25 Katsumi Yamaoka Make TAB key work again in Gnus article buffer (bug#37193) * w3m.el (w3m-handle-non-anchor-buttons): Rename variable and function names from w3m-imitate-widget-button. (w3m-fontify-anchors): Add button and category text props to an anchor so that forward-button may recognize it; remove widget-button stuff; add a dummy widget to rendered area for Emacs <=26. (w3m-next-anchor, w3m-previous-anchor): Run forward-button instead of widget-forward. 2019-09-25 Katsumi Yamaoka * w3m.el (w3m-fix-melpa-installation): Eval-and-compile. * doc/Makefile.in (PDFTEX): Default to XeTex instead of LuaTex. 2019-09-20 Katsumi Yamaoka Create w3m-load.el also when performing package-reinstall * w3m.el (w3m-fix-melpa-installation): Run it also when performing package-reinstall in the ccondition w3m.elc is already loaded. 2019-09-19 Katsumi Yamaoka * w3m.el (w3m-fix-melpa-installation): Fix criteria to check if w3m-load.el should be created or updated; report it if it is done. 2019-09-18 Katsumi Yamaoka Create w3m-load.el file in melpa installation ([emacs-w3m:13542]) * w3m.el (w3m-fix-melpa-installation): New function; add it to after-load-functions. * w3m-bug.el (report-emacs-w3m-bug-system-informations): Always show emacs-w3m-git-revision even if it is unbound; add (featurep 'w3m-load); delete Meadow-version. (report-emacs-w3m-bug): Don't error out when w3m-load.el is missing; add autoload cookie; unset buffer-modified-p in mail buffer. 2019-09-12 Katsumi Yamaoka w3m-view-this-url-new-session work in background ([emacs-w3m:13543]) * w3m.el (w3m-view-this-url-new-session): Enable it to work in background. (w3m-goto-url-new-session): Disable background mode if there is no other emacs-w3m buffer. 2019-09-12 Jose A. Ortega Ruiz Fix :set form of w3m-key-binding (issue #70) * w3m.el (w3m-key-binding): Fix :set form so as to quote an operand that could be the symbol `info', not only nil. 2019-09-11 Katsumi Yamaoka Declare some functions and variables for emacs-nox * w3m-ems.el (image-size, image-types): Declare. * w3m.el (mwheel): Require it when compiling. 2019-09-11 Katsumi Yamaoka Use tab-line if available instead of header-line ([emacs-w3m:13537]) * w3m.el (w3m-use-tab-line): New user option; default to t if tab-line-format is available. * w3m-ems.el (w3m-setup-tab-line): Rename w3m-setup-header-line; use tab-line-format if w3m-use-tab-line is non-nil instead of header-line-format. (w3m-tab-map[w3m-tab-make-keymap], w3m-tab-separator-map): Use tab-line for prefix key if w3m-use-tab-line is non-nil instead of header-line. (w3m-tab-separator): Remove variable; move to w3m-tab-line. (w3m-tab-line): Fix background color for the case w3m-use-tab is nil. * w3m.el (w3m-show-graphic-icons-in-tab-line): Rename w3m-show-graphic-icons-in-header-line. (w3m-header-line-title): Rename w3m-header-line-location-title. (w3m-header-line-content): Rename w3m-header-line-location-content. (w3m-header-line-background): New face. 2019-09-10 Katsumi Yamaoka Don't kill external process that is running (issue #69) * w3m.el (w3m-create-page): Fix PR#55; don't kill external process. (w3m-external-view-file): Don't error out when deleting temp file. 2019-09-10 Katsumi Yamaoka * aclocal.m4 (AC_EMACS_LISP): Fix redirect spells. 2019-08-30 Katsumi Yamaoka Improve/fix custom type for some user options * mime-w3m.el (mime-w3m-safe-url-regexp): * w3m-antenna.el (w3m-antenna-refresh-interval) (w3m-antenna-make-summary-function, w3m-antenna-make-summary-function) (w3m-antenna-sort-changed-sites-function) (w3m-antenna-sort-unchanged-sites-function): * w3m-bookmark.el (w3m-bookmark-default-section): * w3m-cookie.el (w3m-cookie-accept-domains, w3m-cookie-reject-domains): * w3m-dtree.el (w3m-dtree-directory-depth, w3m-dtree-indent-strings) (w3m-dtree-stop-strings): * w3m-favicon.el (w3m-favicon-size, w3m-favicon-cache-file) (w3m-favicon-type): * w3m-filter.el (w3m-filter-configuration, w3m-filter-rules): * w3m-form.el (w3m-form-textarea-edit-mode): * w3m-image.el (w3m-imagick-convert-program) (w3m-imagick-identify-program, w3m-resize-images): * w3m-lnum (w3m-lnum-context-alist, w3m-lnum-actions-custom-type): * w3m-mail.el (w3m-mail-subject): * w3m-namazu.el (w3m-namazu-arguments, w3m-namazu-index-alist): * w3m-perldoc.el (w3m-perldoc-pod2html-arguments): * w3m-session.el (w3m-session-load-last-sessions) (w3m-session-load-crashed-sessions): * w3m-symbol.el (w3m-symbol-custom-type, w3m-symbol): * w3m-util.el (w3m-strip-queries-alist): * w3m.el (w3m-command, w3m-display-ins-del, w3m-user-agent-alist) (w3m-user-agent-site-specific-alist, w3m-language) (w3m-command-arguments, w3m-command-arguments-alist) (w3m-no-proxy-domains, w3m-command-environment) (w3m-mailto-url-function, w3m-mailto-url-popup-function-alist) (w3m-pixels-per-character, w3m-image-default-background) (w3m-coding-system-priority-list, w3m-url-coding-system-alist) (w3m-default-directory, w3m-accept-languages, w3m-icon-directory) (w3m-home-page, w3m-encoding-type-alist) (w3m-charset-coding-system-alist, w3m-correct-charset-alist) (w3m-view-recenter, w3m-edit-function-alist) (w3m-url-local-directory-alist, w3m-new-session-url) (w3m-horizontal-scroll-division, w3m-markdown-converter) (w3m-dirlist-cgi-program, w3m-add-referer, w3m-puny-utf-16be) (w3m-uri-replace-alist, w3m-process-modeline-format) (w3m-ignored-image-url-regexp, w3m-select-buffer-window-ratio): Improve/fix custom type. Changes relation to custom type * w3m-image.el (w3m-imagick-convert-program-available-p): Return nil if noninteractive. 2019-08-29 Katsumi Yamaoka Make w3m-goto-url-new-session work correctly (issue #68) * w3m.el (w3m-goto-url-new-session): Work correctly according to w3m-use-tab w3m-pop-up-windows and w3m-pop-up-frames. (w3m-display-mode(function)): Set w3m-pop-up-windows adequately. 2019-08-28 Katsumi Yamaoka Devote system-type on Cygwin platform to be cygwin, not windows-nt * w3m.el (w3m-command-environment, w3m-use-cygdrive): Use cygwin, not windows-nt to compare with system-type to check if running on Cygwin. 2019-08-26 Katsumi Yamaoka * w3m.el (w3m-anchor-list-filter-alist): Fix custom type so not to say "CHANGED outside Customize" when customizing it initially. 2019-08-21 Katsumi Yamaoka Improve custom type for some user options * w3m-antenna.el (w3m-antenna-sites): * w3m-favicon.el (w3m-favicon-size, w3m-favicon-convert-args) (w3m-favicon-default-background): * w3m-filter.el (w3m-filter-configuration, w3m-filter-rules): * w3m-namazu.el (w3m-namazu-default-index-customize-spec) (w3m-namazu-index-alist): * w3m-search.el (w3m-search-engine-alist, w3m-search-default-engine): * w3m-util.el (w3m-strip-queries-alist): * w3m.el (w3m-decoder-alist, w3m-popup-frame-parameters) (w3m-anchor-list-filter-alist): Improve custom type. 2019-08-20 Hideyuki SHIRAI Fix position to be jumped to name anchor ([emacs-w3m:13526]) * w3m.el (w3m-anchor-list-filter-alist): Allow not-match regexp; don't prune wikipedia's name anchor matching cite_.*[0-9] by default. (w3m--filter-page-anchors): Handle not-match regexp. (w3m--get-page-anchors): Fix name anchor potision to be jumped to. 2019-08-20 Katsumi Yamaoka Fix bug that caused issue #66 * w3m.el (w3m-toggle-inline-images-internal): Make lexical variable `start' separate from the one with the same name used in synchronous procedures while running asynchronous processes (issue #66). (w3m-about): Renew home page address. 2019-08-19 Katsumi Yamaoka Bugfix: Don't break the value of w3m-content-type-alist * w3m.el (w3m-external-view): Don't run nreverse on an element of w3m-content-type-alist. 2019-08-14 Filipp Gunbin Fix saving and restoring of a session (PR#67) * w3m-session.el (w3m-session-save): Fix session saving putting previous position instead of current. (w3m-session-goto-session): Add current page to history before restoring w3m-history. Data is taken from the session itself. 2019-08-08 Katsumi Yamaoka Don't load cl for Emacs 26 and greater * w3m-form.el, w3m-proc.el, w3m.el: Don't load cl. * w3m-form.el (w3m-form-method): * w3m.el (w3m-arrived-time, w3m-arrived-get): Use gv-define-simple-setter or gv-define-setter instead of defsetf. * w3m-proc.el (w3m-gensym): Remove. (gensym): New compiler macro for Emacs 25. (w3m-process-with-null-handler, w3m-process-with-wait-handler) (w3m-process-do, w3m-process-do-with-temp-buffer): Use gensym instead of w3m-gensym. * w3m-hist.el, w3m-rss.el, w3m-save.el, w3m-search.el, w3m-session.el: * w3m.el: Add comment about cl. 2019-08-07 Katsumi Yamaoka Make charset symbols in w3m-halfdump-command-arguments substitutable ([emacs-w3m:13516]) * w3m.el (w3m-halfdump-command-arguments): Revert the value to that of before turning lexical-binding on. (w3m-w3m-expand-arguments): Dynamically bind the `charset' symbol temporarily; accept it as an optional argument. (w3m-rendering-half-dump): Pass charset to w3m-w3m-expand-arguments as an argumant; add docstring. 2019-08-05 Katsumi Yamaoka Work for file and url specified in w3m-content-type-alist (issue #65) * w3m.el (w3m-external-view): Revert. (w3m-external-view-file): Substitute `file' and `url' specified in `w3m-content-type-alist' with the values of the lexical argumants. 2019-08-02 Katsumi Yamaoka * w3m.el (w3m-halfdump-command-arguments): Enable the symbol `charset' to be substituted by the lexical one. (w3m-toggle-inline-images-internal): Fix last wrong change made in revno 216aed6 about the lexical variable `end'. (w3m-external-view): Enable the symbols `file' and `url' specified in `w3m-content-type-alist' to be substituted by the lexical ones. 2019-08-01 Katsumi Yamaoka * w3m.el (w3m--filter-page-anchors): Regard nil anchor as junk ([emacs-w3m:13510]). 2019-08-01 Katsumi Yamaoka Turn on lexical-binding * mew-w3m.el (mew-w3m-ext-url-fetch): * w3m-antenna.el (w3m-antenna-check-hns, w3m-antenna-check-rss) (w3m-antenna-check-another-page, w3m-antenna-check-anchor) (w3m-antenna-check-page): * w3m-ems.el (w3m-create-image, w3m-create-resized-image): * w3m-favicon.el (w3m-favicon-retrieve): * w3m-image.el (w3m-imagick-start-convert-buffer): * w3m-proc.el (w3m-process-do-with-temp-buffer): * w3m-weather.el (w3m-about-weather, w3m-weather-run-filter-functions): * w3m.el (w3m-attributes, w3m-idle-images-show) (w3m-resize-inline-image-internal, w3m-w3m-dump-head) (w3m-w3m-attributes-1, w3m-w3m-dump-extra, w3m-w3m-retrieve) (w3m-w3m-retrieve-1, w3m-about-retrieve, w3m-download) (w3m-retrieve-and-render, w3m-external-view, w3m-external-view-file) (w3m-download-this-url, w3m-download-this-image) (w3m--goto-url--valid-url): Set lexical-binding; don't use lexical-let. Preparations toward lexical-binding * w3m-proc.el (w3m-process-with-null-handler) (w3m-process-with-wait-handler, w3m-process-do) (w3m-process-do-with-temp-buffer): * w3m.el (w3m-rendering-half-dump, w3m-view-this-url, w3m-submit-form) (w3m-external-view-file, w3m-download-this-url) (w3m-download-this-image): Declare variables that look like unused by the compiler as ignorable. * mew-w3m.el (mew-w3m-cite-blockquote, mew-w3m-cid-retrieve) (mew-w3m-ext-url-show, mew-w3m-ext-url-fetch): * w3m-antenna.el (w3m-about-antenna): * w3m-ems.el (w3m-insert-image, w3m-form-button) (w3m-tab-double-click-mouse1-function) (w3m-tab-double-click-mouse2-function): * w3m-proc.el (w3m-process-stop, w3m-process-sentinel): * w3m-weather.el (w3m-about-weather, w3m-weather-extract-contents) (w3m-weather-adjust-contents, w3m-weather-insert-title) (w3m-weather-expand-anchors): * w3m.el (w3m-entity-regexp, w3m-make-help-echo) (w3m-resize-inline-image-internal, w3m-canonicalize-url) (w3m-local-attributes, w3m-local-retrieve, w3m-data-retrieve) (w3m-download, w3m-create-image-page, w3m-tab-button-menu2) (w3m--goto-torrent-url, w3m--goto-url--handler-function, w3m-about) (w3m-about-header, w3m-about-history, w3m-about-db-history) (w3m-select-buffer-update): Mark arguments or variables that are unused (or look like unused by the compiler) with leading "_". * mew-w3m.el (w3m-mail-compose-with-mew): * w3m-antenna.el (w3m-antenna-check-all-sites): * w3m-ems.el (w3m-tab-move-right): * w3m.el (w3m-arrived-intern, w3m-fontify-anchors) (w3m--get-page-anchors, w3m-delete-buffer, w3m--goto-url--valid-url) (w3m--setup-popup-window): Remove unused or obsolete variables. * w3m-ems.el (w3m-image-type-available-p): Don't use the existing variable name `image-type' as an argument. * w3m.el (w3m-key-binding): Fix eval form to run in lexbind world. 2019-07-31 Katsumi Yamaoka * w3m-util.el (w3m-cancel-timer): New function. * w3m.el (w3m-idle-images-show, w3m-idle-images-show-unqueue): Use it. Make w3m-scroll-up-or-next-url work again ([emacs-w3m:13503]) * w3m.el (w3m-relationship-estimate-rules): Update Google regexps. (w3m-scroll-up-or-next-url): Make it work (broken at revno b5ec877). 2019-08-01 Katsumi Yamaoka * w3m-cookie.el (w3m-cookie-clear): Clear cached forms and post-data. 2019-07-29 Katsumi Yamaoka * w3m.el (w3m--retrieve-1--handler-function): Use w3m--url-strip-queries instead of w3m-url-strip-query (debian bug#933371: ). 2019-07-25 Katsumi Yamaoka * w3m.el (w3m-redisplay-pages-automatically): Recenter pages if and only if redisplaying takes place. 2019-07-23 Manuel Giraud * aclocal.m4 (AC_EMACS_LISP): Fix redirect spells ([emacs-w3m:13501]). 2019-07-24 Katsumi Yamaoka * w3m.el (w3m-redisplay-pages-automatically): Make recentering a little better. 2019-07-23 Katsumi Yamaoka * w3m.el (w3m-redisplay-pages-automatically): Recenter pages displayed in unselected windows as well when window config is changed. 2019-07-18 Katsumi Yamaoka * w3m-form.el (w3m-form-resume): Remove workaround. (w3m-form-parse-and-fontify): Don't put sequential numbers to buttons if they are the ones chopped into two or more pieces from a single button because the window width is too narrow. 2019-07-17 Tatsuya Kinoshita * w3mhack.el (w3mhack-module-list): Ignore `mime-w3m.el' when `mime-view.el' is not found. 2019-07-17 Katsumi Yamaoka * w3m-favicon.el (w3m-favicon-type): Don't error out on Emacs-noX where the image-types variable is not available (issue #63). 2019-07-12 Katsumi Yamaoka Work around certain html pages that embed java scripts * w3m-form.el (w3m-form-resume): Work around rendering certain html pages embedding java scripts that w3m would parse inconsistently. * w3m.el (w3m-redisplay-pages-automatically): Move FIXME comment to w3m-form-resume. 2019-07-11 Katsumi Yamaoka * w3m.el (w3m-scroll-up-or-next-url): Scroll up, not down (issue #61). 2019-07-09 Katsumi Yamaoka Replace ^ and $ with \` and \' in string-match regexps except for the case it runs to find a text in the middle of a string. * mew-w3m.el, w3m-bookmark.el, w3m-bug.el, w3m-cookie.el, w3m-dtree.el * w3m-filter.el, w3m-form.el, w3m-mail.el, w3m-session.el, w3m-util.el * w3m.el, w3mhack.el * shimbun/{mew-shimbun.el, nnshimbun.el, sb-2ch.el, sb-atom-hash.el} * shimbun/{sb-emacswiki.el, sb-impress.el, sb-infoshop.el} * shimbun/{sb-itmedia.el, sb-jpo.el, sb-lotusex.el, sb-mailman.el} * shimbun/{sb-opentechpress-jp.el, sb-palmfan.el, sb-redhat.el} * shimbun/{sb-rss.el, sb-sueddeutsche-de.el, sb-tcup.el,} * shimbun/{sb-wincefan.el, sb-yahoo-auctions.el, sb-zeit-de.el} * w3m-cookie.el (w3m-cookie-two-dot-domains-regexp): Remove. 2019-07-08 Katsumi Yamaoka Fix how w3m-pop-up-windows to control the behavior * w3m-util.el (w3m-popup-window-p): Don't care w3m-use-tab. * w3m-util.el (w3m-popup-buffer): * w3m.el (w3m-goto-url-new-session): Use switch-to-buffer-other-window for the w3m-pop-up-windows case. * w3m (w3m-display-mode(variable)): Default to the style corresponding to the values of w3m-use-tab, w3m-pop-up-windows, and w3m-pop-up-frames; fix custom type; add custom set. (w3m-display-mode(function)): Don't modify w3m-pop-up-windows if it is unnecessary; define it before it is used. * bookmark-w3m.el, w3m-session.el, w3m.el: Fix the term `no-popup' into `background'. * w3m.el: Protect against nil value for ffap-url-regexp (issue #59). 2019-07-07 Hideyuki SHIRAI * w3m-util.el (w3m-list-buffers): Use frame-parameter instead of abolished compat function w3m-fb-frame-parameter ([emacs-w3m:13491]). 2019-07-05 Katsumi Yamaoka * .travis.yml: Drop Aquamacs. 2019-07-05 Boruch Baum Emulate `awesome-bar' for bookmarked urls (PR#56) * w3m-bookmark.el (w3m-bookmark-add, w3m-bookmark-add-all-urls): Add new bookmarks to w3m-input-url-history for `awesome bar' feature. * w3m.el (w3m-input-url): Interpret bookmark titles as urls (ala awesome-bar). (w3m--get-url-from-bookmark-title): New function to enable the feature. (w3m-arrived-setup): Add bookmark urls and title strings to variable w3m-input-url-history. Bugfixes for content-type handling (PR#55) * w3m.el (w3m-create-page): Bugfixes: Properly construct collection for completing-read, return to original buffer when performing an external view or a download. Spin off two parts into separate functions: (w3m--unsupported-display, w3m--prompt-for-unknown-content-type) (w3m-external-view): Bugfix: was not respecting user's request to download. (w3m-external-view-file): Bugfixes: account for file arg being nil. Regex for suffix was failing for foo.bar.abc. Wasn't parsing external format for content types based upon substituting '%s' for filename. Fix issue #52: quick-search that requires POST-DATA (PR#54) * w3m.el (w3m-input-url): Don't remove potential POST-DATA from raw-input (ref github issue #52). Callers to this function will now need to perform w3m-canonicalize-url if and when they choose. (w3m-goto-url): Extract potential POST-DATA from output of w3m-input-url, and only afterwards perform w3m-canonicalize-url. (w3m-uri-replace-alist): Correct omissions in docstring. * w3m-antenna.el (w3m-antenna-add-current-url): * w3m-bookmark.el (w3m-bookmark-add-current-url): * w3m.el (w3m-download, w3m-edit-url) (w3m-view-url-with-external-browser): Perform w3m-canonicalize-url for w3m-input-url. 2019-07-04 Katsumi Yamaoka Improve w3m-buffer-unseen control * w3m.el (w3m-select-buffer-hook): Define before loading w3m-ems; add w3m-set-buffer-seen. (w3m-set-buffer-unseen, w3m-set-buffer-seen): No need to manipulate pre-command-hook. (w3m-select-buffer-show-this-line, w3m-select-buffer-quit): Run w3m-set-buffer-seen. Workaround to let w3m-session-selest-select get correct window width (w3m-display-width): Add a workaround with a FIXME comment so to work with w3m-session-select-select. 2019-07-04 Boruch Baum New feature: toggle unread status of buffer (PR#50) * w3m.el (w3m-select-buffer-toggle-unseen): New feature. (w3m-select-buffer-mode-map): Bind new feature to 'u'. (w3m-select-buffer-mode): Document new feature. w3m-session: bugfixes and new feature `copy a session' (PR#49) * w3m-session.el (w3m-session-select-delete): Advance to next session group element after delete, not previous. Handle case of final entry of session group being deleted. (w3m-session-delete): Deleting final element of a session removes the session entry itself, and returns to the parent page (ie. the list of sessions, not the list of session elements). (w3m-session-save): Remove catch/throw idiom (w3m-session-select-copy): New feaure. (w3m-session-select-mode-map): Bind new feature to `c' and `C'. (w3m-session-select-quit): Properly position point upon completion. Add a new command `w3m-search-name-anchor' bound to `C-c j' key (PR#46) * w3m.el (w3m--filter-page-anchors): New feature to prune junk anchors from anchor searches. (w3m-anchor-list-filter-alist): Junk anchor defcustom. (w3m--get-page-anchors): New funcion. (w3m-search-name-anchor): Prompt user interactively with list of available anchors, excluding those from w3m half-dump. Provide this function a keybinding `C-c j'. 2019-07-03 Boruch Baum Remove trackers embedded in URLs (PR#47) * w3m-util.el (w3m-strip-queries, w3m-strip-queries-alist) (w3m-queries-log, w3m-queries-log-file): New defcustoms. (w3m--url-strip-queries): New feature; strip unwanted trackers from urls. * w3m.el (w3m--retrieve-1--handler-function): Undo potential url modification performed by w3m-w3m-dump-extra. (w3m--goto-url--valid-url): Use new feature w3m--url-strip-queries; ensure query trackers are stripped at first opportunity. 2019-07-02 Katsumi Yamaoka * .dir-locals.el: New file; make indent-tabs-mode default to t. * w3mhack.el (w3mhack-module-list): Don't compile it. * Makefile.in (install-lisp): Install it. 2019-07-02 Boruch Baum Replace w3m-view-this-url-1 with w3m-goto-url{,-new-session} (PR#44) * w3m.el (w3m-view-this-url-1): Remove this function as unnecessary and duplicate. (w3m-view-this-url, w3m-view-this-url-new-session) (w3m-goto-new-session-url): Replace use of function w3m-view-this-url-1 with either w3m-goto-url or w3m-goto-url-new-session. * w3m-bookmark.el (w3m-bookmark-view-new-session): Replace use of function w3m-view-this-url-1 with w3m-goto-url-new-session. 2019-07-02 Katsumi Yamaoka * w3m.el (w3m-region): Improve the way to suspend undo recording. 2019-07-01 Katsumi Yamaoka * w3m.el (w3m-region): Suspend undo recording while rendering if the buffer enables undo. 2019-06-28 Eugene Sharygin * w3m.el (w3m-select-buffer-delete-buffer): Make sure the buffer on the current menu line to be shown after the deletion (PR#26). 2019-06-28 Katsumi Yamaoka * w3m.el (w3m-redisplay-pages-automatically): Rewrite it with a FIXME comment; use `window-configuration-change-hook' and also `window-size-change-functions' for Emacs 26 otherwise only `window-configuration-change-hook' to run it. * w3m-util.el (w3m-condition-case): Uncomment it. 2019-06-27 Katsumi Yamaoka Redisplay page automatically when its window width changes Suggested by Dan Jacobson * w3m.el (w3m-last-window-width): New buffer local variable. (w3m-mode): Initialize it. (w3m-redisplay-pages-automatically): New function to be added to `window-size-change-functions'. 2019-06-26 Katsumi Yamaoka A trial to make w3m-arrived-db a real hash table * w3m.el (w3m-arrived-setup): Make w3m-arrived-db a real hash table. (w3m-arrived-intern, w3m-arrived-shutdown, w3m-about-db-history): Use hash table functions. (w3m-arrived-db-size): Remove. * w3m-hist.el (w3m-history-add-arrived-db): Replace mapatoms w/ maphash. 2019-06-25 Katsumi Yamaoka * w3m-ems.el (w3m-toolbar-define-keys): Remove old Emacsen stuff that was left mistakenly in last commit. 2019-06-25 Katsumi Yamaoka Improve web contents cache handling * w3m.el (w3m-cache-articles): Handle cache pointer as well. (w3m-cache-setup): Make w3m-cache-hashtb a real hash table. (w3m-cache-header, w3m-cache-request-header, w3m-cache-remove-oldest) (w3m-cache-available-p): Use hash table functions. (w3m-cache-remove-oldest, w3m-cache-remove, w3m-cache-contents) (w3m-cache-request-contents): Use pointer instead of text props to find cache. (w3m-cache-remove): Detach the function core into w3m-cache-remove-1. 2019-06-19 Katsumi Yamaoka * aclocal.m4 (AC_EMACS_LISP): Protect against malfunctioned Emacs. (AC_PATH_EMACS): Clarify error message. * w3mhack.el (w3mhack-compile-file): Simplify. 2019-06-17 Katsumi Yamaoka Drop old Emacsen support Remove things used for keeping compatibility with Emacs 24 and older; Drop XEmacs support; Use cl-lib rather than cl as much as possible; Use declare-function instead of autoload for non-existent functions; Remove old face name aliases; Remove coding cookie for utf-8 as that is Emacs' default for .el files; Remove "*" from docstring for defcustom and defface * .travis.yml, Makefile.in, aclocal.m4, configure.in, doc/Makefile.in * doc/emacs-w3m-ja.texi, doc/emacs-w3m.texi * attic/addpath.el, bookmark-w3m.el, mew-w3m.el, mime-w3m.el, octet.el * w3m-antenna.el, w3m-bookmark.el, w3m-bug.el, w3m-cookie.el * w3m-dtree.el, w3m-ems.el, w3m-favicon.el, w3m-fb.el, w3m-filter.el * w3m-form.el, w3m-hist.el, w3m-image.el, w3m-lnum.el, w3m-mail.el * w3m-namazu.el, w3m-perldoc.el, w3m-proc.el, w3m-rss.el, w3m-save.el * w3m-search.el, w3m-session.el, w3m-symbol.el, w3m-tabmenu.el * w3m-util.el, w3m-weather.el, w3m.el, w3mhack.el * shimbun/{mew-shimbun.el, nnshimbun.el, sb-2ch.el, sb-airs.el} * shimbun/{sb-asahi-mytown.el, sb-asahi.el, sb-atmarkit.el} * shimbun/{sb-atom-hash.el, sb-atom.el, sb-cgi-board.el, sb-chise.el} * shimbun/{sb-cnet-jp.el, sb-cnet.el, sb-cnn-jp.el, sb-debian-jp.el} * shimbun/{sb-debian.el, sb-dennou.el, sb-digiko.el, sb-emacs-w3m.el} * shimbun/{sb-emacswiki.el, sb-engadget-ja.el, sb-excite.el, sb-fau.el} * shimbun/{sb-fml.el, sb-geocrawler.el, sb-glimpse.el, sb-gnome.el} * shimbun/{sb-hns.el, sb-ibm-dev.el, sb-impress.el, sb-itmedia.el} * shimbun/{sb-javaconf.el, sb-jpo.el, sb-kantei.el, sb-kde.el} * shimbun/{sb-kyoko-np.el, sb-lotusex.el, sb-m17n.el, sb-mailman.el} * shimbun/{sb-mainichi.el, sb-meadow.el, sb-mew.el} * shimbun/{sb-msports-nifty.el, sb-multi.el, sb-netbsd.el} * shimbun/{sb-nikkangendai.el, sb-nikkansports.el, sb-nikkei.el} * shimbun/{sb-nytimes.el, sb-orca.el, sb-palmfan.el} * shimbun/{sb-pcweb-column.el, sb-pocketgames.el, sb-rakuten.el} * shimbun/{sb-redhat.el, sb-rss.el, sb-ruby.el, sb-sankei.el} * shimbun/{sb-savannah.el, sb-slashdot-jp.el, sb-sml.el} * shimbun/{sb-sourceforge-jp.el, sb-tcup.el, sb-tdiary.el} * shimbun/{sb-tech-on.el, sb-text.el, sb-tigris.el, sb-toshiba.el} * shimbun/{sb-vinelinux.el, sb-wiki.el, sb-wikimedia.el} * shimbun/{sb-wincefan.el, sb-wired-jp.el, sb-x51.el} * shimbun/{sb-yahoo-auctions.el, sb-yahoo.el, sb-yomiuri-html.el} * shimbun/{sb-yomiuri.el, sb-yoshirin.el, sb-zdnet-jp.el, shimbun.el} Remove files * w3m-ccl.el, w3m-ucs.el, w3m-xmas.el, attic/rfc2368.el * doc/ptexinfmt.el, patches/* New implementation for w3m-download ([emacs-w3m:13326]) * w3m (w3m-download): Use awk to divide the output of `w3m -dump_extra' into header fed to Emacs and body to be saved in file; note that awk should be GNU awk that supports BINMODE and RT. (w3m-current-process): Modify docstring; now it's a list of processes. (w3m-buffer-setup): Show downloading indicator in the mode-line. (w3m--goto-url--valid-url): Treat w3m-current-process as a list. * w3m-proc.el (w3m-process-filter): Show downloading indicators. (w3m-process-modeline-string): Modify docstring; now it's an alist of downloading progress informations. (w3m-process-start-after): No need to reset w3m-process-modeline-string. 2019-06-07 Katsumi Yamaoka * w3m.el (w3m-select-buffer-show-this-line) (w3m-select-buffer-next-line): Keep the column position in the selection window when moving up or down ([emacs-w3m:13440]). * w3m-util.el (w3m-generate-new-buffer): Work regardless of w3m-use-title-buffer-name ([emacs-w3m:13441]). 2019-05-28 Katsumi Yamaoka Bugfix ([emacs-w3m:13417]) * w3m.el (w3m-search-name-anchor): Refactor; make the window positions sure to be set for the case where it runs in the background. (w3m-copy-buffer): Revert to the old function definition keeping the current arglist and its order; work for the background run suitably. Trivia: * w3m.el (w3m-view-this-url-new-session-in-background): Remove. (w3m--retrieve-and-render--handler-function): Make the "...has been retrieved" message sure to be shown for a while. (w3m-view-this-url-1): Always select the copied buffer. (w3m-view-this-url-new-session, w3m-goto-url-new-session): Don't show the progress message for the background run. (w3m--goto-url--handler-function): Show the "...has been retrieved" message when jumping to a name anchor in the background. 2019-05-27 Tatsuya Kinoshita * w3m-bookmark.el (w3m-bookmark-file-modtime): Chase links ([emacs-w3m:13427]). 2019-05-19 Boruch Baum * w3m-session.el (w3m-session-select-merge): New feature, allows moving data between sessions. (w3m-session-select-mode-map): Bind new feature to 'm' and 'M'. (w3m-session-select-mode): Document the new feature. * w3m-session.el (w3m-session-select-select): Don't quit after each individual session action. (w3m-session-goto-session): Preserve session buffer in its window, use w3m version of message function, remove needless nreverse, do not create duplicate buffers. 2019-05-09 Boruch Baum * w3m-bookmark.el (w3m-bookmark-add): Bugfix: Order of args to function string-match. Message text tweak. (w3m-bookmark-add-all-urls): Operate in all display modes, only ask for section once, provide sane default section, don't add bookmarks buffers, auto-refresh existing bookmark buffers, improve error handling, add tab character to whitespace regexp, use set-buffer instead of switch-to-buffer. 2019-05-09 Katsumi Yamaoka * w3m-filter.el (w3m-filter-configuration): Add a missing parameter to the w3m-filter-prefer-lazy-images section ([emacs-w3m:13396]). 2019-05-08 Katsumi Yamaoka * w3m-filter.el (w3m-filter-prefer-lazy-images): New filter that prefers a lazy image specified with data-src= rather than that of src= in img tags. (w3m-filter-configuration): Add it. 2019-05-07 Katsumi Yamaoka * w3m.el (w3m-browse-url): Refresh the already existing page if it is older than the site and the new arg REFRESH-IF-EXISTS is given. Off-list suggested by Dan Jacobson . 2019-05-06 Boruch Baum * w3m.el (w3m--goto-torrent-url): Change dependency `transmission-remote-cli' from required to recommended, and update documentation accordingly. 2019-05-05 Boruch Baum * w3m.el (w3m--goto-torrent-url): New feature to support torrent and magnet links, using for now external programs from the `transmission' suite. (w3m-goto-url): Integrate the new feature. 2019-05-03 Kazuhiro Ito * w3m-util.el (w3m-insert-string): Don't touch unibyte string. encode-coding-string may modify unibyte string. 2019-04-17 Tatsuya Kinoshita * w3m-search.el (w3m-search-engine-alist): Add &gbv=1 to www.google.com/search to prevent META refresh ([emacs-w3m:13355]). 2019-04-15 Boruch Baum * w3m.el (w3m-ctl-c-map): Assign console-friendly keybindings to replace C-., C-,, C->, C-<. (w3m-select-buffer-mode): Doc fix. (w3m-select-buffer-move-next, w3m-select-buffer-move-previous): New features for buffer listing. (w3m-select-buffer-mode-map): Keybindings for the new commands. * w3m-ems.el (w3m-tab-move-right, w3m-tab-move-left): Doc fix. (w3m-tab-move-next, w3m-tab-move-prior): defaliases for w3m-tab-move-right, w3m-tab-move-left. 2019-04-15 Boruch Baum * w3m.el bugfixes to allow loading new tabs in background. (w3m-goto-url-new-session): add optional arg NO-POPUP; replace undocumented use of prefix-arg for RELOAD, with toggle of default NO-POPUP value. (w3m-copy-buffer): allow tab load in background; remove duplicate arg JUST-COPY, major efficiency gains by using clone-buffer instead of repeating entire w3m processing; replace undocumented use of prefix-arg for renaming new copy, with toggle of default BACKGROUND value. (w3m--goto-url--valid-url): adjust args for new format of w3m-copy-buffer. (w3m-view-this-url-1): pass arg NO-POPUP to allow tab load in background. 2019-04-14 Boruch Baum * w3m.el (emacs-w3m-version, w3m-version): Doc fix ([emacs-w3m:13330]). 2019-04-11 Vladimir Sedach * w3m-search.el (w3m-search-engine-alist): Use the lite version in the duckduckgo engine ([emacs-w3m:13336]). 2019-04-10 Boruch Baum * w3m-filter.el (w3m-filter-stackexchange): bugfix: re-search-forward instances needed parm NOERROR set non-nil. 2019-04-03 Boruch Baum * w3m-filter.el (w3m-filter-rt): Update for new site footers. 2019-03-13 Katsumi Yamaoka * w3mhack.el (w3mhack-insert-git-revision): Allow git-revision no matter what kind of object it is, including nil. 2019-03-08 Katsumi Yamaoka Improve the travis build * .travis.yml: Separate the env var EMACS to EMACS and EMACS_EXE that are a common name and an executable name respectively. * aclocal.m4 (AC_CHECK_TEXINFO): Remove useless uppercase conversion. 2019-03-07 Katsumi Yamaoka Make travis CI work for emacs25 on osx (Successful but emacs26 on osx got to fail; should be fixed...) Developers should note that the environment variable EMACS will be passed to the configure script as if it is specified with: ./configure --with-emacs=${EMACS} * .travis.yml (install): Make the name of a symbolic-link linked to the real Emacs that of the environment variable EMACS when building emacs-w3m on osx. (before_script, script): Use the value of the environment variable EMACS rather than just "emacs" as the name of Emacs to run. 2019-03-01 Katsumi Yamaoka * w3m.el (w3m-display-hook): Add w3m-db-history-fix-indentation. (w3m-create-text-page): Don't run w3m-db-history-fix-indentation there. (w3m-db-history-align-to-column): New internal variable. (w3m-about-db-history): Widen contents' width as much as possible; pass it to w3m-db-history-fix-indentation. (w3m-db-history-fix-indentation): Use variable width space to indent. (w3m-db-history): Fix interactive spec so normally not to prompt a user. 2019-02-26 Boruch Baum * w3m-proc.el (w3m-process-new): BUGFIX: gihub issue #20 (reverts part of commit 99db1df). * w3m-hist.el (w3m-history-slimmed-history-flat): BUGFIX: gihub issue #20 (reverts part of commit 99db1df). 2019-02-25 Boruch Baum * w3m-favicon.el (w3m-favicon-convert): bugfix: check string bounds before use (Andres Ramirez [emacs-w3m:13266]) 2019-02-25 Boruch Baum , TSUCHIYA Masatoshi * octet.el: Documentation update 2019-02-25 Boruch Baum * w3m.el (w3m-encode-specials-string): Simplify, remove need for nreverse, remove need for constant w3m-entity-reverse-table. 2019-02-22 Katsumi Yamaoka * w3m.el (w3m-db-history): Remove GUI stuff; prompt a user for `start' and `size' only when it is called interactively. 2019-02-21 TSUCHIYA Masatoshi * w3mhack.el (w3mhack-insert-git-revision): Check the existence of '.git' instead of '.git/config'. This change is proposed by . 2019-02-21 Katsumi Yamaoka * aclocal.m4 (AC_EMACS_LISP): Use a file to pass ELisp program to Emacs. 2019-02-19 Boruch Baum * .travis.yaml: Add support for multiple emacs versions and multiple operating systems. * READMME.md: Add the file as a stub, with example "badge" picture for travis building and GPL licensing. 2019-02-19 Katsumi Yamaoka Add some tweaks to Boruch Baum's changes * w3m.el (w3m-db-history-fix-indentation): New function. (w3m-create-text-page): Use it to fix indentation in db history. (w3m-about-db-history): Don't fold Time/Date string. (w3m-db-history): Raise GUI dialog box if called from GUI. 2019-02-19 Boruch Baum Improve history display Fix the handling of the START and SIZE args for the global history display, applies cosmetic changes to that display, and adds an option for all forms of history display to be done in a new buffer. * w3m.el (w3m-history-in-new-buffer): New option. (w3m-db-history): Apply the new option. Add details to docstring. Allow interactive user to set function options START and SIZE. (w3m-history): Apply the new option. Improve docstring. (w3m-about-history): Add programmer's note. Modify Docstring. (w3m-about-db-history): Add programmer's note. Modify Docstring. Properly handle START and SIZE arguments. Modify html output for: clarity, date display format, use of ellipsis, maximum use of page width, center heading, align page navigation links to page edges, remove extraneous ';' after url's, add ellipsis when truncating url's. 2019-02-14 Boruch Baum * w3m.el (w3m-resize-image-interactive): Refactor function to remove code duplications. 2019-02-12 Boruch Baum * w3m-dtree.el (w3m-dtree-create-sub): BUGFIX: don't abort if a subdir denies permission to read. 2019-02-03 Boruch Baum * Refactor entire codebase for utf-8. There were a zillion changes in this commit, spread over very many files. See the git commit extended message for details. 2019-02-03 Boruch Baum * w3m-cookie.el (w3m-cookie-shutdown): avoid duplicate get-buffer call. * w3m-form.el (w3m-form-textarea-file-cleanup) (w3m-form-textarea-files-remove): use pop instead of (cdr (car x)) * w3m-session.el (w3m-session-select-sessions): Add docstring * w3m.el (w3m-cleanup-temp-files): Add cache and tmp files to list. 2019-02-03 Boruch Baum * w3m-filter.el (w3m-filter-xkcd, w3m-filter-github-repo-main-page): New filters. (w3m-filter-configuration): Add the new filters. 2019-01-31 Katsumi Yamaoka * w3m-bug.el (report-emacs-w3m-bug-system-informations): Add emacs-w3m-git-revision. 2019-01-30 TSUCHIYA Masatoshi * w3m.el (emacs-w3m-git-revision): Moved to w3m-load.el. * w3mhack.el (w3mhack-insert-git-revision): New function to set the value of `emacs-w3m-git-revision'. (w3mhack-generate-load-file): Call the above and check the timestamp of w3mhack.el to decide necessity of updating w3m-load.el. 2018-12-01 TSUCHIYA Masatoshi * w3m.el (emacs-w3m-git-revision): New constant. (emacs-w3m-version): Separated from revision string. 2018-10-22 Katsumi Yamaoka * w3m.el (w3m-decode-encoded-contents): Use the conventional way if zlib-decompress-region returns nil ([emacs-w3m:13038]). 2018-06-13 Katsumi Yamaoka * w3m.el (w3m-user-agent-default-alist): Fix default value; move "Don't send..." item to `w3m-user-agent-change'. (w3m-user-agent-change): Don't sort collection. 2018-06-08 Boruch Baum * w3m.el (w3m-content-type-alist): Remove extraneous fields from two elements (bzip2, gzip) in the alist ([emacs-w3m:13081]). 2018-06-08 Boruch Baum Refactor w3m-process-queue memory and redability ([emacs-w3m:13013]). * w3m.el (w3m--dump-extra--handler-function) (w3m--retrieve--handler-function, w3m--retrieve-1--handler-function) (defun w3m--retrieve-and-render--handler-function) (w3m--goto-url--handler-function, w3m--goto-url--valid-url): New functions to reduce memory footprint of `w3m-process-queue', aid readability debugging. * w3m.el (w3m-w3m-dump-extra, w3m-w3m-retrieve, w3m-w3m-retrieve-1) (w3m-retrieve-and-render, w3m-goto-url): Use the new functions listed above. 2018-06-07 Boruch Baum * w3m-filter.el (w3m-filter-stackexchange): Rewrite ([emacs-w3m:13010]). 2018-06-01 Boruch Baum * w3m-filter.el (w3m-filter-stackexchange, w3m-filter-youtube): New filters ([emacs-w3m:12999]). (w3m-filter-configuration): Add those filters. 2018-05-30 Boruch Baum * w3m-filter.el (w3m-filter-generic-page-header): New filter ([emacs-w3m:12996]). (w3m-filter-configuration): Add it but not activated by default. 2018-05-23 Boruch Baum * w3m.el (w3m-delete-buffer): Perform some operations from a temporary buffer in order not to lose information such as `w3m-current-url' ([emacs-w3m:12989]). 2018-05-23 Boruch Baum * w3m.el (w3m-select-buffer): Pass correct current buffer value to `w3m-select-buffer-generate-contents' ([emacs-w3m:12988]). (w3m-select-buffer-generate-contents): Variable rename. 2018-05-19 Kevin Ryde * w3m-favicon.el (w3m-favicon-setup): Enable favicons be taken from file://, too ([emacs-w3m:12983]). 2018-05-18 Boruch Baum Make progress messages more uniform and more useful ([emacs-w3m:12980] [emacs-w3m:12986]). * w3m.el (w3m-display-progress-message): Combine code from `w3m-retrieve-and-render', separate url from "...", and add user-friendly advice message. (w3m-retrieve-and-render): Replace snippet with call to `w3m-display-progress-message'. * w3m-proc.el (w3m-process-stop): Document in the buffer when an operation has been aborted by the user, what that operation was, and remove progress message. 2018-05-18 Katsumi Yamaoka * w3m-proc.el (w3m-process-stop): Don't move point ([emacs-w3m:12976]). 2018-05-17 Katsumi Yamaoka Work for mailto urls. * w3m.el (w3m-url-readable-string): Make w3m-url-decode-string detect coding system for mailto url instead of using w3m-url-coding-system. (w3m-fontify-anchors, w3m-goto-url): Don't encode mailto url. (w3m-goto-mailto-url): Remove CR from, but preserve LF in mailto url; don't decode mailto url containing non-ASCII letters. 2018-05-09 Boruch Baum Update faces for all navigation cases ([emacs-w3m:12969]). * w3m-session.el (w3m--session-update-faces): New function for `pre-command-hook' and `post-command-hook' in w3m-session buffers. (w3m-session-select-mode): Apply it. (w3m-session-select-list-all-sessions, w3m-session-select-next): Don't set the "selected" face, because it is now done by the new hook function. 2018-05-09 Boruch Baum Fix two bugs in navigating the w3m-session-select popup window ([emacs-w3m:12968]). * w3m-session.el (w3m-session-select-list-all-sessions): Fix navigation errors that happen when using functions beginning-of-buffer, end-of-buffer. (w3m-session-select-next): Fix navigation so previous line of first rotates back to last line. Remove unnecessary loop. 2018-05-09 Boruch Baum * w3m.el (w3m-mode): Don't visually indicate non-breaking spaces ([emacs-w3m:12967]). 2018-05-09 Boruch Baum Bugfix for the creation of session pop-up window ([emacs-w3m:12966]). * w3m.el (w3m--setup-popup-window): New function. (w3m-select-buffer): Use it. (w3m-select-buffer-horizontal-window): Update documentation. * w3m-session.el (w3m-session-select): Use the new function, thus fixing a display bug, and making popup windows consistent. 2018-05-09 Boruch Baum Uniform error handling and message presentation ([emacs-w3m:12964]). * w3m.el (w3m--buffer-busy-error): New function for uniform error handling and message presentation. (w3m-goto-url): Use it. * w3m-search.el (w3m-search-read-variables): Use it. 2018-05-09 Boruch Baum Introduce w3m-display-mode ([emacs-w3m:12963]). * w3m.el (w3m-display-mode): New user option. (w3m-display-mode): New function. (w3m-use-tab, w3m-use-tab-menubar, w3m-pop-up-windows) (w3m-pop-up-frames, w3m-copy-buffer, w3m-delete-buffer, w3m-doc-view) (w3m, w3m-browse-url, w3m-select-buffer, w3m-use-header-line-title) (w3m-safe-view-this-url): Doc fix. * w3m-fb.el (Commentary): Doc fix. (w3m-fb-mode): Fix warning message. * w3m-util.el (w3m-popup-buffer): Doc fix. (w3m-add-w3m-initial-frames): Comment fix. (w3m-device-on-window-system-p): Typo fix. 2018-05-08 Boruch Baum * w3m-session.el (w3m-session-select-list-all-sessions): Don't display urls in the session select window ([emacs-w3m:12960]). 2018-05-02 Katsumi Yamaoka * w3m-image.el (w3m-favicon-usable-p): Relax the criterion. * aclocal.m4 (AC_PATH_EMACS): Work for Emacs >= 26 in which the emacs-version variable no longer includes the build number. * w3m-favicon.el (w3m-favicon-retrieve): Gunzip data if necessary. 2018-04-05 Katsumi Yamaoka * w3m.el (w3m-cache-available-p, w3m-w3m-retrieve-1): Revert. See [emacs-w3m:12951]. 2018-04-03 Boruch Baum Send a cached ETag to the remote server so as to check whether the server responds with 304 meaning the cache is still up-to-date. [emacs-w3m:12947] * w3m.el (w3m-cache-available-p): Fetch Etag. (w3m-w3m-retrieve-1): Send it to the server. 2018-03-05 TSUCHIYA Masatoshi * w3m-perldoc.el (w3m-about-perldoc): Expand "~" before setting `default-directory' to avoid an error calling a process. 2018-02-27 Katsumi Yamaoka [emacs-w3m:12929] * w3m.el (w3m-previous-session-buffer): New variable, a successor to w3m-parent-session-buffer. (w3m-next-buffer): Set it. (w3m-delete-buffer): Return to it after deletion. * w3m-util.el (w3m-generate-new-buffer): Set it. * w3m-ems.el (w3m-tab-drag-mouse-function) (w3m-tab-click-mouse-function): Set it. 2018-02-26 Katsumi Yamaoka [emacs-w3m:12928] * w3m.el (w3m-parent-session-buffer): Remove it (temporarily). * w3m-util.el (w3m-generate-new-buffer): Run w3m-mode here. 2018-02-26 Vladimir Sedach [emacs-w3m:12892] * w3m.el (w3m-view-this-url-1): Fix LAST parameter to w3m-copy-buffer to make new buffer go after the current buffer, as intended in revision 1.1691 on 2017-10-13. * w3m-util.el (w3m-generate-new-buffer): Fix bug introduced in revision 1.3628 on 2017-10-13 where new buffers were always assigned number 1. 2018-02-23 Katsumi Yamaoka * w3m-ems.el (w3m-toolbar-define-keys): Don't show button names in tool-bar in order to prevent the rightmost buttons from being pushed out. Instead, hover the mouse on a button and see the help-echo. 2018-02-22 Katsumi Yamaoka * w3m-util.el (w3m-generate-new-buffer): Work for w3m-fb-mode correctly ([emacs-w3m:12904]). 2018-02-20 Boruch Baum * w3m.el (w3m-relationship-estimate-rules): Remove rule for discontinued freshmeat.net website. Improve docstring ([emacs-w3m:12924]). 2018-02-21 Katsumi Yamaoka Delete about://cookie/ buffer when w3m-view-previous-page is performed. Suggested by Dan Jacobson. * w3m-cookie.el (w3m-cookie): Clear history. * w3m.el (w3m-view-previous-page): Delete about://cookie/ buffer if there is no other w3m-mode buffer. 2018-02-18 Boruch Baum * w3m-session.el (w3m-session-select-quit): Remove cruft: w3m-session-select-wincfg is used, but never set. This caused a bad (nil) window configuration to be used when exiting a session-select window in w3m-fb mode ([emacs-w3m:12918]). 2018-02-18 Boruch Baum * w3m-session.el (w3m-session-rename): BUGFIX: had been failing to find buffers with identical names to rename candidate ([emacs-w3m:12917]). 2018-02-18 Boruch Baum * w3m.el (w3m-quit): Maintain frame isolation when in fb-mode. Update docstring. (w3m-close-window): Update doscstring. * w3m-fb.el (w3m-fb-delete-frame-buffers): Kill all buffers directly instead of incrementally moving to next one. This also is part of the fix so that frame isolation is maintained in fb-mode after quitting. [emacs-w3m:12916]. 2018-02-18 Boruch Baum * w3m-search.el (w3m-search-default-engine): Restrict options to valid current choices and present them as radio buttons ([emacs-w3m:12915]). 2018-02-18 Katsumi Yamaoka * w3m-session.el: Tidy up source code so as to be within 80-column. 2018-02-16 Boruch Baum * w3m-session.el: Reformat docstrings for proper opening summary sentence ([emacs-w3m:12912]). 2018-02-16 Katsumi Yamaoka * w3m-fb.el (w3m-fb-mode, w3m-fb-delete-frame-kill-buffers): Use delete-frame-functions. (w3m-fb-delete-frame-functions): Remove. * w3m-util.el (w3m-delete-frames-and-windows): Bind delete-frame-functions so as not to run w3m-fb-delete-frame-buffers. (w3m-delete-w3m-initial-frames): Remove obsolete delete-frame-hook. 2018-02-15 Boruch Baum * w3m-session.el: Add commentary, correct grammar of prompts.. (w3m-session-group-open): New variable (w3m-session-select-quit): Quitting a session-group display returns to its parent session list display. (w3m-session-select-open-session-group, w3m-session-select-rename) (w3m-session-select-delete): Stay on proper line when within session-group display, after renaming or deleting an entry. This required adding an optional arg to the function. (w3m-session-rename): Allow renaming individual tabs of a session. (w3m-session-delete): Allow deleting individual tabs of a session. [emacs-w3m:12907] 2018-02-14 Boruch Baum * w3m.el (w3m-external-view): Fix regex for url's that contain uri 'query' and or 'fragment' components ([emacs-w3m:12901]). 2018-02-05 Katsumi Yamaoka * w3m-util.el (w3m-string-match-url-components) (w3m-string-match-url-components-1, w3m-url-strip-fragment): Don't recognize a url fragment "#/foo" as a name attribution. 2018-02-02 Katsumi Yamaoka * w3m-filter.el (w3m-filter-gnome-bugzilla): Limit to
.  Thanks to Kevin Ryde
	([emacs-w3m:12890]).

2018-01-30  Katsumi Yamaoka  

	* w3m-filter.el (w3m-filter-gnome-bugzilla): New ([emacs-w3m:12885]).

2018-01-19  Boruch Baum  

	* w3m.el (w3m-user-agent-site-specific): Remove debug message.
	[emacs-w3m:12883]

2018-01-18  Boruch Baum  

	* w3m.el (w3m-add-referer): Update for https support.
	(w3m-user-agent-site-specific-alist, w3m-user-agent-site-specific):
	New feature.
	(w3m-header-arguments, w3m-request-arguments): Integrate new feature.
	[emacs-w3m:12881]

2018-01-17  Boruch Baum  

	* w3m.el (w3m-user-agent-change): New feature.
	(w3m-reload-this-page): Integrate new feature.
	(w3m-request-arguments, w3m-header-arguments): Ensure w3m and
	w3mmee honor `w3m-add-user-agent'.  [emacs-w3m:12876]

2018-01-16  Katsumi Yamaoka  

	Make `cd doc; make pdf' work again  [emacs-w3m:12875]

	This requires Texinfo the version >=6.3, and either (or both) of LuaTeX
	>=0.95 (i.e., TeXLive >=2016) or XeTeX >=0.9998 (i.e., TeXLive >=2012).

	* Makefile.in (clean): Use doc/Makefile's clean.

	* aclocal.m4 (AC_CHECK_TEXINFO): New function.

	* configure.in (MAKEINFO, TEXI2PDF): Check version.
	(TEXI2DVI, PTEX, PBIBTEX, DVIPDFMX, TEXI2PDF): Remove.

	* doc/Makefile.in (TEXI2DVI, PTEX, PBIBTEX, DVIPDFMX, TEXI2PDF): Remove.
	(PDFTEX): New internal variable.
	(dvi, dvi-en, dvi-ja, emacs-w3m.dvi, emacs-w3m-ja.dvi, .texi.dvi):
	Remove targets.
	(.texi.pdf): Use texi2pdf instead of dvipdfmx.
	(clean): Renew.

	* doc/emacs-w3m-ja.texi (texinfo-ja.tex): Use it instead of texinfo.tex.
	(@documentencoding): New.
	(@usedvipdfmx): Remove.

	* doc/texinfo-ja.tex: New file.
	* doc/texinfo.tex, doc/txi-en.tex, doc/txi-ja.tex: Renew.

2017-12-22  Katsumi Yamaoka  

	Update selection buffer properly after deletion or renaming.
	Suggested by Boruch Baum ([emacs-w3m:12847]).

	* w3m-session.el (w3m-session-save): Update selection buffer.
	(w3m-session-select-rename, w3m-session-select-delete):
	Make the selected session highlighted after renaming or deletion.
	(w3m-session-select): Allow specifying the session number;
	close selection window when no session remains after deletion.
	(w3m-session-save, w3m-session-rename): Emulate INITIAL-INPUT.

2017-12-12  Boruch Baum  

	* w3m.el (w3m-lynx-like-map): Remap "s" to `w3m-search', "S" to
	`w3m-search-new-session'. [emacs-w3m:12838]
	(w3m-ctl-c-map): Remap "C-c M-h" to `w3m-history' [emacs-w3m:12842]

2017-12-08  Boruch Baum  

	[emacs-w3m:12840]
	* w3m.el (w3m-edit-url, w3m-edit-current-url, w3m-edit-this-url):
	Enable editing non-local files. In such cases, the user is prompted to
	save the emacs-w3m buffer locally, prior to beginning the editing
	session. Edit docstring.
	(w3m-goto-url, w3m-goto-url-new-session): Clarify in docstring
	and in input prompt whether the action is to happen in the current or
	in a new buffer.
	* w3m-save.el (w3m-save-buffer): function returns the saved file name.
	* w3m-bookmark.el (w3m-bookmark-view-new-session): Add to docstring
	whether the bookmark list will be presented in the current or in a new
	buffer.
	* w3m-search.el (w3m-search-read-variables): Add to docstring
	information on new arg, rename arg to `where', change terminology from
	`session' to `buffer'.
	(w3m-search, w3m-search-new-session): Add to docstring whether results
	will be repesented in the current or in a new buffer.

2017-12-07  Boruch Baum  

	* w3m-search.el (w3m-search, w3m-search-new-session)
	(w3m-search-read-variables): Provide visual feedback for whether search
	will be in new or current session ([emacs-w3m:12837]).

2017-12-07  Katsumi Yamaoka  

	* w3mhack.el: Require seq.

	* w3m-session.el (w3m-session-save, w3m-session-crash-recovery-save)
	(w3m-session-crash-recovery-remove, w3m-session-rename)
	(w3m-session-delete): Use delq rather than delete.

2017-12-07  Boruch Baum  

	* w3m-session.el (w3m-session-select-delete)
	(w3m-session-select-rename): Retain cursor position after completion;
	simplify code ([emacs-w3m:12832]).

2017-12-04  Katsumi Yamaoka  

	* w3m-filter.el (w3m-filter-add-name-anchors): Relax regexp
	([emacs-w3m:12824]).  Thanks to Musha-san and Shirai-san.

2017-12-03  Katsumi Yamaoka  

	* w3m.el (w3m-detect-meta-charset): Ignore comment ([emacs-w3m:12828]).
	Thanks to Renato Ferreira.

2017-11-18  Hideyuki SHIRAI  

	* w3m-filter.el (w3m-filter-add-name-anchors):
	Work for id="name" where name begins with "." ([emacs-w3m:12812]).

2017-10-13  Katsumi Yamaoka  

	* w3m.el (w3m-copy-buffer): Make the copied buffer the next of the
	current buffer by default (like Firefox does); use the new argument
	LAST to make it the last in order of buffers.
	(w3m-view-this-url-1, w3m-goto-url, w3m-goto-url-new-session): Set LAST.

	* w3m-util.el (w3m-generate-new-buffer): Make the new buffer the next
	of the current buffer if the new argument NEXT is set.

	* w3m-util.el (w3m-about-cookie): Use input instead of textarea.

2017-10-13  Katsumi Yamaoka  

	Make `w3m-retrieve' do onload redirection.

	* w3m.el (w3m-retrieve-and-render): Move onload redirection stuff to
	(w3m-w3m-onload-redirection): New function.
	(w3m-w3m-retrieve-1): Use it.
	(w3m-decode-encoded-contents): Use zlib-decompress-region for gzip.

2017-09-26  Katsumi Yamaoka  

	* w3m-cookie.el (w3m-about-cookie): Work for old Emacsen.
	* aclocal.m4 (AC_PATH_EMACS): Work for Emacs 27 and greater.

2017-09-25  Boruch Baum  

	* w3m.el (w3m-confirm-leaving-secure-page):
	Move forward ([emacs-w3m:12807]).

2017-09-25  Boruch Baum  

	* w3m.el (w3m-goto-url-new-session): Fix the problem ([emacs-w3m:12584])
	that a w3m buffer is mis-named "*server*-nnnnnn";
	Use (if (not CONDITION) FOO BAR) instead of (if CONDITION BAR FOO) style
	in order to improve the visibility of the code.

2017-09-11  Katsumi Yamaoka  

	* w3m.el (w3m-retrieve-and-render): Workaround: don't do redirection if
	the onload function name doesn't end with ".submit" ([emacs-w3m:12795]).

	* w3m.el (w3m-content-type-alist): Run mailcap-parse-mailcaps and
	mailcap-parse-mimetypes before setting it.
	(w3m-create-page): Run w3m-external-view in tty for images, etc.
	(w3m-external-view-file): Make deleting of temp file delayed.
	[emacs-w3m:12793]

2017-09-06  Katsumi Yamaoka  

	* w3m.el (w3m-verbose, w3m-message-silent, w3m-message): Doc fix.

	* w3m-cookie.el (w3m-about-cookie):
	Add GUIs that support limiting and deleting ([emacs-w3m:12790]).
	* w3m-form.el (w3m-form-make-form-data):
	Don't encode SPC in a search word used for w3m-cookie.

2017-08-25  Katsumi Yamaoka  

	* w3m.el (w3m-retrieve-and-render): Parse a form in its page buffer.

2017-08-11  Boruch Baum  

	* w3m.el (w3m-italic):
	* w3m-lnum.el (w3m-lnum-minibuffer-prompt, w3m-lnum-match):
	* w3m-session.el (w3m-session-select, w3m-session-selected):
	Update "face spec" DISPLAY form "type" to be `nil' for character-only
	terminals.  [emacs-w3m:12788]

2017-08-10  Katsumi Yamaoka  

	* w3m.el (w3m-retrieve-and-render): Do onload redirection.
	[emacs-w3m:12787]

2017-08-08  Katsumi Yamaoka  

	* w3m.el (w3m-arrived-shutdown):
	* w3m-cookie.el (w3m-cookie-shutdown): Don't error out.

2017-08-08  Akinori MUSHA  

	* w3m.el: Don't add autoload functions to hooks (see below).
	[emacs-w3m:12784]

	* w3m-cookie.el: Add w3m-cookie-shutdown to kill-emacs-hook here.

	* w3m-sesseion.el: Add w3m-session-crash-recovery-remove and
	w3m-session-automatic-save to w3m-arrived-shutdown-functions here.

2017-08-08  Katsumi Yamaoka  

	* w3m.el (w3m-scroll-up, w3m-scroll-down): Make argument default to 1
	if and only if called interactively so that w3m-scroll-up-or-next-url
	and w3m-scroll-down-or-previous-url work as before.  [emacs-w3m:12783]

2017-08-04  Katsumi Yamaoka  

	* w3m-cookie.el (w3m-cookie-1-acceptable-p):
	Use url-domsuf-cookie-allowed-p if available to check if a domain is
	unique to allow having cookies set.  [emacs-w3m:12782]

2017-08-03  Boruch Baum  

	* w3m.el (w3m-scroll-up, w3m-scroll-down): Remove restriction of using
	prefix-argument, remove code that fixes bug in emacs v21.
	(w3m-mwheel-scroll-up, w3m-mwheel-scroll-down): Delete.
	(w3m-mode): Change local bindings of `mwheel-scroll-up-function' and
	`mwheel-scroll-down-function' to `w3m-scroll-up' and `w3m-scroll-down'.
	[emacs-w3m:12779]

2017-08-02  Boruch Baum  

	* w3m-search.el (w3m-search-engine-alist): Update URL for debian
	package search, and change its default parameters from i386
	architecture to amd64.  [emacs-w3m:12776]

2017-07-28  defanor  

	"google feeling lucky" to "feeling searchy" ([emacs-w3m:12774])

	* w3m.el (w3m-enable-feeling-searchy):
	Rename from w3m-enable-google-feeling-lucky.
	(w3m-canonicalize-url):
	Doc fix; use w3m-search-do-search to generate url.
	(w3m-canonicalize-url, w3m-input-url, w3m-view-this-url, w3m-goto-url)
	(w3m-goto-url-new-session, w3m): feeling-lucky to feeling-searchy.

2017-07-26  Katsumi Yamaoka  

	Fix cookies handling ([emacs-w3m:12768], [emacs-w3m:12772])

	Regard a Set-Cookie header as it contains a single cookie, that is,
	the one at the beginning of the field is it and succeeding semi-colon
	separated ones are the attributions of it.  Formerly the Lisp code
	regarded the semi-colon separated ones as all individual cookies, and
	therefore the locally stored cookies would potentially be all bogus.
	So, we highly recommend resetting it once when you start using or if
	you are already using this version of w3m-cookie.el.  To do that,
	shutdown Emacs and delete the "~/.w3m/.cookie" file (or the ".cookie"
	file existing in the `w3m-profile-directory').

	* w3m-cookie.el (w3m-cookie-parse-args): Reverse the order of the value.
	(w3m-cookie-1-set): Regard a Set-Cookie header as it contains a single
	cookie; prefer Max-Age than Expires and convert it to Expires.
	(w3m-cookie-get): Use "NAME", not "NAME=", if the value of NAME is null.

2017-07-25  Katsumi Yamaoka  

	* w3m.el (w3m-content-type-alist): Exclude zero-length extension.
	(w3m-canonicalize-url): Test preferentially if URL is a local file.

2017-07-21  Katsumi Yamaoka  

	* w3m-util.el (w3m-url-invalid-regexp): Remove.
	(w3m-url-valid): Use w3m-url-invalid-base instead.  [emacs-w3m:12767]

2017-07-20  Boruch Baum  

	* w3m.el, w3m-util.el (w3m-url-fallback-base):
	Rename `w3m-url-fallback-base' to more descriptive
	`w3m-url-invalid-base' ([emacs-w3m:12763]).

2017-07-20  Katsumi Yamaoka  

	* w3m-filter.el (w3m-filter-subst-disabled-with-readonly):
	Work for two or more disabled tags.

2017-07-16  Boruch Baum  

	* w3m.el (w3m-canonicalize-url): Make scheme default to https, not http.
	[emacs-w3m:12749]

2017-07-14  Katsumi Yamaoka  

	* w3m-util.el (w3m-delete-frames-and-windows): Replace `one-window-p'
	with a custom function that works for unselected windows as well.

2017-07-11  Katsumi Yamaoka  

	* w3m-util.el (w3m-delete-frames-and-windows): Work for Emacs on tty;
	always delete w3m windows if possible ([emacs-w3m:12733]).
	* w3m.el (w3m-select-buffer-delete-buffer):
	No need to wind up selection buffer when quitting.

2017-07-10  Katsumi Yamaoka  

	* w3m.el (w3m-show-form-hint): Clarify echo message.
	* w3m-form.el (w3m-form-expand-form, w3m-form-unexpand-form):
	Work for mouse-clicking ([emacs-w3m:12731]).

2017-07-07  Katsumi Yamaoka  

	* w3m.el (w3m-show-form-hint): Expand form so at to show text fully.
	* w3m-form.el (w3m-form-input): Revert 2017-06-30 change.
	(w3m-form-expand-form, w3m-form-unexpand-form): New functions.
	[emacs-w3m:12728]

2017-07-05  Katsumi Yamaoka  

	* w3m-form.el (w3m-form-input-textarea-mode-hook): Fix mismatched paren;
	use outline-show-all instead of show-all if available.

2017-07-04  Katsumi Yamaoka  

	* w3m.el (w3m-content-type-alist): Use mailcap.
	(w3m-image-viewer): Abolish.
	(w3m-create-page): Allow user to download file of unknown content-type.

2017-06-30  Vladimir Sedach  

	* w3m-form.el (w3m-form-input): If input is readonly, put the input
	value on the kill ring in addition to displaying it in the echo area.
	[emacs-w3m:12724]

2017-06-28  Katsumi Yamaoka  

	* mime-w3m.el, w3m-antenna.el, w3m-bookmark.el, w3m-cookie.el,
	w3m-dtree.el, w3m-ems.el, w3m-favicon.el, w3m-filter.el, w3m-form.el,
	w3m-namazu.el, w3m-perldoc.el, w3m-search.el, w3m-session.el,
	w3m-symbol.el, w3m.el:
	Remove `:size 0' from defcustoms ([emacs-w3m:12709]).

2017-06-26  Vladimir Sedach  

	* w3m.el (w3m-url-completion-map): Bind "?" to self-insert-command.
	[emacs-w3m:12721]

2017-06-22  Vladimir Sedach  

	* w3m.el (w3m-external-view-temp-directory): New user option.
	(w3m-external-view): Use it control which directory files are saved to
	before being opened with the external viewer.  [emacs-w3m:12708]

2017-06-20  Vladimir Sedach  

	* w3m.el (w3m-goto-url-new-session): Handle POST data.
	[emacs-w3m:12704]

2017-06-14  Boruch Baum  

	* w3m-cookie.el (w3m-cookie-url, w3m-cookie-domain, w3m-cookie-secure)
	(w3m-cookie-name, w3m-cookie-value, w3m-cookie-path)
	(w3m-cookie-version, w3m-cookie-expires, w3m-cookie-ignore): Add docs.
	(w3m-cookie): Test w3m-use-cookies here insted.
	(w3m-about-cookie): Don't test it.  [emacs-w3m:12699]

2017-06-13  Katsumi Yamaoka  

	* w3mhack.el (w3mhack-makeinfo): Simplify the tweaking of `message'.

2017-06-12  Boruch Baum  

	* w3m-cookie.el (w3m-cookie-clear): Make it a user command.
	(w3m-cookie): Open it as a new session ([emacs-w3m:12685]).

	* w3m.el (w3m-select-buffer-delete-buffer): Don't move point forward
	([emacs-w3m:12684]); clarify doc string.

	* w3m-filter.el (w3m-filter-rt): Bind ephemeral var ([emacs-w3m:12682]).

2017-06-12  Boruch Baum  

	* w3m-filter.el (w3m-filter-rt, w3m-filter-slashdot):
	Update ([emacs-w3m:12678]).

2017-06-12  Katsumi Yamaoka  

	* w3mhack.el (w3mhack-compile-file): Silence compile warnings when
	compiling w3m-filter.el ([emacs-w3m:12676]).

2017-06-11  Boruch Baum  

	* w3m-filter.el (w3m-filter-delete-regions, w3m-filter-replace-regexp):
	Make a return value always mean deletion or replacement is made
	([emacs-w3m:12674]).

2017-06-01  Katsumi Yamaoka  

	* w3m-filter.el (w3m-filter-delete-regions, w3m-filter-replace-regexp):
	Refactor to Lisp macros.
	(w3m-filter-geocities-remove-garbage, w3m-filter-infoseek-remove-ads)
	(w3m-filter-ascii24-remove-ads): New filters that replace the ones
	having existed in w3m-filter-configuration ([emacs-w3m:12669]).

2017-05-30  Boruch Baum  

	* w3m-filter.el (w3m-filter-delete-regions, w3m-filter-replace-regexp):
	Allow optional args used to modify search/replace boundaries.
	(w3m-filter-rt, w3m-filter-slashdot): New filters.
	(w3m-filter-configuration): Add new filters ([emacs-w3m:12666]).

	* w3m.el (w3m-uri-replace-alist): Remove Google groups, Altavista, and
	iij-archie ([emacs-w3m:12661]).

	* w3m-search.el (w3m-search-engine-alist): Remove Google groups that
	requires javascript and alltheweb that is forwarded to Yahoo!; use
	https on all urls ([emacs-w3m:12657]).

2017-05-29  Katsumi Yamaoka  

	* w3m-filter.el (w3m-toggle-filtering): Use completing-read.

2017-05-28  Boruch Baum  

	* w3m-filter.el (w3m-toggle-filtering): New user command.

	* w3m.el (w3m-lynx-like-map, w3m-info-like-map): Bind "f" to it.

	* w3m-lnum.el (w3m-lnum-mode-map): Don't bind f, F, and w keys;
	use `L'-prefixed version defined in `w3m-lnum-map' instead.

2017-05-26  Aubrey Raech  

	* w3m-search.el (w3m-search-engine-alist):
	Replace freshmeat with duckduckgo.

2017-05-24  Katsumi Yamaoka  

	* w3m.el (w3m-url-decode-string): Fix previous commit, that breaks url
	of being not encoded.

2017-05-22  Katsumi Yamaoka  

	Don't use string-(as|make|to)-(multi|uni)byte ([emacs-w3m:12630]).

	* w3m.el (w3m-url-decode-string): Use a unibyte buffer to represent
	encoded byte stream.

	* w3m-util.el (w3m-decode-coding-string-with-priority): Simplify.

2017-05-11  Katsumi Yamaoka  

	* w3m-proc.el: Bind w3m-clear-display-while-reading, w3m-current-title.

2017-05-10  Katsumi Yamaoka  

	Allow local file of which the name is not absolute ([emacs-w3m:12643])

	* w3m.el (w3m-canonicalize-url): Allow local file of relative name.
	* w3m-util.el (w3m-popup-buffer): Preserve the current directory.

2017-03-16  Katsumi Yamaoka  

	* w3m-proc.el (w3m-process-stop): Blank page if
	w3m-clear-display-while-reading is non-nil ([emacs-w3m:12633]).
	(w3m-process-kill-stray-processes): Separate it from
	w3m-process-start-queued-processes.

2017-02-20  Katsumi Yamaoka  

	Revert last change in w3m-decode-coding-string-with-priority.

	* w3m-util.el (w3m-decode-coding-string-with-priority): Revert.
	[emacs-w3m:12630]

2017-02-03  Katsumi Yamaoka  

	Don't use string-make-(multi|uni)byte that got obsolete in Emacs 26.

	* octet.el (w3m-about-octet-attachments, octet-w3m-region):
	Use (decode|encode)-coding-string.
	* w3m-image.el (w3m-imagick-convert-buffer): Bind LC_ALL with C.
	* w3m-proc.el (w3m-process-start-after):
	Bind LC_ALL with C in w3m-command-environment.
	* w3m-util.el (w3m-decode-coding-string-with-priority): Don't use it.
	(w3m-insert-string): Encode a string by utf-8-emacs when inserting it
	into a unibyte buffer.
	* w3m.el (w3m-command-environment): Bind LC_ALL with C.

2017-01-10  Katsumi Yamaoka  

	* w3m.el (w3m-external-view-this-url, w3m-external-view-current-url)
	(w3m-view-url-with-external-browser):
	Don't make obsolete.  [emacs-w3m:12627]

2017-01-06  Katsumi Yamaoka  

	* w3m.el (w3m-real-url): Preserve #name portion.  [emacs-w3m:12618]

2017-01-04  Kevin Ryde  

	* w3m-save.el (w3m-save-buffer): Use w3m-expand-file-name-as-url for
	w3m-history-push in case filename ~/foo etc.  [emacs-w3m:12617]

2016-10-04  Katsumi Yamaoka  

	* aclocal.m4 (AC_PATH_EMACS): Work for Emacs 26.

2016-09-27  Katsumi Yamaoka  

	* w3m-util.el (w3m-flet, w3m-labels): Add edebug spec.

2016-09-21  Katsumi Yamaoka  

	* w3m.el (w3m-retrieve-and-render): Reset hscroll.

2016-09-08  Katsumi Yamaoka  

	* w3m-util.el (w3m-delete-frames-and-windows): Don't try to delete
	window that this function deleted already in conjunction with its frame.
	It happened when a frame has two or more emacs-w3m windows.

2016-09-08  Boruch Baum  

	* w3m-save.el (w3m-save-buffer-html-only): New user option.
	(w3m-save-buffer): Use it; improve docstring.  [emacs-w3m:12595]

2016-08-25  Katsumi Yamaoka  

	* w3m.el (w3m-url-at-point): Refactor.

2016-08-18  Boruch Baum  

	* w3m.el (w3m-image-viewer): Make it defcustom.

2016-08-17  Katsumi Yamaoka  

	Don't use `string-as-multibyte' and `string-as-unibyte' that are
	obsolete in Emacs 25.2.
	Use `string-make-multibyte' and `string-make-unibyte' instead.

	* octet.el (octet-w3m-region):
	* w3m-image.el (w3m-imagick-convert-buffer):
	* w3m-proc.el (w3m-process-start-after):
	* w3m-util.el (w3m-insert-string): Do.

	Remove Gmane mailing list archive stuff.

	* w3m.el (w3m-gmane-url-at-point): Remove.

2016-08-01  Boruch Baum  

	* w3m-lnum.el: Do a boundp test for browse-url-generic-program.

2016-07-27  Katsumi Yamaoka  

	Make w3m-delete-buffer return to the buffer that launches
	the buffer to be deleted if w3m-use-tab is non-nil.

	* w3m.el (w3m-parent-session-buffer): New internal variable.
	(w3m-view-this-url-1):
	Save the current session in it when launching a new session.
	(w3m-delete-buffer, w3m-next-buffer):
	Return to the buffer that launches the buffer to be deleted.

2016-07-26  Katsumi Yamaoka  

	* w3m.el (w3m-lynx-like-map): Bind "K" to w3m-scroll-down.
	[emacs-w3m:12570]

2016-07-19  Katsumi Yamaoka  

	* w3m-ems.el (w3m-create-image): Run w3m-image-animate in page buffer.

	* w3m.el (w3m-goto-url): Run w3m-select-buffer-update after evaluating
	w3m-display-hook and w3m-display-functions.  [emacs-w3m:12568]
	It seems to be rational to run w3m-force-window-update, that
	w3m-select-buffer-update runs, after settling down the page display.

2016-04-22  Katsumi Yamaoka  

	* w3m-util.el (w3m-buffer-name-lessp): Work for Emacs 25.2 that starts
	numbered buffer names with *w3m*<1>, not *w3m*<2>.

2016-03-04  TSUCHIYA Masatoshi  

	* w3m.el (w3m-markdown-converter): New option to select the command to
	convert markdown formed files into HTML format.
	(w3m-prepare-markdown-content): Use the above.

2016-03-03  TSUCHIYA Masatoshi  

	* w3m.el: Add support for markdown formed files.
	(w3m-content-type-alist, w3m-local-find-file-regexps): Add markdown
	entry.
	(w3m-prepare-markdown-content): New function.

2015-11-27  Katsumi Yamaoka  

	Prefer Cygwin pathnames when building emacs-w3m on Cygwin for
	Windows-native Emacs.  [emacs-w3m:12540]

	* aclocal.m4 (AC_PATH_CYGWIN): New function.
	(AC_PATH_LISPDIR, AC_PATH_ICONDIR): Use it.
	* configure.in: Check for cygpath program.

2015-11-26  Katsumi Yamaoka  

	* Makefile.in (lisp, what-where, install-package, install-package-ja)
	(dist, .el.elc, slow, very-slow)
	* doc/Makefile.in (EMACSINFO, version.texi): Quote Emacs's path name.

2015-11-25  Katsumi Yamaoka  

	* aclocal.m4 (AC_SET_VANILLA_FLAG, AC_SET_XEMACSDEBUG, AC_EMACS_LISP)
	(AC_ADD_LOAD_PATH):
	* Makefile.in (FLAGS, lisp, what-where, install-lisp, install-package)
	(install-package-ja, dist, tarball, .el.elc, slow, very-slow):
	* doc/Makefile.in (FLAGS, EMACSINFO, version.texi, install, install-en)
	(install-ja): Work for path names containing whitespace.
	[emacs-w3m:12530]

2015-10-13  Bruno F$(D+1(Blix Rezende Ribeiro  

	* w3m-form.el (w3m-form-make-form-data): Protect against empty token.
	[emacs-w3m:12517]

2015-10-13  Katsumi Yamaoka  

	* w3m.el (w3m-gmane-url-at-point):
	Change query url to .

	* doc/txi-ja.tex: Make the pdf document display a bookmark by default.

2015-10-09  Katsumi Yamaoka  

	* configure.in:
	* doc/Makefile.in (.texi.dvi): Use pbibtex rather than jbibtex.
	* doc/emacs-w3m-ja.texi: Add @usedvipdfmx to generate pdf bookmark.
	* doc/txi-ja.tex: Copy from .

2015-09-29  Kevin Ryde  

	* w3m.el (w3m-check-header-tags): w3m-expand-url  to tolerate
	a non-absolute there, as for example from archive.org.
	(If w3m-current-base-url is relative then form setups error out.)

2015-06-09  Katsumi Yamaoka  

	* w3m.el (w3m-retrieve-and-render):
	Set w3m-current-url (and w3m-current-title) so as to enable moving back
	to the past page (in the case w3m-clear-display-while-reading is t).
	(w3m-goto-url): Don't move point to the top when it failed to retrieve.
	[emacs-w3m:12471]

2015-06-02  Katsumi Yamaoka  

	* w3m.el (w3m-retrieve-and-render):
	Don't display progress message for `about:' pages.  [emacs-w3m:12465]

2015-05-22  Katsumi Yamaoka  

	* w3m.el (w3m-refresh-at-time): Remove workaround.  [emacs-w3m:12459]

2015-05-13  Katsumi Yamaoka  

	* w3m.el (w3m-use-refresh): Mention Google looping problem in docstring.
	(w3m-refresh-minimum-interval): Default to 5; change the meaning.
	(w3m-check-refresh-attribute, w3m-view-previous-page):
	Do nothing for w3m-refresh-minimum-interval.
	(w3m-refresh-at-time):
	Override meta refresh seconds by w3m-refresh-minimum-interval.
	(w3m-goto-url-with-timer): Check for buffer's existence correctly.

2015-05-10  Katsumi Yamaoka  

	* w3m.el (w3m-error): Work for XEmacs.  [emacs-w3m:12444]
	(w3m-retrieve-and-render): Work for XEmacs.
	Note: `get-buffer-window' requires a buffer for the 1st arg in XEmacs.

2015-05-08  Katsumi Yamaoka  

	* w3m.el (w3m-refresh-at-time):
	Temporary fix to avoid Google search looping.  [emacs-w3m:12440]

2015-04-27  Katsumi Yamaoka  

	* w3m.el (w3m-error): New face.
	(w3m-retrieve-and-render): Denote `failed' if it did so.

2015-04-06  Katsumi Yamaoka  

	* w3m.el (w3m-clear-display-while-reading): New user option.
	(w3m-retrieve-and-render): Clear the current display while reading
	a new page if w3m-clear-display-while-reading is non-nil.
	[emacs-w3m:12428]

2015-04-03  Katsumi Yamaoka  

	* w3m.el (w3m-url-savable-p): New function.
	(w3m-toolbar, w3m-menubar): Use it.

	* w3m-save.el: Provide the feature.

2015-04-02  Katsumi Yamaoka  

	* w3m.el (w3m-toolbar-buttons, w3m-toolbar): Add `Save' button.

	* icons/save-up.png, icons/save-up.xpm
	* icons30/save-up.png, icons30/save-up.xpm: New files.

2015-04-01  Katsumi Yamaoka  

	* w3m-save.el: New file.

	* w3m.el (w3m-menubar, w3m-lynx-like-map, w3m-info-like-map):
	Add w3m-save-buffer and bind `C-x C-s' to it.

2015-03-13  Katsumi Yamaoka  

	* w3m-filter.el (w3m-filter-add-name-anchors):
	Don't use ambiguous regexp.  [emacs-w3m:12422]

2015-02-08  Katsumi Yamaoka  

	* w3m.el (w3m-search-name-anchor): Search for both "name" and
	(w3m-url-decode-string "name").  [emacs-w3m:12392]

2015-01-28  Katsumi Yamaoka  

	* w3m.el (w3m-extra-numeric-character-reference):
	Use #x20 instead of ? .
	(w3m-scroll-up-1): Remove obsolete function alias to w3m-scroll-up.

2015-01-22  Katsumi Yamaoka  

	* w3mhack.el (w3mhack-compile-file): New function.
	(w3mhack-compile): Use it.

2014-11-24  Andrey Kotlarski  

	* w3m-lnum.el (w3m-lnum-actions-link-alist): Add open in background
	bindings.
	(w3m-lnum-remove-overlays): Enlarge default region to clean.
	(w3m-lnum-set-numbering): Use w3m-lnum-remove-overlays.
	(w3m-lnum-next-filter): New function.
	(w3m-lnum-read-interactive): Use it to search below and above when
	filter has no matches left.
	(w3m-with-lnum): Guarantee cleanup of right buffer.
	(w3m-lnum-get-action): Fix checkdoc warning.
	(w3m-lnum-visit): Make it function.  Enable visiting in background.
	(w3m-lnum-follow): Add prefix combinations to visit links in
	background.

2014-10-06  Katsumi Yamaoka  

	* w3m.el (w3m-extra-numeric-character-reference): Add (?\C-m . ? ).
	[emacs-w3m:12378]

2014-10-01  Herbert J. Skuhra  

	* aclocal.m4 (AC_PATH_EMACS): Work for Emacs 25.

2014-08-01  Michael Heerdegen  
	Katsumi Yamaoka 

	* w3m.el (w3m-input-url-next-history-element): Abolish.
	(w3m-url-completion-map): Don't bind M-n key.
	(w3m-input-url-default-add-completions): New function.
	(w3m-input-url):
	Bind minibuffer-default-add-function to it locally in minibuffer.

2014-07-29  Katsumi Yamaoka  

	* w3m.el (w3m-input-url-provide-initial-content): New user option.
	(w3m-input-url): Use it.
	(w3m-input-url-next-history-element): New function.
	(w3m-url-completion-map): Bind it.
	[emacs-w3m:12345]

2014-07-24  Katsumi Yamaoka  

	* w3m-filter.el (w3m-filter-add-name-anchors): Subdivide long regexp.
	[emacs-w3m:12339]

2014-06-12  Katsumi Yamaoka  

	* Makefile.in (install-lisp): Compress .el files.
	* doc/Makefile.in (install): Compress info files.

	* aclocal.m4 (AC_COMPRESS_INSTALL): New function.
	* configure.in: Use it.

2014-06-11  Kevin Ryde  

	* w3m.el (w3m-zoom-out-image, w3m-resize-image-interactive): Treat
	zoom-out percentage as inverse of zoom-in, so "in" then "out" returns
	to the original size.
	(w3m-resize-inline-image-internal): Set w3m-image-scale property to
	flonum to avoid integer round-off when resizing in and out.  Use
	`round' rather than `truncate' when calling "convert" so flonum
	round-off 99.999 is original 100%.

2014-06-11  Katsumi Yamaoka  

	* w3m.el (w3m-content-type-alist): Don't bug out for the case where
	browse-url-browser-function is set to a function symbol that is not yet
	defined.  [emacs-w3m:12317]

2014-04-21  Michael Ernst  

	* w3m-util.el (w3m-beginning-of-tag, w3m-end-of-tag): Work correctly
	for the case there is only whitespace between  and .

2014-03-31  Katsumi Yamaoka  

	* w3m.el (w3m-markup-urls-nobreak): Don't modify textarea.
	[emacs-w3m:12308]

2014-03-26  Katsumi Yamaoka  

	* w3m.el (w3m-relationship-estimate-rules): Update regexps for Google.

2014-02-13  Katsumi Yamaoka  

	* w3m.el (w3m-url-encode-string): Encode `:' and `/'.
	Suggested by Dan Jacobson .

	* w3m-form.el (w3m-form-make-form-data, w3m-form-parse-and-fontify):
	Use car-less-than-car.

2014-02-10  Katsumi Yamaoka  

	* w3m-filter.el (w3m-filter-subst-disabled-with-readonly): Relax regexp.

	* w3m-form.el (w3m-form-submit): Work for a url having no query part.

2014-01-08  Mirko M.  

	* w3m-util.el (w3m-delete-frames-and-windows): Don't clear the windows
	layout that used to be before visiting an emacs-w3m buffer.
	[emacs-w3m:12273]

2014-01-07  Katsumi Yamaoka  

	* w3m-util.el (w3m-static-if, w3m-static-when, w3m-static-unless)
	(w3m-static-cond): Add edebug spec.

	* octet.el: Fix edebug spec for the static-* macros.

2013-12-03  Tatsuya Kinoshita  

	* mew-w3m.el (mew-w3m-region): Set point to the end of 
tag to prevent infinite loop. 2013-12-01 Tatsuya Kinoshita * mew-w3m.el (mew-w3m-region): Set point to minimum for `mew-w3m-cite-blockquote' to work. 2013-11-05 Katsumi Yamaoka * mew-w3m.el (mew-w3m-cite-blockquote): New function. (mew-w3m-region): Use it. 2013-11-26 Katsumi Yamaoka * w3m-filter.el (w3m-filter-subst-disabled-with-readonly): Rewrite. * w3m-filter.el (w3m-filter-subst-disabled-with-readonly): Fix the width of disabled select form. 2013-11-25 Katsumi Yamaoka * w3m-filter.el (w3m-filter-subst-disabled-with-readonly): Replace disabled or readonly select forms, that w3m doesn't support, with read-only input forms. [emacs-w3m:12222] * w3m-form.el (w3m-form-parse-and-fontify): Make read-only text buttons for image, reset, and submit forms if readonly attr is turned on. * w3m-ems.el, w3m-form (w3m-form-make-button): Add the optional readonly argument; make a read-only text button if it is non-nil. 2013-11-20 Katsumi Yamaoka Make non-link urls unbreakable. [emacs-w3m:12215] * w3m.el (w3m-markup-urls-nobreak): New function. (w3m-rendering-buffer): Use it. 2013-10-22 Katsumi Yamaoka Simplify the tab line control so as not to consume CPU. Thanks to Michael Heerdegen for good suggestions. * w3m-ems.el (w3m-tab-line-format, w3m-tab-timer): Abolish. (w3m-tab-mouse-track-selected-tab): Run `w3m-tab-line' instead of using its cache; remove unused argument `buffers'. (w3m-tab-line): Don't use chache and timer. 2013-10-17 Katsumi Yamaoka Replace `w3m-external-view-current-url', `w3m-external-view-this-url', and `w3m-view-url-with-external-browser' with `w3m-view-url-with-browse-url' that runs `browse-url'. [emacs-w3m:12190] * w3m.el (w3m-menubar, w3m-tab-button-menu-commands, w3m-link-map): Do. (w3m-external-view-current-url, w3m-external-view-this-url) (w3m-view-url-with-external-browser): Make obsolete. (w3m-view-url-with-browse-url): New function. (w3m-mode-map): Bind "M" to it. * w3m-lnum.el (w3m-lnum-actions-link-alist): Bind "M" to w3m-view-url-with-browse-url instead of w3m-external-view. (w3m-lnum-mode-map): Use the key bound to w3m-view-url-with-browse-url for w3m-lnum-external-view-this-url. (w3m-lnum-external-view-this-url): Use w3m-view-url-with-browse-url instead of w3m-external-view. 2013-10-16 Michael Heerdegen * w3m-ems.el (w3m-tab-line): Run w3m-force-window-update unconditionally. [emacs-w3m:12175] 2013-10-09 Katsumi Yamaoka * w3m-form.el (w3m-form-inactive): Add underline property. (w3m-form-input-textarea): Don't use it to view read-only textarea. 2013-10-08 Katsumi Yamaoka Make disabled or read-only forms inatcive. * w3m-form.el (w3m-form-parse-and-fontify): Make `select', `checkbox', `radio', and `file' input forms inactive. (w3m-form-input-checkbox, w3m-form-input-radio, w3m-form-input-file) (w3m-form-input-select): Don't allow keys if it is inactive. 2013-10-08 Thorsten Jolitz * w3m-form.el (w3m-form-input-textarea-mode-setup): New option for setting up the textarea input buffer in org-mode instead of text-mode. (w3m-form-input-textarea-org-mode-map) New minor-mode-map. (w3m-form-textarea-use-org-mode-p) New variable. (w3m-form-textarea-toggle-major-mode) New function. (w3m-form-input-textarea-mode-setup) Setup textarea edit buffer with major-mode 'org-mode if `w3m-form-textarea-use-org-mode-p' is non-nil. (w3m-form-input-textarea) Split window sensibly if `w3m-form-textarea-use-org-mode-p' is non-nil. (w3m-form-input-textarea-mode) Override default minor-mode map with new minor-mode-map in case major-mode is 'org-mode. 2013-10-08 Katsumi Yamaoka * w3m-form.el (w3m-form-input-textarea-mode-setup): Fix typo (unquoted `view-mode'). 2013-10-04 Katsumi Yamaoka * w3m-form.el (w3m-form-input-textarea-mode-setup): Use view-mode to show disabled or readonly textarea. (w3m-form-input-textarea): Revert last change; use w3m-form-inactive face to show disabled or readonly textarea. 2013-10-03 Katsumi Yamaoka Make disabled forms not editable. [emacs-w3m:12146] * w3m.el (w3m-use-filter): Default to t. (w3m-show-form-hint): Notice form is inactive. * w3m-filter.el (w3m-filter-subst-disabled-with-readonly): New function that substitutes the `disabled' attribute with the `readonly' attribute in an html source so as to enable w3m to handle. (w3m-filter-configuration): Add it. * w3m-form.el (w3m-form-inactive): New face. (w3m-fontify-textareas, w3m-form-parse-and-fontify): Use it if text is not editable. (w3m-form-input): Use w3m-message rather than message. (w3m-form-input-textarea): Don't allow editing text if it is disabled. (w3m-form-last-position): New variable. (w3m-form-restore-last-position): New function. (w3m-form-submit): Add it to w3m-fontify-after-hook. 2013-09-10 Katsumi Yamaoka * w3m.el (w3m-input-url): Default to `default' or "". (w3m-download): Prompt for url endlessly instead of bugging out. (w3m): Doc fix. 2013-09-09 Katsumi Yamaoka * w3m.el (w3m-url-completion-map): New overriding keymap. (w3m-input-url): Use it. Suggested by Manuel Giraud . 2013-09-06 Katsumi Yamaoka * w3m-ems.el (w3m-toolbar-make-buttons): Make tool-bar button use a single icon image if Emacs built with Gtk+ is running. cf. (w3m-toolbar-use-single-image-per-icon): Add a note to docstring. 2013-09-04 Katsumi Yamaoka * w3m-util.el (w3m-decode-coding-string-with-priority): Move from w3m-ems.el and w3m-xmas.el. * w3m-ems.el, w3m-xmas.el (w3m-decode-coding-string-with-priority): Move to w3m-util.el. * w3m-proc.el: Don't Fbind it. * w3mhack.el (w3mhack-make-package): Avoid making a hard link for w3m-load.el twice. 2013-09-03 Manuel Giraud * w3m.el (w3m-canonicalize-url): Do uri replace before normal parsing. 2013-09-02 Katsumi Yamaoka Prefer uris based on w3m-uri-replace-alist to Google's feeling lucky. Suggested by Michael Heerdegen . * w3m.el (w3m-canonicalize-url): Run w3m-uri-replace before falling back to Google's feeling lucky. (w3m-uri-replace): Simply return nil if there is no replacement. (w3m-goto-url): Move forward w3m-uri-replace to w3m-canonicalize-url. 2013-08-26 Katsumi Yamaoka * w3m.el (w3m-retrieve-and-render): Record failed urls as well to the arrived database. Suggested by Dan Jacobson. (w3m-delete-buffer): Kill form buffers before killing a page buffer. (w3m-delete-buffer): Work around mysterious bug where window positions aren't restored if this command is called by a mouse event. Reported by Dan Jacobson. 2013-08-26 Dan Jacobson * w3m.el (w3m-toolbar): Simplify the label used for w3m-history. 2013-08-13 Kevin Ryde * w3mhack.el (w3mhack-module-list): Remove w3mhack-load-file from the modules not to be byte compiled, so that it is byte compiled. (w3mhack-generate-load-file): Remove no-byte-compile from w3m-load.el. 2013-08-01 Katsumi Yamaoka * w3m-form.el (w3m-form-parse-and-fontify): Prefer base url if any rather than the current url when constructing urls that form buttons specify. Thanks to Thorsten Jolitz [emacs-w3m: 12107]. 2013-07-01 Katsumi Yamaoka * w3m.el (w3m): Enable it again to fetch Gmane url and others. (w3m-gmane-url-at-point): Update url. 2013-06-26 Katsumi Yamaoka * w3m.el (w3m-use-cookies): Default to t. Make `w3m-input-url' offer no useless initial string. * w3m.el (w3m-active-region-or-url-at-point, w3m-input-url) (w3m-download, w3m-view-this-url, w3m-view-url-with-external-browser) (w3m-goto-url, w3m-goto-url-new-session, w3m): Do. 2013-06-21 Katsumi Yamaoka * aclocal.m4: Make configure work for term-mode running in Emacs. 2013-06-18 Katsumi Yamaoka * w3m.el (ffap-url-regexp): Silence the byte compiler. * mime-w3m.el: Require calist when compiling. 2013-05-30 Katsumi Yamaoka * mime-w3m.el: Don't use obsolete macro dont-compile. * w3m.el (w3m-goto-mailto-url): Bind display-buffer-alist instead of special-display-buffer-names and special-display-regexps for Emacs >= 24.3. * w3m-ems.el (w3m-image-multi-frame-p): Exclude images that don't specify a delay. 2013-04-19 Katsumi Yamaoka * w3m-filter.el (w3m-filter): Don't modify w3m-filter-rules. 2013-04-12 REN Lifeng * w3m-session.el (w3m-session-rename): Don't infloop. 2013-04-11 Katsumi Yamaoka * w3m-filter.el (w3m-filter-configuration): Use w3m-language rather than w3m-use-japanese-menu. 2013-04-10 Katsumi Yamaoka * w3m-filter.el (w3m-filter-add-name-anchors): Fix regexp matching name anchors. Reported by Dan Jacobson . 2013-04-08 Katsumi Yamaoka * w3m-form.el (w3m-form-get-by-name): Distinguish the type of forms of the same names. Reported by Kevin Ryde . (w3m-form-resume, w3m-form-parse-and-fontify, w3m-form-input-map): Do. 2013-04-05 Katsumi Yamaoka * w3m-filter.el (w3m-filter-fix-tfoot-rendering): New filter. (w3m-filter-configuration): Add it but not activate. * w3m-ems.el (w3m-image-multi-frame-p): New alias. (w3m-image-animate): Use it. 2013-02-04 Katsumi Yamaoka * w3m.el (w3m-retrieve-and-render): Remove workaround. * w3m-util.el (w3m-force-window-update-later): Make 1st arg optional. * w3m-ems.el (w3m-force-window-update): A window need to be redisplayed for `force-window-update' to work (see the docstring). 2013-01-23 Katsumi Yamaoka * w3m-lnum.el (w3m-lnum-read-interactive): Replace w3m-scroll-up-1 with w3m-scroll-up. * w3m.el (w3m-scroll-up): Rename from w3m-scroll-up-1. (w3m-scroll-up, w3m-scroll-up-or-next-url): Make the bottom of a page border on the bottom of a screen when having finished scrolling the page up. (w3m-scroll-down): New function detached from w3m-scroll-down-or-previous-url. (w3m-scroll-down-or-previous-url): Move point to the top when having finished scrolling a page down. (w3m-mwheel-scroll-up, w3m-mwheel-scroll-down): New functions. (w3m-mode): Bind mwheel-scroll-(up,down)-function to w3m-mwheel-scroll-(up,down). Suggested by Dan Jacobson . 2013-01-11 Katsumi Yamaoka * w3m.el (w3m-retrieve-and-render): Do (sit-for 0) to update the header-line appearance as a workaround; see the 2013-01-11 comment. (w3m-view-this-url-1): Revert 2010-01-15 change; don't popup new session if w3m-new-session-in-background is non-nil. Reported by Michael Heerdegen . 2012-12-25 Katsumi Yamaoka * w3m-search.el (w3m-search-do-search): Save history position. Reported by Dan Jacobson . 2012-12-17 Katsumi Yamaoka * w3m-ems.el (w3m-ems-create-image): Abolish. (w3m-image-animate-seconds): New user option. (w3m-image-animate): New function. (w3m-create-image): Use it. * w3m.el (w3m-resize-inline-image-internal): Use w3m-image-animate. * w3m-xmas.el (w3m-image-animate): Alias to identity. 2012-12-10 Katsumi Yamaoka * w3m.el (w3m-decode-anchor-string): Decode url used to next/prev/... cf. http://emacs-w3m.namazu.org/ml/msg11824.html 2012-12-05 Katsumi Yamaoka * w3m-util.el (w3m-flet): Rewrite it using cl-letf. 2012-12-04 Katsumi Yamaoka * w3m-util.el (w3m-labels): Revert; use cl-labels if available. 2012-12-04 Katsumi Yamaoka * w3m-util.el (w3m-labels): Rewrite. 2012-11-19 Uday S Reddy * w3m.el (w3m-command-environment): Make the "CYGWIN" environment variable default to "binmode" for NTEmacs. 2012-10-18 Katsumi Yamaoka * w3m-filter.el (w3m-filter-configuration): Work around a widget bug. 2012-10-17 Katsumi Yamaoka * w3m-filter.el: Change file coding system to utf-8. (w3m-filter-configuration): New user option, a successor to w3m-filter-rules. (w3m-filter-rules): Make it semi-obsolete (but still usable) and default to nil. (w3m-filter): Use w3m-filter-configuration in addition to w3m-filter-rules. (w3m-filter-google-click-tracking) (w3m-filter-google-shrink-table-width, w3m-filter-add-name-anchors): New filters. * w3m.el (w3m-rendering-half-dump): Move function, that adds name anchors, to w3m-filter.el. (w3m-create-page): Move Google click-tracking filter to w3m-filter.el. * w3m-util.el (w3m-widget-type-convert-widget): Don't modify default sexp values. 2012-10-10 Katsumi Yamaoka * w3m-bookmark.el (w3m-bookmark-buffer): Use (0 0) as the Unix epoch. * w3m.el (w3m-create-page): Fix regexp matching Google's click- tracking urls. 2012-07-22 Katsumi Yamaoka * w3m.el (w3m-rendering-half-dump): Add name anchors for only existing internal links. 2012-07-19 Katsumi Yamaoka * w3m-util.el (w3m-flet): New macro. 2012-07-18 Katsumi Yamaoka * w3m.el (w3m-input-url): Decode url string by the coding system that url itself specifies if any. * w3m.el (w3m-goto-url): Allow optional save-pos argument, that leads it to run w3m-history-store-position. (w3m-view-parent-page, w3m-scroll-up-or-next-url) (w3m-scroll-down-or-previous-url): Run w3m-history-store-position. (w3m-gohome, w3m-browse-url, w3m-find-file, w3m-db-history) (w3m-history): Run w3m-history-store-position by way of w3m-goto-url. * w3m-util.el (w3m-labels): New macro that runs cl-labels in Emacs 24.2 and later, otherwise runs labels. * mime-w3m.el (mime-w3m-insinuate): * w3m-bookmark.el (w3m-bookmark-safe-string): * w3m-proc.el (w3m-process-do-with-temp-buffer): * w3m-rss.el (w3m-rss-parse-date-string): * w3m-weather.el (w3m-weather-completion-table): Replace labels with w3m-labels. * w3mhack.el (w3mhack-nonunix-install): Don't use labels. 2012-07-13 Katsumi Yamaoka * w3m.el (w3m-input-url, w3m-header-line-insert): Don't decode only control characters. 2012-07-12 Katsumi Yamaoka * w3m.el (w3m-input-url): Don't decode %00~%1F and %7F~%9F in url. 2012-07-11 Katsumi Yamaoka * w3m.el (w3m-url-decode-string): Allow optional regexp matching %**. (w3m-header-line-insert): Don't decode %00~%1F and %7F~%9F in url. * w3m.el (w3m-create-page): Show raw contents briefly, not fully, when prompting a user for the content type. 2012-07-10 Katsumi Yamaoka * w3m.el (w3m-rendering-half-dump): Add name anchors fast. 2012-07-10 Naohiro Aota * w3m.el: (w3m-data-retrieve): URL-decode data-string. It can have "%2b%2d%3d" representing "/+=". 2012-07-08 Katsumi Yamaoka * w3m.el (w3m-rendering-half-dump): Add name anchors that w3m can handle in nested tags. 2012-07-02 Katsumi Yamaoka * w3m.el (w3m-view-url-with-external-browser): Improve prompt string. Suggested by Dan Jacobson . 2012-06-25 Katsumi Yamaoka * w3m.el (w3m-active-region-or-url-at-point, w3m-print-this-url): Try to pick #name anchor out. * w3m-search.el (w3m-search-read-variables): Make commands that use it error out when other processes run in the current w3m buffer. * w3m.el (w3m-mode): Add description of some missing commands to doc. 2012-06-20 Katsumi Yamaoka * w3m.el (w3m-create-page): Safely quit session when a user hits C-g; make sure to set w3m-current-url. 2012-06-19 Katsumi Yamaoka * w3m.el (w3m-cache-header, w3m-cache-request-header) (w3m-cache-contents, w3m-cache-request-contents) (w3m-cache-available-p): Canonicalize given url. (w3m-show-error-information): Show as many info as possible. 2012-06-18 Katsumi Yamaoka * w3m-util.el (w3m-popup-buffer): Do nothing for the current buffer. * w3m.el (w3m-history-highlight-current-url): Extend href anchor to bol. * w3m.el (w3m-http-status-alist): New variable. (w3m-http-status): New variable. (w3m-w3m-retrieve): Set it. (w3m-retrieve): Clear it. (w3m-download, w3m-retrieve-and-render, w3m-show-error-information): Show http status if download or retrieving fails. 2012-06-14 Katsumi Yamaoka * w3m.el (w3m-url-encode-string-2): Encode only `(' and `)'. 2012-06-12 Katsumi Yamaoka * w3m-proc.el (w3m-process-do-with-temp-buffer): Use labels macro again. Functions that the labels form generates to be used in the outside of the labels form should be prefixed with #' from now on. Thanks to Michael Heerdegen and Andreas Schwab. * w3m-proc.el (w3m-process-do-with-temp-buffer): Don't use labels macro of which the spec has been changed in the most recent Emacs. 2012-06-04 Katsumi Yamaoka * w3m.el (w3m-expand-url): Work for scheme name containing upcase letters. Reported by Dan Jacobson . * w3m-util.el (w3m-force-mode-line-update): New alias. * w3m-lnum.el (w3m-with-lnum, w3m-lnum-universal-dispatch): Use it. 2012-06-03 Katsumi Yamaoka * w3m.el (w3m-create-page): Improve regexp matching Google's click- tracking urls. 2012-05-14 Katsumi Yamaoka * w3m.el (w3m-url-encode-string-2): New function. (w3m-print-current-url, w3m-print-this-url, w3m-print-this-image-url): Use it to encode url characters that are apt to be misidentified as word boundaries. 2012-04-22 Katsumi Yamaoka * w3m.el (w3m-create-page): Decode url in Google's click-tracking filter. 2012-04-18 Andrey Kotlarski * w3m-lnum.el (w3m-with-lnum, w3m-lnum-universal-dispatch): Explicitly redraw mode line. (w3m-lnum-visit): Fix prompt; add --insecure option to Curl. 2012-04-17 Katsumi Yamaoka * w3m.el (w3m-create-page): Add a filter for Google's click-tracking temporarily --- maybe this should be incorporated in w3m-filter.el. 2012-04-13 Katsumi Yamaoka * w3m.el (w3m-goto-mailto-url): Protect against nil value of body=; decode url string; don't change mail buffer's modification status; make sure body text is inserted to the message body. 2012-04-12 Katsumi Yamaoka * w3m.el (w3m-shr-url-at-point): New function. (w3m-url-at-point): Use it. * doc/ptexinfmt.el (texinfo-format-syntax-table): Modify character syntax of " and \ to w, as a workaround. (texinfo-format-comma): Support @comma. (texinfo-format-parse-args): Tweak it so as to work for @comma. 2012-03-16 Katsumi Yamaoka * w3m.el (w3m-scroll-left, w3m-scroll-right): Use image-mode function for an image page. (w3m-shift-left, w3m-shift-right): Pass prefix argument to image-mode function. 2012-03-12 Dan Jacobson * w3m.el (w3m-ctl-c-map): Bind `C-c C-e' to w3m-goto-new-session-url. 2012-02-27 Katsumi Yamaoka * w3m.el (w3m-relationship-estimate-rules) (w3m-open-all-links-in-new-session): Work for https Google pages. 2012-02-20 Katsumi Yamaoka * w3m.el (w3m-goto-mailto-url): Work for mail body. 2012-02-13 Katsumi Yamaoka * w3m-util.el (w3m-switch-to-buffer): Abolish. * w3m-bookmark.el (w3m-bookmark-add-all-urls): * w3m-ems.el (w3m-tab-drag-mouse-function) (w3m-tab-click-mouse-function, w3m-tab-next-buffer) (w3m-tab-make-keymap): * w3m-form.el (w3m-form-input-textarea, w3m-form-input-select) (w3m-form-input-map): * w3m-session.el (w3m-session-select): * w3m-tabmenu.el (w3m-switch-buffer, w3m-tab-menubar-open-item): * w3m-util.el (w3m-popup-buffer, w3m-make-menu-commands): * w3m.el (w3m-next-buffer, w3m-move-unseen-buffer) (w3m-goto-url-new-session, w3m-reload-all-pages): Revert to using switch-to-buffer. 2012-02-10 Katsumi Yamaoka * w3m-hist.el (w3m-history-store-position): Don't trust column position that Emacs tells if there's an image. (w3m-history-restore-position): Revert 2011-10-21 change. 2012-02-10 Kevin Ryde * w3m.el (w3m-about-header): Show info of image where point stays. 2012-01-26 Katsumi Yamaoka * w3m.el (w3m-mode): Don't make bidi-paragraph-direction bound globally in old Emacsen and XEmacsen. (w3m-goto-url): Work for name anchors. 2012-01-23 Katsumi Yamaoka * w3m-ems.el (w3m-form-make-button): Use "submit" instead for an empty text, that won't be buttonized. Reported by Roland Winkler . 2012-01-13 Hideyuki SHIRAI * w3m.el (w3m-fontify-anchors, w3m-goto-url): Not encode and decode the anchor values to use Punycode. 2012-01-10 Katsumi Yamaoka * w3m.el (w3m-image-type-alist): Add image/tiff. (w3m-view-previous-page): Protect against empty history. 2012-01-06 Katsumi Yamaoka * Makefile.in (install-icons, install-icons30, install-info) (install-info-en, install-info-ja, install-package) (install-package-ja): * doc/Makefile.in (install): Add DESTDIR variable to installation directory. * w3mhack.el (w3mhack-expand-file-name): New function. (w3mhack-what-where): Use it. * aclocal.m4 (AC_SET_VANILLA_FLAG): Remove --no-unibyte option. 2012-01-02 Elias Pipping * Makefile.in (install-lisp): Add DESTDIR variable to installation directory. 2011-12-26 Dan Jacobson * w3m.el (w3m-gohome): Always reload the home page. 2011-12-07 Katsumi Yamaoka * w3m.el (w3m-mode): Force paragraph direction to be left-to-right. Suggested by Naohiro Aota . 2011-12-06 Katsumi Yamaoka * Makefile.in (.el.elc): Shut up. * w3m-lnum.el (w3m-lnum-read-interactive): Use (sit-for 0) instead of redisplay for Emacs 21.1, too. 2011-12-05 Katsumi Yamaoka * aclocal.m4 (AC_EMACS_LISP): Simplify. (AC_PATH_EMACS): Simplify Lisp code so as to make it work for recent XEmacsen. * w3m-favicon.el (w3m-favicon-type): Silence SXEmacs 22.1.14's byte compiler. * w3m-lnum.el (w3m-lnum-read-interactive): Use (sit-for 0) instead of redisplay for XEmacs. * w3m.el (w3m-resize-image-interactive): Use read-char-exclusive with no arg for XEmacs. 2011-12-05 Katsumi Yamaoka * w3m.el (w3m-read-file-name): Don't strip query part from given url. (w3m-download): Always prompt for file name; don't strip query part. Suggested by Dan Jacobson . 2011-12-04 Katsumi Yamaoka * w3m-lnum.el (w3m-lnum-universal-dispatch): Add argument passed to kill-buffer, Emacs 22 requires it; use beginning-of-line rather than move-beginning-of-line that XEmacs doesn't provide. 2011-12-02 Dan Jacobson * w3m-search.el (w3m-search-engine-alist): Put search string first in query form. 2011-11-30 Katsumi Yamaoka * w3m-util.el (w3m-popup-buffer): Restore history position always. * w3m.el (w3m-copy-buffer): Save history position. 2011-11-17 Katsumi Yamaoka * w3m-lnum.el (w3m-lnum-actions-custom-type): New variable. (w3m-lnum-actions-general, w3m-lnum-actions-image-alist) (w3m-lnum-actions-link-alist w3m-lnum-actions-button-alist) (w3m-lnum-actions-form-alist): Use it to improve custom type. 2011-11-16 Andrey Kotlarski Add alternative selection->action method. * w3m-lnum.el: Update comment section. (w3m-lnum-quick-browsing): Change default value. (w3m-lnum-actions-general, w3m-lnum-actions-image-alist) (w3m-lnum-actions-link-alist, w3m-lnum-actions-button-alist) (w3m-lnum-actions-form-alist): New custom options. (w3m-lnum-remove-overlays): Add optional parameters for start and end. (w3m-lnum, w3m-lnum-prompt-str, w3m-lnum-highlight-anchor): Sanitize variable naming. (w3m-read-event, w3m-lnum-visit, w3m-lnum-make-action): New macros. (w3m-lnum-read-interactive): Add optional parameters for previous filter and selected number. Return last applied filter along selected value. Use `w3m-read-event'. Remove lnum overlays within all buffer on scroll. (w3m-with-lnum): Add parameter for initial filter. Change mode-line during selection. (w3m-lnum-get-action): If single image during image selection - immediately select it. Accommodate to new return format of `w3m-lnum-read-interactive'. (w3m-lnum-follow): Use `w3m-lnum-visit'. (w3m-lnum-universal-dispatch): New function. (w3m-lnum-universal): New command. (w3m-lnum-view-image, w3m-lnum-save-image, w3m-lnum-print-this-url): Use nth. (w3m-lnum-zoom-image): Use `w3m-resize-image-interactive'. (w3m-lnum-zoom-in-image, w3m-lnum-zoom-out-image): Update doc string. (w3m-lnum-bookmark-add-this-url): Fix bookmarking of current url. (w3m-lnum-actions-link-alist): Add actions for generic browser and Curl if present. * w3m.el (autoload): Autoload `w3m-lnum-universal'. (w3m-resize-image-interactive): New function. (w3m-lnum-map): Add key for `w3m-lnum-universal'. 2011-11-14 Katsumi Yamaoka * w3m.el (w3m-expand-url): Assume only a name anchor, that has no scheme part nor directory part, to be the buffer: scheme. (w3m-buffer-local-url): Move forward. 2011-10-24 Katsumi Yamaoka * w3m-hist.el: Require w3m-util. 2011-10-22 Naohiro Aota * w3m.el (w3m-goto-url): Check name anchor after redirect resolution. 2011-10-21 Katsumi Yamaoka * w3m-hist.el (w3m-history-restore-position): Don't hscroll if there are images ([emacs-w3m:11658]). 2011-10-17 Katsumi Yamaoka * w3m.el (w3m-canonicalize-url): Fix url that fails to have put a separator following a domain name. Suggested by Dan Jacobson . 2011-10-14 Katsumi Yamaoka * w3m.el (w3m-url-coding-system-alist): Add a rule for Google. (w3m-url-coding-system): Allow function to determine coding system. 2011-10-14 Katsumi Yamaoka * w3m.el (w3m-url-encode-string, w3m-url-transfer-encode-string): Restore optional coding argument. (w3m-gmane-url-at-point, w3m-canonicalize-url): Do. (w3m-download): Decode file name in url. * w3m-form.el (w3m-form-make-form-data, w3m-form-parse-and-fontify): * w3m-search.el (w3m-search-escape-query-string, w3m-search-do-search) (w3m-search-uri-replace): Revert last change. 2011-10-13 Katsumi Yamaoka * w3m.el (w3m-url-coding-system-alist): New user option. (w3m-show-decoded-url, w3m-google-feeling-lucky-charset): Abolish. (w3m-url-coding-system): New function. (w3m-url-encode-string, w3m-url-readable-string) (w3m-url-transfer-encode-string): Use it. * w3m.el (w3m-fontify-anchors, w3m-gmane-url-at-point) (w3m-canonicalize-url, w3m-goto-url): * w3m-form.el (w3m-form-make-form-data, w3m-form-parse-and-fontify): * w3m-search.el (w3m-search-escape-query-string, w3m-search-do-search) (w3m-search-uri-replace): Don't specify coding system for encoding url. 2011-10-07 Katsumi Yamaoka * w3m-favicon.el (w3m-favicon-type): Prefer gif. (w3m-favicon-convert): Work for gif icons named "favicon.ico". 2011-09-08 Katsumi Yamaoka * w3m-lnum.el (w3m-lnum-face): Remove face alias. (w3m-lnum-quick-browsing): Add custom type. (w3m-lnum-remove-overlays, w3m-lnum-set-numbering) (w3m-lnum-highlight-anchor, w3m-lnum-get-match-info): Fix overlay end range, too. 2011-09-07 Andrey Kotlarski * w3m.el: Use `w3m-lnum' as naming prefix for commands and maps from `w3m-lnum.el'. * w3m-lnum.el: Use `w3m-lnum' as naming prefix everywhere instead of `w3m-linknum' or `w3m-link-numbering'. (w3m-lnum-set-numbering, w3m-lnum): Optionally don't clean previous numbering. (w3m-lnum-read-interactive): Don't clean previous numbering with `w3m-lnum' in cases when there is no such. (w3m-lnum-remove-overlays, w3m-lnum-set-numbering): Fix overlay start range to make it work for XEmacs. (w3m-lnum-get-action): Don't invoke `w3m-lnum-read-interactive' with 0 numbered items. * w3m-util.el (w3m-goto-next-defun): New macro. (w3m-goto-next-anchor-or-image, w3m-substitute-key-definitions): Move from w3m-lnum.el 2011-09-04 Katsumi Yamaoka * w3m-lnum.el (w3m-link-numbering, w3m-linknum-minibuffer-prompt) (w3m-linknum-match): Use old defface style for XEmacs. (w3m-link-set-numbering): Replace string-match-p w/ w3m-string-match-p. (w3m-highlight-numbered-anchor, w3m-get-match-info): Fix range passed to overlays-in to make it work for XEmacs. 2011-09-04 Andrey Kotlarski * w3m-lnum.el: Update copyright years. Don't require `cl'. (w3m-linknum-match): Make numbering face visible for some consoles. (w3m-link-numbering-quick-browsing) (w3m-link-numbering-context-alist): New custom variables. (w3m-linknum-remove-overlays): Delete overlays only within the visible window part. (w3m-link-set-overlay): Don't use `incf'. (w3m-link-set-numbering): Number additional context items as specified by `w3m-link-numbering-context-alist'. Return index of the last matched item. (w3m-goto-next-image2): Fix doc typo. (w3m-goto-next-anchor-or-image, w3m-link-numbering): Cosmetic indent. (w3m-linknum-prompt-str): Don't show 0 when this is being current default for selection. (w3m-read-int-interactive): Up and down scrolling preserves text filter and cleans previous numbering. Allow shortcutting options as specified by `w3m-link-numbering-quick-browsing'. Don't let the text filter grow when no items match. (w3m-with-linknum): Make `last-index' variable visible within body and set as the last index currently used for numbering. (w3m-get-match-info): New macro. (w3m-get-anchor-info): Use `w3m-get-match-info'. (w3m-go-to-linknum, w3m-linknum-get-action): Call `w3m-get-anchor-info' with a selection number. (w3m-linknum-follow, w3m-linknum-view-image) (w3m-linknum-save-image, w3m-linknum-print-this-url): Don't use cl functions. (w3m-linknum-zoom-image): Cosmetic doc string change. (w3m-linknum-bookmark-add-this-url): Use 1+. 2011-09-03 Dan Jacobson * w3m.el (w3m-lynx-like-map, w3m-info-like-map): Bind the `C-t t' key to w3m-create-empty-session. 2011-09-02 Katsumi Yamaoka * w3m.el (w3m-create-empty-session): New user command. (w3m-new-session-url): Default to about:blank. (w3m-input-url): Don't use about:* as initial value. (w3m-goto-url-new-session): Use w3m-new-session-url as the default. 2011-07-20 Katsumi Yamaoka * w3m-ems.el (w3m-toolbar-define-keys): No need to take care of the tool-bar default bindings for Emacs 24. 2011-07-13 Katsumi Yamaoka * w3m-ccl.el (charset-id): Work for old Emacsen. 2011-07-11 Katsumi Yamaoka * w3m.el (w3m-delete-buffer): Switch to the previous emacs-w3m buffer explicitly; bind frame-auto-delete and ignore-window-parameters while killing the buffer. (w3m-goto-url): Change the order of retrieving group:* urls so as to arrange the buffer list in turn. 2011-07-08 Katsumi Yamaoka * w3m-ccl.el (charset-id): Silence the byte compiler. * w3m-ems.el (w3m-detect-coding-region): Use with-coding-priority. (w3m-make-ccl-coding-system): Silence the byte compiler. 2011-07-07 Katsumi Yamaoka * w3m-util.el (w3m-switch-to-buffer): New function. * w3m-bookmark.el (w3m-bookmark-add-all-urls): * w3m-ems.el (w3m-tab-drag-mouse-function) (w3m-tab-click-mouse-function, w3m-tab-next-buffer) (w3m-tab-make-keymap): * w3m-form.el (w3m-form-input-textarea, w3m-form-input-select) (w3m-form-input-map): * w3m-session.el (w3m-session-select): * w3m-tabmenu.el (w3m-switch-buffer, w3m-tab-menubar-open-item): * w3m-util.el (w3m-popup-buffer, w3m-make-menu-commands): * w3m.el (w3m-next-buffer, w3m-move-unseen-buffer) (w3m-goto-url-new-session, w3m-reload-all-pages): Use it. 2011-07-07 Katsumi Yamaoka * w3m.el (w3m-goto-mailto-url): Pass other headers to the agent. Suggested by Dan Jacobson . 2011-07-06 Katsumi Yamaoka * w3m-util.el (w3m-interactive-p): New macro. * w3m.el (w3m-toggle-inline-image, w3m-toggle-inline-images) (w3m-goto-url, w3m-safe-view-this-url): * w3m-hist.el (w3m-history-store-position) (w3m-history-restore-position): Use it. * w3m-ems.el (w3m-toolbar-define-keys): Work around the Emacs 24 error "`keymap' is reserved for embedded parent maps". 2011-05-11 Katsumi Yamaoka * w3m.el (w3m-show-form-hint): Give point as arg to w3m-submit to prevent cursor from being caught in form area. 2011-04-20 TAKAHASHI Kaoru * doc/ptexinfmt.el: Fix description comment style. 2011-04-13 TAKAHASHI Kaoru * doc/ptexinfmt.el: Use lexical binding. (ptexinfmt-broken-facility): Rename _dummy argument. (texinfo-enclosure-list, texinfo-alias-list): Add defvar stub for lexical binding. 2011-03-10 TSUCHIYA Masatoshi * w3m.el (w3m-content-type-alist): Use functionp instead of symbolp for the users who set their own private function to browse-url-browser-function. 2011-02-28 Hideyuki SHIRAI * w3m.el (w3m-active-region-or-url-at-point): Move w3m-url-at-point() after to check the properties of w3m-URL. 2011-02-23 Naohiro Aota * w3m.el (w3m-goto-url): Invoke error if you try to invoke another w3m process when one loading. 2011-02-09 Naohiro Aota * w3m.el (w3m-show-form-hint): New function to display submitting form hint. (w3m-after-cursor-move-hook): Use it. 2011-01-31 Johan Claesson * w3m.el (w3m-content-type-alist): When selecting which external html browser to use, handle the case where browse-url-browser-function is an alist. 2011-01-26 Hideyuki SHIRAI * w3m.el (w3m-rendering-half-dump): Protect against things that look like tags but aren't. 2011-01-23 Hideyuki SHIRAI * w3m.el (w3m-fontify-anchors): Decode entities in title of anchor. 2011-01-23 Kevin Ryde * w3m.el (w3m-print-this-url): Correction to my last, use string-width not length. 2011-01-13 Hideyuki SHIRAI * w3m.el (w3m-goto-mailto-url): Decode entities in URL. 2011-01-11 Kevin Ryde * w3m.el (w3m-print-this-url): If anchor-title plus url is wider than the frame then use two lines "Title\nURL". (w3m-about-header): Show anchor-title of link at point. 2011-01-04 Hideyuki SHIRAI * w3m.el (w3m-fontify-anchors): If exist `title' in anchor, it adds to w3m-balloon-help property and puts it to w3m-anchor-title property. (w3m-print-this-url): Treat w3m-anchor-title property. * w3m-util.el (w3m-anchor-title): New macro. 2011-01-03 Hideyuki SHIRAI * w3m.el (w3m-fix-illegal-blocks): Fix FIXEDCASE and LITERAL options of replace-match to `t'. 2010-12-28 Katsumi Yamaoka * w3m.el (w3m-rendering-half-dump): Add name anchors that w3m can handle ([emacs-w3m:11153]). 2010-12-27 Katsumi Yamaoka * w3m-util.el (w3m-replace-regexps-in-string): Move from w3m-lnum.el; use w3m-replace-in-string instead of replace-regexp-in-string that is not available in XEmacs 21.4; make it a Lisp function. (w3m-string-match-p, w3m-substring-no-properties): New functions. * w3m-lnum.el (w3m-link-set-numbering): Use w3m-string-match-p instead of string-match-p that is not available in Emacs 21~22 and XEmacs. (w3m-read-int-interactive): Use w3m-substring-no-properties instead of substring-no-properties that is not available in Emacs 21, XEmacs 21.4, and SXEmacs. (w3m-linknum-follow): Remove the 5th arg passed to read-string. It is not available in XEmacs. 2010-12-26 Andrey Kotlarski * w3m-lnum.el: Updated comments section. (w3m-link-numbering-mode-hook, w3m-link-numbering-mode-map): Updated doc string. (w3m-link-set-overlay): No more need for save-excursion. (w3m-replace-regexps-in-string, w3m-linknum-prompt-str): New macros. (w3m-link-set-numbering): Refactored, does filtering as well. Does numbering only within the visible window part. (w3m-goto-next-link, w3m-goto-next-image2): New functions. (w3m-goto-next-anchor-or-image): Take optional argument for position. No need to use goto-char. (w3m-link-numbering): Take additional argument for filtering string. Use `w3m-goto-next-link', `w3m-goto-next-image2'. No more need for `save-excursion'. (w3m-read-int-interactive): I-search functionality added. Offer to select firstly numbered option when possible. (w3m-with-linknum): Put the call to `w3m-link-numbering' inside the `unwind-protect'. (w3m-highlight-numbered-anchor): Highlight only within the visible window part. Return text for the form fields or buttons as well. (w3m-get-anchor-info): Operate only within the visible window part. (w3m-go-to-linknum, w3m-linknum-get-action): Updated for the changed `w3m-link-numbering' argument codes. (w3m-linknum-follow): According to prefix arguments may toggle instead of visit image links. Also options to edit link before visiting. 2010-12-22 Katsumi Yamaoka * w3m.el (w3m-fix-illegal-blocks): Save restriction. 2010-12-20 Katsumi Yamaoka * mime-w3m.el (kill-new): Don't compile defadvice form when building emacs-w3m. * w3m.el (w3m-fix-illegal-blocks): New function. (w3m-rendering-buffer): Use it. * w3m-util.el (w3m-beginning-of-tag, w3m-end-of-tag): Move from shimbun/shimbun.el. 2010-12-13 Hideyuki SHIRAI * w3m.el (w3m-external-view): Execute default web browser insted of download if content-type is not supported. 2010-12-09 Katsumi Yamaoka * w3m.el (w3m-print-this-url, w3m-print-this-image-url): Fix "no url" message. Suggested by Dan Jacobson . 2010-12-08 Katsumi Yamaoka * w3m-session.el (w3m-session-crash-recovery-remove): Add autoload cookie. 2010-12-06 Katsumi Yamaoka * w3m.el (w3m-input-url): Return nil for empty url. (w3m-view-url-with-external-browser): Prompt user to edit url, not to answer y/n. Suggested by Dan Jacobson . 2010-11-03 Kevin Ryde * w3m-util.el (w3m-condition-case): Add a missing quote ([emacs-w3m:11405]). 2010-10-21 Katsumi Yamaoka * bookmark-w3m.el (bookmark-make-record-function): Don't bind it to any value. Suggested by David Engster ([emacs-w3m:11395]). 2010-10-13 IRIE Shinsuke * w3m-ems.el (w3m-tab-previous-buffer): Work when called interactively with no arg. 2010-10-08 Katsumi Yamaoka * w3m.el: Load bookmark-w3m for Emacs >=23. * w3mhack.el (w3mhack-module-list): Exclude bookmark-w3m.el from compilation under Emacs <23 and XEmacs. * bookmark-w3m.el: Provide the feature; add comment. (bookmark-w3m-bookmark-jump): Add autoload cookie. 2010-10-08 Masatake YAMATO * bookmark-w3m.el: New file. 2010-10-07 Katsumi Yamaoka * w3m-util.el (w3m-make-local-hook): New function. * mime-w3m.el (mime-display-message) * w3m-mail.el (w3m-mail-compose-with-vm) * w3m.el (w3m-set-buffer-unseen, w3m-buffer-setup): Use it. 2010-10-06 Katsumi Yamaoka * w3m-ems.el (w3m-add-local-hook, w3m-remove-local-hook): Abolish. * mime-w3m.el (mime-display-message) * w3m-mail.el (w3m-mail-compose-with-vm) * w3m.el (w3m-set-buffer-unseen, w3m-set-buffer-seen) (w3m-buffer-setup): Don't use w3m-add-local-hook and w3m-remove-local-hook. 2010-09-25 Andrey Kotlarski * w3m-lnum.el: Update Commentary section. (w3m-link-set-overlay): New macro. (w3m-link-set-numbering, w3m-goto-next-anchor-or-image): New functions. (w3m-link-numbering): Refactor, use `w3m-link-set-numbering'. (w3m-read-int-interactive): Echo currently to be selected element. (w3m-with-linknum): Update docstring. (w3m-highlight-numbered-anchor): Properly highlight and unhighlight multiline elements and return selection info. (w3m-get-anchor-info): Always return 4 element list. (w3m-go-to-linknum): Echo `w3m-current-url' for default selection. (w3m-linknum-follow): Add support for toggling non link images. Inverse prefix argument behaviour for some elements. (w3m-linknum-toggle-inline-image, w3m-linknum-edit-this-url) (w3m-linknum-print-this-url): Cosmetic indentation changes. 2010-09-22 Katsumi Yamaoka * w3m.el (w3m-init-file): Allow nil. Suggested by Leo. 2010-09-09 Leo * w3m.el (w3m-input-url): Pass DEFAULT argument to completing-read, instead of replacing its return value, to enable a user to edit. 2010-09-09 Katsumi Yamaoka * w3m.el (w3m-active-region-or-url-at-point): Remove only newlines and leading and trailing whitespace in region string. (w3m-input-url): Treat INITIAL if it is "" as nil but don't mind region even if it is active; treat DEFAULT if it is "" as nil but don't regard to w3m-home-page; always show DEFAULT if any within prompt string. Suggested by Leo . 2010-09-06 Katsumi Yamaoka * w3m-lnum.el (w3m-read-int-interactive): Make it work for XEmacs (note: `?<' is not `eq' to `60' in XEmacs, for example). 2010-09-06 Andrey Kotlarski * w3m-lnum.el (w3m-linknum-remove-overlays): Simplified. (w3m-link-numbering-mode): Using `or' instead of `unless'. (w3m-read-int-interactive): Added ability to scroll page while selecting number. 2010-09-06 Katsumi Yamaoka * w3m.el (w3m-input-url): Move cursor to place where a user likely begins to edit. 2010-09-02 TAKAHASHI Kaoru * doc/ptexinfmt.el (texinfo-multitable-widths): Use `make-char' instead of KANJI literal. 2010-08-24 TAKAHASHI Kaoru * doc/ptexinfmt.el (texinfo-format-verb): Use (delete-char -1) instead of (delete-backward-char 1); For Emacs24. 2010-08-20 ARISAWA Akihiro * w3m.el (w3m-entity-table): Reverte last change. (w3m-extra-numeric-character-reference): New variable. (w3m-entity-value): Use it. 2010-08-18 Katsumi Yamaoka * octet.el (octet-find-file) * w3m-form.el (w3m-fontify-textareas, w3m-form-replace) * w3m-proc.el (w3m-process-filter) * w3m-session.el (w3m-session-select-list-all-sessions) (w3m-session-select-list-session-group, w3m-session-select-next) * w3m.el (w3m-idle-images-show, w3m-toggle-inline-images-internal) (w3m-resize-inline-image-internal, w3m-fontify, w3m-refontify-anchor) (w3m-cache-remove-oldest, w3m-cache-remove, w3m-cache-contents) (w3m-cache-request-contents, w3m-create-text-page) (w3m-create-image-page, w3m-select-buffer-generate-contents) (w3m-select-buffer-recheck): Replace let-bindings of buffer-read-only to nil with inhibit-read-only to t. 2010-08-18 Katsumi Yamaoka * w3m-search.el (w3m-search-engine-alist): Fix `google news' url forms used to non-Japanese utf-8 environments. * w3m.el (w3m-entity-table): Add table for "•". (w3m-entity-value): Prefer "&#NUM;" type entities specified in w3m-entity-table. 2010-08-17 Katsumi Yamaoka * w3m.el (w3m-safe-view-this-url): Never query "Are you sure..." if prefix arg is given. 2010-08-10 Katsumi Yamaoka * w3m.el (w3m-create-text-page): Make point and window start be the start of contents, especially for text/plain pages. 2010-08-05 Katsumi Yamaoka * w3m.el (w3m-relationship-estimate-rules): Update regexps for Google. 2010-07-30 Katsumi Yamaoka * w3m.el: Autoload w3m-bookmark-add. * w3m-lnum.el (w3m-read-int-interactive): Ignore mouse event in XEmacs. 2010-07-29 Andrey Kotlarski * w3m.el (autoload, w3m-linknum-map): `w3m-linknum-bookmark-add-this-url', `w3m-linknum-zoom-in-image' and `w3m-linknum-zoom-out-image' added. * w3m-lnum.el (w3m-link-numbering-mode-map): `w3m-linknum-bookmark-add-this-url', `w3m-linknum-zoom-in-image' and `w3m-linknum-zoom-out-image' added. (w3m-link-numbering-mode, w3m-with-linknum) (w3m-linknum-get-action): Use `zerop'. (w3m-link-numbering): Simplify argument list and checks assosiated with it. (w3m-read-int-interactive): Add for quit. (w3m-linknum-follow): Add position to history when visiting url in curent page. Change message when no valid anchor is selected. (w3m-linknum-view-image, w3m-linknum-save-image): Rewrite using `cond'. (w3m-linknum-zoom-image): New macro. (w3m-linknum-zoom-in-image, w3m-linknum-zoom-out-image) (w3m-linknum-bookmark-add-this-url): New functions. 2010-07-25 Hideyuki SHIRAI * w3m.el (w3m-auto-show): Guard error if this-command is not a symbol. Thanks to IRIE Shinsuke san. cf. [emacs-w3m:11282] 2010-07-23 Katsumi Yamaoka * w3m.el (w3m-goto-url): Save positions iff called interactively. (w3m-goto-url-new-session): Save positions. * w3m-bookmark.el (w3m-bookmark-view): Save positions. * w3m-hist.el (w3m-history-copy): Copy positions. 2010-07-13 Andrey Kotlarski * w3m-lnum.el (w3m-link-numbering-mode): Using `buffer-list' instead of `w3m-list-buffers' as the latter does unnecessary stuff. (w3m-linknum-read-url): Removed. It's now equivalent to: (car (w3m-linknum-get-action prompt 1)) (w3m-linknum-toggle-inline-image): If no url under selected image, move over it and toggle it. (w3m-linknum-external-view-this-url, w3m-linknum-edit-this-url): Using `w3m-linknum-get-action' instead of `w3m-linknum-read-url'. * w3m.el (autoload): Added `w3m-link-numbering-mode', removed `w3m-linknum-read-url'. 2010-07-13 Katsumi Yamaoka * w3m-lnum.el (w3m-linknum-minibuffer-prompt): Make face config valid for XEmacs as well. (w3m-linknum-match): New face. (w3m-read-int-interactive): Make it work for XEmacs as well. (w3m-highlight-numbered-anchor): Use w3m-linknum-match face. 2010-07-12 Andrey Kotlarski * w3m-lnum.el: Updated commentary and usage sections. (w3m-substitute-key-definitions): New macro. (w3m-link-numbering-mode-map): Changed keybindings. (w3m-link-numbering-mode): Added mode-line indicator. Don't activate numbering overlays. Changing status mode causes all other w3m buffers to change status as well. (w3m-move-numbered-anchor): Removed. (w3m-with-linknum): Numbering overlays should never be active before invoking linknum functions thus less bookkeeping. (w3m-go-to-linknum, w3m-linknum-follow): Add mark for previous position. 2010-07-09 Hideyuki SHIRAI * w3m-lnum.el (w3m-read-int-interactive): Add keys to exit event loop, C-m & C-j. 2010-07-09 Katsumi Yamaoka * w3m.el (w3m-ctl-c-map, w3m-redisplay-map) (w3m-linknum-map): New sub-keymaps. (w3m-lynx-like-map, w3m-info-like-map): Move `C-c' prefixed commands and `C' prefixed commands to w3m-ctl-c-map and w3m-redisplay-map respectively. 2010-07-09 Andrey Kotlarski * w3m.el: Autoload w3m-linknum-follow, w3m-linknum-read-url, w3m-linknum-toggle-inline-image, w3m-linknum-view-image, w3m-linknum-external-view-this-url, w3m-linknum-edit-this-url, w3m-linknum-print-this-url, w3m-linknum-download-this-url. * w3m-lnum.el: Update usage comment. (w3m-link-numbering-mode): Cosmetic change. (w3m-get-anchor-info): Added w3m-image-alt char property to return list. (w3m-go-to-linknum, w3m-linknum-get-action): On 0 input select location url. (w3m-linknum-follow): Changed prompt and using w3m-message. (w3m-linknum-toggle-inline-image): Renamed from w3m-linknum-toggle-image and using w3m-message. When image on point, toggle it. (w3m-linknum-view-image, w3m-linknum-save-image) (w3m-linknum-external-view-this-url) (w3m-linknum-edit-this-url, w3m-linknum-print-this-url) (w3m-linknum-download-this-url): New commands. 2010-07-08 Andrey Kotlarski * w3m-lnum.el: Update usage comment. (w3m-linknum-minibuffer-prompt): New face. (w3m-linknum-remove-overlays): Quit immediately when it finds and deletes temporary match overlay. (w3m-link-numbering-mode): Pass prefix arg, which makes this function index only images if it is 2, to w3m-link-numbering. Remove interactive declaration and autoload cookie. (w3m-link-numbering, w3m-with-linknum): Vary function according to arg; index only images if it is 2. (w3m-read-int-interactive): Change prompt face to w3m-linknum-minibuffer-prompt. (w3m-highlight-numbered-anchor): Use next-single-property-change. (w3m-get-anchor-info): New function. Renamed from w3m-get-numbered-url. Using macrolet for less clutter. (w3m-go-to-linknum): Rewrote it more in style with the other user commands. (w3m-linknum-get-action): Added optional type argument to determine numbering scheme. (w3m-linknum-follow): Rewrite to use the new w3m-linknum-get-action return format. (w3m-linknum-read-url): Rewrite using w3m-linknum-get-action. (w3m-linknum-toggle-image): New function. 2010-07-06 Andrey Kotlarski * w3m-lnum.el: Update usage comment. (w3m-linknum-remove-overlays): New function. (w3m-link-numbering-mode): Turn mode off if prefix arg is 0; index forms as well as url links if prefix arg is 4. (w3m-link-numbering): Index forms as well if prefix arg is given. (w3m-move-numbered-anchor): Fix grammar in error message. (w3m-read-int-interactive): New function. (w3m-with-linknum): New macro. (w3m-highlight-numbered-anchor, w3m-get-numbered-url): New functions. (w3m-go-to-linknum): Add autoload cookie; turn on form numbers as well; don't highlight current link if prefix arg is given. (w3m-linknum-get-action, w3m-linknum-follow, w3m-linknum-read-url): New functions. 2010-06-25 Katsumi Yamaoka * w3m.el (w3m-toggle-inline-image) (w3m-toggle-inline-images): Fix query logic about safe url. 2010-06-24 Katsumi Yamaoka * w3m.el (w3m-menubar): Add w3m-pipe-source. (w3m-lynx-like-map, w3m-info-like-map): Bind "|" to w3m-pipe-source. (w3m-pipe-source): New command. 2010-06-22 Katsumi Yamaoka * w3mhack.el (w3mhack-update-files-autoloads): Strip subdirectory name that Emacs 24 doesn't strip from load-name. 2010-06-03 Hideyuki SHIRAI * octet.el (octet-w3m-region): Set to unibyte string for base64 encoding. 2010-05-24 Fedor Khod'kov * w3m-cookie.el (w3m-cookie-trusted-host-p): Don't bother to add excessive "$" to a regexp that w3m-cookie-reject-domains specifies. 2010-05-19 Katsumi Yamaoka * w3m.el (w3m-relationship-estimate-rules): Update regexps for Google. 2010-04-21 Katsumi Yamaoka * w3m.el (w3m-view-previous-page): Save positions. 2010-03-29 Katsumi Yamaoka * w3m.el (w3m-fontify-images): Use the identical Lisp object for a string used as w3m-image's property in order to enable XEmacs to display images in shimbun articles properly. 2010-03-29 Hideyuki SHIRAI * w3m.el (w3m-active-region-or-url-at-point): Check availability of w3m-current-url. 2010-03-12 Katsumi Yamaoka * w3m-ems.el (w3m-ems-create-image): New function that's an alias to create-animated-image or create-image. (w3m-create-image): Use it. * w3m.el (w3m-emacs-w3m-icon): Replace it with data not optimized. 2010-03-12 Katsumi Yamaoka * aclocal.m4 (AC_PATH_EMACS): Support Emacs 24. (AC_ADD_LOAD_PATH): Pipe stderr to /dev/null when running w3mhack-print-status. 2010-03-09 Katsumi Yamaoka * w3m.el (w3m-ignored-image-url-regexp): Fix custom type. 2010-03-09 Katsumi Yamaoka * w3m.el (w3m-view-this-url-1): Don't recenter if page is not changed. (w3m-goto-url): Don't move point to the top unless redisplaying page. 2010-03-02 Katsumi Yamaoka * w3m.el: Suppress compiler warnings that Emacs<22.2 and XEmacs issue against image-mode functions. 2010-03-02 Naohiro Aota * w3m.el (top): Require image-mode if available. (w3m-image-page-displayed-p): New function. (w3m-create-image-page): Setup image-mode's variable if possible. (w3m-scroll-up-or-next-url, w3m-scroll-down-or-previous-url) (w3m-shift-left, w3m-shift-right, w3m-beginning-of-line) (w3m-end-of-line): Call image-mode functions if possible and needed. 2010-02-22 Katsumi Yamaoka * w3m.el (w3m-goto-url): Turn truncate-lines off for text/plain pages. 2010-02-18 Katsumi Yamaoka * w3m.el (w3m-fontify-images): Add menu to images. (w3m-download-this-image, w3m-print-this-image-url): New functions. (w3m-link-menu): Add them; enable menu only when url or image is there. 2010-02-13 Katsumi Yamaoka * w3m-xmas.el (w3m-window-hscroll): Revert 2010-01-13 change. 2010-02-09 TSUCHIYA Masatoshi * w3m.el (w3m-cache-available-p): Now, pages with neither Last-Modified header and ETag header are treated as dynamically-generated pages. (w3m-cache-header-delete-variable-part): Contination lines are also removed. 2010-02-02 Katsumi Yamaoka * w3m.el (w3m-local-dirlist-cgi, w3m-set-display-ins-del): Honor w3m-command-environment. Suggested by Toru TSUNEYOSHI . 2010-02-01 Hideyuki SHIRAI * w3m.el (w3m-redisplay-this-page): Save positions. 2010-02-01 Katsumi Yamaoka * w3m.el (w3m-reload-this-page): Save positions. * w3m-hist.el (w3m-history-store-position) (w3m-history-restore-position): Use line number and column number to save positions. 2010-01-25 Katsumi Yamaoka * w3m.el (w3m-view-previous-page): Restore positions as well when jumping within a page. (w3m-view-this-url-1): Reset hscroll after retrieving a new page. (w3m-view-this-url): Save positions first. (w3m-delete-buffer): Restore positions in a page being left. (w3m-goto-url): Don't save positions here. * w3m-util.el (w3m-popup-buffer): Restore positions only when buffer to be displayed is hidden, not always. 2010-01-19 Katsumi Yamaoka * w3m.el (w3m-next-anchor, w3m-previous-anchor, w3m-next-form) (w3m-previous-form, w3m-next-image, w3m-previous-image): Remove unused var `st'. 2010-01-19 Katsumi Yamaoka * w3m.el (w3m-goto-url): Make it work as before for group: urls. 2010-01-15 Katsumi Yamaoka * w3m.el (w3m-doc-view-map): New variable. (w3m-view-this-url-1): Improve the way to keep the window configuration for the case where w3m-new-session-in-background is non-nil. (w3m-doc-view): Use w3m-doc-view-map. (w3m-doc-view-quit): New function. 2010-01-13 Katsumi Yamaoka * w3m-bug.el (report-emacs-w3m-bug) * w3m-session.el (w3m-session-save, w3m-session-automatic-save) (w3m-session-deleted-save, w3m-session-crash-recovery-save) * w3m.el (w3m-key-binding): Use save-current-buffer instead of save-excursion. * mew-w3m.el (mew-w3m-view-inline-image, mew-mime-text/html-w3m) * w3m-xmas.el (w3m-window-hscroll) * w3mhack.el (toplevel, w3mhack-generate-load-file): Use with-current-buffer rather than save-excursion + set-buffer. * w3m-cookie.el (w3m-cookie-parse-args): Use with-current-buffer rather than save-excursion + set-buffer; no need to use save-restriction and narrow-to-region; remove duplicate set-syntax-table. 2010-01-12 Katsumi Yamaoka * w3m.el (w3m-print-this-url): Exclude empty image-alt string. * w3m-form.el (w3m-form-parse-and-fontify): Strip text props from string elements contained in w3m-current-forms so as to enable XEmacs to read ~/.w3m/.sessions file. 2010-01-12 Katsumi Yamaoka * w3m.el (w3m-refontify-anchor, w3m-cache-setup) (w3m-cache-remove-oldest, w3m-cache-remove, w3m-cache-contents) (w3m-cache-request-contents, w3m-view-this-url-1) (w3m-download-this-url, w3m-goto-url) * w3m-session.el (w3m-session-save) * w3m-bookmark.el (w3m-bookmark-sections, w3m-bookmark-write-file) (w3m-bookmark-kill-entries, w3m-bookmark-undo, w3m-bookmark-iterator) * w3m-util.el (w3m-unseen-buffer-p): Use with-current-buffer rather than save-excursion + set-buffer. * w3m.el (toplevel, w3m-highlight-current-anchor-1): Use point-at-eol rather than `(save-excursion (end-of-line) (point))'. * w3m-util.el: Autoload w3m-history-restore-position when compiling; autoload w3m-fb-frame-parameter only when compiling. 2010-01-12 Katsumi Yamaoka * w3m.el (w3m-next-buffer): Save and restore positions. (w3m-close-window): Save positions. * w3m-hist.el (w3m-history-store-position) (w3m-history-restore-position): Save and restore hscroll. * w3m-util.el (w3m-popup-buffer): Restore positions. 2009-11-06 TSUCHIYA Masatoshi * w3m-antenna.el (w3m-antenna-check-rss): Ignore future entries to display site announcements. 2009-11-03 Hideyuki SHIRAI * mew-w3m.el (mew-w3m-region-cite-mark): Add new selection. (mew-w3m-region): Rewrite. 2009-11-02 Hideyuki SHIRAI * mew-w3m.el (mew-w3m-region-cite-mark): New option. (mew-w3m-region): New function. (mew-mime-text/html-w3m): Use `mew-w3m-region' instead of `w3m-region'. 2009-09-02 Hideyuki SHIRAI * w3m-image.el (w3m-imagick-convert-program-available-p): If someone set `w3m-imagick-convert-program' to nil before load emacs-w3m, do not show warning message for ImageMagick's `convert'. 2009-09-02 Katsumi Yamaoka * w3m-mail.el (w3m-mail-embed-base-url, w3m-mail-compose-with-mml) (w3m-mail-compose-with-vm): Don't use default-enable-multibyte-characters that is obsolete in Emacs 23.2. 2009-09-01 Hideyuki SHIRAI * w3m.el (w3m-content-type-alist): Support `browse-url-default-windows|macosx-browser'. Thanks to Leo. Cf. [emacs-w3m:11035]. * w3m-ems.el (w3m-form-button, w3m-form-button-mouse) (w3m-form-button-pressed, w3m-tab-unselected) (w3m-tab-unselected-retrieving, w3m-tab-unselected-unseen) (w3m-tab-selected, w3m-tab-selected-retrieving, w3m-tab-background) (w3m-tab-selected-background, w3m-tab-mouse): Add type ns. Thanks to Leo. Cf. [emacs-w3m:11034]. 2009-08-25 Hideyuki SHIRAI * w3m.el (w3m-toggle-inline-images-internal): Do not display image, if its url is local and current url is not local. 2009-08-24 ARISAWA Akihiro * w3m.el (w3m-output-coding-system): Use `utf-8' except for emacs-21 under Japaese environment. 2009-08-19 Hideyuki SHIRAI * w3m.el (w3m-use-symbol): Set nil with emacs-23 or later. cf. [emacs-w3m:11002]. 2009-08-18 Hideyuki SHIRAI * w3m-util.el (w3m-puny-decode-url): Decode the part of hostname only. Add doc-strings. (w3m-puny-encode-url): Add doc-strings. 2009-08-17 Hideyuki SHIRAI * w3m.el (w3m-puny-utf-16be): New variable. (w3m-url-readable-string): Call `w3m-puny-decode-url'. (w3m-url-transfer-encode-string): Call `w3m-puny-encode-url'. (w3m-header-line-insert): Call `w3m-puny-decode-url'. (w3m-input-url): Call `w3m-puny-decode-url' for initial URL. * w3m-util.el (top): Add the variable definition of `w3m-puny-utf-16be' to avoid byte-compile warnings. (w3m-puny-code-regex, w3m-puny-code-nonascii, w3m-puny-base) (w3m-puny-tmin, w3m-puny-tmax, w3m-puny-damp, w3m-puny-skew) (w3m-puny-initial-bias, w3m-puny-initial-n, w3m-puny-delimiter): New constants. (w3m-puny-adapt, w3m-puny-decode-digit, w3m-puny-encode-digit) (w3m-puny-decode1, w3m-puny-decode, w3m-puny-decode-url) (w3m-puny-encode1, w3m-puny-encode, w3m-puny-encode-url): New functions. 2009-08-04 Hideyuki SHIRAI * w3m.el (w3m-decode-anchor-string): Convert contol-characters to space. 2009-07-17 Naohiro Aota * w3m.el (w3m-about-retrieve): When type is `nil', decode cached contents to display source of 404 page. Reported by Dan Jacobson . (w3m-do-cleanup-temp-files): New customize variable. (w3m-cleanup-temp-files): Use it. (toplevel): Call it when emacs-w3m shutdown. 2009-07-04 Naohiro Aota * w3m-search.el (w3m-search-thing-at-point-arg): New variable. (w3m-search-read-query): Use it. * w3m-util.el (w3m-current-title): Set title to ">" when w3m is retrieving a page. 2009-06-13 Kevin Ryde * w3m.el (w3m-view-recenter): Only nil,t,integer, not a cons. (w3m-search-name-anchor, w3m-view-this-url-1): No arg to w3m-recenter. (w3m-next-anchor, w3m-previous-anchor, w3m-next-form, w3m-previous-form, w3m-next-image, w3m-previous-image): Don't recenter, leave recentering just for following a link, not Tab etc within the buffer. (w3m-recenter): Remove NAME arg, believe don't need to differentiate URLs with an anchor or not since with no anchor `point' is at the start of the buffer and can't be recentered anyway. Use C-u style "(recenter '(4))" for the `t' middle-of-screen case. No need for code to avoid redisplay, `recenter' doesn't redisplay in the integer or C-u cases. 2009-06-13 Naohiro Aota * w3m.el (w3m-fontify-anchors): Decode entities of name anchor. 2009-05-25 Hideyuki SHIRAI * w3m.el (w3m-cache-available-p): Analyze the cache-control header more strictly. (w3m-scroll-up-or-next-url): Bind w3m-prefer-cache to `t' when goto the w3m-next-url. (w3m-scroll-down-or-previous-url): Bind w3m-prefer-cache to `t' when goto the w3m-previous-url. 2009-05-23 Naohiro Aota * w3m.el (w3m-reload-this-page): Add new argument `no-popup'; Call w3m-goto-url() with the argument. (w3m-goto-url-with-timer): Use it. 2009-04-28 Katsumi Yamaoka * w3m-bookmark.el (w3m-bookmark-make-item) * w3m-cookie.el (w3m-cookie-create) * w3m-dtree.el (w3m-dtree-expand-file-name, w3m-dtree-directory-name) * w3m-form.el (w3m-form-normalize-action, w3m-form-p) (w3m-form-set-method, w3m-form-put-property, w3m-form-field-parse) (w3m-form-real-reset) * w3m-hist.el (w3m-history-set-current) * w3m-namazu.el (w3m-namazu-call-process) * w3m-proc.el (w3m-process-p, w3m-process-kill-process) (w3m-process-error-handler) * w3m-session.el (w3m-session-history-to-save, w3m-session-make-item) * w3m-tabmenu.el (w3m-tab-menubar-make-items-1) * w3m-util.el (w3m-get-buffer-create, w3m-kill-buffer) (w3m-current-title, w3m-buffer-title, w3m-buffer-number) (w3m-buffer-set-number, w3m-buffer-name-add-title) (w3m-generate-new-buffer, w3m-lefttab-exist-p, w3m-righttab-exist-p) (w3m-url-valid, w3m-time-newer-p, w3m-time-lapse-seconds) (w3m-url-local-p, w3m-url-authinfo, w3m-url-strip-authinfo) (w3m-url-strip-fragment, w3m-url-strip-query, w3m-which-command) (w3m-assoc-ignore-case, w3m-unseen-buffer-p) * w3m-xmas.el (w3m-make-glyph) * w3m.el (w3m-clear-local-variables, w3m-copy-local-variables) (w3m-arrived-p, w3m-arrived-put, w3m-arrived-get) (w3m-url-transfer-encode-string, w3m-entity-value) (w3m-decode-anchor-string, w3m-toggle-inline-images-internal) (w3m-canonicalize-url, w3m-cache-header-delete-variable-part) (w3m-w3m-canonicalize-url, w3m-view-this-url-1) * mime-w3m.el (mime-w3m-setup): Don't use defsubst. * w3m-hist.el (w3m-history-plist-put, w3m-history-remove-properties): Don't inline w3m-history-add-properties. 2009-04-28 Katsumi Yamaoka * w3m.el (w3m-cache-available-p): Work around too large integer in Cache-Control header. 2009-04-27 Katsumi Yamaoka * w3m.el (w3m-url-to-file-name): Fix regexp used for stripping localhost part; make url a Tramp name if it is guessed. 2009-04-24 Katsumi Yamaoka * w3m.el (w3m-url-to-file-name): Allow "file:/foo.html" in addition to "file://foo.html" and "file:///foo.html". 2009-04-23 Katsumi Yamaoka * w3m-bookmark.el (w3m-bookmark-buffer): Use the time 0 as modtime of the bookmark buffer by default. 2009-04-22 Hideyuki SHIRAI * w3m.el (w3m-view-this-url-1): Pass url to sentinel. (w3m-recenter): Save excursion. 2009-04-22 Katsumi Yamaoka * w3m.el (w3m-view-recenter): New user option. (w3m-recenter): New function. (w3m-search-name-anchor, w3m-view-this-url-1, w3m-next-anchor) (w3m-previous-anchor, w3m-next-form, w3m-previous-form, w3m-next-image) (w3m-previous-image): Use it. 2009-04-20 Kevin Ryde * w3m.el (w3m-local-find-file-regexps): Make regexp-opt group regexps explicitly. 2009-04-14 Hideyuki SHIRAI * w3m.el (w3m-cache-available-p): The control of expire is added. (w3m-w3m-retrieve-1): The case where the option "no_cache=1" is put has been increased. 2009-04-12 Naohiro Aota * w3m.el (w3m-select-buffer-delete-buffer, w3m-goto-url) (w3m-delete-buffers): Unqueue image retrieving process manually. (w3m-idle-images-show): Widen narrowing. * w3m-proc.el (w3m-process-stop): Don't unqueue image retrieving process. * w3m.el (w3m-message-silent): New variable. (w3m-message): Use it: when the variable is `t', don't show a message. (w3m-idle-images-show): Use it. (w3m-w3m-dump-head): lexical-let it. (w3m-w3m-dump-extra): Ditto. (w3m-w3m-retrieve): Ditto. (w3m-retrieve-and-render): Ditto. (w3m-refresh-minimum-interval): New variable. (w3m-check-refresh-attribute): Use it. (w3m-view-previous-page): When visiting pages by history-back or history-next, don't just ignore refresh, but wait for a while. (w3m-idle-images-show): When there are events pended, re-create the idle timer; Check current position's item every time loop starts. (w3m-idle-images-show-unqueue): Set w3m-idle-images-show-timer properly. (w3m-arrived-add): Revert recent changes. * w3m-favicon.el (w3m-favicon-retrieve): lexical-let w3m-message-silent. 2009-04-02 Hideyuki SHIRAI * w3m.el (w3m-arrived-add): If url has a multi-byte character, do not do recursive-call itself. If decoded url does not have a multi-byte character, do not do recursive-call itself. 2009-03-28 Naohiro Aota * w3m.el (w3m-goto-url-with-timer): When going to the same url, use `w3m-reload-this-page'. (w3m-image-no-idle-timer): New variable. (w3m-toggle-inline-images-internal): Use it. (w3m-arrived-add): Add also decoded url. (w3m-goto-url): Restore forms also when url is local. 2009-03-18 Katsumi Yamaoka * w3m.el (w3m-link-menu): Always provide title string. Suggested by David Abrahams . cf. . 2009-03-17 Victor Ren * w3m.el (w3m-url-to-file-name): Support "file://c:/" in addition to "file:///c:/". 2009-03-12 Hideyuki SHIRAI * w3m.el (w3m-w3m-parse-header): The value of w3m-document-charset is not used excluding x-moe-internal. 2009-03-04 Hideyuki SHIRAI * w3m.el (w3m-decode-buffer): If context-charset is x-moe-internal, x-moe-internal is used as charset regardless of w3m-type. (w3m-w3m-parse-header): Add w3m-document-charset to handle of the headers. If w3m-document-charset is x-moe-internal, charset sets to x-moe-internal compulsorily. If x-w3m-content-encoding is exist, the value of x-w3m-content-encoding is used as encoding method regardless of w3m-type. 2009-03-03 Naohiro Aota * w3m-hist.el (w3m-history-slimmed-history-flat, w3m-history-slim): New functions. * w3m-session.el (w3m-session-history-to-save): Use it. 2009-02-26 Katsumi Yamaoka * w3m.el: Require w3m-session instead of autoloading it. * w3m-session.el: Don't require w3m; require w3m-util; silent warnings. (w3m-session-select): Use w3m-get-buffer-create instead of get-buffer-create to kill the session select buffer when quitting. * w3m-util.el (w3m-delete-frames-and-windows): Delete frames if the other windows visit buffers being related to emacs-w3m or the session select buffer. (w3m-replace-in-string): eval-and-compile. 2009-02-24 Katsumi Yamaoka * w3m.el: Autoload w3m-go-to-linknum. (w3m-lynx-like-map, w3m-info-like-map): Bind `C-c C-l' to it. (w3m-mode): Mention w3m-go-to-linknum in doc string. * w3m-util.el (w3m-read-number): New function. * w3m-lnum.el (w3m-go-to-linknum): Use w3m-read-number. 2008-04-12 Jose A. Ortega Ruiz * w3m-lnum.el (w3m-go-to-linknum): New function. 2009-02-23 Katsumi Yamaoka * w3m-session.el (w3m-session-ignore-errors): New macro. (w3m-session-save, w3m-session-automatic-save) (w3m-session-deleted-save, w3m-session-crash-recovery-save) (w3m-session-crash-recovery-remove, w3m-session-select-mode) (w3m-session-select, w3m-session-make-menu-items) (w3m-session-last-autosave-session, w3m-session-last-crashed-session): Use it. (toplevel): Require cl when compiling. (w3m-session-crash-recovery-save) (w3m-session-select-list-all-sessions): Remove unused variables. 2009-02-16 Hideyuki SHIRAI * w3m-session.el (w3m-session-last-crashed-session): Fix tiny typo. 2009-02-15 Naohiro Aota * w3m.el (w3m-idle-images-show): If detect deleted buffer, unqueue processes related to the buffer. * w3m-session.el (w3m-session-crash-recovery): Change the default to t. 2009-02-12 Katsumi Yamaoka * w3m.el (w3m-buffer-setup): Add keymap that cycles buffers as usual to mode-line-buffer-identification. 2009-02-09 Katsumi Yamaoka * w3m-bookmark.el (w3m-bookmark-view, w3m-bookmark-view-new-session) (w3m-bookmark-make-menu-items): Check if bookmark file exists. 2009-02-04 Katsumi Yamaoka * w3m.el (w3m-header-line-insert): Don't decode url containing non-ASCII characters already. e.g. about://weather/WHERE 2009-02-03 Hideyuki SHIRAI * mew-w3m.el (mew-w3m-cid-retrieve): Remove a wrong set-buffer(). 2009-02-03 Katsumi Yamaoka * w3m.el (w3m-input-url): Offer decoded url in the minibuffer. (w3m-copy-buffer): Copy w3m-current-coding-system. (w3m-header-line-insert): Display decoded url. 2009-02-02 Naohiro Aota * w3m.el (w3m-idle-images-show): Change the order of image retrieving. (w3m-toggle-inline-images-internal): Use `w3m-idle-image-item' text-property. (w3m-goto-url): Add new argument `no-popup'. (w3m-goto-url-with-timer): Call w3m-goto-url with `no-popup' nil. 2009-02-01 Naohiro Aota * w3m.el (w3m-toggle-inline-images-internal): Add new argument `safe-regexp'. (w3m-toggle-inline-images): Pass `safe-regexp' to w3m-toggle-inline-images-internal when called non-interactively. 2009-01-28 Katsumi Yamaoka * w3m-proc.el: Autoload w3m-idle-images-show-unqueue when compiling. 2009-01-27 Naohiro Aota * w3m-proc.el (w3m-process-stop): Call `w3m-idle-images-show-unqueue'. * w3m.el (w3m-idle-images-show-timer, w3m-idle-images-show-list) (w3m-idle-images-show-interval): New variables. (w3m-idle-images-show, w3m-idle-images-show-unqueue): New functions. (w3m-toggle-inline-images-internal): Use them. 2009-01-26 Naohiro Aota * w3m.el (w3m-content-type-alist): Add "application/x-pdf" content type. 2009-01-21 Kevin Ryde * w3m.el (w3m-search-name-anchor): Return true meaning "found" if point is already at the anchor position. 2009-01-21 Naohiro Aota * w3m-session.el (w3m-session-last-autosave-session): Check if autosaved sessions set exists before asking whether to load the last sessions set; Search older sessions sets when the last sessions set doesn't exist (maybe it is removed by user); Load autosaved sessions set when w3m-session-load-last-sessions is non-nil. (w3m-session-load-last-sessions): Fix docstring; Change `auto' to `t'. (w3m-session-crash-recovery-title): New variable. (w3m-session-load-crashed-sessions): Ditto. (w3m-session-crash-recovery-save): New function. * w3m.el (w3m-goto-url): Save sessions set for crash recovering. (w3m-delete-buffer): Ditto. (w3m): Load crashed sessions if necessary. Suggested by Samuel Wales . 2009-01-20 Hideyuki SHIRAI * w3m.el (w3m-fontify-anchors): Use new `w3m-balloon-help' text-property for balloon help. (w3m-fontify-images): Ditto and create help together href, alt and URL of image. 2009-01-19 Naohiro Aota * w3m.el (w3m-image-anchor): Fix docstring. (toplevel): Fix w3m-image-anchor-face's alias. 2009-01-15 Hideyuki SHIRAI * w3m.el (w3m-fontify-images): Put the 'full alt text' on new 'w3m-image-alt' property. (w3m-print-this-url): Print the content of 'w3m-image-alt'. * w3m-util.el (w3m-image-alt): New macro. 2009-01-14 Katsumi Yamaoka * doc/Makefile.in (.texi.info): Use --no-split. 2009-01-11 Naohiro Aota * w3m.el (w3m): Move last session restoring asking afterward, so that the restoring wouldn't be avoided by w3m-input-url's input. * w3m-session.el (w3m-session-last-autosave-session): Follow the above change. 2009-01-10 Naohiro Aota * w3m.el (w3m): Check whether to load the last autosaved sessions. Suggested by Samuel Wales . * w3m-session.el (w3m-session-automatic-keep-number): New variable. Suggested by Samuel Wales . (w3m-session-automatic-save): Use it. (w3m-session-last-autosave-session): New function. (w3m-session-load-last-sessions): New variable. * w3m.el (w3m-image-anchor): New face. (w3m-fontify-images): Use it. 2009-01-09 Katsumi Yamaoka * w3m.el (w3m-language): Allow the value like "Japanese (UTF-8)" of current-language-environment. * w3m-symbol.el (w3m-symbol): Ditto. * w3mhack.el (w3mhack-makeinfo): Use locale-coding-system for Emacs to encode Japanese messages. 2009-01-09 Naohiro Aota * w3m.el (w3m-create-text-page, w3m-goto-url): Check if the url is arrived before getting real-url. 2009-01-06 Hideyuki SHIRAI * w3m.el (top): Add the variable definitions of `w3m-tab-menubar-make-items-preitems' and `w3m-session-menu-items-pre' to avoid byte-compile warnings. (w3m-setup-menu): Move the postion of session menu. (w3m-mouse-major-mode-menu): Add session menu. * w3m-xmas.el (autoload): Add w3m-setup-session-menu. (w3m-menu-on-forefront): Treat "Session" menu. (w3m-setup-menu): Call `w3m-setup-session-menu'. 2008-12-30 Hideyuki SHIRAI * w3m.el (w3m-select-buffer-mode-map): Bind `w3m-select-buffer-quit' to C-g. * w3m-session.el (w3m-session-select-mode-map): Bind `w3m-session-select-quit' to C-g. * w3m-form.el (w3m-form-input-select-keymap): Bind `w3m-form-input-select-keymap' to C-g. (w3m-form-input-map-keymap): Bind `w3m-form-input-map-exit' to C-g. 2008-12-17 Hideyuki SHIRAI * w3m-session.el (w3m-session-select-mode-map): Add new key. (w3m-session-select-mode): Modify doc-string. (w3m-session-select-rename): New command. (w3m-session-rename): New function. 2008-12-17 Naohiro Aota * w3m.el (autoload): Add w3m-setup-session-menu. (w3m-menubar): Moved session menu to w3m-session-menu-items. (top): Call w3m-setup-session-menu. * w3m-session.el: Change to use major mode; Add session menu. (w3m-session-unknown-title): New option. 2008-12-15 Katsumi Yamaoka * w3m.el (w3m-compatible-encoding-alist): Add (gb2312 . gbk). 2008-12-12 David Engster * w3m-proc.el (w3m-process-wait-process): Reduce sit-for time. (w3m-process-sentinel): Wait for process output (on Emacs only). 2008-12-08 Katsumi Yamaoka * w3m.el (w3m-show-redirection-error-information): Improve the error message. 2008-12-10 Naohiro Aota * w3m.el (w3m-next-anchor): Go to the first anchor when next anchor is not found. (w3m-previous-anchor): Go to the last anchor when previous anchor is not found. (w3m-url-encode-string): Encode SPC only when encode-space is non-nil. * w3m-form.el (w3m-form-make-form-data): Follow the above change. * w3m.el (w3m-gmane-url-at-point): Ditto. (w3m-canonicalize-url): Ditto. 2008-12-08 Katsumi Yamaoka * w3m-ems.el (w3m-make-ccl-coding-system): Use define-coding-system if it is available. 2008-12-06 Naohiro Aota * w3m.el (w3m-show-redirection-error-information): New function. (w3m-retrieve-and-render): Use it. (w3m-w3m-retrieve-1): Return 'redirection-exceeded if redirect counter exceeded. (w3m-w3m-retrieve): Return "X-w3m-error/redirection" if attr eq 'redirection-exceeded. (w3m-w3m-attributes-1): Return dummy attribute if redirect counter exceeded. 2008-12-05 Naohiro Aota * w3m-form.el (w3m-same-window-p): New function. (w3m-form-input-textarea): Use it. * w3m.el (w3m-local-find-file-regexps): Try to open with emacs-w3m as many types as possible. 2008-12-03 Katsumi Yamaoka * w3m.el (w3m-fontify): Remove hidden anchors like " ". cf. [emacs-w3m:10484] 2008-12-01 Naohiro Aota * w3m-form.el (w3m-form-input-textarea): Use the whole current window for the textarea when `same-window-buffer-names' contains the buffer name "*w3m form textarea*"; simplify the window size calculation. 2008-11-21 Naohiro Aota * w3m.el (w3m-w3m-parse-header): Also remove parameters when charset is specified. 2008-11-11 Katsumi Yamaoka * w3m-util.el (w3m-visited-file-modtime): New function. * w3m-bookmark.el (w3m-bookmark-file-modtime): Just return result of file-attributes(). 2008-11-11 Naohiro Aota * w3m-antenna.el (w3m-antenna-check-rss): Support RSS2.0. Check also items. (w3m-antenna-alist): Update site-class if needed. * w3m-bookmark.el (w3m-bookmark-buffer, w3m-bookmark-verify-modtime): Replace visited-file-modtime with w3m-visited-file-modtime. 2008-10-28 Naohiro Aota * w3m.el (w3m-view-header): Check if current page is source of about:something. 2008-10-16 Katsumi Yamaoka * w3m.el (w3m-active-region-or-url-at-point): Take notice of the link under the point as well; return the url of the current page by default if the new optional argument `default=current' is given. (w3m-input-url): Make w3m-active-region-or-url-at-point return the url of the current page by default; modify the prompt string according to whether there is an initial input. (w3m-download, w3m-goto-url, w3m-goto-url-new-session): Simplify args passed to w3m-input-url. (w3m-view-this-url): Make w3m-active-region-or-url-at-point return the url of the current page by default. 2008-10-08 Katsumi Yamaoka * w3m.el (w3m-italic): Make it be a underline face on a non-window system by default. 2008-09-24 Katsumi Yamaoka * w3m.el (w3m-toggle-inline-images-internal) (w3m-resize-inline-image-internal): Confirm whether to retrieve insecure image only once, or don't confirm it if w3m-confirm-leaving-secure-page is nil. Suggested by Dan Jacobson . (w3m-confirm-leaving-secure-page): Doc fix. * w3mhack.el (w3mhack-makeinfo): Remove Emacs 19 stuff; remove TeX directives first; don't call texinfo-mode. 2008-09-21 Akinori MUSHA * doc/emacs-w3m.texi (Image Variables): Fix syntax error. * doc/emacs-w3m-ja.texi (Image Variables): Ditto. 2008-09-17 Naohiro Aota * w3m.el (w3m-buffer-local-url): New constant variable. (w3m-buffer-local-url-p): New function. (w3m-goto-url): Also process buffer local url. (w3m-region): Use w3m-buffer-local-url as url if it is not set. (w3m-safe-view-this-url, w3m-mouse-safe-view-this-url): Check if url is buffer local. 2008-09-12 Katsumi Yamaoka * w3m.el (w3m-download): Add doc string. (w3m-lynx-like-map): Bind M-d key to w3m-download. (w3m-mode): Add w3m-download to major mode info; clarify description of w3m-download-this-url. 2008-09-11 Katsumi Yamaoka * w3m.el (w3m-gmane-url-at-point): Return a url used for asking Gmane for the thread that begins with the current article instead of the whole thread if it is run on the Message-ID header. (w3m-examine-command-line-args): Make it an alias to `(lambda nil)' instead of `ignore' after it is run for the first time in order to silence the byte compiler. 2008-09-01 Katsumi Yamaoka * w3m.el (w3m-use-favicon): Assume w3m-image.elc is always loaded. (w3m-resize-inline-image-internal): Change it to a normal function from an inline function; remove interactive. (w3m-zoom-in-image, w3m-zoom-out-image): Error if ImageMagick's convert program is not available; improve doc string. (w3m-auto-show): Don't make the cursor position disappear after executing beginning-of-buffer and end-of-buffer. 2008-08-25 David Hansen * w3m.el (w3m-about-header): Fixed typo. 2008-08-05 Katsumi Yamaoka * w3m.el (w3m-view-source, w3m-view-header): Save points positioned last in pages. Suggested by Dan Jacobson . 2008-07-22 Katsumi Yamaoka * w3m-ems.el: Bind w3m-image-default-background when compiling. 2008-07-20 Naohiro Aota * w3m-hist.el (w3m-history-restore-position): Run w3m-after-cursor-move-hook after restoring cursor position. 2008-07-18 Naohiro Aota * w3m.el (w3m-image-default-background): New variable. * w3m-ems.el (w3m-create-image): Use it. (w3m-initialize-graphic-icons): Check if xpm is available. Reported by Diego 'Flameeyes' Petten,Ar(B . * w3m-filter.el (w3m-filter-wikipedia): Improve regexp. 2008-07-01 Katsumi Yamaoka * w3m-search.el (w3m-search-engine-alist): Test if mule-version is bound (XEmacs does not provide it). 2008-06-30 Naohiro Aota * w3m-form.el (w3m-form-input, w3m-form-input-password): Process readonly attribute. 2008-06-25 Naohiro Aota * w3m.el (w3m-toggle-inline-images-internal): Make it non-interactive. * w3m-form.el (w3m-form-input-textarea): Make buffer unmodified when user selected to reuse saved text; parse readonly attribute; kill newly generated buffer when the reusing question aborted. (w3m-form-textarea-info): Also provide readonly info. (w3m-fontify-textareas): Parse readonly attribute. (w3m-form-parse-and-fontify): Ditto. (w3m-form-input): Ignore cursor moving while read from minibuffer. (w3m-form-input-password): Ditto. (w3m-form-input-file): Ditto. * w3m.el (w3m-toggle-inline-image): Don't toggle images that are outside of the region even if they are identical to the ones in the region; don't do recursive call of itself; rearrange the source code. (w3m-toggle-inline-images): Check whether images are safe even if it is called with w3m-display-inline-images=t and force=t; rearrange the source code. (w3m-toggle-inline-images-internal): Add new optional argument: `begin-pos' and `end-pos'. Only process region from `begin-pos' to `end-pos'. 2008-06-25 Katsumi Yamaoka * w3m.el (w3m-toggle-inline-image): Work for an image in which there is the region end within its anchor. Reported by Dan Jacobson . * w3m-util.el (w3m-deactivate-region): Use zmacs-deactivate-region for XEmacs. 2008-06-22 Naohiro Aota * w3m-search.el (w3m-search-engine-alist): Improve detection of utf-8 capability. (w3m-search-engine-alist): Abolish `yahoo beta' entry; Improve `blog' entry to work like `google' entry. * w3m-session.el: Add coding cookie. 2008-06-18 Katsumi Yamaoka * w3m.el (w3m-submit-form-safety-check): New user option. Suggested by Dan Jacobson . (w3m-submit-form): Use it. 2008-06-12 Hideyuki SHIRAI * w3m.el (w3m-auto-show): Scrool horizontally after executing a search command. 2008-06-07 Hideyuki SHIRAI * w3m.el (w3m-use-header-line-title): Modify the doc-string. 2008-06-06 Naohiro Aota * w3m.el (w3m-select-buffer): Don't delete other windows. * w3m-filter.el (w3m-filter-wikipedia): New function. (w3m-filter-rules): Add w3m-filter-wikipedia. 2008-06-03 Katsumi Yamaoka * w3m.el: Add coding cookie. 2008-06-02 Naohiro Aota * w3m.el (w3m-detect-meta-charset): Use also ';' as delimiter. 2008-05-28 Katsumi Yamaoka * w3m.el (w3m-examine-command-line-args): Treat the null string given as a url in the command line args as `w3m-home-page' or "about:". 2008-05-28 Naohiro Aota * doc/emacs-w3m.texi (Inline Images): Update. * doc/emacs-w3m-ja.texi (Inline Images): Ditto. 2008-05-27 Katsumi Yamaoka * w3m.el (w3m-url-readable-string): Don't decode url if it looks not to have been encoded. (w3m-current-longest-line): New variable. (w3m-set-current-longest-line): New function. (w3m-scroll-left, w3m-shift-left): Don't scroll the window endlessly; beep if the window can't be scrolled any more. (w3m-scroll-right, w3m-shift-right): Beep if the window can't be scrolled any more. 2008-05-25 Naohiro Aota * w3m.el (w3m-relationship-estimate-rules): Fix regexp for Google search within EmacsWiki. 2008-05-20 Naohiro Aota * README: Add information about how to create `configure' script. * README.ja: Ditto. * w3m.el (w3m-goto-url): Delayed encoding of fragment part. 2008-05-18 Naohiro Aota * w3m-cookie.el (w3m-cookie-save-current-site-cookies): New function. (w3m-cookie-save): Add optional argument "domain". 2008-05-16 Hideyuki SHIRAI * mew-w3m.el (mew-w3m-add-text-properties): New inline macro. (mew-w3m-view-inline-image): Use `mew-w3m-add-text-properties'. (mew-mime-text/html-w3m): Ditto. 2008-05-09 Naohiro Aota * w3m-cookie.el (w3m-cookie-save): Make it interactive function. (w3m-cookie-save-cookies): New variable. (w3m-cookie-shutdown): Use it. * w3m.el (toplevel): Shutdown cookie system when exiting emacs. 2008-05-08 Naohiro Aota * w3m-cookie.el (w3m-cookie-shutdown): Fixed docstring. 2008-05-08 Hideyuki SHIRAI * w3m-filter.el (w3m-filter-amazon): Fix string to search the body. 2008-04-30 Naohiro Aota * doc/emacs-w3m-ja.texi: Update translation. * w3m.el (w3m-goto-url): Use w3m-current-coding-system first to encode url if available; Also encode name part when url is local. (w3m-ignored-image-url-regexp): New variable. (w3m-toggle-inline-images-internal): Don't display image whose url match `w3m-ignored-image-url-regexp'. (w3m-decode-entities, w3m-decode-entities-string): Replace "(match-beginning 2)" with "(match-end 1)" to deal with emacs-21's strange behavior. 2008-04-24 Hideyuki SHIRAI * w3m-filter.el (w3m-filter-rules): Support Mixi with SSL. 2008-04-22 TAKAHASHI Kaoru * doc/ptexinfmt.el: Fix Comments. (texinfo-format-geq, texinfo-format-leq,): Support @geq and @leq. 2008-04-18 Hideyuki SHIRAI * w3m-filter.el (w3m-filter-rules): Add rule for the site of Allatanys. (w3m-filter-allatanys): New function. * w3m.el (w3m-relationship-estimate-rules): Fix regexp for Google search within EmacsWiki. Add rule for Google Mobile Proxy. 2008-04-17 Hideyuki SHIRAI * w3m.el (top): Add the variables definition of `w3m-bookmark-mode', `w3m-bookmark-menu-items', `w3m-bookmark-menu-items-pre' and `w3m-tab-menubar-make-items-preitems' avoid byte-compile warnings. (w3m-rmouse-menubar): New user option. (w3m-setup-menu): Add the setup of `w3m-rmouse-menubar'. (w3m-mouse-major-mode-menu): Rewrite to use `w3m-rmouse-menubar'. (w3m-link-menu): Add `w3m-external-view-this-url'. 2008-04-15 Hideyuki SHIRAI * w3m.el (w3m-turnoff-inline-images): New command. (w3m-toggle-inline-images): If force is 'turnoff, turn off to display images. (w3m-menubar): Add w3m-turnoff-inline-images. (w3m-lynx-like-map): Ditto. (w3m-info-like-map): Ditto. (w3m-mode): Ditto. 2008-04-07 Katsumi Yamaoka * w3m.el (w3m-relationship-estimate-rules): Fix custom type. 2008-04-03 Katsumi Yamaoka * w3m.el (w3m-relationship-estimate-rules): Support Google search within EmacsWiki. cf. [emacs-w3m:10067] 2008-03-17 Katsumi Yamaoka * w3m.el (w3m-mouse-safe-view-this-url): Remove redundant confirmation of whether to follow link. 2008-03-14 Katsumi Yamaoka * w3m.el (w3m-doc-view-content-types): New variable. (w3m-doc-view): New function. (w3m-create-page): Use it. (w3m-content-type-alist): Add application/dvi. (w3m-delete-buffer): Save windows layout. 2008-03-12 Katsumi Yamaoka * w3m-image.el (w3m-imagick-convert-program-available-p): Don't use w3m-imagick-convert-data which may issue a warning when checking whether the convert program supports png32. cf. [emacs-w3m:10048] 2008-03-03 Naohiro Aota * doc/emacs-w3m.texi (Inline Images): Updated. * doc/emacs-w3m-ja.texi (Inline Images): Ditto. * w3m.el (w3m-toggle-inline-images): Only toggle in the region if Transient Mark mode. (w3m-toggle-inline-image): Ditto. 2008-02-20 Katsumi Yamaoka * w3m.el (w3m-arrived-intern): Protect against null string. It enables url completion even for null string. Suggested by Aota-san. 2008-02-07 Naohiro Aota * w3m.el (w3m-expand-path-name): New function. (w3m-expand-url): Remove useless expanded path-name check. 2008-02-06 Katsumi Yamaoka * Makefile.in (install-lisp, install-icons, install-icons30): Quote directory name that might contain whitespace. * doc/Makefile.in (install): Ditto. * aclocal.m4 (AC_PATH_LISPDIR): Ditto; always report prefix name. * mkinstalldirs: Replace it with the 2006-05-11.19 version. 2008-01-30 Naohiro Aota * w3m.el (w3m-fontify-anchors): Don't expand icon's url when it is nil. 2008-01-26 Katsumi Yamaoka * w3m.el (w3m-safe-url-regexp): Add note to doc string. (w3m-fontify): Hold the value of w3m-safe-url-regexp with the w3m-safe-url-regexp text-property. (w3m-toggle-inline-image, w3m-toggle-inline-images) (w3m-safe-view-this-url, w3m-mouse-safe-view-this-url): Check whether url is safe by comparing it with the value of the w3m-safe-url-regexp text property; prompt a user to confirm whether to proceed. (w3m-safe-toggle-inline-image, w3m-safe-toggle-inline-images): Abolish. (w3m-minor-mode-command-alist): Map w3m-toggle-inline-image and w3m-toggle-inline-images to themselves. 2008-01-20 Naohiro Aota * w3m.el (w3m-search-name-anchor): Accept and optional argument `no-record'. (w3m-goto-url): Going other page's anchor, call `w3m-search-name-anchor' with 3rd argument t. 2008-01-16 Naohiro Aota * w3m-form.el (w3m-form-input-textarea-coding-system): Revert. (w3m-form-input-textarea): Set w3m-form-input-textarea-coding-system to use in w3m-form-coding-system-accept-region-p. 2008-01-15 Naohiro Aota * w3m-form.el (w3m-form-textarea-file-coding-system): New variable. (w3m-form-input-textarea-save): Use it. (w3m-form-input-textarea): Ditto. (w3m-form-input-textarea-coding-system): Abolish. 2008-01-11 Naohiro Aota * w3m-filter.el (w3m-filter-iframe): New function. (w3m-filter-rules): Add rule for inserting link to the url iframe displays. 2008-01-09 Naohiro Aota * w3m-form.el (w3m-form-coding-system-accept-region-p): Abolish. * w3m-ems.el (w3m-form-coding-system-accept-region-p): Use select-safe-coding-system if unencodable-char-position is not available. * w3m-xmas.el (w3m-form-coding-system-accept-region-p): Use decode-coding-string and encode-coding-string instead of unencodable-char-position; Only warn coding-system problem. 2008-01-09 Katsumi Yamaoka * w3m.el (w3m-url-decode-string): Don't replace +'s with spaces. 2007-12-27 Naohiro Aota * w3m-form.el (w3m-form-coding-system-accept-region-p): New function. (w3m-form-input-textarea-save, w3m-form-input-textarea-set): Use it. 2007-12-24 Hideyuki SHIRAI * w3m-session.el (w3m-session-goto-session): Go to the current w3m buffer in data of session. 2007-12-24 Naohiro Aota * w3m-session.el (w3m-session-history-to-save): New function. (w3m-session-save): Also record history data. (w3m-session-automatic-save, w3m-session-deleted-save): Ditto. (w3m-session-select): Follow the format change. (w3m-session-goto-session): Also restore history data. 2007-12-23 Hideyuki SHIRAI * w3m-tabmenu.el (w3m-tab-menubar-force-update): New function. (top): Register `w3m-tab-menubar-force-update' to `w3m-display-functions'. 2007-12-20 Hideyuki SHIRAI * w3m.el (w3m-lynx-like-map): Bind `w3m-move-unseen-buffer'. (w3m-info-like-map): Ditto. (w3m-buffer-unseen): New buffer local variable. (w3m-set-buffer-unseen): New function. (w3m-set-buffer-seen): Ditto. (w3m-move-unseen-buffer): Ditto. (w3m-remove-local-hook): Ditto. (w3m-goto-url): Set buffer to unseen. (w3m-select-buffer-generate-contents): Support `unseen'. * w3m-util.el (top): Add the variable definition of `w3m-buffer-unseen' to avoid byte-compile warnings. (w3m-unseen-buffer-p): New inline macro. * w3m-tabmenu.el (w3m-tab-menubar-make-items-1): Support `unseen'. * w3m-ems.el (w3m-remove-local-hook): New function. (w3m-tab-unselected-unseen): New face. (w3m-tab-line): Support `unseen'. 2007-12-20 Katsumi Yamaoka * w3m.el (w3m-mode): Set show-trailing-whitespace to nil. 2007-12-18 Katsumi Yamaoka * w3m-favicon.el (w3m-favicon-default-background): New user option. (w3m-favicon-set-image): Don't set background color of favicon here. (w3m-favicon-convert): Set the background color of favicon according to w3m-favicon-default-background. * w3m-ems.el (w3m-tab-line): Don't set the background color of favicon here. * w3m-image.el (w3m-imagick-identify-program): New user option. 2007-12-17 TSUCHIYA Masatoshi * w3m-proc.el (w3m-process-kill-stray-processes): Do not kill process when the buffer associated to it is alive. (w3m-process-sentinel): Do not call a handler when its parent buffer have been killed. 2007-12-15 Naohiro Aota * w3m-form.el (w3m-form-submit): Remove query part from the form's action url when using get method. 2007-12-14 Katsumi Yamaoka * w3m-favicon.el (w3m-favicon-size): Change the value form into the cons of WIDTH and HEIGHT. (w3m-favicon-convert-args): New user option. (w3m-favicon-convert): Pass it to convert. * w3m-ems.el (w3m-tab-mouse-track-selected-tab): Follow change of w3m-favicon-size. 2007-12-13 Katsumi Yamaoka * w3m-ems.el (w3m-tab-line): Set the background color of favicon for Emacs 22+. * w3m-favicon.el (w3m-favicon-set-image): Ditto. * w3m-image.el (w3m-imagick-convert-program-available-p): Check whether the convert program supports the image type png32 for Emacs 22+. (w3m-imagick-convert-buffer, w3m-imagick-start-convert-buffer): Use png32 if it is available. 2007-12-11 Katsumi Yamaoka * w3m-favicon.el (w3m-favicon-convert): Make last change revert. 2007-12-11 Katsumi Yamaoka * w3m-favicon.el (w3m-favicon-convert): Apply the background color of header line or mode line to pixels of which the color is transparent. 2007-12-06 Naohiro Aota * w3m.el (w3m-goto-url): Canonicalize the url when it is called non-interactively. 2007-12-01 Naohiro Aota * w3m.el (w3m-name-anchor-from-hist): New buffer-local variable. (w3m-clear-local-variables): Also clear w3m-name-anchor-from-hist. (w3m-goto-url): Save and restoe w3m-name-anchor-from-hist. (w3m-search-name-anchor): Record (point)s of before and after following a name-anchor. (w3m-view-previous-page): If possible, move back the cursor to the point where it was before following name-anchors. 2007-11-30 Naohiro Aota * w3m-proc.el (w3m-process-y-or-n-p): Ignore space to avoid answering y without intention. 2007-11-29 Katsumi Yamaoka * w3m.el (w3m-goto-url-new-session): Use w3m-active-region-or-url-at-point. Reported by Naohiro Aota. * w3m-ems.el (w3m-create-image): Don't modify case-fold-search. * w3m-xmas.el (w3m-create-image): Ditto; parse image data to identify its type in the beginning position. 2007-11-29 Naohiro Aota * w3m.el (w3m-w3m-dump-extra, w3m-w3m-retrieve): Removed image data type tests. * w3m-xmas.el (w3m-create-image): Parse image data first, use server's content-type when it failed to identify type. * w3m-ems.el (w3m-create-image): Ditto. 2007-11-29 Katsumi Yamaoka * w3m-search.el (w3m-search-engine-alist): Fix google news entry. * w3m-ems.el (w3m-create-image): Parse image data if it failed in identifying type. * w3m-xmas.el (w3m-create-image): Ditto. 2007-11-27 Katsumi Yamaoka * w3m.el (w3m-resize-inline-image-internal): Validate image url. Reported by Naohiro Aota . 2007-11-27 Naohiro Aota * w3m.el (w3m-toggle-inline-images-internal): Confirm retrieving non-secure image. (w3m-resize-inline-image-internal): Ditto. 2007-11-27 Katsumi Yamaoka , TSUCHIYA Masatoshi * w3m.el (w3m-retrieve-and-render): Permit leaving safe pages without confirmation for several safe commands. 2007-11-26 Katsumi Yamaoka * w3m-symbol.el: Autoload w3m-mule-unicode-p when compiling. * w3m-proc.el: Update the way to suppress compile warning for gensym. 2007-11-26 Trent W. Buck * w3m.el (w3m-confirm-leaving-secure-page): New user option. (w3m-retrieve-and-render): Use it. 2007-11-22 Katsumi Yamaoka * w3m.el (w3m-use-japanese-menu): Default to nil for XEmacs 21.4 and SXEmacs. (w3m-link-map): New variable. (w3m-fontify-anchors): Add menu to links. (w3m-read-file-name): Don't use default file name if it is "". (w3m-link-menu): Define. 2007-11-06 Naohiro Aota * w3m.el (w3m-redisplay-with-charset): Strip first 'about://source/' before setf w3m-arrived-content-charset. (w3m-redisplay-and-reset): Ditto. 2007-11-05 Naohiro Aota * w3m-filter.el (w3m-filter-rules): Add rule for the site of imepita. (w3m-filter-imepita): New function. 2007-11-03 David Hansen * w3m-proc.el (w3m-process-wait-process): Preserve the current buffer \(work around an Emacs bug\). 2007-11-03 David Hansen * w3m.el (w3m-relationship-oddmuse-estimate): Follow new page layout. 2007-11-01 Katsumi Yamaoka * w3m-xmas.el (w3m-ucs-to-char): Alias to unicode-to-char, ucs-to-char, or int-to-char. * w3m-ems.el (w3m-ucs-to-char): Always define it. * w3m.el (w3m-ucs-to-char): Abolish. 2007-10-26 Katsumi Yamaoka * w3mhack.el (w3mhack-module-list): Don't compile mew-w3m.el and mew-shimbun.el if there is only the official Mew XEmacs package that is extremely old. * w3m-proc.el: Update the way to suppress compile warning for gensym. * w3m-util.el (w3m-list-buffers): Check if w3m-fb-mode is bound. * w3m.el (w3m-copy-buffer, w3m-mouse-major-mode-menu): Remove unused let-bound variables. 2007-10-25 Katsumi Yamaoka * Makefile.in (install-lisp): Don't install w3m-ems.el for XEmacs and w3m-xmas.el for GNU Emacs. 2007-10-17 Katsumi Yamaoka * *, doc/*: Fix expressions of the copyright notices. * w3mhack.el (w3mhack-makeinfo): Don't split Info file to pieces. * doc/emacs-w3m.texi, doc/emacs-w3m-ja.texi: Use @copying and @insertcopying to put up the copyright notice. (Coding convention of Shimbun): Don't use @itemx with @@multitable. * doc/ptexinfmt.el (texinfo-copying-text, texinfo-copying) (texinfo-insertcopying, texinfo-format-scan): Add them for old Emacsen. * doc/Makefile.in (install): Remove installed *.info-[0-9] files; install only *.info files. (.texi.dvi): Don't specify "-l ja" to texi2dvi. (clean): No need to remove *.info-[0-9] and *.info-[0-9][0-9] files. 2007-10-12 Katsumi Yamaoka * w3m-xmas.el (w3m-find-coding-system): Return symbol, not coding system object. 2007-10-12 TSUCHIYA Masatoshi * w3m.el (w3m-entity-regexp, w3m-entity-value): Accept case-insensitive numeric character references. 2007-10-09 Katsumi Yamaoka * w3m.el (w3m-message): Work with XEmacs. 2007-10-04 Katsumi Yamaoka * w3m-ems.el: Bind w3m-use-title-buffer-name (see the comment). * Makefile.in (very-slow): Add missing semicolon. 2007-10-03 Katsumi Yamaoka * Makefile.in (install-lisp): Don't install ChangeLog~. 2007-10-02 Naohiro Aota * w3m.el (w3m-show-error-information): When emacs-w3m cannot find host, set charset to us-ascii. 2007-10-02 Katsumi Yamaoka * w3m.el (w3m-show-decoded-url): Add entry for nikkei.co.jp. 2007-09-28 TSUCHIYA Masatoshi * w3m.el (w3m-decode-buffer): Don't decode escaped URLs. (w3m-toggle-inline-images-internal): Escape non-ASCII characters in the URL of the image before retrieving it. 2007-09-27 TSUCHIYA Masatoshi * w3m.el (w3m-safe-view-this-url): When a function which is specified by `w3m-goto-article-function' returns the `w3m-goto-url' symbol, it falls back to emacs-w3m displaying functions. Cf. [emacs-w3m:09660] (w3m-goto-article-function): Its comment is updated to follow the above change. (w3m-entity-value, w3m-decode-entities-string): Change to save working memory. 2007-09-27 Katsumi Yamaoka * w3m.el (w3m-entity-regexp): Bind max-specpdl-size for old Emacsen. (w3m): Revert 2007-09-19 change. 2007-09-26 Katsumi Yamaoka * NEWS: New file. 2007-09-25 Katsumi Yamaoka * w3m.el (w3m-examine-command-line-args): Don't pass negative number to nthcdr. * w3m-session.el (w3m-session-save, w3m-session-select): Use mapc instead of mapcar. 2007-09-24 TSUCHIYA Masatoshi * w3m.el: Changes to stricten entities decoded by `w3m-decode-entities'. (w3m-entity-table, w3m-entity-reverse-table): New constants. (w3m-entity-regexp): Stricten. (w3m-entity-alist, w3m-entity-db, w3m-entity-db-size): Abolished. (w3m-entity-value, w3m-decode-entities, w3m-decode-entities-string, w3m-encode-specials-string): Rewritten to use the above constants. 2007-09-21 TAKAHASHI Kaoru * doc/ptexinfmt.el: Support @fonttextsize, @textdegree. 2007-09-19 Katsumi Yamaoka * w3m.el (w3m-examine-command-line-args): Rewrite. (w3m): Always call it; set the 2nd arg new-session when Emacs 21 or XEmacs runs in the batch mode. 2007-09-19 Katsumi Yamaoka * w3m.el (w3m-examine-command-line-args): Inhibit Emacs head from displaying startup screen when emacs-w3m runs in the batch mode; improve parsing of arguments. 2007-09-13 Hideyuki SHIRAI * w3m.el (w3m-expand-path-name): Save the matched data surely. 2007-09-09 Naohiro Aota * w3m.el (w3m-expand-url): Use "/" as path when it of base-uri is not defined; Clear query of base-uri when empty query exist; Changes to follow RFC3986. 2007-09-07 Katsumi Yamaoka * w3m-ems.el (w3m-euc-japan-encoder, w3m-iso-latin-1-encoder): Use mule-version to decide whether to redefine them. * w3m.el: Use emacs-version instead of emacs-major-version to show the version of Emacs that emacs-w3m doesn't support. 2007-09-03 Katsumi Yamaoka * w3m.el (w3m-local-file-type): Regard news:* urls as text/html. (w3m-w3m-retrieve): Return nil if retrieving failed. (w3m-show-error-information): Improve error message for news:* urls. 2007-09-03 Katsumi Yamaoka * aclocal.m4 (AC_PATH_EMACS): Improve expression of Emacs version. * doc/ptexinfmt.el (ptexinfmt-broken-facility) (ptexinfmt-defun-if-broken, ptexinfmt-defun-if-void) (ptexinfmt-defvar-if-void): Don't use old-style backquotes. (texinfo-format-cedilla-accent): Quote `,'. * w3m-antenna.el (w3m-antenna-site-key, w3m-antenna-site-title) (w3m-antenna-site-class, w3m-antenna-site-url) (w3m-antenna-site-last-modified, w3m-antenna-site-size) (w3m-antenna-site-size-detected): Don't use old-style backquotes. * w3m-ccl.el (w3m-ccl-write-repeat, w3m-euc-japan-decoder) (w3m-euc-japan-encoder, w3m-iso-latin-1-decoder) (w3m-iso-latin-1-encoder): Don't use old-style backquotes. * w3m-dtree.el (w3m-dtree-has-child): Don't use old-style backquotes. * w3m-form.el (w3m-form-method, w3m-form-action, w3m-form-charlst) (w3m-form-enctype, w3m-form-plist, w3m-form-get-property, w3m-form-put) (w3m-form-get): Don't use old-style backquotes. * w3m-namazu.el (w3m-namazu-default-index-customize-spec): Don't use old-style backquotes. * w3m-util.el (w3m-static-if, w3m-static-when, w3m-static-unless) (w3m-condition-case, w3m-add-text-properties) (w3m-get-text-property-around, w3m-action, w3m-anchor, w3m-image) (w3m-submit, w3m-anchor-sequence): Don't use old-style backquotes. * w3m.el (w3m-dirlist-cgi-program): Don't use old-style backquotes. * w3mhack.el (char-before, match-string-no-properties) (set-text-properties): Don't use old-style backquotes. * w3m-filter.el: Set file's coding-system to euc-japan in order to enable non-Mule XEmacsen to byte-compile this module. 2007-08-31 Hideyuki SHIRAI * w3m.el (top): Remove unnecessary space at the line end. (w3m-use-title-buffer-name): New option. (w3m-copy-buffer): Use `w3m-generate-new-buffer' instead of `generate-new-buffer'. (w3m-pack-buffer-numbers): Call `w3m-form-set-number' with new name of buffer. (w3m-buffer-setup): Use `w3m-generate-new-buffer' instead of `generate-new-buffer'. (w3m-buffer-setup): Do not display title if w3m-use-title-buffer-name is non-nil. (w3m-modeline-title): Retrun "" if w3m-use-title-buffer-name is non-nil. (w3m-goto-url): Call `w3m-buffer-name-add-title' when display. (w3m): Use `w3m-generate-new-buffer' instead of `generate-new-buffer'. (w3m-use-header-line-title): New option. * w3m-form.el (w3m-form-set-number): Change 2'nd argument to `newname' from `count'. * w3m-util.el (top): Add the variable definition of `w3m-use-title-buffer-name' to avoid byte-compile warnings. (w3m-buffer-number): Support the feature of buffer-name with title. (w3m-buffer-set-number): Ditto. (w3m-generate-new-buffer): Ditto. (w3m-buffer-name-lessp): Ditto. (w3m-buffer-name-add-title): New inline macro. * w3m-ems.el (top): Add the variable definition of `w3m-use-header-line-title' to avoid byte-compile warnings. (w3m-setup-header-line): If `w3m-use-header-line-title' is not nil, display title and URI. 2007-08-30 Hideyuki SHIRAI * w3m-proc.el (top): Add the function definition of `w3m-decode-coding-string-with-priority' to avoid byte-compile warnings. * w3m-ems.el (top): Add the variable definition of `w3m-default-coding-system' and `w3m-coding-system' to avoid byte-compile warnings. * w3m-xmas.el (top): Add the variable definition of `w3m-coding-system' to avoid byte-compile warnings. 2007-08-29 Naohiro Aota * w3m-proc.el (w3m-process-filter): Decode realm string. * w3m.el (w3m-url-decode-string): Define latter half as a function : w3m-decode-coding-string-with-priority ,and use it. * w3m-ems.el (w3m-decode-coding-string-with-priority): New function. * w3m-xmas.el (w3m-decode-coding-string-with-priority): Return string itself unless find-coding-system is defined as built-in function. 2007-08-28 Hideyuki SHIRAI * w3m.el (w3m-uri-replace-alist): Add key of "alc:". (w3m-relationship-estimate-rules): Add alc's rule. (w3m-relationship-alc-estimate): New function. * w3m-search.el (w3m-search-engine-alist): Add rule of http://eow.alc.co.jp/. * w3m-filter.el (w3m-filter-rules): Add w3m-filter-alc. (w3m-filter-alc): New function. Supper `goFairWord'. 2007-08-24 Katsumi Yamaoka * w3m.el (w3m-goto-mailto-url): Make it work even with no rfc2368.el. 2007-08-21 Eugene Oleinik * w3m-filter.el (w3m-filter-google-separator): New user option. (w3m-filter-google): Replace hard-coded ones with it. (w3m-filter): Iterate through all cases in w3m-filter-rules. (w3m-filter-replace-regexp): New function. 2007-08-20 Katsumi Yamaoka * w3m.el (w3m-detect-xml-type): New function that treats application/xml looking like xhtml+xml as text/html. (w3m-content-type-alist): Use it for application/xml. (w3m-w3m-parse-header): Parse Alternates header for a real url. (w3m-w3m-retrieve-1): Retrieve real url according to Alternates header. (w3m-external-view): Treat xhtml+xml as html. 2007-07-30 Naohiro Aota * w3m-form.el: Changes to download contents after submitting form. (w3m-form-download): New variable. (w3m-fontify-textareas, w3m-form-parse-and-fontify): Combine the above variable into expressions which represent form actions. (w3m-form-submit): Accept and optional argument `download'. * w3m.el: Changes to download contents after submitting form. (w3m-download): Accept and optional argument `post-data'. (w3m-download-this-url): `w3m-form-download' is binded locally. (w3m-view-this-url): Ditto. (w3m-submit-form): Ditto. 2007-07-30 Katsumi Yamaoka * w3m-ucs.el (font-ccl-encoder-alist): Bind it for XEmacs 21.5. 2007-07-26 Katsumi Yamaoka * w3m.el (w3m-relationship-estimate-rules): Make Google rule support images. 2007-07-23 Katsumi Yamaoka * w3m-session.el (w3m-session-select, w3m-session-selected): Add spec for dark tty. (w3m-session-select): Use read-key-sequence rather than read-event or next-command-event in order to enable it to read arrow keys in tty. 2007-07-17 Katsumi Yamaoka * w3m-form.el (w3m-form-make-button): Make it work. * w3m-ems.el (w3m-form-make-button): Work when w3m-form-use-fancy-faces is nil. 2007-07-04 Katsumi Yamaoka * w3m.el (w3m-goto-article-function): Change the default function into browse-url; doc fix. (w3m-safe-view-this-url): Catch a signal from function which is set to w3m-goto-article-function, and don't run the default function if it is nil. 2007-07-03 Katsumi Yamaoka * w3m.el (w3m-goto-article-function): Use defcustom; doc fix. (w3m-safe-view-this-url): Use functionp instead of fboundp to check the value of w3m-goto-article-function. * w3m-favicon.el, w3m-namazu.el, w3m-perldoc.el, w3m-xmas.el, w3m.el: Use custom-set-default instead of set-default in defcustom forms. 2007-07-02 Katsumi Yamaoka * w3m.el (w3m-make-help-echo): Make the function for Emacs bind deactivate-mark to nil. 2007-06-26 Katsumi Yamaoka * w3m-ems.el, w3m-form.el, w3m-lnum.el, w3m-search.el, w3m-session.el * w3m.el: Rename w3m-FOO-face with w3m-FOO. 2007-06-21 Katsumi Yamaoka * w3mhack.el (w3mhack-makeinfo): Format @key{...}. 2007-06-20 Katsumi Yamaoka * w3m.el (w3m-lynx-like-map, w3m-info-like-map): Bind [backtab] to w3m-previous-anchor. 2007-06-08 Katsumi Yamaoka * w3m.el (w3m-local-retrieve, w3m-w3m-retrieve, w3m-about-retrieve) (w3m-cid-retrieve, w3m-data-retrieve, w3m-retrieve, w3m-about-header): Change the term and the symbol name `no-decode' into `no-uncompress'. 2007-06-08 Naohiro Aota * w3m.el (w3m-w3m-retrieve): Check if content-type is wrong after decoding encoded contents. * w3m-ems.el (w3m-create-image, w3m-create-resized-image): Decode content retrieving image. * w3m-xmas.el (w3m-create-image, w3m-create-resized-image): Ditto. 2007-06-07 Naohiro Aota * w3m-search.el (w3m-search-engine-alist): Add output encoding argument to google search. 2007-06-06 Katsumi Yamaoka * w3m-image.el (w3m-imagick-convert-program, w3m-resize-images): Reset them if convert program is not really available. (w3m-imagick-convert-program-available-p): New function. (w3m-imagick-convert-buffer, w3m-imagick-start-convert-data): Use it. 2007-06-05 Yoichi NAKAYAMA * w3m-image.el (w3m-imagick-start-convert-data): Clarify message which is issued when convert program is not available. 2007-06-05 Hideyuki SHIRAI * w3m-filter.el (w3m-filter-mixi): Follow the change of Mixi's HTML. 2007-06-01 Katsumi Yamaoka * attic/vm-w3m.el, attic/vm-7.19.patch: Remove. They have been integrated into VM 8.x. 2007-05-17 Tatsuya Kinoshita * w3m.el (w3m-view-this-url-1): Check whether the marker buffer exists. 2007-05-17 Katsumi Yamaoka * w3m-ems.el (w3m-switch-to-buffer, w3m-subst-switch-to-buffer-keys): Remove. 2007-05-17 Hideyuki SHIRAI * w3m.el (w3m-expand-url): Guard error in aref when url is "". 2007-05-16 Naohiro Aota * w3m.el (w3m-expand-url): Remove query strings when expanding URL like "foo.cgi?#bar"; add "./" to top of URL when expanding "?hoge". 2007-05-16 Katsumi Yamaoka * w3m-ems.el (w3m-switch-to-buffer): Work just like switch-to-buffer. Suggested by Robert J. Chassell . 2007-05-11 Katsumi Yamaoka * w3m.el (w3m-url-encode-string, w3m-url-transfer-encode-string): Use uppercase letters in hexadecimal string. Suggested by Lukasz Demianiuk . 2007-05-09 Hideyuki SHIRAI * w3m.el (w3m-header-line-url): New function. (w3m-url-at-point): Call w3m-header-line-url after w3m-gmane-url-at-point. (w3m-goto-url-with-timer): Execute w3m-goto-url if its buffer does not exist foreground. 2007-05-08 Hideyuki SHIRAI * w3m.el (all): Revert SHIRAI's 2007-04-24 changes and fix it to accompany Ito-san's patch [w3m-dev 04233]. (w3m-display-ins-del): New option. (w3m-support-emacs-w3m): Remove this variable. (w3m-strike-through-face): Modify. (w3m-insert-face): Ditto. (w3m-strike-through-face-no-windowsystem): Remove this face. (w3m-fontify-insert): Remove this variable. (w3m-halfdump-command-arguments): Remove w3m-support-emacs-w3m. (w3m-halfdump-command-common-arguments): Add w3m-display-ins-del support. (w3m-fontify-strike-through): Rewrite. (w3m-fontify-insert): Ditto. (w3m-set-display-ins-del): New function. (w3m-rendering-half-dump): Call w3m-set-display-ins-del. 2007-04-30 Naohiro Aota * w3m-form.el (w3m-form-resume): Also resume contents of forms without name. (w3m-fontify-textareas): Also fontify textareas without name. (w3m-form-field-parse): Also parse form fields without name. 2007-04-28 Naohiro Aota * w3m.el (w3m-decode-buffer): Use w3m-url-transfer-encode-string instead of w3m-url-encode-string. 2007-04-27 Naohiro Aota * w3m.el (w3m-view-this-url): Check if w3m-current-url is string before matching. 2007-04-27 Katsumi Yamaoka * w3m.el (w3m-decode-buffer): Fully decode a source by default. (w3m-view-source): Doc fix. 2007-04-26 Hideyuki SHIRAI * w3m.el (w3m-goto-url): Redisplay to search an anchor sure with goto-new-session. 2007-04-26 Katsumi Yamaoka * w3m.el (w3m-view-source-decode-level): New variable. (w3m-decode-buffer): Control how much it decodes an html source according to w3m-view-source-decode-level. (w3m-view-source): Bind w3m-view-source-decode-level with prefix arg. 2007-04-25 Naohiro Aota * w3m.el (w3m-decode-buffer): Encode urls containing non-ASCII characters quoted with '' as well as those quoted with "". (w3m-goto-url): Decode urls when url is local. characters when displaying an html source. 2007-04-24 Naohiro Aota * w3m.el (w3m-decode-buffer): Use charset specified in meta tag even for decoding html source. 2007-04-24 Katsumi Yamaoka * Makefile.in (install-lisp): Install shimbun/ChangeLog file. 2007-04-24 Hideyuki SHIRAI * w3m.el (w3m-support-emacs-w3m): New variable. (w3m-compile-options): Set w3m-support-emacs-w3m to t if w3m compiled with emacsdump. (w3m-strike-through-face-no-windowsystem): New face. (w3m-halfdump-command-arguments): Use '-emacsdump' instead of '-halfdump' when w3m has it. (w3m-fontify-strike-through): Support w3m-support-emacs-w3m. (w3m-fontify-insert): Ditto. 2007-04-24 Naohiro Aota * w3m.el (w3m-goto-url): Set truncate-lines to nil, if a source or header view. (w3m-view-source): Remove to set truncate-lines. (w3m-view-header): Ditto. 2007-04-19 Katsumi Yamaoka * ChangeLog, ChangeLog.1: Separate shimbun entries. (Local Variables): Set fill-column to 79. 2007-04-19 Hideyuki SHIRAI * w3m-form.el (w3m-form-input-textarea-filename): Use MD5 first. 2007-04-14 Naohiro Aota * w3m-form.el (w3m-form-input-textarea-filename): Truncate filename into less than or equal to 255 bytes long. 2007-04-06 Matt Hodges * w3m.el (w3m-next-buffer): Fix last change when w3m-fb-mode. 2007-04-04 Hideyuki SHIRAI * w3m.el (w3m-view-parent-page): Use numbered prefix argument to move the parent directory according to input number. 2007-03-31 Andreas Seltenreich * w3m.el (w3m-external-view-file): Actually kill the temporary buffer. 2007-03-30 Hideyuki SHIRAI * w3m-ems.el (w3m-tab-mouse-track-selected-tab): Sleep anyway. (w3m-tab-make-keymap): Add key-bindings for mouse wheel-up|down to w3m-mode-map. 2007-03-30 Katsumi Yamaoka * w3m-bug.el (report-emacs-w3m-bug-system-informations): Add gtk. (report-emacs-w3m-bug): Bind print-quoted to t. * w3m-ems.el (w3m-force-window-update): Do split-window-vertically instead of performing enlarge-window/shrink-window for Emacs 21. (w3m-tab-mouse-track-selected-tab): Add `decelerate' argument; use it instead of to check the value of this-command. (w3m-tab-move-right): Set it. (w3m-tab-make-keymap): Rearrange. (w3m-update-tab-line): Remove. * w3m.el (w3m-select-buffer-update): Use w3m-force-window-update instead of w3m-update-tab-line. 2007-03-29 Hideyuki SHIRAI * w3m-ems.el (w3m-tab-mouse-track-selected-tab): Tiny fix. (w3m-tab-make-keymap): Use next|previous-buffer-action instead of w3m-tab-next|previous-buffer. 2007-03-29 Katsumi Yamaoka * w3m-ems.el (w3m-tab-mouse-track-selected-tab): Ignore mouse position info if mouse points to other frame; recognize wheel-up and wheel-down in addition to mouse-4 and mouse-5; don't respond to too fast operation of mouse wheel for moving a tab. 2007-03-28 Katsumi Yamaoka * w3m-ems.el (w3m-tab-track-mouse): New variable. (w3m-tab-mouse-position-adjuster): Express the values in pixel units rather than the number of characters. (w3m-tab-mouse-track-selected-tab): Be controlled by w3m-tab-track-mouse; calculate the mouse position in pixel units rather than the number of characters. (w3m-tab-make-keymap): Make the buffer selected by a tab the current buffer before performing w3m-tab-move-(left|right). (w3m-tab-separator-map): New keymap. (w3m-tab-separator): Use it as the local-map property. (w3m-tab-line): Use it as the local-map property in trailing space. 2007-03-27 Katsumi Yamaoka * w3m-ems.el (w3m-tab-unselected-face) (w3m-tab-unselected-retrieving-face, w3m-tab-selected-face) (w3m-tab-selected-retrieving-face, w3m-tab-mouse-face): Make background colors bright. (w3m-tab-mouse-position-adjuster): New variable. (w3m-tab-mouse-track-selected-tab, w3m-tab-next-buffer) (w3m-tab-previous-buffer, w3m-tab-move-right, w3m-tab-move-left): New functions. (w3m-tab-map): Bind C-wheel-up and C-mouse-4 to w3m-tab-move-left; bind C-wheel-down and C-mouse-5 to w3m-tab-move-right; use w3m-tab-previous-buffer and w3m-tab-next-buffer instead of w3m-previous-buffer and w3m-next-buffer. (w3m-tab-separator): Add tab-separator property. * w3m.el (w3m-next-buffer): Fix calculation. (w3m-lynx-like-map, w3m-info-like-map): Bind `C-c C-,' and `C-c C-<' to w3m-tab-move-left, and bind `C-c C-.' and `C-c C->' to w3m-tab-move-right for GNU Emacs. 2007-03-27 Hideyuki SHIRAI * w3m.el (w3m-add-tab-number): New user option. * w3m-ems.el (top): Add w3m-add-tab-number to avoid byte-compile warnings. (w3m-tab-line): Display sequential number on tab title when w3m-add-tab-number is not nil. * w3m.el (w3m-menubar): Add w3m-session-save and w3m-session-select. (w3m-tab-button-menu-commands): Ditto. 2007-03-23 Katsumi Yamaoka * w3m-ems.el: New file merging w3m-e21.el, w3m-e23.el and w3m-fsf.el. (image-size): No need to silence the byte compiler. (w3m-ccl-get-ucs-codepoint-with-emacs-unicode): Remove. (w3m-euc-japan-encoder, w3m-euc-japan-encoder) (w3m-iso-latin-1-encoder, w3m-iso-latin-1-encoder): Redefine them only for Emacs 22 and earlier. * w3m-e21.el, w3m-e23.el, w3m-fsf.el: Remove. * w3m.el: Load w3m-ems.el instead of w3m-e21.el or w3m-e23.el. (w3m-fontify-strike-through): Remove variable. * w3mhack.el (w3mhack-mdelete): Remove. (w3mhack-module-list): Use w3m-ems.el instead of w3m-fsf.el and w3m-e21.el or w3m-e23.el. * Makefile.in (tarball): No need to exclude w3m-e23.el. 2007-03-23 Katsumi Yamaoka * aclocal.m4 (AC_SET_XEMACSDEBUG): Fix the way to quote the value of XEMACSDEBUG. Reported by Norbert Koch . 2007-03-22 Katsumi Yamaoka * aclocal.m4 (AC_SET_XEMACSDEBUG): Quote VANILLA_FLAG. 2007-03-16 Katsumi Yamaoka * aclocal.m4 (AC_SET_XEMACSDEBUG): New function; set XEMACSDEBUG environment variable, which is eval'd when XEmacs 21.5 starts, to the Lisp form, which sets `log-warning-minimum-level' to `error', in order to suppress warnings for Lisp shadows when XEmacs 21.5 starts. (AC_PATH_EMACS): Run AC_SET_XEMACSDEBUG. (AC_EMACS_LISP, AC_ADD_LOAD_PATH): Use XEMACSDEBUG. * Makefile.in (XEMACSDEBUG): New variable. (lisp, what-where, install-package, install-package-ja, dist) (.el.elc, slow, very-slow): Use it. * doc/Makefile.in (XEMACSDEBUG): New variable. (EMACSINFO, version.texi, install-en, install-ja): Use it. * w3mhack.el: Reset `log-warning-minimum-level' to `info'. 2007-03-15 Hideyuki SHIRAI * w3m-session.el (w3m-session-deleted-save): Sort buffers to use their name. 2007-03-13 Hideyuki SHIRAI * w3m.el (autoload): Add w3m-session-deleted-save. (w3m-delete-buffer): Call w3m-session-deleted-save. (w3m-delete-other-buffers): Call w3m-delete-buffers instead of piece of code. (w3m-delete-buffers): Call w3m-session-deleted-save. * w3m-session.el (w3m-session-deleted-save): New option. (w3m-session-deleted-title): Ditto. (w3m-session-deleted-keep-number): Ditto. (w3m-session-deleted-save): New function. (w3m-session-select): Display URLs. (w3m-session-select): Add key assignment; `k' and `j'. 2007-03-12 Katsumi Yamaoka * w3m-bug.el (report-emacs-w3m-bug): Use a new buffer to compose a mail if at least mail-user-agent is sendmail-user-agent that is the default. cf. 2007-03-09 Katsumi Yamaoka * w3mhack.el (w3mhack-generate-load-file): Advise make-autoload to support define-minor-mode if it should be necessary. 2007-03-08 Katsumi Yamaoka * w3m.el (w3m-async-exec-with-many-urls): New variable; default to t except for XEmacs 21.5. (w3m-goto-url): Bind w3m-async-exec to nil when retrieving group:* urls if w3m-async-exec-with-many-urls is nil. * w3m-session.el (w3m-session-goto-session): Bind w3m-async-exec to nil if w3m-async-exec-with-many-urls is nil. 2007-03-08 Hideyuki SHIRAI * w3m-session.el (w3m-session-select): Use next-command-event and event-key for XEmacs with checked surely. 2007-03-08 Katsumi Yamaoka * w3m-session.el (w3m-session-automatic-save): Remove unused vars. (w3m-session-select): Use next-command-event for XEmacs; clear the echo area after entering command. 2007-03-08 Hideyuki SHIRAI * w3m.el (autoload): Add w3m-session-select, w3m-session-save and w3m-session-automatic-save. (w3m-lynx-like-map): Add w3m-session-select and w3m-session-save to map. (w3m-info-like-map): Ditto. (w3m-arrived-shutdown-functions): Add w3m-session-automatic-save. (w3m-quit): Call w3m-session-automatic-save. * w3m-session.el: New file. 2007-02-28 Hideyuki SHIRAI * w3m-filter.el (w3m-filter-rules): Add rules for the site of Amazon and Mixi. (w3m-filter-amazon-regxp): New option. (w3m-filter-amazon-short-url-bottom): Ditto. (w3m-filter-google): Add doc-string. (w3m-filter-amazon): New function. (w3m-filter-mixi): New function. 2007-02-24 Tatsuya Kinoshita * Makefile.in, doc/Makefile.in (clean): Remove doc/version.texi. 2007-02-22 Katsumi Yamaoka * w3m.el (w3m-decode-buffer): Improve further regexp matching urls containing non-ASCII characters. 2007-02-21 Katsumi Yamaoka * w3m.el (w3m-decode-buffer): Improve regexp matching urls containing non-ASCII characters. 2007-02-20 Katsumi Yamaoka * w3m.el (w3m-decode-buffer): Encode urls containing non-ASCII characters. 2007-02-06 Naohiro Aota * w3m.el (w3m-decode-entities): Don't decode things like entities in forms of the text or the select type having the name property. 2007-02-05 Naohiro Aota * w3m.el (w3m-fontify): Don't delete things like tags in forms of type=text as well as of type=textarea. 2007-02-05 Katsumi Yamaoka * w3m.el (w3m-arrived-intern): New macro, that normalizes urls by stripping last `/'s. (w3m-arrived-add, w3m-arrived-p, w3m-arrived-time) (w3m-arrived-put, w3m-arrived-get): Use it. (w3m-create-text-page): Make sure to set w3m-current-title. 2007-02-04 David Hansen * w3m.el (w3m-relationship-estimate-rules): Added `w3m-relationship-slashdot-estimate'. (w3m-relationship-slashdot-estimate): New function. 2007-02-02 Katsumi Yamaoka * w3m.el (w3m-menu-on-forefront): New variable. (w3m-setup-menu): Use it. * w3m-e21.el (w3m-menu-on-forefront): New function. * w3m-xmas.el (w3m-menu-on-forefront): New function. (w3m-setup-menu): Use it. * w3m-bookmark.el (w3m-setup-bookmark-menu): Don't arrange the order of the menu items here. * w3m-tabmenu.el (w3m-setup-tab-menu): Ditto. 2007-02-01 Katsumi Yamaoka * Makefile.in, doc/Makefile.in: Add datarootdir setting that is required for newer autoconfs. * w3m.el (w3m-lynx-like-map, w3m-info-like-map): Use (featurep 'gtk) instead of (boundp 'gtk-version-string); use down-mouse-3 instead of mouse-3, and bind drag-mouse-3 and mouse-3 to undefined for GTK Emacs. * w3m-e21.el (w3m-use-toolbar) (w3m-toolbar-icon-preferred-image-types): Use (featurep 'gtk) instead of (boundp 'gtk-version-string). (w3m-toolbar-configurations): Select frame visiting buffer which is about to apply configurations; use (featurep 'gtk) instead of \(boundp 'gtk-version-string); enable it for GTK Emacs; exclude auto-resize-tool-bars and auto-raise-tool-bar-buttons. 2007-01-31 Katsumi Yamaoka * w3m.el (w3m-clean-hook-options): Remove. 2007-01-31 Hideyuki SHIRAI * w3m-search.el (w3m-search-read-query): Check that face property is `list' to avoid argument error. 2007-01-30 Katsumi Yamaoka * w3m-xmas.el (w3m-define-w3m-make-ccl-coding-system): Rename from w3m-xmas-define-w3m-make-ccl-coding-system. (w3m-toolbar-make-buttons): Rename from w3m-xmas-make-toolbar-buttons. (w3m-define-missing-widgets): Rename from w3m-xmas-define-missing-widgets. (w3m-show-current-title-in-buffer-tab): Rename from w3m-xmas-show-current-title-in-buffer-tab. (w3m-setup-tab-in-gutter): Rename from w3m-xmas-setup-tab-in-gutter. (w3m-update-tab-in-gutter): Rename from w3m-xmas-update-tab-in-gutter. * w3m-e21.el (w3m-toolbar-icon-preferred-image-types) (w3m-toolbar-icon-preferred-image-types): Use w3m-update-toolbars instead of w3m-setup-toolbar. (w3m-toolbar-configurations): Rename from w3m-e21-toolbar-configurations; make it customizable for LUCID Emacs. (w3m-toolbar-define-keys): Rename from w3m-e21-setup-toolbar; don't apply w3m-toolbar-configurations here. (w3m-toolbar-make-buttons): Rename from w3m-e21-make-toolbar-buttons. (w3m-toolbar-set-configurations): New function. (w3m-setup-toolbar): Remove force argument; apply w3m-toolbar-configurations here. (w3m-update-toolbars): New function. (w3m-switch-to-buffer): Rename from w3m-e21-switch-to-buffer. (w3m-subst-switch-to-buffer-keys): Rename from w3m-e21-subst-switch-to-buffer-keys. * w3m.el (w3m-message): Clear previous message only if it is longer than the window width and running Emacs 22 and greater. 2007-01-29 Katsumi Yamaoka * w3m-xmas.el (w3m-toolbar-icon-preferred-image-types) (w3m-toolbar-use-single-image-per-icon): New variables. (w3m-find-image): New function. (w3m-xmas-make-toolbar-buttons): Use it; add force argument. (w3m-setup-toolbar): Use it; add force and buffer arguments. (w3m-initialize-graphic-icons): Use it. * w3m-e21.el (w3m-toolbar-icon-preferred-image-types) (w3m-toolbar-use-single-image-per-icon): Apply customized value to tool bar immediately. (w3m-e21-make-toolbar-buttons, w3m-setup-toolbar): Add force arg. 2007-01-26 Katsumi Yamaoka * icons/*.png, icons30/*.png: New files. * Makefile.in (install-icons, install-icons30): Install png files. * w3mhack.el (w3mhack-nonunix-install, w3mhack-make-package): Install png files. (w3mhack-what-where): Update for png files. * w3m-e21.el (w3m-use-toolbar): Check whether tool-bar and gtk-version-string are available. (w3m-toolbar-icon-preferred-image-types) (w3m-toolbar-use-single-image-per-icon): New variables. (w3m-find-image): New function. (w3m-e21-make-toolbar-buttons, w3m-setup-toolbar) (w3m-initialize-graphic-icons): Use it. 2007-01-24 Hideyuki SHIRAI * w3m.el (w3m-halfdump-command-arguments): Generate the right values for non-Mule XEmacs. 2007-01-24 Katsumi Yamaoka * w3m.el (w3m-message): Clear previous message first. Suggested by David Hansen . 2007-01-18 Friedrich Delgado Friedrichs * w3m-proc.el (w3m-process-ssl-passphrase): New variable. (w3m-process-filter): Enable w3m to authenticate itself with a client certificate. 2007-01-16 Katsumi Yamaoka * w3m-e21.el: Autoload iswitchb-read-buffer when compiling. 2007-01-10 Katsumi Yamaoka * w3m-e21.el (w3m-e21-switch-to-buffer): Add iswitchb-mode support. 2007-01-09 Katsumi Yamaoka * w3m.el (w3m-modeline-title): Don't use w3m-force-window-update which obstructs viewing of large images. Reported by Chris Moore . 2006-12-21 Hideyuki SHIRAI * w3m-filter.el (w3m-filter-rules): Add rule for the site of Google. (w3m-filter-google-use-utf8): New user option. (w3m-filter-google-use-ruled-line): Ditto. (w3m-filter-google): New function. 2006-12-13 ARISAWA Akihiro * w3m-search.el (w3m-search-engine-alist): Fix amazon entry. 2006-12-11 Katsumi Yamaoka * aclocal.m4 (AC_EXAMINE_PACKAGEDIR): Check for (early|late|last)-package-hierarchies as well as (early|late|last)-packages; prefer them to configure-package-path. 2006-12-09 TSUCHIYA Masatoshi * w3m-form.el: Changes to create a new session after submitting form. (w3m-form-new-session): New variable. (w3m-fontify-textareas, w3m-form-parse-and-fontify): Combine the above variable into expressions which represent form actions. (w3m-form-submit): Accept and optional argument `new-session'. * w3m.el: Changes to create a new session after submitting form. (w3m-submit-form): Accept and optional argument `new-session'. `w3m-form-new-session' is binded locally. (w3m-view-this-url): `w3m-form-new-session' is binded locally. 2006-12-08 Hideyuki SHIRAI * w3m.el (w3m-view-parent-page): Add prefix argument `TOP'. If TOP is non-nil, visit the top of this site." (w3m-parent-page-available-p): Fix regexp. 2006-12-08 Katsumi Yamaoka * patches/README: Update. * patches/italic-text.patch: New file. * patches/dot-domain.patch: New file. * patches/file-progress.patch: Renew. * patches/w3m-0.2.1-inu-1.5-solaris-xemacs.patch: Remove. * patches/no-proxy.patch: Remove. 2006-12-07 Katsumi Yamaoka * w3m.el (w3m-italic-face): New face. (w3m-fontify-italic): New function. (w3m-fontify): Use it. 2006-11-25 Hideyuki SHIRAI * mew-w3m.el (w3m-mail-compose-with-mew): Refrain handling of `current-prefix-arg'. 2006-11-14 Ren Lifeng * w3m-cookie.el (w3m-cookie-1-acceptable-p): Accept cookie whose domain attribute is ".foo.barz.bar" from host "foo.barz.bar". (w3m-cookie-retrieve): Send cookie whose domain attribute is ".foo.barz.bar" when requesting host "foo.barz.bar". 2006-11-20 Katsumi Yamaoka * w3m-mail.el (w3m-mail-compose-with-vm): Require vm-startup. 2006-11-20 Hiroya Murata * w3m-mail.el (w3m-mail-compose-with-semi): Require mime-edit. 2006-10-11 David Hansen * w3m.el (w3m-relationship-estimate-rules): Support for google code search added. 2006-10-09 Katsumi Yamaoka * w3m.el, w3m-bookmarks.el, w3m-search.el: Remove misadded Luca Capello from the Authors field. 2006-10-06 Katsumi Yamaoka * w3m.el (w3m-compatible-encoding-alist): Add iso-8859-8/windows-1255 and iso-8859-9/windows-1254. 2006-10-02 Katsumi Yamaoka * w3m-mail.el (w3m-mail-compose-with-vm): Treat source as binary data for images; encode source according to charset; use mail-send-actions to kill source buffer. (w3m-mail): Examine charset when the page is displayed normally. * w3m-util.el (w3m-coding-system-to-mime-charset): Rename to w3m-coding-system-to-charset and move to w3m.el * w3m.el (w3m-coding-system-to-charset): Move from w3m-util.el. (w3m-buffer): New function. 2006-09-29 Katsumi Yamaoka * w3m.el (w3m-mail-user-agents): Add vm-user-agent. * w3m-mail.el (w3m-mail-user-agent-compose-function-alist): Add vm-user-agent. (w3m-mail-compose-with-vm): New function. (w3m-mail-goto-body-and-clear-body): New function. (w3m-mail-position-point): New function. (w3m-mail-compose-with-mml, w3m-mail-compose-with-semi): Use them. 2006-09-29 Hideyuki SHIRAI * mew-w3m.el (w3m-mail-compose-with-mew): Handle coding-system and charset accurately. When call with `current-prefix-arg', try to use existing draft buffer. * w3m-mail.el (w3m-mail): Bind `w3m-history-reuse-history-elements' to 'reload. 2006-09-29 Hiroya Murata * w3m-mail.el (w3m-mail-compose-with-semi): Handle types other than text/html as well. Decide the charset when the charset is nil though the content-type is a text. 2006-09-28 Katsumi Yamaoka * w3m-mail.el (w3m-mail-compose-with-mml): Treat source as binary data for images (we will probably have to do so for some more types); pass content-type argument to MML. 2006-09-28 Hideyuki SHIRAI * w3m.el (w3m-mail-user-agents): Add mew-user-agent. * w3m-mail.el (top): Autoload w3m-mail-compose-with-mew (w3m-mail-user-agent-compose-function-alist): Add mew-user-agent. (w3m-mail-compose-with-mml): Add `content-type' argument (w3m-mail-compose-with-semi): Ditto. (w3m-mail): Handle `content-type' and `about://header/'. * mew-w3m.el (w3m-mail-compose-with-mew): New function. Add `content-type' argument and handle it. 2006-09-28 Hiroya Murata * w3m-mail.el (w3m-mail-user-agent-compose-function-alist): Add wl-user-agent. (w3m-mail-compose-with-semi): New function. * w3m.el (w3m-mail-user-agents): Add wl-user-agent. 2006-09-28 Katsumi Yamaoka * w3m-util.el (w3m-coding-system-to-mime-charset): New function. * w3m-mail.el (w3m-mail-compose-with-mml): Bind gnus-newsgroup-name to nil while composing mail if gnus-user-agent is used instead of removing X-Draft-From header. (w3m-mail): Use w3m-coding-system-to-mime-charset. 2006-09-27 Katsumi Yamaoka * w3m-mail.el (w3m-mail-compose-with-mml): Remove X-Draft-From header; make charset argument a string. (w3m-mail): Make charset argument to be passed to composer a symbol. 2006-09-27 Katsumi Yamaoka * w3m-mail.el: New file. * w3m.el: Autoload w3m-mail. (w3m-mail-user-agents): New variable. (w3m-menubar): Add w3m-mail. 2006-09-26 Luca Capello * w3m-search.el (w3m-search-new-session): New command. (w3m-search-read-variables): Ditto. (w3m-search-do-search): Ditto. (w3m-search): Rewrite to use the new commands above; add myself to the authors list. * w3m.el (autoload): Add w3m-search-new-session. (w3m-menubar): Add w3m-search-new-session. (w3m-info-like-map): Add w3m-search-new-session at the place of the called-interactively w3m-search to be compliant with the other *-new-session key-bindings. (w3m-mode): Add description of w3m-search-new-session to docstring. 2006-09-25 Luca Capello * w3m-bookmark.el: Add myself to the authors list, forgotten when submitting the patch for w3m-bookmark-view-new-session. * w3m.el: Ditto. 2006-09-22 Hideyuki SHIRAI * w3m-e21.el (w3m-tab-make-keymap): Support mouse wheel on the tab. * w3m-e23.el (w3m-tab-make-keymap): Ditto. 2006-09-20 Katsumi Yamaoka * w3m-fb.el: Bind w3m-delete-buffer, w3m-fb-frame-parameter, w3m-list-buffers, w3m-next-buffer, and w3m-pop-up-frames when compiling. 2006-09-16 David Hansen * w3m.el (w3m-relationship-estimate-rules): Changed freshmeat URL regexp. 2006-09-13 Katsumi Yamaoka * w3m.el (w3m-lynx-like-map, w3m-info-like-map): Don't bind M-g key because Emacs 22 uses it as a prefix command in global map. Suggested by David Hansen . 2006-09-09 Masayuki Ataka * w3m-search.el (w3m-search-engine-alist): Instruct explicitly Google to return English pages for google-en. 2006-09-07 Katsumi Yamaoka * w3m.el (w3m-default-directory): New variable. (w3m-current-directory): Use it. 2006-09-05 David Hansen * w3m.el (w3m-local-find-file-regexps): Default to '(nil . "\\.[sx]?html?\\'"). 2006-08-31 Katsumi Yamaoka * w3m.el (w3m-enable-google-feeling-lucky): New variable. (w3m-input-url): Disable the Google feeling lucky feature if it is nil. 2006-08-30 Katsumi Yamaoka * w3m.el (w3m-show-decoded-url): Add entry for ohmynews.co.jp. 2006-08-30 TSUCHIYA Masatoshi * w3m.el (w3m-relationship-search-patterns): Call `w3m-decode-anchor-string' in order to decode "&" in anchor strings. (w3m-relationship-freshmeat-estimate): Removed. (w3m-relationship-estimate-rules): Use `w3m-relationship-simple-estimate' instead of the above, to simplify related codes. 2006-08-11 David Hansen * w3m.el (w3m-relationship-oddmuse-estimate): New function. (w3m-relationship-freshmeat-estimate): New function. (w3m-relationship-estimate-rules): Fixed regexp for google groups. Added above new functions. 2006-07-25 Katsumi Yamaoka * w3m-util.el (w3m-truncate-string): Don't autoload mule-util.el. 2006-06-19 Hideyuki SHIRAI * w3m-tabmenu.el (w3m-tab-menubar-make-items-precbuf): New internal variable. (w3m-tab-menubar-make-items-prebuflst): Ditto. (w3m-tab-menubar-make-items-preurl): Ditto. (w3m-tab-menubar-make-items-preitems): Ditto. (w3m-tab-menubar-make-items): Set an use previous variables to used for the speed improvement. * w3m-util.el (w3m-make-menu-commands-keys): New internal variable. (w3m-make-menu-commands): Set and use `w3m-make-menu-commands-keys to used for the speed improvement. 2006-06-15 Katsumi Yamaoka * attic/rfc2368.el: Copy from Emacs 22; modify rfc2368-unhexify-string to work with both Emacs and XEmacs. 2006-05-31 Hideyuki SHIRAI * w3m.el (w3m-view-this-url-1): Set 5th argument of `w3m-copy-buffer' to `w3m-new-session-in-background'. (w3m-copy-buffer): Add `background' argument. When URL is null and `background' is not non-nil, stay the current buffer. 2006-05-31 Katsumi Yamaoka * w3m-search.el (w3m-search-read-query): Ignore page title only in w3m-mode buffers. 2006-05-30 Katsumi Yamaoka * w3m-search.el (w3m-search-read-query): Assume there's not only a list of faces but also just a face. 2006-05-30 Yoichi NAKAYAMA * w3m.el (w3m-copy-buffer): Create empty w3m buffer when url is not set. Cause error on meaningless combination of arguments. 2006-05-28 Hideyuki SHIRAI * w3m-e21.el (w3m-tab-selected-background-face): New face. (w3m-tab-separator): Put `mouse-face' for the shape of a mouse button. (w3m-tab-line): Ditto. * w3m-e23.el (w3m-tab-selected-background-face): New face. (w3m-tab-separator): Put `mouse-face' for the shape of a mouse button. (w3m-tab-line): Ditto. 2006-05-26 Hideyuki SHIRAI * w3m.el (w3m-tab-button-menu-commands): Disable same items if `w3m-tab-button-menu-current-buffer' is nil. (w3m-tab-button-menu2): New function. * w3m-e21.el (top): Add the variables and function to avoid byte-compile warnings. (w3m-tab-drag-mouse-function): Support drag & drop to out of the frame. Don't call `bury-buffer'. (w3m-tab-click-mouse-function): Don't call `bury-buffer'. (w3m-tab-double-click-mouse1-function): new function. (w3m-tab-double-click-mouse2-function): Ditto. (w3m-tab-make-keymap): Add some methods. * w3m-e23.el (top): Add the variables and function to avoid byte-compile warnings. (w3m-tab-drag-mouse-function): Support drag & drop to out of the frame. Don't call `bury-buffer'. (w3m-tab-click-mouse-function): Don't call `bury-buffer'. (w3m-tab-double-click-mouse1-function): new function. (w3m-tab-double-click-mouse2-function): Ditto. (w3m-tab-make-keymap): Add some methods. * w3m.el (w3m-tab-button-menu-commands): Change position some items. 2006-05-22 Katsumi Yamaoka * w3m-util.el (w3m-widget-type-convert-widget): New function. * w3m.el (w3m-home-page, w3m-new-session-url) (w3m-uri-replace-alist): Use it. * w3m-dtree.el (w3m-dtree-indent-strings, w3m-dtree-stop-strings): Use it. * w3m-symbol.el (w3m-symbol-custom-type): Use it. 2006-05-21 Yoichi NAKAYAMA * w3m.el (autoload): `w3m-bookmark-view-new-sessiont' -> `w3m-bookmark-view-new-session'. 2006-05-19 Katsumi Yamaoka * w3m.el (w3m-home-page): Rewrite :convert-widget function. (w3m-new-session-url): Ditto. 2006-05-19 Katsumi Yamaoka * w3m.el (w3m-new-session-url): Doc fix; improve custom type. (w3m-new-session-in-background): Doc fix. 2006-05-19 Hideyuki SHIRAI * w3m.el (w3m-new-session-url): Rename from `w3m-tab-button-new-session-url'. (w3m-tab-button-focus-new-tab): Delete. (w3m-view-this-url-new-session-in-background): This option sets obsolete. (w3m-new-session-in-background): New option. (w3m-menubar): Change and add Some items. (w3m-copy-buffer): If call-interactively, set `just-copy' to `t'. If `w3m-new-session-in-background' and `just-copy' is non-nil, swith to original buffer when finished. (w3m-lynx-like-map): Add `w3m-bookmark-view-new-session'. (w3m-tab-button-menu-commands): Use `w3m-new-session-in-background' insted of `w3m-tab-button-focus-new-tab'. (w3m-goto-new-session-url): New command. (w3m-goto-url-new-session): Call `w3m-copy-buffer' with `w3m-new-session-in-background'. (w3m-select-buffer-generate-contents): Add prefix number to beginning of title name. * w3m-tabmenu.el (w3m-tab-menubar-items-sub-coeff): New variable. (w3m-tab-menubar-items-width): Ditto. (w3m-tab-menubar-make-items-1): New inline macro and trancate string of tab's title if over `w3m-tab-menubar-items-width'. (w3m-tab-menubar-make-items): Use `w3m-tab-menubar-make-items-1'. If the number of tabs over `(- (frame-height) w3m-tab-menubar-items-sub-coeff)', make sub-menu. * w3m-bookmark.el (w3m-bookmark-view-new-session): Use w3m-view-this-url-1 instead of w3m-goto-url; warn if w3m-mode does not run. (w3m-bookmark-menu-items): Add w3m-bookmark-view-new-session. 2006-05-18 Luca Capello * w3m-bookmark.el (w3m-bookmark-view): Add docstring. (w3m-bookmark-view-new-session): New command. * w3m.el (autoload): Add docstring to w3m-bookmark-view; add w3m-bookmark-view-new-session. (w3m-menubar): Add Bookmark submenu and w3m-bookmark-view-new-session. (w3m-info-like-map): Add w3m-bookmark-view-new-session. (w3m-mode): Add description of w3m-bookmark-view-new-session to docstring. 2006-05-18 Hideyuki SHIRAI * w3m.el (w3m-tab-button-focus-new-tab): New option. (w3m-menubar): Add some items. (w3m-external-view-this-url): New command. (w3m-external-view-current-url): Ditto. (w3m-tab-button-menu-commands): Use `w3m-tab-button-focus-new-tab' on `w3m-goto-url-new-session' and `w3m-copy-buffer'. (w3m-tab-button-menu): Make with `w3m-make-menu-commands'. * w3m-util.el (top): Add the variable definition of `w3m-mode-map' to avoid byte-compile warnings. (w3m-make-menu-commands): New function. * w3m-tabmenu.el (w3m-tab-menubar-make-items): Use `w3m-make-menu-commands'. 2006-05-18 Katsumi Yamaoka * w3m.el (w3m-view-url-with-external-browser): Add optional url argument. (w3m-tab-button-menu-commands): Make w3m-copy-buffer and w3m-view-url-with-external-browser select the buffer; pass url to w3m-view-url-with-external-browser. 2006-05-18 Katsumi Yamaoka * w3m-bookmark.el (w3m-bookmark-add-all-urls): New function. * w3m.el: Autoload w3m-bookmark-add-all-urls. (w3m-menubar): Add w3m-reload-all-pages. (w3m-lynx-like-map): Add w3m-reload-all-pages and w3m-bookmark-add-all-urls. (w3m-info-like-map): Ditto. (w3m-tab-button-menu-commands): Make it enable to pass arguments to function items; use w3m-goto-url-new-session, w3m-reload-all-pages, and w3m-bookmark-add-all-urls instead of lambda forms. (w3m-tab-button-menu): Pass arguments to functions defined in w3m-tab-button-menu-commands. (w3m-mode): Add descriptions about w3m-reload-all-pages and w3m-bookmark-add-all-urls to docstring. (w3m-reload-all-pages): New function. 2006-05-18 Hideyuki SHIRAI * w3m.el (w3m-lynx-like-map): Define `w3m-mouse-major-mode-menu' to mouse-3. (w3m-info-like-map): Ditto. (w3m-mouse-major-mode-menu): New command. * w3m-util.el (top): Add the variable definition of `w3m-use-japanese-menu' to avoid byte-compile warnings. (w3m-make-menu-item): Change method to take measures for garbage characters on XEmacs. * w3m-bookmark.el (w3m-bookmark-make-item-xmas): New variable. (w3m-bookmark-make-item): New inline macro. (w3m-bookmark-make-menu-items): Use `w3m-bookmark-make-item'. 2006-05-18 Hideyuki SHIRAI * w3m.el (w3m-menubar): Use `w3m-make-menu-item'. (w3m-tab-button-menu-current-buffer): Enable always. (w3m-tab-button-menu-commands): Ditto. Use `w3m-make-menu-item'. * w3m-util.el (w3m-make-menu-item): New function. * w3m-tabmenu.el (w3m-tab-menubar-make-items): Handle `w3m-tab-button-menu-commands' always. * w3m-bookmark.el (w3m-bookmark-menu-items): Use `w3m-make-menu-item'. 2006-05-17 Hideyuki SHIRAI * w3m.el (w3m-use-japanese-menu): Change default value. (w3m-menubar): Simplify the rule to use Japanese menu. (w3m-tab-button-menu-commands): Ditto. * w3m-bookmark.el (w3m-bookmark-menu-items): Simplify the rule to use Japanese menu. 2006-05-17 Katsumi Yamaoka * w3m.el (w3m-menubar): Escape the Japanese katakana `a' which breaks the string syntax in non-Mule XEmacs. * w3m-bookmark.el (w3m-bookmark-menu-items): Escape the Japanese kanji `etsu' which breaks the string syntax in non-Mule XEmacs. 2006-05-17 Hideyuki SHIRAI * w3m.el (w3m-use-japanese-menu): New option. (w3m-menubar): Add Japanese menu. (w3m-tab-button-menu-commands): Change the way to check Japanse or others. * w3m-bookmark.el (w3m-bookmark-menu-items): Add Japanese menu. 2006-05-17 Hideyuki SHIRAI * w3m.el (w3m-tab-button-new-session-url): New option. (w3m-delete-other-buffers): New command. (w3m-delete-left-tabs): Ditto. (w3m-delete-right-tabs): Ditto. (w3m-delete-buffers): New function. (w3m-lynx-like-map): Add `w3m-delete-left|right-tabs'. (w3m-tab-button-menu-commands): New new items. * w3m-util.el (w3m-lefttab-exist-p): New inline function. (w3m-righttab-exist-p): Ditto. * w3m-tabmenu.el (w3m-tab-menubar-make-items): Handle `w3m-tab-button-menu-commands' if possible. 2006-05-16 Katsumi Yamaoka * w3m.el (w3m-tab-button-menu-commands): New variable. (w3m-tab-button-menu-current-buffer): New variable. (w3m-tab-button-menu): New variable. (w3m-tab-button-menu): New function. * w3m-e21.el (w3m-tab-make-keymap): Bind mouse-3 to menu. 2006-05-14 Tsuyoshi CHO * w3m.el (w3m-refontify-anchor): Improve parameter check. (w3m-create-image-page): Use `w3m-add-face-property' instead `put-text-property'/`add-text-properties'/`w3m-add-text-properties'. (w3m-history-highlight-current-url): Ditto. (w3m-header-line-insert): Ditto. * w3m-search.el (w3m-search-read-query): Improve parameter check. * w3m-lnum.el (w3m-link-numbering): Use `w3m-add-face-property' instead `put-text-property'. * w3m-form.el (w3m-form-make-button): Use `w3m-add-face-property' instead `add-text-properties'. (w3m-fontify-textareas): Ditto. (w3m-form-parse-and-fontify): Ditto. * w3m-e21.el,w3m-e23.el (w3m-form-make-button): Improve face property append method. (w3m-setup-header-line): Ditto. (w3m-tab-line): Ditto. (w3m-tab-separator): Modify `face' value to list. 2006-05-11 Hideyuki SHIRAI * w3m-search.el (w3m-search-engine-alist): Use utf-8 for google if possible. 2006-05-10 Katsumi Yamaoka * w3m.el (w3m-show-decoded-url): Add entry for hatena.ne.jp. 2006-05-09 Katsumi Yamaoka * aclocal.m4 (AC_SET_VANILLA_FLAG): Add --no-unibyte option so as to invalidate EMACS_UNIBYTE environment variable. 2006-05-07 ARISAWA Akihiro * w3m-symbol.el: Bind w3m-use-symbol when compiling. (w3m-use-symbol): New function. (w3m-replace-symbol): Use it. * w3m.el (w3m-use-symbol): Changed its default value when w3m-output-coding-system is utf-8. 2006-05-07 ARISAWA Akihiro * w3m-util.el (w3m-device-on-window-system-p): New function. (w3m-popup-frame-p): Use it. * w3m-search.el (w3m-search-engine-alist): Ditto. * w3m.el (w3m-fontify-strike-through): Ditto. 2006-05-06 Yoichi NAKAYAMA * w3m-search.el (w3m-search-engine-alist): Remove lycos-ja. 2006-05-01 Katsumi Yamaoka * w3m-search.el (w3m-search-engine-history): New variable. (w3m-search): Use it. 2006-05-01 David Hansen * w3m-search.el (w3m-search-engine-alist): Add freshmeat. 2006-04-28 Katsumi Yamaoka * w3m.el (w3m-url-decode-string): Don't perform find-coding-system on a list of coding system in XEmacs. 2006-04-28 Hideyuki SHIRAI * w3m.el (w3m-google-feeling-lucky-charset): New user option. (w3m-canonicalize-url): Support search-keyword for "I'm Feeling Lucky on Google". Add 2nd argument. (w3m-input-url): Suport "I'm Feeling Lucky". Add 5th argument `feeling-lucky'. Bind key to `self-insert-command' if `feeling-lucky'. Call `w3m-canonicalize-url' with `feeling-lucky'. (w3m-view-this-url): Call `w3m-input-url' with `feeling-lucky'. (w3m-goto-url-new-session): Ditto. (w3m): Ditto. 2006-04-24 Katsumi Yamaoka * w3mhack.el: Require APEL XEmacs package 1.32 and later. 2006-04-22 Yoichi NAKAYAMA * w3m-search.el (w3m-search-engine-alist): Add msdn. 2006-04-21 Katsumi Yamaoka * w3m.el (w3m-url-decode-string): Support non-Mule XEmacs superficially. * w3m-util.el (w3m-replace-in-string): Prefer replace-regexp-in-string over of replace-in-string. It was done in Gnus by Reiner Steib. 2006-04-20 Kazuhiro NISHIYAMA * w3m-search.el (w3m-search-engine-alist): Fix url for ja.wikipedia. 2006-04-20 Katsumi Yamaoka * w3m-search.el (w3m-search-engine-alist): Add ja.wikipedia. 2006-04-20 David Hansen * w3m-search.el (w3m-search-engine-alist): Add wikipedia, en.wikipedia and de.wikipedia. 2006-04-14 Katsumi Yamaoka * w3m.el (w3m-download): Clear minibuffer after y-or-n-p. 2006-04-06 Katsumi Yamaoka * attic/vm-w3m.el (vm-w3m-use-w3m-minor-mode-map): New variable. (vm-mime-display-internal-text/html): Use it. 2006-04-04 Katsumi Yamaoka * w3m.el (w3m-url-decode-string): Make string unibyte before decoding. 2006-03-16 Tsuyoshi CHO * w3m.el (w3m-data-retrieve): New function. (w3m-attributes, w3m-retrieve): Add support `data:' scheme handled by `w3m-data-retrieve'. 2006-03-15 Katsumi Yamaoka * w3m-ccl.el (charset-id): Define it as a macro instead of an alias to charset-id-internal if Emacs doesn't provide it. 2006-03-12 Tsuyoshi CHO * w3m.el (w3m-insert-face): New face. (w3m-fontify-insert): New variable. (w3m-fontify-insert): New function. (w3m-fontify): Add calling `w3m-fontify-insert'. 2006-02-28 Katsumi Yamaoka * w3m.el (w3m-decode-buffer): Decode buffer's string outside the buffer. 2006-02-26 ARISAWA Akihiro * w3m.el (w3m-w3m-parse-header): When the url matchs to ftp, rewrite type and charset. (w3m-w3m-attributes-1): Don't rewrite type and charset. (w3m-w3m-retrieve): Don't check status code when the url does not match to http. 2006-02-01 Katsumi Yamaoka * w3m.el (w3m-url-components-regexp): Move to w3m-util.el. (w3m-fontify-anchors, w3m-canonicalize-url, w3m-add-referer-p) (w3m-expand-url, w3m-view-this-url-1, w3m-goto-url) (w3m-goto-url-new-session): Use w3m-string-match-url-components rather than to run string-match with w3m-url-components-regexp. cf. . * w3m-form.el (w3m-form-normalize-action): Ditto. * w3m-cookie.el (w3m-parse-http-url): Ditto. * w3m-util.el (w3m-string-match-url-components-1): New function. (w3m-url-components-regexp): Move from w3m.el. (w3m-string-match-url-components): New macro. 2006-01-19 Tsuyoshi CHO * w3m.el (w3m-fontify-strike-through): Improve matching point. 2006-01-16 Katsumi Yamaoka * doc/Makefile.in: Add rules to make pdf files. * configure.in: Check for dvipdfmx and texi2pdf. 2005-12-31 TSUCHIYA Masatoshi * w3m-util.el (top): Add the variable definition of `w3m-mode-hook' to avoid byte-compile warnings. 2005-12-30 Tsuyoshi CHO * w3m.el (w3m-fontify-strike-through): Fix multi `' problem. 2005-12-23 Matt Hodges * w3m-util.el (w3m-list-buffers): Ensure disabling the w3m-fb-mode after a careless (setq w3m-fb-mode t). 2005-12-22 Tsuyoshi CHO * w3m-antenna.el (w3m-antenna-refresh-interval): Add new customize variable. (w3m-antenna-make-contents): Add new generation rule for refresh interval replacing `%R' to META Refresh tag and contents value are `w3m-antenna-refresh-interval'. (w3m-antenna-html-skelton): Add %R rule. 2005-12-19 Matt Hodges * w3m-util.el (w3m-list-buffers): Further fix against the case where someone did (setq w3m-fb-mode t). 2005-12-19 Katsumi Yamaoka * w3m-fb.el (w3m-fb-mode): Never activate w3m-fb-mode if w3m-pop-up-frames is non-nil. * w3m-util.el (w3m-list-buffers): Reset w3m-fb-mode if it seems to have been set thoughtlessly. 2005-12-19 Katsumi Yamaoka * w3m-fb.el: Don't require w3m. (w3m-fb-frame-parameter): Always define. (w3m-fb-delete-frame-functions): Ditto. (w3m-fb-select-buffer): Fix the 2nd clause of cond. (w3m-fb-advised-functions): Remove. (w3m-list-buffers): Move advice code to w3m-fb.el. (w3m-close-window): Move advice code to w3m.el. (w3m-delete-buffer): Ditto. (w3m-quit): Ditto. (w3m-fb-mode): Remove w3m-fb-advised-functions stuff. * w3m.el (w3m-fb): Require. (w3m-delete-buffer, w3m-quit, w3m-close-window): Merge the codes which were formerly provided as advices in w3m-fb.el. * w3m-util.el (w3m-fb-list-buffers-frame, w3m-fb-mode): Bind them when compiling. (w3m-fb-frame-parameter): Autoload. (w3m-list-buffers): Merge the code which was formerly provided as an advice in w3m-fb.el. 2005-11-26 Matt Hodges * w3m-fb.el: New file. 2005-12-09 Katsumi Yamaoka * w3m-form.el (w3m-form-submit): Use the post method for the multipart/form-data enctype according to the proposal of RFC2070 even if the form specifies the get method. 2005-11-24 ARISAWA Akihiro * w3m-form.el (w3m-form-submit): If anchor exists, go to the uri. 2005-11-21 Tsuyoshi CHO * w3m-favicon.el (w3m-favicon-type): Renew default image type list. 2005-11-19 Tsuyoshi CHO * w3m.el (w3m-menubar): Renew enable/disable condition for `[Copy This Session]',`[Download This URL]', and Append `[Toggle This Image]'. * w3m-bookmark.el (w3m-bookmark-menu-items): Renew enable/disable condition for `[Add This URL to Bookmark]'. 2005-11-16 Hideyuki SHIRAI * w3m.el (w3m-open-all-links-in-new-session): Reverse the list of URLs. 2005-10-21 Katsumi Yamaoka * w3m-e21.el (w3m-tab-drag-mouse-function): Lower the buffer displayed before moving to the other tab. (w3m-tab-click-mouse-function): Ditto. 2005-10-17 TSUCHIYA Masatoshi * w3m-util.el (w3m-add-face-property): Simplified. 2005-10-15 Tsuyoshi CHO * w3m-util.el (w3m-add-face-property): Add new functions. (w3m-remove-face-property): Ditto. * w3m.el (w3m-fontify-bold, w3m-fontify-underline) (w3m-fontify-strike-through, w3m-fontify-anchors) (w3m-fontify-images): Replace `w3m-add-text-properties' to `w3m-add-face-property' at FACE. (w3m-refontify-anchor): Change for FACE properly is list type. 2005-10-14 Katsumi Yamaoka * w3m-e21.el (w3m-insert-image): Make it work with a face text property whose value is a list. (w3m-remove-image): Remove useless text property. * w3m-e23.el (w3m-insert-image,w3m-remove-image): Same as w3m-e21.el's modification. 2005-09-29 ARISAWA Akihiro * w3m-proc.el (w3m-process-filter): Fixed regexp. 2005-09-27 ARISAWA Akihiro * w3m-proc.el (w3m-process-filter): Remove SSL warning message for basic authentication over SSL. 2005-09-22 Katsumi Yamaoka * w3m.el (w3m-fontify): Remove empty lines at the beginning of the buffer (see the comment). 2005-09-21 Katsumi Yamaoka * mime-w3m.el (mime-w3m-preview-text/html): Revert. 2005-09-21 Katsumi Yamaoka * mime-w3m.el (mime-w3m-preview-text/html): Bind w3m-treat-image-size to avoid inserting excessive newlines. 2005-09-18 Masayuki Ataka * w3m.el (w3m-relationship-estimate-rules): Add a rule for Google Blog Search. * w3m-search.el (w3m-search-engine-alist): Use `http://blogsearch.google.com/' instead of `http://search.blogger.com/' for "blog-*" search, because search.blogger.com does not have a explicit link to previous search result page. 2005-09-16 Hideyuki SHIRAI * w3m.el (w3m-redisplay-this-page): Use the cache always. 2005-09-15 Masayuki Ataka * w3m-search.el (w3m-search-engine-alist): Add "blog-*" entries. 2005-09-02 TAKAHASHI Kaoru * doc/ptexinfmt.el: Support @frenchspacing, @euro, @sansserif. (texinfo-format-ordf): Fix typo. 2005-09-01 Hiroshi Fujishima * w3m-search.el (w3m-search-engine-alist): Update goo-ja, waei, eiwa, kokugo URL. 2005-08-29 Katsumi Yamaoka * w3m-ucs.el: Enable XEmacs 21.5-Mule to compile it anyway. 2005-08-29 Hideyuki SHIRAI * w3m.el (w3m-fontify-anchors): Put the encoded anchor names instead of the itself. 2005-08-01 Katsumi Yamaoka * octet.el (octet-insert-buffer): Use insert-buffer-substring instead of insert-buffer. * w3m-bookmark.el (w3m-about-bookmark): Ditto. * w3m-proc.el (w3m-process-sentinel): Ditto. 2005-07-29 Kevin Rodgers * w3m.el (w3m-content-type-alist): Add the text/sgml entry. 2005-07-29 Katsumi Yamaoka * w3m.el (w3m-scroll-up-1): New function. (w3m-lynx-like-map): Use it for the J command. (w3m-scroll-up-or-next-url): Use it. 2005-07-15 TSUCHIYA Masatoshi * w3m.el (w3m-current-message): New internal variable. (w3m-message): Use the above variable to keep the last displayed message, to decide that this function can override the current message in the echo area. (w3m-make-help-echo): Use `message' instead of `w3m-message' to clear the echo area in the foreground context. (w3m-quit): Ditto. (w3m-goto-ftp-url): Ditto. (w3m-select-buffer-show-this-line-and-switch): Ditto. * w3m-proc.el (w3m-process-background): New internal variable. (w3m-process-sentinel): Set t to the above variable. 2005-07-13 TSUCHIYA Masatoshi * w3m.el (w3m-message): Bury messages when the cursor in the echo area which is used by `y-or-n-p' etc. (w3m-view-parent-page): Refer both `start' link element and `content' start element before checking a parent URL. 2005-07-11 Katsumi Yamaoka * w3m-bookmark.el (w3m-bookmark-menu-dummy-item): Remove. (w3m-bookmark-menubar-dummy): Remove. (w3m-bookmark-menu-items): Also define the menu for the case where w3m-bookmark-mode is turned on. (w3m-setup-bookmark-menu): Rewrite it so as to work properly with Emacs 22. (w3m-bookmark-menubar-update): Ditto; remove the iswitchb section. (w3m-bookmark-make-menu-items): Return nil if there's no bookmark. * w3m-tabmenu.el (w3m-tab-menubar-dummy): Remove. (w3m-setup-tab-menu): Rewrite it so as to work properly with Emacs 22. (w3m-tab-menubar-update): Ditto; remove the iswitchb section. 2005-07-11 Hideyuki SHIRAI * w3m-bookmark.el (w3m-bookmark-buffer): Disable undo before modify the buffer. (w3m-bookmark-menu-items-pre): New variable. (w3m-bookmark-menu-items-time): Ditto. (w3m-bookmark-make-menu-items): Use previous items if it available. 2005-07-09 Tsuyoshi CHO * w3m-xmas.el (top): Add `w3m-setup-bookmark-menu' to autoload list at compiled time. (w3m-setup-menu): Append bookmark menu setup calling. * w3m-bookmark.el (top): Add requirement `easymenu' and `easy-menu-remove-item' autoload at compiled time. (w3m-bookmark-menu-open-new-session): Add new customize variable. (w3m-bookmark-menu-dummy-item): Add new const variable. (w3m-bookmark-menubar-dummy): Ditto. (w3m-bookmark-menu-items): Ditto, Define Bookmark const menu items. (w3m-setup-bookmark-menu): Add new autoload function. (w3m-bookmark-menubar-update): Add new function. (w3m-bookmark-iterator): Ditto. (w3m-bookmark-menu-open-item): Ditto. (w3m-bookmark-make-menu-items): Ditto. * w3m.el (top): Add `w3m-setup-bookmark-menu' to autoload list at compiled time. (w3m-menubar): Remove "Bookmark" menu item. 2005-07-08 Hideyuki SHIRAI * w3m.el (w3m-print-current-url): Bind deactivate-mark. (w3m-print-this-url): Ditto. 2005-07-08 Katsumi Yamaoka * w3m.el (w3m-check-current-position): Bind deactivate-mark. cf. 2005-07-05 Masayuki Ataka * ChangeLog: Add file local variables to set fill-column 74 and indent-tabs-mode t. 2005-07-03 Masayuki Ataka * w3m-search.el (w3m-search-engine-alist): Add "technorati-*" entries. 2005-07-01 Katsumi Yamaoka * w3m-util.el (w3m-which-command): Make sure the command is not a directory. cf. . 2005-06-26 Masayuki Ataka * w3m.el (w3m-relationship-estimate-rules): Add a rule for Yahoo Search Beta. 2005-06-26 Masayuki Ataka * w3m.el (w3m-relationship-estimate-rules): Improve regexp for Google in order to make the scroll-to-next-page feature work on Google News as well. 2005-06-26 Masayuki Ataka TSUCHIYA Masatoshi * w3m-search.el (w3m-search-engine-alist): Add Yahoo Beta. 2005-06-18 Masayuki Ataka * w3m-search.el (w3m-search-engine-alist): Search Google News in US by "google news-en". 2005-06-17 Masayuki Ataka * w3m-search.el (w3m-search-engine-alist): Add "google news" entry. 2005-06-13 Katsumi Yamaoka * aclocal.m4 (AC_PATH_EMACS): Check whether XEmacs works with the shy group regexp and runs call-process-region correctly. * w3m-perldoc.el (w3m-about-perldoc): Don't relieve buggy XEmacs 21.5 for call-process-region. * w3m-xmas.el (w3m-fix-gif): Ditto. (w3m-initialize-graphic-icons): Ditto. * w3m.el (w3m-decode-encoded-contents): Ditto. (w3m-x-moe-decode-buffer): Ditto. (w3m-rendering-half-dump): Ditto. * w3mhack.el: Advise byte-optimize-form-code-walker to avoid the ``...called for effect'' warnings for Emacs 21.4 as well as 21.3; don't relieve buggy XEmacs 21.5 for call-process-region. 2005-06-10 Katsumi Yamaoka Make emacs-w3m not support the XEmacs versions older than 21.4.17 or 21.5-b19. * aclocal.m4 (AC_PATH_EMACS): Check whether XEmacs runs the timer functions correctly. * w3m-util.el (w3m-cancel-refresh-timer): Use delete-itimer instead of cancel-timer under XEmacs. * w3m-xmas.el (call-process-region): Don't advise it. (w3m-run-at-time): Remove. * w3m.el (w3m-refresh-at-time): Use run-at-time instead of w3m-run-at-time. * w3mhack.el (w3mhack-byte-optimize-letX): Doc fix. 2005-06-09 Tsuyoshi CHO * w3m.el: Update my mail address. 2005-06-09 Katsumi Yamaoka * w3m-antenna.el (w3m-antenna-mapcar): Remove unused temp var. * w3m-bookmark.el (w3m-bookmark-buffer): Remove file-coding-system-for-read. * w3m-form.el (w3m-form-input-textarea-save): Remove file-coding-system. (w3m-form-input-textarea): Ditto. * w3m-image.el (w3m-imagick-convert-buffer): Remove file-coding-system. (w3m-imagick-start-convert-buffer): Remove file-coding-system and jam-zcat-filename-list. * w3m.el (w3m-load-list): Remove file-coding-system-for-read. (w3m-save-list): Remove file-coding-system. (w3m-local-retrieve): Remove file-coding-system-for-read and jam-zcat-filename-list. (w3m-download): Remove file-coding-system and jam-zcat-filename-list. (w3m-copy-buffer): Remove unused temp var. * w3mhack.el (w3mhack-byte-optimize-letX): Remove file-coding-system, file-coding-system-for-read and pathname-coding-system. 2005-06-09 Katsumi Yamaoka * w3m-util.el (w3m-replace-in-string): Don't use eval-and-compile. (w3m-compare-strings): Ditto. (w3m-force-window-update): Alias to ignore if it is not defined. (w3m-force-window-update-later): New function. * w3m-favicon.el (w3m-favicon-retrieve): Use w3m-force-window-update-later. * w3m-proc.el (w3m-process-stop): Use w3m-force-window-update-later. * w3m.el (w3m-retrieve-and-render): Use w3m-force-window-update-later. (w3m-select-buffer-show-this-line): Always run w3m-force-window-update. 2005-06-09 Masatake YAMATO * w3m-e21.el (w3m-initialize-graphic-icons): Highlight icon under mouse. 2005-06-09 Katsumi Yamaoka * w3m-e21.el (w3m-tab-mouse-face): New face. (w3m-setup-header-line): Use highlight face for bg color. (w3m-tab-line): Use w3m-tab-mouse-face. 2005-06-08 Masatake YAMATO * w3m-e21.el (w3m-setup-header-line): Highlight url under mouse. (w3m-tab-line): Highlight tab under mouse. 2005-05-30 Katsumi Yamaoka * w3m-util.el (w3m-run-mode-hooks): New function. * w3m-form.el (w3m-form-input-select-mode): Use it. (w3m-form-input-map-mode): Use it. * w3m.el (w3m-mode): Use it. 2005-05-26 Katsumi Yamaoka * w3m-util.el (w3m-truncate-string): Autoload mule-util for truncate-string-to-width. 2005-05-26 Yoichi NAKAYAMA * w3m.el (w3m-safe-view-this-url): `unsecure' -> `insecure'. (w3m-safe-toggle-inline-image): Ditto. (w3m-safe-toggle-inline-images): Ditto. 2005-05-20 Katsumi Yamaoka * w3m.el (w3m-menubar): Add the "Close Other Sessions" button. (w3m-delete-other-buffers): Run w3m-force-window-update. 2005-05-18 Katsumi Yamaoka * attic/vm-w3m.el (vm-w3m): Provide the feature. * attic/vm-7.19.patch: New file. 2005-05-12 Hideyuki SHIRAI * w3m.el (w3m-open-all-links-in-new-session): Fix regexp. 2005-05-11 Katsumi Yamaoka * w3m-bookmark.el (w3m-about-bookmark): Use shy group in regexp. * w3m-cookie.el (w3m-cookie-two-dot-domains-regexp): Ditto. (w3m-cookie-set): Ditto. * w3m-dtree.el (w3m-dtree-directory-name): Ditto. (w3m-about-dtree): Ditto. * w3m-favicon.el (w3m-favicon-setup): Ditto. * w3m-namazu.el (w3m-about-namazu): Ditto. * w3m-proc.el (w3m-process-filter): Ditto. * w3m-rss.el (w3m-rss-parse-date-string): Ditto. * w3m-util.el (w3m-html-string-regexp): Remove useless quotes. (w3m-parse-attributes): Don't use old fashioned backquotes; use shy group in regexp. (w3m-url-authinfo-regexp): Use shy group in regexp. * w3m-weather.el (w3m-weather-completion-table): Ditto. (w3m-weather-area-completion): Ditto. * w3m-xmas.el (w3m-fix-gif): Ditto. * w3m.el: Use shy group in regexp when examining w3m-command. (w3m-content-type-alist): Use shy group in regexp. (w3m-show-decoded-url): Ditto. (w3m-add-referer): Ditto. (w3m-relationship-estimate-rules): Ditto. (w3m-arrived-ignored-regexp): Ditto. (w3m-history-ignored-regexp): Ditto. (w3m-url-to-file-name): Ditto. (w3m-fontify-strike-through): Ditto. (w3m-fontify): Ditto. (w3m-url-completion): Ditto. (w3m-gmane-url-at-point): Ditto. (w3m-cache-header-delete-variable-part): Ditto. (w3m-cache-available-p): Ditto. (w3m-decode-buffer): Ditto. (w3m-local-dirlist-cgi): Ditto. (w3m-w3m-canonicalize-url): Ditto. (w3m-additional-command-arguments): Ditto. (w3m-download): Ditto. (w3m-check-header-tags): Ditto. (w3m-retrieve-and-render): Ditto. (w3m-create-text-page): Ditto. (w3m-view-this-url): Ditto. (w3m-open-all-links-in-new-session): Ditto. (w3m-external-view-file): Ditto. (w3m-edit-url): Ditto. (w3m-convert-ftp-url-for-emacsen): Ditto. (w3m-goto-url): Ditto. (w3m-goto-url-new-session): Ditto. (w3m-about-db-history): Ditto. (w3m-history-highlight-current-url): Ditto. * w3mhack.el: Fix the section adding dirs to load-path. (w3mhack-make-package): Use shy group in regexp. (w3mhack-makeinfo): Ditto. 2005-05-10 Katsumi Yamaoka * Makefile.in (clean): Don't remove w3m-kwds.el. (.el.elc): Use batch-byte-compile instead of w3mhack-batch-compile. (very-slow): Don't run keywords. (keywords): Remove. * aclocal.m4 (AC_PATH_EMACS): Don't support Emacs 19 and 20. (AC_PATH_LISPDIR): Follow the change of the EMACS_FLAVOR value. (AC_PATH_ICONDIR): Ditto. (AC_CHECK_ELISP): Remove. (AC_CHECK_XML): Remove. * configure.in: Don't check for regexp-opt; don't run AC_CHECK_XML. * mime-w3m.el (mime-w3m-mode-map): Remove. (mime-w3m-local-map-property): Remove. (mime-w3m-preview-text/html): Don't use it. * octet.el (octet-decode-image): Ignore Emacs 19 and 20. * w3m-bitmap.el: Remove. * w3m-bookmark.el (w3m-bookmark-sections): Use point-at-eol. (w3m-bookmark-safe-string): Don't support Mule 2.3. (w3m-bookmark-current-number): Use point-at-eol. (w3m-bookmark-kill-entries): Use point-at-bol. * w3m-bug.el: Don't require w3m-om or w3m-e19. * w3m-ccl.el: Don't require w3m-om. * w3m-e19.el: Remove. * w3m-e20.el: Remove. * w3m-hist.el: Don't load w3m-kwds.el. * w3m-lnum.el (w3m-link-numbering): Don't support Emacs 20. * w3m-om.el: Remove. * w3m-proc.el: Don't require w3m-om or w3m-e19. * w3m-search.el (w3m-search-read-query): Use point-at-bol. * w3m-ucs.el: Ignore Emacs 20. * w3m-util.el: Don't load w3m-kwds.el; don't support Emacs 19. (w3m-use-tab-p): Ignore Emacs 19 and 20. (w3m-popup-window-p): Ditto. (w3m-add-w3m-initial-frames): Don't support Emacs 19. (after-make-frame-hook): Don't use it. (delete-frame): Don't advise it for Emacs 19 or 20. (w3m-truncate-string): Don't support Emacs 19 and 20. (w3m-default-face-colors): Remove. (w3m-replace-in-string): Don't support Emacs 19 and 20. * w3m-xmas.el (w3m-should-unoptimize-animated-gifs): Default to always t. (w3m-make-glyph): Use string-to-number instead of string-to-int. * w3m.el: Don't require w3m-e20, w3m-om or w3m-e19. (emacs-w3m-version): Reset to 1.4.50. (w3m-language): Ignore Mule 2.3. (w3m-history-current-url-face): Don't require wid-edit. (w3m-bold-face): Don't use w3m-default-face-colors. (w3m-underline-face): Ditto. (w3m-strike-through-face): Ditto. (w3m-use-symbol): Ignore Emacs 19 and 20. (w3m-show-decoded-url): Ditto. (w3m-use-tab): Doc fix. (w3m-entity-alist): Don't support Mule 2.3. (w3m-make-help-echo): Ignore Emacs version. (w3m-toggle-inline-images-internal): Ignore bitmap images. (w3m-resize-inline-image-internal): Don't support Emacs 19 and 20. (w3m-url-at-point): Always use ffap. (w3m-about-retrieve): Consider base64 codec is always available. (w3m-close-window): Don't support Emacs 19 and 20. (w3m-store-current-position): Use point-at-bol and point-at-eol. (w3m-buffer-setup): Ditto. (w3m-make-separator): Don't support Mule 2.3. (w3m-select-buffer-current-buffer): Use point-at-bol. (w3m-header-line-insert): Don't support Emacs 19 and 20. * w3mhack.el: Consider w3mhack-batch-compile is not used. (locate-library): Don't redefine it for Emacs 19. (APEL): Don't check for it for Emacs. (w3mhack-colon-keywords-file): Remove. (w3mhack-module-list): Ignore Emacs 19, 20, old XEmacsen and BITMAP-MULE. (w3mhack-shimbun-modules-using-rss): Remove. (current-column): Don't take care of it for old Emacsen. (w3mhack-compile): Don't run w3mhack-check-colon-keywords-file. (w3mhack-batch-compile): Remove. (w3mhack-nonunix-install): Ignore Emacs 19 and 20. (custom-declare-variable): Don't take care of it for Emacs 19. (locate-library): Ditto. (w3mhack-generate-colon-keywords-file): Remove. (w3mhack-check-colon-keywords-file): Remove. (w3mhack-load-path): Ignore Emacs 19, 20 and old XEmacsen. (w3mhack-makeinfo): Ignore Mule 2.3. * attic/regexp-opt.el: Remove. * attic/xml.el: Remove. * patches/mule-2.3@19.34.patch: Remove. 2005-04-20 Katsumi Yamaoka * w3m.el (w3m-remove-invisible-image-alt): New function. (w3m-rendering-buffer): Use it. 2005-04-13 Katsumi Yamaoka * w3m.el (w3m-decode-buffer): Decode "\240" into " ". 2005-04-08 Katsumi Yamaoka * w3m.el (w3m-decode-buffer): Decode `&#nnn;' entities in 128..159. 2005-04-07 Katsumi Yamaoka * w3m.el (w3m-detect-xml-charset): Return nil if the data don't look like xml contents. (w3m-compatible-encoding-alist): New variable. (w3m-decode-buffer): Always use w3m-detect-xml-charset; use a compatible encoding according to w3m-compatible-encoding-alist. * w3m-xmas.el (w3m-find-coding-system): Don't return binary for the nil argument. 2005-03-25 Katsumi Yamaoka * Release emacs-w3m-1.4.4 from emacs-w3m-1_4 branch. 2005-03-23 Katsumi Yamaoka * w3m-xmas.el (w3m-setup-toolbar): Make sure icon files exist. (w3m-update-toolbar): Make sure toolbar items have been specified. (w3m-initialize-graphic-icons): Make sure icon files exist. * w3m-e21.el (w3m-setup-toolbar): Make sure icon files exist. (w3m-initialize-graphic-icons): Ditto. 2005-03-23 TSUCHIYA Masatoshi * Makefile.in (tarball): Remove `w3m-e23.el' instead of `w3m-e22.el'. * w3m.el (w3m-url-readable-string): Decide a scheme to guess encodings based on the target URL, instead of the current URL. (w3m-show-decoded-url): Doc fix to follow the above change. (w3m-copy-buffer): Do not set `w3m-current-url' and `w3m-current-coding-system'. (w3m-goto-url-new-session): Simplified. 2005-03-22 Katsumi Yamaoka * w3m-e21.el (display-images-p): Remove alias. 2005-03-18 Katsumi Yamaoka * Makefile.in (very-slow): Don't mv non-existent files. * w3m-e19.el (easy-menu-remove-item): Don't autoload it. * w3m-om.el (easy-menu-remove-item): Ditto. * w3m-rss.el (match-string-no-properties): Avoid warning for Emacs 19 and XEmacs. (split-string): Avoid warning for Emacs 19. * w3m-symbol.el: Require cl when compiling. * w3m-tabmenu.el (easy-menu-remove-item): Aautoload it for Emacs 19. * w3m.el: Autoload widget-get to avoid compile warning for Emacs 19. (w3m): Remove unused bound variable. * w3mhack.el: Bind executable-binary-suffixes to the proper value for OS/2 and emx while checking for the shell command; cause an error only when compiling or formatting files. * attic/addpath.el: Make it work with old Emacsen even if cl is not loaded; load custom, bind defcustom'ed variables and make the locate-library function run quietly for Emacs 19; synch the code testing the shell command with w3mhack.el. (char-after): Add a byte-optimizer for Emacs 19. * w3m-ccl.el: Load w3m-om instead of autoloading it for charset-id. * w3m-util.el: Load cl independently when compiling. 2005-03-18 Katsumi Yamaoka * w3mhack.el: Check whether the shell command can be used. * attic/addpath.el: Ditto; add early-package-load-path to load-path for XEmacs 21.5. 2005-03-17 ARISAWA Akihiro * w3m-favicon.el: Add autoload of `w3m-url-readable-string'. 2005-03-17 Tsuyoshi CHO * w3m.el (w3m-check-header-tags): Check abnormal `base' url. 2005-03-16 Katsumi Yamaoka * w3mhack.el: Add early-package-load-path to load-path for XEmacs 21.5. * w3m-xmas.el: Fbind coding-system-type to ignore if it is void. 2005-03-15 Hideyuki SHIRAI * w3m-form.el (w3m-form-mee-new): Display clear signs of coding-system for `w3m-url-decode-string'. (w3m-form-mee-select-value): Ditto. (w3m-form-parse-and-fontify): Ditto. * w3m.el (w3m-decode-buffer): Decode the buffer within buffer set the `multibyte'. 2005-03-13 MIYOSHI Masanori * doc/emacs-w3m-ja.texi (Sport Sites Supported by Shimbun): Update. * doc/emacs-w3m.texi (Sport Sites Supported by Shimbun): Ditto. 2005-03-12 MIYOSHI Masanori * doc/emacs-w3m-ja.texi (Sport Sites Supported by Shimbun): Update. * doc/emacs-w3m.texi (Sport Sites Supported by Shimbun): Ditto. 2005-03-10 Katsumi Yamaoka * w3m.el: Load w3m-e23.el(c) that exists in the same directory as w3m.el(c) so as to exclude ones in other places; report the precise error message if it doesn't exist. 2005-03-10 Katsumi Yamaoka * w3m-xmas.el (w3m-decode-coding-string-with-priority): Ignore `undecided' so as not to use it for the priority list. 2005-03-10 Hideyuki SHIRAI * w3m-fsf.el (w3m-detect-coding-region): Guard error for `undecided'. 2005-03-09 Katsumi Yamaoka * w3mhack.el: Remove the byte-optimizer which replaces truncate-string with truncate-string-to-width. 2005-03-09 Katsumi Yamaoka * w3m.el (w3m-modeline-title): Replace truncate-string-to-width with w3m-truncate-string. * w3m-util.el (w3m-truncate-string): Use truncate-string-to-width if it is available. 2005-03-08 Katsumi Yamaoka * w3m.el (w3m-info-like-map): Bind the `y' key to the w3m-print-current-url command; bind the `Y' key to the w3m-print-this-url command; don't bind the `c' key. 2005-03-04 Katsumi Yamaoka * w3m.el (w3m-make-help-echo): Fix the backquote form. (w3m-make-balloon-help): Ditto. * w3m-util.el (w3m-set-match-data): Use existing markers. 2005-03-04 TSUCHIYA Masatoshi * w3m.el (w3m-url-readable-string): Save matching data. Check whether `w3m-current-url' is string before checking it. (w3m-goto-url-new-session, w3m-copy-buffer): Call `w3m-goto-url' with `redisplay' option to enforce redisplaying the certain content. * w3m-favicon.el (w3m-favicon-retrieve): Decode an URL when displaying it. * w3m-form.el (w3m-form-input-textarea-mode-setup): An expression is evaluated without checking type, and save matching data. 2005-03-03 TSUCHIYA Masatoshi * w3m.el (w3m-url-readable-string): Check whether `w3m-current-coding-system' is valid before calling `w3m-url-decode-string'. (w3m-local-dirlist-cgi, w3m-w3m-dump-extra): Use `w3m-url-readable-string'. (w3m-copy-buffer): Copy all buffer-local variables, and do not cancel them even if `empty' option is set. (w3m-display-progress-message): Import from w3m-util.el to suppress byte-compile warnings. * w3m-util.el (w3m-parse-attributes): Accept XHTML format of boolean atttibutes. (w3m-display-progress-message): Export to w3m.el. 2005-03-03 ARISAWA Akihiro * w3m.el (w3m-url-readable-string): An expression is evaluated without checking type. 2005-03-03 TSUCHIYA Masatoshi * w3m.el (w3m-show-decoded-url): Update its customize spec to use it as the rule set to decode URIs when displaying them. Changed its default value. (w3m-url-readable-string): New function to process the above option. (w3m-make-help-echo, w3m-make-balloon-help): Do not accept `url-decode' option, and use the above function to decore URIs. (w3m-fontify-anchors): Follow the above change. (w3m-print-current-url, w3m-print-this-url): Call the above function. (w3m-make-url-decode-function): Removed. (w3m-entity-alist, w3m-about-history): Remove redundant `function'. For more detail, see http://www.mew.org/~kazu/doc/elisp/function.html. 2005-03-03 Katsumi Yamaoka * w3m.el (w3m-modeline-title-string): New variable. (w3m-modeline-title-timer): New variable. (w3m-modeline-title): New function used to truncate the title string not to cut the right end of the mode line. Works only with Emacs 22 and newer. (w3m-buffer-setup): Use it. 2005-03-03 Katsumi Yamaoka * w3m.el (w3m-make-help-echo): Make it work with XEmacs. (w3m-make-balloon-help): Support decoding URIs. (w3m-fontify-anchors): Make the balloon-help show decoded URIs. 2005-03-02 ARISAWA Akihiro * w3m.el (w3m-show-decoded-url): New user option. (w3m-make-url-decode-function): New inline function. (w3m-make-help-echo): Use it. (w3m-fontify-anchors): The function of help-echo property has an ability to decode url. 2005-03-01 Katsumi Yamaoka * w3m-xmas.el (w3m-decode-coding-string-with-priority): New function. * w3m.el (w3m-url-decode-string): Use it. 2005-03-01 Hideyuki SHIRAI * w3m.el (w3m-w3m-attributes-1): Support `300 Multiple Choices'. (w3m-w3m-retrieve): Ditto. (w3m-w3m-retrieve-1): Ditto. 2005-02-28 Katsumi Yamaoka * w3m-xmas.el (w3m-detect-coding-region): Use the name of the coding system instead of the coding category if it is void. * w3m-util.el (w3m-set-match-data): New macro which converts points into markers under XEmacs. (w3m-search-tag-1): Use it. * w3m-e19.el: Autoload easymenu in order to avoid compile warning. * w3m-om.el: Ditto. 2005-02-25 Hideyuki SHIRAI * w3m.el (all): Use `w3m-form-set-number' and `w3m-form-kill-buffer' instead of `w3m-form-textarea-set-number' and `w3m-form-textarea-kill-buffer' * w3m-form.el (w3m-form-input-select-urlid): New buffer local variable. (w3m-form-input-map-urlname): Ditto. (w3m-form-set-number): Rename from `w3m-form-textarea-set-number' and treate buffers of `select' and `map'. (w3m-form-kill-buffer): Ditto. (w3m-form-input-select-set): Allways remove own buffer. (w3m-form-input-select-exit): Ditto. (w3m-form-input-map-set): Ditto. (w3m-form-input-map-exit): Ditto. (w3m-form-input-select): When exists same from buffer, use it. (w3m-form-input-map): Ditto. 2005-02-25 Katsumi Yamaoka * w3mhack.el (w3mhack-what-where): Fix the form. (w3mhack-makeinfo): Silence it when formatting @multitable section. 2005-02-25 Hideyuki SHIRAI * w3m.el (top): Add autoloads of `w3m-form-textarea-kill-buffer' and `w3m-form-textarea-set-number' to avoid byte-compile warnings. (w3m-delete-buffer): Call `w3m-form-textarea-kill-buffer' when use form. (w3m-delete-other-buffers): Ditto. (w3m-quit): Ditto. (w3m-select-buffer-delete-buffer): Ditto. (w3m-pack-buffer-numbers): Call `w3m-form-textarea-set-number' when use form. * w3m-form.el (top): Move all buffer local variables on the top to avoid byte-compile warnings. (w3m-form-parse-and-fontify): Set `w3m-form-use-textarea-backup-p' to nil. (w3m-form-input-textarea-save): Use `w3m-form-use-textarea-backup-p' instead of `w3m-form-use-textarea-backup'. (w3m-form-input-textarea-set): Allways remove textarea buffer and window. (w3m-form-input-textarea-exit): Ditto. (w3m-form-input-textarea): Check to call for backup. Check identity of existed textarea buffer and w3m buffer. Treat `w3m-form-use-textarea-backup-p'. (w3m-form-use-textarea-backup-p): New function. (w3m-form-textarea-set-number): Ditto. (w3m-form-textarea-kill-buffer): Ditto. (w3m-form-submit-get-textarea-files): If no backup, return nil. 2005-02-24 Katsumi Yamaoka * w3m-util.el: Autoload cancel-timer for XEmacs. * w3m-xmas.el (w3m-run-at-time): Use run-at-time which comes from timer-funcs.el if it seems to work correctly. (cancel-timer): Defun if it is void. 2005-02-24 Katsumi Yamaoka * doc/ptexinfmt.el (texinfo-multitable-widths): Reverse the logic that shows whether it is broken. * w3m-util.el: Autoload regexp-opt for Emacs 19. * w3mhack.el (w3mhack-makeinfo): Load poe for Emacs 19. 2005-02-24 Romain Francoise * w3m.el (w3m-lynx-like-map): Bind [follow-link] so as to make mouse-1 work in Emacs 22 like mouse-2. (w3m-info-like-map): Ditto. 2005-02-23 Hideyuki SHIRAI * w3m-antenna.el (w3m-antenna-check-rss): Parse all date fields. 2005-02-21 TSUCHIYA Masatoshi * w3m-form.el (w3m-form-input-textarea): Fix. 2005-02-21 Tsuyoshi CHO , Hideyuki SHIRAI * w3m-form.el (w3m-form-input-textarea-mode-setup): Fix. (w3m-form-input-textarea): Follow the above change. 2005-02-21 TSUCHIYA Masatoshi * w3m-form.el (w3m-form-textarea-edit-mode): Changed its default value to `text-mode'. 2005-02-21 Katsumi Yamaoka * Makefile.in (install-package): Change the default directory in which icon files will be installed from `etc/w3m/icons/' into `etc/images/w3m/' following the most recent Emacs and Gnus. (install-package-ja): Ditto. * aclocal.m4 (AC_EXAMINE_PACKAGEDIR): Use configure-package-path. (AC_PATH_ICONDIR): Change the default directory in which icon files will be installed from `etc/w3m/icons/' into `etc/images/w3m/' following the most recent Emacs and Gnus. * w3m.el (w3m-icon-directory): Improve the way to determin the default value. * w3mhack.el (w3mhack-nonunix-install): Change the default directory in which icon files will be installed from `etc/w3m/icons/' into `etc/images/w3m/' following the most recent Emacs and Gnus. (w3mhack-make-package): Ditto. (w3mhack-what-where): Ditto. 2005-02-16 Katsumi Yamaoka * w3m-lnum.el: Rename from w3m-link-numbering.el. * mime-w3m.el: Load mime-parse.el before mime.el and w3m.el when compiling rather than always loading mime.el and w3m.el. 2005-02-16 TSUCHIYA Masatoshi * w3m-form.el: Changes to define `w3m-form-input-textarea-mode' as a minor mode. (w3m-form-textarea-edit-mode): New option. (w3m-form-input-textarea-map): Renamed from `w3m-form-input-textarea-keymap'. (w3m-form-input-textarea-mode) [variable]: New internal variable. (w3m-form-input-textarea-mode) [function]: Reconstructed. (w3m-form-input-textarea-mode-setup): New function. (w3m-form-input-textarea): Clean up. 2005-02-15 Katsumi Yamaoka * aclocal.m4 (AC_PATH_EMACS): Show the correct Emacs version. * mime-w3m.el: Always require mime and w3m instead of to autoload mime-parse.el. * w3m-bitmap.el: Bind w3m-work-buffer-list when compiling. * w3m-proc.el: Silence the byte compiler complaining against gensym. * w3m-rss.el: Use eval-and-compile in order to autoload timezone.el. * w3m.el (w3m-treat-drive-letter): Use eval-and-compile. (w3m-touch-file-available-p): Move forward. (w3m-touch-file): Ditto. (w3m-expand-path-name): Use eval-and-compile. (w3m-window-hscroll): Ditto. (w3m-current-column): Ditto. (w3m-set-window-hscroll): Ditto. (w3m-add-local-hook): Silence the byte compiler. (w3m-run-at-time): Use eval-and-compile. * w3mhack.el: Remove the code used to silence the byte compiler which complains make-local-hook is obsolete. (w3mhack-makeinfo): Silence XEmacs when formatting Infos. * octet.el: Require cl when compiling. * w3m-filter.el: Ditto. * w3m-fsf.el: Ditto. * w3m-link-numbering.el: Ditto. * w3m-namazu.el: Ditto. 2005-02-14 Katsumi Yamaoka * w3m.el: Load w3m-e23.el for Emacs 23. * w3mhack.el (w3mhack-module-list): Use w3m-e23.el for Emacs 23. * w3m-e23.el: Rename from w3m-e22.el. 2005-02-10 Katsumi Yamaoka * w3m.el: Load w3m-e21.el even if the version of Emacs is 22.x when the Emacs CVS HEAD is used. * w3mhack.el (w3mhack-module-list): Prefer w3m-e21.el rather than w3m-e22.el if the Emacs CVS HEAD is used. 2005-02-06 TSUCHIYA Masatoshi * w3m-antenna.el (w3m-antenna-html-skelton): Fix typo. (w3m-antenna-make-contents): Replace %D to the modified time of `w3m-antenna-file'. 2005-02-02 Katsumi Yamaoka * w3m.el (w3m-gmane-url-at-point): New function. (w3m-url-at-point): Use it. 2005-01-30 Yoichi NAKAYAMA * w3m.el (w3m-attributes): Support cid urls. (w3m-external-view): Ditto. 2005-01-27 Katsumi Yamaoka * w3m-e21.el (w3m-force-window-update): Make it work whatever the value for the resize-mini-windows variable is. (w3m-update-tab-line): Ditto. 2005-01-25 Katsumi Yamaoka * w3m-rss.el (w3m-rss-parse-date-string): Support the date format in the RFC822 style which RSS 2.0 allows. Suggested by David Hansen . 2005-01-23 TSUCHIYA Masatoshi * w3m-e21.el (w3m-force-window-update, w3m-update-tab-line): Call `enlarge-window' before calling `shrink-window', in order to avoid deleting sole window. 2005-01-19 ARISAWA Akihiro * w3m.el (w3m-content-type-alist): Check if "fiber.exe" is exist. 2005-01-17 ARISAWA Akihiro * w3m-form.el (w3m-form-parse-and-fontify): Check if w3m-current-url is available. 2004-07-24 Tsuyoshi CHO * w3m.el (w3m-menubar): Rearrange it hierarchical. (w3m-setup-menu): Use easymenu. 2005-01-10 Hideyuki SHIRAI * w3m-form.el (w3m-form-input-textarea): Modify string of the inquiry. 2005-01-07 Hideyuki SHIRAI * w3m.el (w3m-goto-url): Call `w3m-form-textarea-files-remove' if necessary. * w3m-util.el (w3m-compare-strings): New define. * w3m-form.el (w3m-form-textarea-file-expire-date): Modify Document. (w3m-fontify-textareas): Put `w3m-form-file-name' property. (w3m-form-textarea-files, w3m-form-textarea-post-files): New buffer local variable. (w3m-form-parse-and-fontify): Set `w3m-form-textarea-files'. Put `w3m-form-file-name' property on the form of textarea. (w3m-form-input-textarea): Use same textarea buffer if exist. Don't ask user if don't modify its area without tailed white space. Visible the editted text when ask user. Guard against 'C-g'. Added `w3m-form-textarea-file-cleanup' to hook as `kill-emacs-hook' (w3m-form-textarea-same-check): New function. (w3m-form-textarea-file-cleanup): Remove myself from `kill-emacs-hook'. (w3m-form-textarea-files-remove): New function. (w3m-form-submit-get-textarea-files): Ditto. (w3m-form-submit): Set `w3m-form-textarea-post-files' for removing files. (w3m-form-resume): Check `selects' is cons. 2005-01-05 Katsumi Yamaoka * doc/Makefile.in (.texi.info): Set LC_ALL=C. 2004-12-29 Hideyuki SHIRAI * w3m.el (w3m-quit): Call `w3m-form-textarea-file-cleanup'. (w3m-view-this-url-1): Revert final change. * w3m-form.el (w3m-form-textarea-file-expire-date): New user option. (w3m-form-textarea-file-cleanup): New function. 2004-12-28 Hideyuki SHIRAI * w3m-form.el (w3m-form-use-textarea-backup): New user option. (w3m-form-textarea-directory): Ditto. (w3m-form-get-coding-system): New function. (w3m-form-make-form-data): Use `w3m-form-get-coding-system'. (w3m-form-input-textarea-keymap): Define "C-xC-s" to `w3m-form-input-textarea-save'. (w3m-form-input-textarea-file): New variable. (w3m-form-input-textarea-coding-system): Ditto. (w3m-form-input-textarea-filename): New function. (w3m-form-input-textarea-save): Ditto. (w3m-form-input-textarea-set): Call `w3m-form-input-textarea-save'. (w3m-form-input-textarea-exit): Ditto. (w3m-form-input-textarea-mode): Modify doc-string. (w3m-form-input-textarea): Handling filename and coding-system. 2004-12-27 Hideyuki SHIRAI * w3m.el (w3m-view-this-url-1): Revert 2004-12-17 change. The buffer seems empty killed before to restore window configuration. Restore the position and window-start if last window equal current-window. 2004-12-24 Hideyuki SHIRAI * w3m-hist.el (w3m-history-restore-position): Handling the window of w3m for sure absolutely. 2004-12-23 Katsumi Yamaoka * w3mhack.el (w3mhack-makeinfo): Revert. 2004-12-22 Katsumi Yamaoka * w3mhack.el (w3mhack-makeinfo): Bind undo-outer-limit. 2004-12-17 Hideyuki SHIRAI * w3m.el (w3m-fontify-anchors): Local file is given special treatment for `href'. Fix match data of `href'. (w3m-view-this-url-1): If the points of window was treated in w3m-goto-url(), now reconstruct window configuration. 2004-12-16 Katsumi Yamaoka * w3m-e21.el (w3m-update-tab-line): Wobble the window size instead of setting the cursor color. 2004-12-15 Hideyuki SHIRAI * w3m-namazu.el (w3m-namazu): Added optional argument `reload'. 2004-12-14 Katsumi Yamaoka * w3m-util.el (w3m-tag-regexp-of): Remove. (w3m-search-tag-1): New function. (w3m-search-tag): New macro. * w3m-form.el (w3m-form-parse-and-fontify): Use w3m-search-tag instead of w3m-tag-regexp-of. 2004-12-10 Hideyuki SHIRAI * w3m.el (w3m-fontify-anchors): Use 'w3m-name-anchor2 property to avoid overriding 'w3m-name-anchor property. (w3m-search-name-anchor): Search 'w3m-name-anchor2 property if not detect 'w3m-name-anchor property. 2004-12-03 Katsumi Yamaoka * w3m-form.el (w3m-form-parse-and-fontify): Ignore a select form in the case where w3mmee is running if its value is not specified. Reported by Clemens Fischer . * w3mhack.el (labels): Remove. 2004-11-26 Katsumi Yamaoka * w3mhack.el (labels): A temporary substitution against the Emacs CVS bug. 2004-11-26 TSUCHIYA Masatoshi * w3m-form.el (w3m-form-resume): Check whether a form exists, before resuming its values from its history. 2004-11-21 TSUCHIYA Masatoshi * w3m-rss.el: New file. * w3m-antenna.el (w3m-antenna-check-rss): New function. (w3m-antenna-sites): Improve its customize spec to support `w3m-antenna-check-rss'. * w3m.el (w3m-content-type-alist): Add text/xml, application/xml, application/rdf+xml, and application/rss+xml. (w3m-detect-xml-charset): New function. (w3m-decode-buffer): Use the above function when decoding XML contents. 2004-11-19 Katsumi Yamaoka * w3m.el (w3m-redisplay-this-page): Don't make a new history. 2004-11-17 Hideyuki SHIRAI * w3m.el (w3m-output-coding-system): Use `utf-8' if Emacs has internal utf-8 only. (w3m-input-coding-system): Revert last change. (w3m-halfdump-command-arguments): Bind `fix_width_conv' and `use_jisx0201' when w3m-m17n. 2004-11-16 Hideyuki SHIRAI * w3m.el (w3m-input-coding-system): Use `utf-8' if Emacs has internal utf-8, it has no Mule-UCS and w3m-type is `w3m-m17n'. 2004-11-15 Katsumi Yamaoka * w3m-form.el (w3m-char-to-int, w3m-string-to-char-list, w3m-int-to-char): Silence byte-compiler. * w3m-ccl.el (charset-id): Ditto. * w3m-tabmenu.el (w3m-tab-menubar-update): Don't let iswitchb manage the w3m tab menubar. 2004-10-27 Hideyuki SHIRAI * w3m.el (w3m-check-refresh-attribute): Support own page reload. (w3m-goto-url-with-timer): Ditto. 2004-10-27 Katsumi Yamaoka * aclocal.m4 (AC_ADD_LOAD_PATH): Clarify the error message. 2004-10-26 Katsumi Yamaoka * w3m-xmas.el (call-process-region): Add an advice in order to fix an XEmacs 21.5.18 bug. * w3mhack.el (call-process-region): Ditto. 2004-10-25 Hideyuki SHIRAI * w3m.el (w3m-check-refresh-attribute): Fix to analyze the URL. 2004-10-21 Katsumi Yamaoka * w3m.el (w3m-touch-file): Protect against the absence of file-name-coding-system and default-file-name-coding-system. 2004-10-20 Hideyuki SHIRAI * w3m.el (w3m-buffer-setup): Modify `mode-line-buffer-identification'; display "Loading..." instead of `w3m-current-titile' when process of w3m active. 2004-10-16 ARISAWA Akihiro * w3m.el (w3m-touch-file): Use `set-file-times' if available; bind `coding-system-for-write' while calling `w3m-touch-command'. 2004-10-08 TSUCHIYA Masatoshi * w3m-perldoc.el (w3m-perldoc-input-coding-system) (w3m-perldoc-output-coding-system): New options. (w3m-about-perldoc): Use the above options, to display both modules encoded in EUC-JP and ones encoded in UTF-8 correctly. 2004-10-08 Katsumi Yamaoka * w3m-e21.el (w3m-tab-line): Replace "%" with "%%" in w3m-tab-line-format. 2004-10-07 Katsumi Yamaoka * w3m.el (w3m-retrieve): Add autoload cookie. 2004-10-03 TSUCHIYA Masatoshi * w3m-search.el (w3m-search-engine-alist): Add the parameter `ie=Shift_JIS' to Google for Japanese users. 2004-09-21 Hideyuki SHIRAI * w3m-antenna.el (w3m-about-antenna): Revert 2004-09-16 change. 2004-09-16 Hideyuki SHIRAI * w3m-antenna.el (w3m-about-antenna): Change the method to compare an arrived time to a last-modified time. 2004-09-07 Katsumi Yamaoka * w3m.el (w3m-goto-url): Don't make a new history when reloading. (w3m-reload-this-page): Ditto. * w3m-hist.el (w3m-history-restore-position): Don't cause an error even if a page has shrunk. 2004-08-17 TSUCHIYA Masatoshi * Release emacs-w3m-1.4.3 from emacs-w3m-1_4 branch. 2004-08-15 Kazuhiro UCHIDA * w3m.el (w3m-remove-meta-charset-tags): Check that a content field has a valid value before parsing it. 2004-08-12 Romain Francoise * w3m.el (w3m-relationship-estimate-rules): Improve regexp for Google in order to make the scroll-to-next-page feature work on Google Groups as well. 2004-08-12 Katsumi Yamaoka * w3m.el (w3m-relationship-estimate-rules): Fix regexp for Google. Suggested by Romain Francoise . 2004-08-02 TAKAHASHI Kaoru * doc/ptexinfmt.el (slanted): Rename @s to @slanted. 2004-07-30 Romain Francoise Enable emacs-w3m to be built with Emacs --without-x. * w3m-e21.el (image-size): Alias to ignore if it is not available. * w3m-favicon.el (w3m-favicon-type): Don't use image-types if it is not available. * w3m.el (mouse-set-point): Autoload mouse.elc. 2004-07-20 TAKAHASHI Kaoru * doc/ptexinfmt.el: Support @s. 2004-07-14 TSUCHIYA Masatoshi * Release emacs-w3m-1.4.2 from emacs-w3m-1_4 branch. * w3m.el (w3m-w3m-canonicalize-url): Revival. (w3m-w3m-attributes, w3m-w3m-retrieve): Call the above. (w3m-canonicalize-url): Do not check a slash. 2004-07-12 TSUCHIYA Masatoshi * w3m.el (w3m-detect-meta-charset): Check that a content field has a valid value before parsing it. 2004-07-08 ARISAWA Akihiro Suggested by Tatsuya Kinoshita * w3m.el (w3m-correct-charset-alist): Reverse "windows-125x" and "cp125x". 2004-07-07 TSUCHIYA Masatoshi * Release emacs-w3m-1.4.1 from emacs-w3m-1_4 branch. 2004-07-06 TSUCHIYA Masatoshi * w3m-weather.el: Reconstructed to follow the change of site design. (w3m-weather-completion-table, w3m-weather-filter-functions): Update. (w3m-weather-extract-contents, w3m-weather-adjust-contents): New functions. (w3m-weather-remove-headers, w3m-weather-remove-footers, w3m-weather-get-seikatu-sisu, w3m-weather-insert-seikatu-sisu): Removed. 2004-06-28 Katsumi Yamaoka * w3m.el (w3m-canonicalize-url): Don't make sure arg is a string. (w3m-input-url): Don't use w3m-canonicalize-url for non-string url which may be the symbol popup. 2004-06-25 TSUCHIYA Masatoshi * w3m.el (w3m-canonicalize-url): New function. (w3m-input-url, w3m-browse-url): Call the above. (w3m-w3m-canonicalize-url): Abolished. (w3m-w3m-attributes, w3m-w3m-retrieve): Do not call the abolished function. (w3m-url-hierarchical-schemes): Add `ftps'. 2004-06-24 Katsumi Yamaoka * w3m-util.el (w3m-add-w3m-initial-frames): Share the opened frame in w3m-initial-frames over all emacs-w3m buffers if w3m-use-tab is non-nil. (w3m-delete-w3m-initial-frames): New function; add it to delete-frame-functions or delete-frame-hook, or merge into delete-frame using defadvice. (w3m-delete-frames-and-windows): Return to the former buffer after performing walk-windows; don't manage w3m-initial-frames. * w3m.el (w3m-delete-buffer): Don't manage w3m-initial-frames. 2004-06-14 Yoichi NAKAYAMA * w3m.el (TopLevel): Display meaningful message when w3m-command is nil. 2004-06-21 ARISAWA Akihiro * w3m.el (w3m-fontify): Call `w3m-replace-symbol' before `w3m-fontify-anchors' in order not to lose text properties. 2004-06-14 Katsumi Yamaoka * w3m.el (w3m): Run w3m-mode before popping to the newly created buffer up. 2004-06-12 ARISAWA Akihiro * w3m.el (w3m-output-coding-system): Change default value for w3m-m17n. * w3m-bug.el (report-emacs-w3m-bug-system-informations): Add w3m-input-coding-system and w3m-output-coding-system. 2004-06-11 ARISAWA Akihiro * w3m.el (w3m-meta-content-type-charset-regexp) (w3m-meta-charset-content-type-regexp) (w3m-meta-refresh-content-regexp) (w3m-meta-content-refresh-regexp): Removed. (w3m-detect-meta-charset, w3m-remove-meta-charset-tags) (w3m-check-refresh-attribute): Use `w3m-parse-attributes' instead of above regexp. (w3m-rendering-buffer): Don't call `w3m-remove-meta-charset-tags' for w3m-m17n. 2004-06-08 Katsumi Yamaoka * w3m.el (w3m-make-new-session): Doc fix. (w3m-safe-view-this-url): Use w3m-goto-url-new-session only when a user invokes this command in a buffer not being running the w3m-mode. 2004-06-07 Masatake YAMATO * w3m-hist.el (w3m-history-store-position): Fix a wrong message. 2004-06-07 TSUCHIYA Masatoshi * w3m-filter.el (w3m-filter-rules): Relax the condition. 2004-06-07 Katsumi Yamaoka * w3m.el (w3m-make-new-session): Doc fix. (w3m-safe-view-this-url): Use w3m-goto-url-new-session instead of w3m-goto-url when w3m-make-new-session is non-nil. 2004-06-04 Katsumi Yamaoka * w3m.el (w3m-make-new-session): New user option. (w3m): Make a new emacs-w3m buffer if w3m-make-new-session is non-nil and a user specifies a url string. 2004-06-02 Katsumi Yamaoka * w3m-util.el (w3m-popup-buffer): Don't use focus-frame in Emacs. 2004-06-01 Katsumi Yamaoka * w3m-proc.el (w3m-process-wait-discard-input): Abolish. (w3m-process-wait-process): Don't use accept-process-output to make it possible to show progress messages; discard key press events while waiting for finishing of a process. 2004-05-24 ARISAWA Akihiro * w3m-form.el (w3m-form-put-by-name): Overwrite ID value when a name is found. 2004-05-22 ARISAWA Akihiro * w3m.el (w3m-fontify): Remove tags in the form element except for textarea. 2004-05-18 Katsumi Yamaoka Suggested by Yoichi NAKAYAMA * w3m-util.el (w3m-replace-in-string): New function which is a copy of shimbun-replace-in-string. * w3m.el (w3m-active-region-or-url-at-point): Use it; remove all whitespace in region. 2004-05-18 Hideyuki SHIRAI * mew-w3m.el (mew-w3m-view-inline-image): Bind mew-use-text/html as t. 2004-05-14 Katsumi Yamaoka * w3m.el (w3m-home-page): Improve the customizing widget. 2004-05-13 Katsumi Yamaoka * w3m.el (w3m-expand-url): Bind file-name-handler-alist as nil. 2004-05-13 Katsumi Yamaoka * w3m.el (w3m-arrived-ignored-regexp): Add about:blank. (w3m-history-ignored-regexp): Ditto. (w3m-about-retrieve): Ditto. (w3m-buffer-setup): Prefer the last visited emacs-w3m buffer. 2004-05-12 TSUCHIYA Masatoshi * w3m-filter.el (w3m-filter-rules): Update its default value and its customize spec. 2004-05-12 Katsumi Yamaoka * w3m.el (w3m-w3m-dump-extra): Examine image data briefly to detect only gif, jpeg and png by itself. * w3m-util.el (w3m-image-type-from-data): Abolish. 2004-05-12 TSUCHIYA Masatoshi * w3m.el (w3m-w3m-dump-extra): Check only 300 bytes at the top of the data. 2004-05-12 Katsumi Yamaoka * w3m-util.el (w3m-image-type-from-data): New function. Suggested by KOSEKI Yoshinori . * w3m.el (w3m-w3m-dump-extra): Use it. 2004-05-11 Katsumi Yamaoka * w3m-proc.el (w3m-process-start-process): Use set-process-query-on-exit-flag if it is available. * w3m.el (w3m-w3m-dump-extra): Trust the magic at the beginning of image data rather than the content-type header. 2004-05-11 TSUCHIYA Masatoshi * w3m.el (w3m-copy-buffer): Prefer cached contents without checking their validity. 2004-05-01 TSUCHIYA Masatoshi * w3m-proc.el (w3m-process-waited): Revival. (w3m-process-with-wait-handler): Set t to the above. * w3m.el (w3m-w3m-dump-extra): Check the above. 2004-04-30 TSUCHIYA Masatoshi * w3m.el (emacs-w3m-version): Reset. 2004-04-29 TSUCHIYA Masatoshi * Release emacs-w3m-1.4 from emacs-w3m-1_4 branch. * Makefile.in (install-package): Install w3m-load.el. (dist, tarball): Reimplemented, in order to keep time stamps of source files. * w3mhack.el (w3mhack-generate-xemacs-load-file): Simplified. 2004-04-28 Katsumi Yamaoka * w3mhack.el (w3mhack-generate-xemacs-load-file): Replace `replace-string' with basic functions. 2004-04-28 TSUCHIYA Masatoshi * w3mhack.el (w3mhack-generate-xemacs-load-file): New function. (w3mhack-make-package): Use `w3mhack-generate-xemacs-load-file. 2004-04-28 Katsumi Yamaoka * w3mhack.el (w3mhack-update-files-autoloads): New function. (w3mhack-generate-load-file): Use `w3mhack-update-files-autoloads'. 2004-04-28 TSUCHIYA Masatoshi * Makefile.in (tarball): Remove w3m-kwds.el and w3m-load.el. * configure.in, aclocal.m4: Add `--with-xml' option. * w3mhack.el (w3mhack-module-list): New function. (w3mhack-examine-modules): Use the above. (w3mhack-compile): Use `w3mhack-module-list' instead of `w3mhack-examine-modules'. (w3mhack-generate-load-file): Likewise; Insert ^L to avoid an error of `update-file-autoloads' of old emacsen. 2004-04-28 Katsumi Yamaoka * w3m.el (w3m-treat-image-size): Default to t. * w3m-filter.el (w3m-filter-asahi-shimbun): Use marker to limit the search bound. 2004-04-27 Katsumi Yamaoka * w3mhack.el (w3mhack-generate-load-file): Save w3m-load.el file before performing `update-file-autoloads'. 2004-04-27 TSUCHIYA Masatoshi * Makefile.in (install-lisp): Do not install w3mhack.el. (install-package): Install neither w3mhack.el nor w3m-load.el. 2004-04-27 Katsumi Yamaoka * w3m.el (w3m-treat-image-size): Default to nil. (w3m-rendering-half-dump): Fix a logic determining whether to specify `-ppl' and `-ppc' options to the w3m command. 2004-04-27 TSUCHIYA Masatoshi * w3mhack.el: Create w3m-load.el. (w3mhack-load-file): New variable. (w3mhack-examine-modules): Ignore `w3mhack-load-file'. (w3mhack-generate-load-file): New function. (w3mhack-compile): Call the above. * .cvsignore: Ignore w3m-load.el. * Makefile.in (clean): Remove w3m-load.el. 2004-04-25 Katsumi Yamaoka * w3m.el (w3m-expand-path-name): In Emacs, don't bind directory-sep-char which is an obsolete variable. 2004-04-24 TSUCHIYA Masatoshi * w3m.el, w3m-favicon.el: Move snippets managing `w3m-arrived-setup-functions' and `w3m-arrived-shutdown-functions' from w3m.el into w3m-favicon.el. 2004-04-23 TSUCHIYA Masatoshi * w3m-antenna.el (w3m-antenna-hns-last-modified): Use 32400 as a correct timezone instead of JST (suggested by YAMAOKA-san). 2004-04-22 Christian Schmitt * w3m.el (w3m-expand-path-name): Bind directory-sep-char to `?/'. It is `?\' by default in XEmacs on Windows (native, not Cygwin). 2004-04-22 Katsumi Yamaoka * w3m.el (w3m-use-symbol): Don't activate it in Emacs 20. Advised by Arisawa-san. 2004-04-21 TSUCHIYA Masatoshi * w3m.el: Simplify the rule of sending referers. (w3m-add-referer-regexps): Abolished. (w3m-add-referer-predicate-function): Abolished. (w3m-add-referer): New option. (w3m-add-referer-p): New function. (w3m-add-referer-predicate-by-referer-regexps): Removed. (w3m-add-referer-predicate-by-hosts): Removed. (w3m-request-arguments, w3m-header-arguments): Follow the above changes. 2004-04-21 Katsumi Yamaoka * w3m-util.el (w3m-add-w3m-initial-frames): Get the correct value for the newly created frame in Emacs 19. * w3m.el (w3m-about-retrieve): Load base64 for Emacs 19. (w3m-minor-mode-command-alist): Add w3m-print-this-url. * w3m-bitmap.el (w3m-bitmap-image-insert): Don't put the evaporate property on empty overlays (revert 2004-04-07 change). 2004-04-20 TSUCHIYA Masatoshi * w3m-link-numbering.el (w3m-view-numbered-link): Removed. (w3m-move-numbered-anchor): New command. (w3m-link-numbering-mode-map): Use `w3m-move-numbered-anchor' instead of `w3m-view-numbered-link'. 2004-04-19 TSUCHIYA Masatoshi * w3m.el (w3m-input-coding-system): Use `w3m-output-coding-system' as its default value for w3m-m17n and w3mmee. (w3m-halfdump-command-arguments): Use "-I" option to disable automatic-detection of coding systems for w3m-m17n and w3mmee. 2004-04-16 ARISAWA Akihiro * w3m.el (w3m-meta-refresh-content-regexp): Allow quoted string as url. (w3m-meta-content-refresh-regexp): Ditto. (w3m-check-refresh-attribute): Decode entities. 2004-04-15 Katsumi Yamaoka * w3m-link-numbering.el (w3m-link-numbering): Quit when links have already been numbered. 2004-04-14 TSUCHIYA Masatoshi * w3m-link-numbering.el (w3m-link-numbering-mode): Delete all overlays that display link numbers, when deactivating. 2004-04-14 Katsumi Yamaoka * w3m-link-numbering.el (w3m-link-numbering): Add face to before-string correctly under XEmacs; don't bother to delete overlays (suggested by TSUCHIYA-san). 2004-04-14 Hideyuki SHIRAI * w3m-link-numbering.el (w3m-link-numbering-face): New face. (w3m-link-numbering): Use it. 2004-04-14 TSUCHIYA Masatoshi * w3m-link-numbering.el: New file. * w3m.el (w3m-browse-url): Load `browse-url' before calling `browse-url-interactive-arg'. 2004-04-12 TAKAHASHI Kaoru * doc/ptexinfmt.el: Support @indicateurl, @LaTeX, @ordf, @ordm. @url is now a synonym for @uref. 2004-04-12 Katsumi Yamaoka * w3m.el (w3m-fontify-anchors): No need to enable evaporation of overlays in XEmacs. 2004-04-08 Hiroya Murata * w3m.el (w3m-delete-all-overlays): Revert. (w3m-highlight-current-anchor): Ditto. 2004-04-07 Katsumi Yamaoka * w3m.el (w3m-delete-all-overlays): Remove. 2004-04-07 Masatake YAMATO * w3m-bitmap.el (w3m-bitmap-image-insert): Enable the evaporate property on overlays. * w3m-e21.el (w3m-form-make-button): Enable the evaporate property on buttun overlays. * w3m.el (w3m-fontify-anchors): Ditto. (w3m-create-text-page): No need to delete zombie overlays. (w3m-create-image-page): Ditto. (w3m-highlight-current-anchor-1): Enable the evaporate property on overlays. (w3m-highlight-current-anchor): No need to delete overlays. 2004-04-07 Katsumi Yamaoka * w3m.el (w3m-rendering-extract-title): Remove too much whitespace. 2004-04-05 Katsumi Yamaoka * w3m.el (w3m-delete-all-overlays): Simply delete all overlays if the optional arg is given. (w3m-create-text-page): Delete zombie overlays. (w3m-create-image-page): Ditto. 2004-04-04 Katsumi Yamaoka * w3m-search.el (w3m-search-engine-alist): Improve custom. 2004-04-04 ARISAWA Akihiro * w3m-search.el (w3m-search-engine-alist): Add "amazon" entry. 2004-03-31 Yuya Nishida * w3m-search.el (w3m-search-engine-alist): Add "amazon-ja" entry; "PostData" can be specified. (w3m-search): Support post-data. 2004-04-04 ARISAWA Akihiro * w3m.el (w3m-header-arguments): Set unibyte at work buffer. * w3m-form.el (w3m-form-make-form-data): Set unibyte at work buffer; Encode form data. 2004-03-22 ARISAWA Akihiro * w3m.el (w3m-type): Check if w3m-compile-options contains "m17n". 2004-03-19 Yuuichi Teranishi * w3m.el (w3m-add-referer-regexps): Fix typo. (w3m-add-referer-predicate-function): New user option. (w3m-add-referer-predicate-by-referer-regexps): New function. (w3m-add-referer-predicate-by-hosts): Ditto. (w3m-request-arguments): Call w3m-add-referer-predicate-function. (w3m-header-arguments): Ditto. * octet.el (mime-view-octet): Avoid redundant invocation of `mime-entity-content'. 2004-03-14 ARISAWA Akihiro * w3m-symbol.el (w3m-mule-unicode-symbol): Fixed 32th character. Thanks to Taichi KAWABATA for his report. 2004-03-06 TSUCHIYA Masatoshi * w3m-weather.el (w3m-weather-get-seikatu-sisu): Relax regular expressions to extract indices, to follow the change of the site design. 2004-03-01 Katsumi Yamaoka * w3m-e21.el (w3m-force-window-update): New function. (w3m-tab-drag-mouse-function, w3m-tab-click-mouse-function, w3m-tab-line, w3m-e21-switch-to-buffer, w3m-select-buffer-hook): Use `w3m-force-window-update' instead of `w3m-e21-wobble-window-size'. (w3m-e21-wobble-window-size): Abolish. * w3m-favicon.el (w3m-favicon-retrieve): Use `w3m-force-window-update'. * w3m-proc.el: Autoload `w3m-force-window-update' when compiling. (w3m-process-stop): Use `w3m-force-window-update'. * w3m.el (w3m-select-buffer-show-this-line): Use `w3m-force-window-update'. 2004-02-27 TSUCHIYA Masatoshi * w3m.el (emacs-w3m-version): Release 1.3.85. 2004-02-27 Katsumi Yamaoka * w3m-e21.el (w3m-tab-drag-mouse-function): Call `w3m-e21-wobble-window-size'. (w3m-tab-click-mouse-function): New function. (w3m-tab-make-keymap): Use it. 2004-02-27 Hideyuki SHIRAI * w3m-form.el (w3m-form-mee-new): Use `w3m-form-normalize-action' for action. 2004-02-26 Katsumi Yamaoka * w3m.el (w3m-select-buffer-show-this-line): Call `w3m-e21-wobble-window-size' when Emacs 21 or 22 is running. * w3m-e21.el (w3m-tab-line-format): Make it buffer-local variable. (w3m-tab-timer): Ditto. (w3m-e21-wobble-window-size): New function. (w3m-tab-line): Make `w3m-tab-timer' hold boolean value; let a timer function run certainly in a buffer in which a timer started; use `w3m-e21-wobble-window-size'. (w3m-e21-switch-to-buffer): New command. (w3m-e21-subst-switch-to-buffer-keys): New function. (w3m-mode-setup-functions): Add `w3m-e21-subst-switch-to-buffer-keys'. (w3m-select-buffer-hook): Add `w3m-e21-wobble-window-size'. (w3m-spinner-image-index): Make it buffer-local variable. 2004-02-25 Hideyuki SHIRAI * w3m-form.el (w3m-form-make-form-data): Align form by the number of `hseq'. 2004-02-24 TSUCHIYA Masatoshi * w3m-antenna.el (w3m-antenna-sites): Add `w3m-antenna-check-another-page' to its customize spec. (w3m-antenna-check-another-page): New function. (w3m-about-antenna): Relaxed the condition to check changed sites. (w3m-antenna-add): Add a new site at the end of `w3m-antenna-sites' instead of adding it at the top. 2004-02-20 Katsumi Yamaoka * w3m-antenna.el (w3m-antenna-function): New widget. (w3m-antenna-sites): Use it. 2004-02-20 Hideyuki SHIRAI * w3m.el (w3m-expand-path-name): Protect expand-file-name from cygwin-mount.el's behavior on Windows. * w3m-antenna.el (w3m-about-antenna): Check arrived-time if no last-modified. 2004-02-20 Katsumi Yamaoka * w3m-antenna.el (w3m-antenna-sites): Fix mis-implemented customizing widgets in Emacs 20.7 through 21.3 and XEmacs. (w3m-antenna-add): Support Emacs 20. * w3m-util.el (widget-default-get): Remove advice. 2004-02-19 Katsumi Yamaoka * w3m-util.el (widget-default-get): Advise the function to fix a bug in Emacs 21.1 through 21.3. 2004-02-17 Yuuichi Teranishi * w3m-form.el (w3m-form-resume): Fix for checkbox. 2004-02-11 TAKAHASHI Kaoru * doc/ptexinfmt.el: Support @docbook, @ifdocbook, @ifnotdocbook, and @registeredsymbol. 2004-02-10 TSUCHIYA Masatoshi * w3m.el (w3m-active-region-or-url-at-point): Move the point backward from the end of the active region instead of moving it forward, in order to avoid enlarging the region. 2004-02-10 Katsumi Yamaoka * w3m.el (w3m-active-region-or-url-at-point): Find a url-like string in the region instead of extracting the whole substring when the region is active. Don't use `w3m-url-at-point' for that since it doesn't work for all url string. (w3m-quit): Delete frames seemingly fast. 2004-02-09 TSUCHIYA Masatoshi * w3m-favicon.el (w3m-favicon-retrieve): Because some broken servers provide empty contents as their favicons, check the length of the retrieved content, before calling `w3m-favicon-convert'. 2004-02-07 TSUCHIYA Masatoshi * w3m.el: Changes to validate cached contents. (w3m-follow-cache-control-header): Abolished. (w3m-prefer-cache): New option. (w3m-cache-available-p): Check whether a cached header includes cache control headers. (w3m-w3m-dump-extra): Always cache both a header and a content. (w3m-w3m-retrieve-1): Check whether a cache is available, before using it. (w3m-view-this-url): When visiting history pages, prefer cached contents without checking their validity. (w3m-view-previous-page, w3m-view-source, w3m-view-header): Prefer cached contents without checking their validity. 2004-02-05 Hideyuki SHIRAI * w3m.el (w3m-show-error-information): Decode cache contents if necessary. 2004-02-05 TSUCHIYA Masatoshi * w3m.el (w3m-edit-url): Define as a command. 2004-02-02 Katsumi Yamaoka * w3mhack.el (w3mhack-examine-modules): Exclude w3m-e22.el except for Emacs 22. 2004-01-31 TSUCHIYA Masatoshi * w3m.el (w3m-edit-function-alist): New option. (w3m-edit-url): Refer the above alist to find a suitable function for editing a specified page. (w3m-edit-function, w3m-edit-current-url): Its docstring is modified to follow the above change. (w3m-edit-this-url): Its docstring is modified likewise, and it is simplified. (w3m-goto-url): Ignore cached form data when reloading. * w3m.el (w3m-safe-view-this-url): Call `w3m-goto-url' when a function set to `w3m-goto-article-function' returns nil. 2004-01-30 TSUCHIYA Masatoshi * w3m.el: Changes to follow anchors that point Shimbun articles. (w3m-goto-article-function): New variable. (w3m-safe-view-this-url): Refer the above. 2004-01-29 Hideyuki SHIRAI * w3m.el (w3m-follow-cache-control-header): New option. (w3m-w3m-dump-extra): If `w3m-follow-cache-control-header' is nil, do not follow the chache control headers. 2004-01-28 TSUCHIYA Masatoshi * Makefile.in (tarball): Because Emacs-22 has not been released, remove w3m-e22.el from the creating tarball. 2004-01-27 Taichi KAWABATA * w3m-e22.el: New file. This file is simply the copy of w3m-e21.el except that the ccl section has been removed. * w3m.el: Require w3m-e22 when Emacs 22 is running. 2004-01-26 TSUCHIYA Masatoshi * w3m.el (w3m-after-cursor-move-hook): Add :group keyword. (w3m-auto-show): Check `truncate-lines' before scrolling. (w3m-check-current-position): Do not check `truncate-lines'. * mime-w3m.el: Changes to display URI of the current anchor. (mime-w3m-after-cursor-move-hook): New option. (mime-w3m-add-local-hook): New advice. (mime-w3m-check-current-position): New funcion. 2004-01-24 TSUCHIYA Masatoshi * w3m-proc.el (w3m-process-start-and-wait): Abolished. (w3m-process-with-wait-handler): Reimplemented. * w3m.el (w3m-input-url): Accept other symbols than `popup'. (w3m-copy-buffer): Fix the bug that drops an asynchronous handler returned by `w3m-goto-url'. 2004-01-23 Katsumi Yamaoka * w3m.el (w3m-goto-url): Register a url to the history even if it is failed to retrieve. Suggested by Fujishima-san. 2004-01-23 Hiroshi Fujishima * w3m.el (w3m-input-url): Fix a bug which causes an error when there's neither a frame nor a window for the emacs-w3m session and `url' is the symbol `popup' (it is because there's a url-like text around the cursor but deleted by a user in the minibuffer). 2004-01-22 TSUCHIYA Masatoshi * w3m.el (w3m-input-url): Add "http://" to its return value, when its return value contains no scheme part. 2004-01-18 TSUCHIYA Masatoshi * w3m.el (w3m-w3m-dump-extra): Check cache control headers before caching headers and contents. This change is suggested by Mr. Amagai in [emacs-w3m:06255]. (w3m-message): Make it verbose, even if a buffer related to emacs-w3m is not displayed. w3m-print-this-url() has been broken in buffers displaying text/html messages, because w3m-message() was too silent. 2004-01-11 TSUCHIYA Masatoshi * w3m.el (w3m-safe-view-this-url): Bind `w3m-pop-up-windows' to nil locally, in order to keep MUA's window configuration. * w3m-proc.el (w3m-process-do-with-temp-buffer): Save the current buffer while executing an asynchronous body. * w3m-util.el (w3m-insert-string): Define its `edebug-form-spec'. 2004-01-09 TSUCHIYA Masatoshi * w3m-util.el (w3m-keep-region-active): Renamed from `w3m-activate-zmacs-regions'. (w3m-deactivate-region): Declared as a macro. * w3m-search.el (w3m-search-read-query): Call `w3m-deactivate-region' instead of `w3m-deactivate-mark'; Call `region-beginning' and `region-end' instead of `point' and `mark'. * w3m.el (w3m-next-anchor, w3m-previous-anchor, w3m-next-form, w3m-previous-form, w3m-next-image, w3m-previous-image, w3m-scroll-up-or-next-url, w3m-scroll-down-or-previous-url, w3m-beginning-of-line, w3m-end-of-line): Call `w3m-keep-region-active' instead of `w3m-activate-zmacs-regions'. (w3m-active-region-or-url-at-point): Call `region-beginning' and `region-end' instead of `point' and `mark'. 2004-01-07 Hideyuki SHIRAI * w3m-proc.el (w3m-process-wait-discard-input): New variable. (w3m-process-wait-process): If `w3m-process-wait-discard-input' is non-nil, call `discard-input'. 2004-01-05 Katsumi Yamaoka * w3m-util.el (w3m-deactivate-mark): New function alias. * w3m.el (w3m-active-region-or-url-at-point): Use it. (w3m-open-all-links-in-new-session): Use it. * w3m-search.el (w3m-search-read-query): Use it. 2004-01-04 TSUCHIYA Masatoshi * w3m.el (w3m-active-region-or-url-at-point): New function. (w3m-input-url, w3m-view-this-url, w3m-goto-url): Call `w3m-active-region-or-url-at-point' instead of `w3m-url-at-point'. 2004-01-04 TSUCHIYA Masatoshi * w3m-util.el (w3m-region-active-p): New macro. * w3m.el (w3m-open-all-links-in-new-session): Deactivate the mark when it is active. (w3m-view-this-url-new-session): Use `w3m-region-active-p'. * w3m-search.el (w3m-search-read-query): Use `w3m-region-active-p'. * w3m-namazu.el (w3m-namazu): Use `w3m-search-read-query' to read a query from the minibuffer. * w3m-search.el (w3m-search-read-query): New function. (w3m-search): Use the above function. 2004-01-03 TSUCHIYA Masatoshi * w3m-search.el (w3m-search): Use the region as an initial string if Transient Mark mode. (w3m-search-word-at-point): Follow the above change in its docstring. * w3m-e21.el (w3m-tab-line): Check the length of the current title, before checking the breadth of its first character. 2003-12-30 TSUCHIYA Masatoshi * w3m.el (w3m-accept-languages): Split the option of w3m with a comma surrounded by some spaces. (w3m-dump-head-source-command-arguments): Use a comma instead of a white space to concatenate elements of `w3m-accept-languages'. Cf. Section 14.4 of RFC2047. 2003-12-26 Katsumi Yamaoka * w3mhack.el: Add an advice to byte-optimize-form-code-walker to avoid the warning ``...called for effect'' for the pop form when running Emacs 21.3. 2003-12-26 TSUCHIYA Masatoshi * w3m.el (w3m-create-text-page): Use the last directory as a title of text/plain page when its uri is terminated by a slash. 2003-12-26 TSUCHIYA Masatoshi * w3m.el (emacs-w3m-version): Release 1.3.80. 2003-12-22 TSUCHIYA Masatoshi * w3m-proc.el (w3m-process-wait-process): Return exit status; Use `accept-process-output' instead of `sit-for' in order to flush pending output. (w3m-process-with-wait-handler): Follow the above change. 2003-12-21 Masatake YAMATO * w3m.el (w3m-mode): Small doc fix. (w3m-relationship-estimate-rules): Relax the regular expression to detect result pages of Google. 2003-12-19 Katsumi Yamaoka * w3m.el (w3m-safe-toggle-inline-image): New function. (w3m-toggle-inline-images): Revoke the recent changes. (w3m-safe-toggle-inline-images): New function. (w3m-safe-view-this-url): Doc fix. (w3m-minor-mode-command-alist): Use `w3m-safe-toggle-inline-image' and `w3m-safe-toggle-inline-images'. * w3m-util.el (w3m-find-w3m-buffer): Abolish. (w3m-with-w3m-buffer): Abolish. * mew-w3m.el (mew-w3m-view-inline-image): Revert. * attic/vm-w3m.el (vm-w3m-safe-toggle-inline-images): New function. 2003-12-19 Katsumi Yamaoka * w3m.el (w3m-toggle-inline-images): Ignore `w3m-safe-url-regexp' when the prefix argument is given. * w3m-util.el (w3m-find-w3m-buffer): Bind `w3m-safe-url-regexp' to the value specified peculiarly by each MUA. (w3m-with-w3m-buffer): Ditto. * mew-w3m.el (mew-w3m-view-inline-image): Don't bind `w3m-safe-url-regexp' there. 2003-12-19 Hideyuki SHIRAI * mew-w3m.el (mew-w3m-view-inline-image): Fix last change. 2003-12-18 Hideyuki SHIRAI * mew-w3m.el (mew-w3m-view-inline-image): Use `w3m-toggle-inline-images'. (mew-mime-text/html-w3m): Put the `w3m-images' text property in the message buffer. * w3m-util.el (w3m-find-w3m-buffer): Fix for Mew. 2003-12-18 Katsumi Yamaoka * w3m.el (w3m-toggle-inline-images): Wrap it with `w3m-with-w3m-buffer'. * w3m-util.el (w3m-find-w3m-buffer): New function. (w3m-with-w3m-buffer): New macro. 2003-12-13 TSUCHIYA Masatoshi * w3m-antenna.el (w3m-antenna-string): Renamed from `string-with-default'. (w3m-antenna-string-create): Renamed from `string-with-default-value-create'. (w3m-antenna-sites): Change its customize spec. * w3m-xmas.el (w3m-window-hscroll, w3m-current-column, w3m-set-window-hscroll): Import definitions from w3m.el. (w3m-run-at-time): Renamed from `w3m-xmas-run-at-time'. * w3m.el (w3m-window-hscroll, w3m-current-column, w3m-set-window-hscroll): Export definitions for XEmacs to w3m-xmas.el. 2003-12-12 Katsumi Yamaoka * aclocal.m4 (AC_SET_VANILLA_FLAG): New function specifying the `VANILLA_FLAG' variavle. XEmacs 21.5 needs to be given `-vanilla' rather than `-q -no-site-file'. (AC_EMACS_LISP): Use `VANILLA_FLAG'. (AC_PATH_EMACS): Call `AC_SET_VANILLA_FLAG'. (AC_ADD_LOAD_PATH): Use `VANILLA_FLAG'. (AC_CHECK_ELISP): Ditto. * configure.in: Check for `EGREP' before calling `AC_PATH_EMACS'. * Makefile.in (VANILLA_FLAG): New variable. (FLAGS): Use it. (very-slow): Use it. * doc/Makefile.in (VANILLA_FLAG): New variable. (FLAGS): Use it. * w3m-xmas.el (w3m-xmas-run-at-time): Use a simple function definition if there is not a bug in `start-itimer'. 2003-12-11 KAMO Tomoyuki * octet.el (octet-suffix-type-alist): Add suffix of bzip-ed files. (octet-type-filter-alist): Add an entry of bzip2. (octet-guess-type-from-name): Relax the regular expression to detect suffix, in order to handle bzip-ed files. 2003-12-11 TSUCHIYA Masatoshi * w3m.el: Experimentally implement the estimation layer of relationships between pages. (w3m-relationship-estimate-rules): New option. (w3m-relationship-estimate, w3m-relationship-simple-estimate, w3m-relationship-magicpoint-estimate, w3m-relationship-search-patterns): New functions. (w3m-use-filter): Cancel the last change; its default value is changed to nil. * w3m-filter.el (w3m-filter-rules): Remove rules to find relationships. (w3m-filter-find-relationships): Abolished. * w3m-util.el (w3m-html-string-regexp): Import from w3m.el. 2003-12-10 TSUCHIYA Masatoshi * w3m.el (w3m-use-filter): Change its default value to t. * w3m-filter.el: Reconstructed completely. (w3m-filter-rules): Change its spec and its default value. (w3m-filter): Reimplemented. (w3m-filter-delete-regions, w3m-filter-find-relationships): New functions. (w3m-filter-db, w3m-filter-db-size, w3m-filter-server-regexp, w3m-filter-setup, w3m-filter-delete-region, w3m-filter-lwn.net, w3m-filter-google.com, w3m-filter-www.zdnet.co.jp): Removed. 2003-12-10 Katsumi Yamaoka * w3m-xmas.el (w3m-xmas-run-at-time): Rewrite w/o using fsf-compat. * w3m.el (w3m-run-at-time): New function alias. (w3m-refresh-at-time): Use it. 2003-12-09 Katsumi Yamaoka * w3m-xmas.el (w3m-xmas-run-at-time): New function. * w3m.el (w3m-refresh-at-time): Use it. 2003-12-04 Katsumi Yamaoka * w3m.el (w3m-view-this-url-new-session): Abolish the optional arg. (w3m-mouse-view-this-url-new-session): Ditto. 2003-12-03 Katsumi Yamaoka * w3m.el (w3m-buffer-setup): Use `defun' instead of `defsubst'. 2003-12-02 Katsumi Yamaoka * w3m.el (w3m-current-anchor-face): Replace backquote with quote. (w3m-select-buffer-current-buffer): Ditto. (w3m-header-line-insert): Ditto. (w3m-about-retrieve): Use `defun' instead of `defsubst'. (w3m-cid-retrieve): Ditto. (w3m-current-column): Make it a function, not a macro. 2003-11-28 TSUCHIYA Masatoshi * w3m.el (w3m-minor-mode): Run hooks only when this minor mode is enabled. * w3m-bookmark.el (w3m-bookmark-mode): Ditto. * w3m-antenna.el (w3m-antenna-mode): Ditto. * w3m-antenna.el (w3m-antenna-alist): Simplified. 2003-11-27 TSUCHIYA Masatoshi * w3m-antenna.el: Define a new minor mode `w3m-antenna-mode'. (w3m-antenna-mode-map, w3m-antenna-mode): New variables. (w3m-antenna-mode, w3m-antenna-mode-setter, w3m-antenna-edit): New functions. * w3m-bookmark.el (w3m-bookmark-mode): Change its interactive spec, and improve its document. * w3m-favicon.el (w3m-favicon-retrieve): Abolish the 4th argument `handler' and wrap the asynchronous processing forms with `w3m-process-with-null-handler', in order to clarify this function's purpose. * w3m.el (w3m-message): Use `walk-windows' instead of `window-list', because the latter is not available at Meadow and Mule2. (w3m-w3m-retrieve): Check the status code. (w3m-show-error-information): Also use retrieved error pages. (w3m-minor-mode): Change its interactive spec. 2003-11-27 Katsumi Yamaoka * w3m-favicon.el (w3m-favicon-convert): Make sure data of the ico type contains the correct magic numbers. 2003-11-27 TSUCHIYA Masatoshi * w3m-util.el (w3m-last-visited-buffer): Abolished. (w3m-popup-buffer): Do not reset the above variable. * w3m.el (w3m-close-window): Do not set the above variable. (w3m): Do not refer the above variable. 2003-11-27 Katsumi Yamaoka * w3m.el (w3m-retrieve-and-render): Use `w3m-message' instead of `message'; don't let it be controlled by `w3m-verbose'. (w3m-alive-p): Don't sort the return value of `list-buffers' so that it returns the last visited emacs-w3m buffer as much as possible; don't inline the `w3m-list-buffers' function. 2003-11-27 TSUCHIYA Masatoshi * w3m.el (w3m-verbose): Change its default value to nil. (w3m-message): When `w3m-verbose' is nil, display messages without logging. (w3m-make-help-echo, w3m-toggle-inline-image, w3m-zoom-in-image, w3m-zoom-out-image, w3m-view-this-url, w3m-submit-form, w3m-view-image, w3m-save-image, w3m-view-url-with-external-browser, w3m-download-this-url, w3m-print-this-url, w3m-edit-current-url, w3m-edit-this-url, w3m-quit, w3m-goto-ftp-url, w3m-select-buffer, w3m-select-buffer-show-this-line, w3m-select-buffer-show-this-line-and-switch): Call `w3m-message' instead of `w3m-display-message'. * w3m-util.el (w3m-display-message): Removed. (w3m-display-message-enable-logging): Abolished. 2003-11-26 TSUCHIYA Masatoshi * w3m.el (w3m-message): Silent when the cursor is in minibuffer. * w3m-util.el (w3m-display-message): Ditto. 2003-11-26 Katsumi Yamaoka * w3m.el (w3m-html-string-regexp): Fix my fault; enclose it with `eval-and-compile' which is needed for compiling since it is used in a macro. 2003-11-25 TSUCHIYA Masatoshi * w3m-proc.el (w3m-process-wait-process): Invert the return value of sit-for() that waits an asynchronous process. (w3m-process-kill-process): Relax the condition that checks whether a given process has already finished or not. 2003-11-25 Katsumi Yamaoka * w3m-search.el (w3m-search): Use `w3m-goto-url' instead of `w3m'. * w3m-weather.el (w3m-weather): Ditto. * w3m.el (w3m-obey-w3m-pop-up-frames): Abolish. (w3m-goto-url-new-session): Find an existing emacs-w3m buffer and then make a copy of it; use `w3m-goto-url' instead of `w3m' if there is no emacs-w3m buffer. (w3m-browse-url): Revert last change; rename the optional arg to `new-session'; call `w3m-goto-url-new-session' or `w3m-goto-url'. (w3m-select-buffer): Use `w3m-goto-url' instead of `w3m'. (w3m-safe-view-this-url): Ditto. 2003-11-25 Katsumi Yamaoka * w3m-antenna.el (w3m-antenna): Don't pass the interactive flag to `w3m-goto-url'. * w3m-bookmark.el (w3m-bookmark-view): Ditto. * w3m-cookie.el (w3m-cookie): Ditto. * w3m-dtree.el (w3m-dtree): Ditto. * w3m-namazu.el (w3m-namazu): Ditto. * w3m-perldoc.el (w3m-perldoc): Ditto. * w3m.el (w3m-copy-buffer): Don't pop up a window or a frame if `w3m-goto-url' is called. (w3m-goto-url): Abolish the 8th arg `interactive-p'; pop up a window or a frame anyway. (w3m-goto-url-new-session): Abolish the `interactive-p' argument; don't pass it to `w3m-goto-url'. (w3m-gohome): Ditto. (w3m): Don't pop up a window or a frame there. (w3m-browse-url): Make it work as `browse-url-w3'. 2003-11-24 Katsumi Yamaoka * w3m-proc.el (w3m-process-wait-process): Don't specify 3 args to `sit-for' for XEmacs. 2003-11-24 TSUCHIYA Masatoshi * w3m-antenna.el (w3m-antenna-sites): Change its default value. Allow a list that consists of a function and its options, as the third element of each site. (w3m-antenna-html-skeleton): Remove the link to the antenna editor. (w3m-antenna-setup): Removed. (w3m-antenna-shutdown): Removed. (w3m-antenna-alist): New function. (w3m-antenna-site-update): Ditto. (w3m-antenna-check-hns): Ditto. (w3m-antenna-check-anchor): Ditto. (w3m-antenna-check-page): Ditto. (w3m-antenna-check-site): Use the above three functions. (w3m-antenna-check-all-sites): Follow the above change. Use w3m-antenna-alist() and w3m-save-list() instead of w3m-antenna-setup() and w3m-antenna-shutdown(). (w3m-antenna-check-site-after): Removed. (w3m-antenna-make-summary): Use a key attribute instead of an url attribute, when the latter is not set. (w3m-antenna-make-summary-like-natsumican): Ditto. (w3m-about-antenna): Call w3m-antenna-alist() instead of w3m-load-list(). (w3m-about-antenna-edit): Removed. (w3m-antenna-edit-reset-post-data): Ditto. 2003-11-21 Katsumi Yamaoka * w3m-antenna.el (w3m-antenna): Pass the interactive flag to `w3m-goto-url'. * w3m-bookmark.el (w3m-bookmark-view): Ditto. * w3m-cookie.el (w3m-cookie): Ditto. * w3m-dtree.el (w3m-dtree): Ditto. * w3m-namazu.el (w3m-namazu): Ditto. * w3m-perldoc.el (w3m-perldoc): Ditto. * w3m.el (w3m-gohome): Ditto. (w3m-browse-url): Ditto. 2003-11-21 Katsumi Yamaoka * w3m.el (w3m-rendering-half-dump): Move point to the end of the region in order to avoid a bug of `call-process-region' in XEmacs 21.5.7+ (see the comment). (w3m-decode-encoded-contents): Ditto. (w3m-x-moe-decode-buffer): Ditto. * w3m-perldoc.el (w3m-about-perldoc): Ditto. * w3m-xmas.el (w3m-initialize-graphic-icons): Ditto. * w3m-favicon.el (w3m-favicon-retrieve): Say "no favicon" if it is not available. * w3m-proc.el (w3m-process-with-environment): Rely on the `temp-directory' function and modify TEMP and TMPDIR env vars for XEmacs. 2003-11-20 Yuuichi Teranishi * w3m-form.el (w3m-form-normalize-action): New inline function. (w3m-form-parse-and-fontify): Use it. (w3m-form-new): Simply set action. (w3m-form-submit): Don't treat !CURRENT_URL! here. 2003-11-20 Katsumi Yamaoka * aclocal.m4 (AC_ADD_LOAD_PATH): Refine the help message for the --with-attic option. 2003-11-19 Katsumi Yamaoka * w3m.el (w3m-buffer-setup): Make sure that `truncate-lines' is t. (w3m-view-source): Don't set `truncate-lines' to nil when quitting viewing a source. (w3m-view-header): Set `truncate-lines' to nil when viewing a header. 2003-11-18 Yuuichi Teranishi * w3m-form.el (w3m-form-put-by-name): New function. (w3m-form-resume): Use w3m-form-get-by-name and w3m-form-put-by-name instead of w3m-form-get and w3m-form-put for radio buttons. (w3m-form-parse-and-fontify): Ditto. (w3m-form-input-radio): Ditto. 2003-11-18 Katsumi Yamaoka * w3m.el (w3m-check-current-position): Don't allow horizontal scrolling when `truncate-lines' is nil. (w3m-view-source): Set `truncate-lines' to nil. * w3m-favicon.el (w3m-favicon-setup): Retrieve favicon even when viewing the header or the page source. 2003-11-18 Katsumi Yamaoka * Makefile.in (very-slow): Fix echo messages. * w3m.el (w3m-follow-redirection): Fix customization type. * w3m-e21.el: Bind `w3m-current-title' when compiling. * /: Bind `w3m-work-buffer-list' when compiling in: w3m-e21.el, w3m-favicon.el, w3m-image.el, w3m-proc.el and w3m-xmas.el. * /: Require `cl' when compiling in: w3m-cookie.el, w3m-form.el and w3m-tabmenu.el. * /: Remove unused non-global variables in: octet.el, w3m-cookie.el, w3m-tabmenu.el and w3m-weather.el. 2003-11-17 Katsumi Yamaoka * w3m.el (w3m-goto-url): Make `w3m-local-find-file-function' don't handle directories. 2003-11-17 Katsumi Yamaoka * w3m-util.el: Bind `w3m-current-process', `w3m-pop-up-frames', `w3m-pop-up-windows', `w3m-popup-frame-parameters', `w3m-select-buffer-name' and `w3m-use-tab', and fbind `select-frame-set-input-focus' when compiling. (w3m-popup-frame-parameters): Move from w3m.el. (w3m-popup-frame-p): Ditto. (w3m-use-tab-p): Ditto. (w3m-popup-window-p): Ditto. (w3m-initial-frames): Ditto. (w3m-last-visited-buffer): Ditto. (w3m-popup-buffer): Ditto; also move the program to make `select-frame-set-input-focus' unbound from w3m.el. (w3m-add-w3m-initial-frames): Ditto; also move the program to add it to `create-frame-hook', `after-make-frame-functions' or `after-make-frame-hook' from w3m.el. (w3m-delete-frames-and-windows): Ditto. (w3m-display-progress-message): Mark a progress message with the `w3m-progress-message' text property. * w3m.el: Don't fbind `select-frame-set-input-focus'. (w3m-local-find-file-function): Use `w3m-popup-frame-p'. (w3m-initial-frames): Move to w3m-util.el. (w3m-popup-frame-parameters): Ditto. (w3m-popup-frame-p): Ditto. (w3m-use-tab-p): Ditto. (w3m-popup-window-p): Ditto. (w3m-last-visited-buffer): Ditto. (w3m-popup-buffer): Ditto; also move the program to make `select-frame-set-input-focus' unbound to w3m-util.el. (w3m-add-w3m-initial-frames): Ditto; also move the program to add it to `create-frame-hook', `after-make-frame-functions' or `after-make-frame-hook' to w3m-util.el. (w3m-delete-frames-and-windows): Ditto. (w3m-delete-buffer-if-empty): New function. (w3m-view-this-url-1): Use it. (w3m-goto-url-new-session): Use it. (w3m): Use it. * w3m-e21.el (w3m-euc-japan-encoder): Compute the ccl program in each time to load w3m-e21.elc to keep the compatibility of the module with Emacs 21.3 and the later versions. (w3m-iso-latin-1-encoder): Ditto. 2003-11-14 Katsumi Yamaoka * w3m.el (w3m-horizontal-scroll-division): Mega doc fix; eliminate illegal values. (w3m-horizontal-on-screen): Rearrange. 2003-11-14 TSUCHIYA Masatoshi * w3m.el (w3m-last-visited-buffer): New variable. (w3m-popup-buffer): Clear `w3m-last-visited-buffer'. (w3m-close-window): Set the last emacs-w3m buffer as `w3m-last-visited-buffer'. (w3m): Preferably use the last emacs-w3m buffer kept in `w3m-last-visited-buffer'. 2003-11-14 Katsumi Yamaoka * w3m.el (w3m-horizontal-recenter): Do nothing besides resetting the window's hscroll if `truncate-lines' is nil. (w3m-beginning-of-line): Replace `w3m-set-window-hscroll' with `set-window-hscroll'. (w3m-end-of-line): Make it work identically as `end-of-line' if `truncate-lines' is nil. (w3m-display-width): Move downward (see the comment). 2003-11-14 TSUCHIYA Masatoshi * w3m.el (w3m-w3m-parse-header): Because a broken server returns a relative URL in the location field, convert a URL to absolute. * w3m-proc.el (w3m-process-wait-process): New function. (w3m-process-start-and-wait): Call the above function. * w3m-weather.el (w3m-weather-run-filter-functions): New function to call filter functions asynchronously. (w3m-about-weather): Call the above. (w3m-weather-get-seikatu-sisu): Asynchronized. (w3m-weather-insert-seikatu-sisu): Ditto. 2003-11-12 Katsumi Yamaoka * w3m.el (w3m-initial-frames): Rename from `w3m-initial-frame'; keep a list of the frame-IDs. (w3m-popup-window-p): Return nil if there is the selection window. (w3m-popup-buffer): Copy a copy of `w3m-initial-frames' from a visible emacs-w3m buffer to a popped-up emacs-w3m buffer; don't set `w3m-initial-frames' for newly created frames there. (w3m-add-w3m-initial-frames): New function; add it to `create-frame-hook', `after-make-frame-functions' or `after-make-frame-hook'. (w3m-copy-buffer): Copy a copy of `w3m-initial-frames'. (w3m-delete-buffer): Pop up another emacs-w3m buffer instead of deleting a frame; remove a deleted frame from `w3m-initial-frames'. (w3m-delete-frames-and-windows): Also allow a window or a frame as the optional argument; emulate XEmacs version's `one-window-p'. (w3m): Set the value for `w3m-initial-frames' even if it is invoked in the batch mode. (w3m-select-buffer): Delete other emacs-w3m frames and windows. (w3m-select-buffer-copy-buffer): Revert the 2003-11-11 change. (w3m-select-buffer-delete-buffer): Simplify. (w3m-display-width): New function for showing pages as if there is no selection window. (w3m-halfdump-command-common-arguments): Use it. (w3m-make-separator): Use it. (w3m-about-db-history): Use it. (w3m-header-line-insert): Work as if there is no selection window. * w3mhack.el (w3mhack-generate-colon-keywords-file): Preset `:strike-through' and `:strikethru' which aren't supported by the old cus-face.el. 2003-11-11 Katsumi Yamaoka * w3m.el (w3m-popup-buffer): Reuse an existing window or frame if it exists; set the value for `w3m-initial-frame' properly; raise, select and focus the new frame. (TopLevel): Make `select-frame-set-input-focus' unbound if it is a dummy. (w3m-view-this-url-1): Show a progress message. (w3m-copy-buffer): Simplify the code to call `w3m-popup-buffer'. (w3m-alive-p): Add an optional arg `visible' (see docs); use inlining `w3m-list-buffers'. (w3m): Simplify the code using `w3m-popup-buffer'; specify the optional arg to `w3m-alive-p'; protect against the case of no url. (w3m-select-buffer-copy-buffer): Bind `w3m-pop-up-windows' to nil. * w3m-util.el (w3m-list-buffers): Make it into a normal function; don't call itself recursively. 2003-11-10 Katsumi Yamaoka * w3m-util.el (w3m-function-max-args): Move to mew-shimbun.el. * w3m.el (w3m-popup-buffer): New function (it still needs to improved in order for the `w3m' function to use). (w3m-view-this-url-1): Specify the value of `w3m-view-this-url-new-session-in-background' to the 3rd arg of `w3m-copy-buffer'; don't pop up a window or a frame there. (w3m-copy-buffer): Change the meaning of the 3rd arg (see docs); don't pop up a window or a frame if it is non-nil, otherwise call `w3m-popup-buffer'. (w3m-goto-url): Change the name of the 8th arg to `interactive-p'; don't pop up a window or a frame unless this function is called interactively, otherwise call `w3m-popup-buffer'. (w3m-goto-url-new-session): Specify nil to the 3rd arg of `w3m-copy-buffer'. (w3m-select-buffer-saved-window-config): Abolish. (w3m-select-buffer): Revert the 2003-11-05 change; delete other windows except for the current emacs-w3m window or create a new emacs-w3m buffer when it is called initially. (w3m-select-buffer-current-buffer): Use `line-beginning-position'. (w3m-select-buffer-copy-buffer): Revert the 2003-11-05 change; simplify. (w3m-select-buffer-delete-buffer): Call `w3m-quit' if there is the sole emacs-w3m buffer. (w3m-select-buffer-delete-other-buffers): Revert the 2003-11-07 change. (w3m-select-buffer-quit): Revert the 2003-11-05 change; bind `pop-up-frames'. 2003-11-09 TSUCHIYA Masatoshi * w3m-proc.el (w3m-process-stop): Change `w3m-current-process' in the buffer specified in the argument, instead of changing it in the current buffer. 2003-11-08 TSUCHIYA Masatoshi * w3m.el (w3m-w3m-canonicalize-url): New function. (w3m-w3m-attributes-1): New function. (w3m-w3m-attributes): Call the above functions to follow redirection. (w3m-w3m-retrieve): Call `w3m-w3m-canonicalize-url' before retrieving. * w3m-proc.el (w3m-process-start-process): Check the value of `w3m-current-url' before calling `w3m-url-authinfo'. (w3m-process-start-and-wait): Make sure synchronization with sub-process. (w3m-process-do-with-temp-buffer): Call `w3m-kill-buffer' instead of calling `kill-buffer' directly. * w3m-antenna.el (w3m-antenna-mapcar): Simplified and follow the change of `w3m-process-do-with-temp-buffer'. (w3m-antenna-mapcar-after): Ditto. 2003-11-07 Katsumi Yamaoka * w3m.el (w3m-delete-other-buffers): Use `w3m-delete-frames-and-windows'. (w3m-delete-frames-and-windows): Take an optional argument for the exception; assume a buffer may be at two or more windows. (w3m-close-window): Assume a buffer may be at two or more windows. (w3m-select-buffer-delete-other-buffers): Save-window-excursion. 2003-11-06 Katsumi Yamaoka * w3m.el (w3m-popup-frame-parameters): Rename from `w3m-pop-up-frame-parameters' to make it easy to complete the `w3m-pop-up-frames' variable name. (w3m-popup-frame-parameters): Rename from `w3m-pop-up-frame-parameters'. (w3m-popup-frame-p): Make it a generic macro. (w3m-use-tab-p): New macro. (w3m-popup-window-p): Use `w3m-use-tab-p'. (w3m-view-this-url-1): Use `w3m-use-tab-p' and `w3m-popup-frame-p'. (w3m-copy-buffer): Ditto. (w3m-delete-buffer): Use `w3m-use-tab-p'. (w3m-goto-url): Use `w3m-use-tab-p' and `w3m-popup-frame-p'. (w3m): Modify to use new `w3m-popup-frame-p'. (w3m-header-line-insert): Use `w3m-use-tab-p'. 2003-11-07 TSUCHIYA Masatoshi * w3m.el (w3m-current-redirect): Abolished. (w3m-clear-local-variables, w3m-copy-local-variables): Follow the above change. * w3m-proc.el (w3m-process-do-with-temp-buffer): Keep the current buffer after given FORM and BODY are evaluated. 2003-11-06 TSUCHIYA Masatoshi * w3m.el (w3m-follow-redirection): Fix its docstring. (w3m-w3m-retrieve): When the above option is equal to nil, it is treated as 0. (w3m-retrieve-and-render): Check content type and charsets with redirected real URI instead of user-specified URI. * w3m-antenna.el (w3m-antenna-hns-last-modified): Do not accept `no-cache' argument. (w3m-antenna-check-site): Ditto. (w3m-antenna-mapcar, w3m-antenna-mapcar-after): New functions. (w3m-antenna-check-all-sites): Use the above functions. 2003-11-06 Katsumi Yamaoka * w3m.el (w3m-delete-buffer): New implementation. (w3m-delete-frame-maybe): Abolish. (w3m-delete-frames-and-windows): New function. (w3m-quit): Use it. (w3m-close-window): New implementation. (w3m-select-buffer-show-this-line): Specify the 1st arg to `one-window-p'. (w3m-select-buffer-quit): Ditto. (w3m-select-buffer-close-window): Ditto. 2003-11-06 Hideyuki SHIRAI * w3m.el (w3m-fontify-strike-through): Support element. (w3m-fontify): Change the turn `w3m-fontify-strike-through' and `w3m-fontify-underline'. 2003-11-06 Katsumi Yamaoka * attic/vm-w3m.el: New file. 2003-11-05 Katsumi Yamaoka * w3m.el: Fbind `select-frame-set-input-focus' when compiling. (w3m-popup-window-p): Rename from `w3m-pop-up-window-p'; use 'emacs-major-version' instead of `MULE' to examine the version. (w3m-view-this-url-1): Use `pop-to-buffer' instead of `switch-to-buffer' in order to be able to popup a window or a frame. (w3m-copy-buffer): Ditto; set the `w3m-initial-frame' variable only when `w3m-pop-up-frames' is non-nil. (w3m-delete-buffer): Select the most suitable buffer. (w3m-goto-url): Use `pop-to-buffer' instead of `switch-to-buffer' in order to be able to popup a window or a frame. (w3m): Ditto; rearrange the source code. (w3m-select-buffer-saved-window-config): New variable. (w3m-select-buffer): Save the window configuration. (w3m-select-buffer-copy-buffer): Bind `pop-up-frames'. (w3m-select-buffer-quit): Restore the window configuration; protect agains the absence of an emacs-w3m buffer. * w3m-xmas.el: Bind `w3m-use-tab' when compiling. (w3m-xmas-show-current-title-in-buffer-tab): Examine the value for the `gutter-buffers-tab-enabled' variable directly. (w3m-xmas-setup-tab-in-gutter): New function; add it to `w3m-mode-setup-functions' and `w3m-select-buffer-mode-hook'. (w3m-xmas-update-tab-in-gutter): Do update only when `w3m-use-tab' and `gutter-buffers-tab-enabled' are non-nil; always add it to `w3m-display-functions'. * octet.el: Don't make sure the `emacs-major-version' variable is bound. * w3m-bitmap: Ditto. * w3m-bug.el: Ditto. * w3m-proc.el: Ditto. * w3m-ucs.el: Ditto. * w3m-util.el: Ditto. * w3m.el: Ditto. * w3mhack.el: Ditto. 2003-11-05 Hideyuki SHIRAI * w3m.el (w3m-delete-buffer, w3m-delete-other-buffers) (w3m-select-buffer-delete-buffer): Call `w3m-process-stop'. * w3m-proc.el (w3m-process-kill-stray-processes): New function. (w3m-process-start-queued-processes): Call `w3m-process-kill-stray-processes'. (w3m-process-filter): When parent-buffer was killed, call `w3m-process-kill-stray-processes' 2003-11-04 Katsumi Yamaoka * w3m.el (w3m-pop-up-windows): Default to t. (w3m-pop-up-window-p): New macro examining the value for the `w3m-use-tab' variable and the present situation. (w3m-copy-buffer): Use it. 2003-11-04 Hideyuki SHIRAI * w3m.el (w3m-meta-content-type-charset-regexp) (w3m-meta-charset-content-type-regexp) (w3m-meta-refresh-content-regexp) (w3m-meta-content-refresh-regexp): Allow `\n' as whitespaces. 2003-10-31 Katsumi Yamaoka * w3m-hist.el (w3m-history-backward): Return the current history if the number zero is given as an argument. 2003-10-29 OHASHI Akira * w3m.el (w3m-process-connection-type): Set t when system is darwin version 7.0.0 or later. 2003-10-28 Katsumi Yamaoka * w3m.el (w3m-fontify-strike-through (var)): Make it into the variable which is not a user option. (w3m-fontify-strike-through (fn)): Check dynamically whether the window system is used. (w3m-url-at-point): Unify iso646 chars to ascii on XEmacs-mule. * mew-w3m.el: Silence the compile warning for `mew-coding-system-p' for people having the Mew XEmacs package installed. 2003-10-23 Katsumi Yamaoka * w3m.el (w3m-obey-w3m-pop-up-frames): New variable. (w3m-copy-buffer): Inherit the value of `w3m-initial-frame' into the new buffer if a new frame is not created for the new buffer. (w3m-delete-frame-maybe): Simplify it in the different way. * w3m-search.el (w3m-search): Specify the 3rd arg of `w3m'. 2003-10-23 Katsumi Yamaoka * w3m.el: Revive `w3m-initial-frame' throughout. (w3m-delete-frame-maybe): Revert 2003-10-20 change. 2003-10-22 Katsumi Yamaoka * w3m.el (w3m-strike-through-face): Use the :strikethru attribute in XEmacs. (w3m-fontify-strike-through): Enable it also for XEmacs. 2003-10-21 TSUCHIYA Masatoshi * w3m.el (w3m-w3m-retrieve): Insert no data when either retrieval or decoding is failed. (w3m-w3m-parse-header): Do not return a base URI of retrieved page. 2003-10-20 Katsumi Yamaoka * w3m.el: Fix some comments and docstrings (to be continued). (w3m-copy-local-variables, w3m-open-all-links-in-new-session, w3m-horizontal-scroll): Remove unused non-global variables. 2003-10-20 Katsumi Yamaoka * w3m.el: Abolish `w3m-initial-frame' throughout. (w3m-delete-frame-maybe): Simplify. 2003-10-19 TSUCHIYA Masatoshi * w3m.el (w3m-base-url): Removed. (w3m-attributes, w3m-local-attributes, w3m-w3m-attributes): Do not return a base URI of retrieved page. 2003-10-14 Jose A. Ortega Ruiz * w3m.el (w3m-decode-entities-string): Move `save-match-data' to the exterior of `with-temp-buffer'. 2003-10-08 Katsumi Yamaoka * w3m-e21.el (w3m-tab-half-space, w3m-tab-separator): Use `:width' instead of `:relative-width' to specify the space width. (w3m-tab-line): Tidy it up. * w3m-favicon.el (w3m-favicon-set-image): Use `:width' instead of `:relative-width' to specify the space width. 2003-10-08 Katsumi Yamaoka * w3m-e21.el (w3m-tab-unselected-face, w3m-tab-unselected-retrieving-face, w3m-tab-selected-face, w3m-tab-selected-face): Exchange the default TTY colors between selected faces and unselected faces. (w3m-tab-drag-mouse-function): Compare buffer objects instead of buffer names. (w3m-tab-make-keymap): Use buffer objects instead of buffer names. (w3m-tab-line): Make all tab widths the same even if there are wide characters; never use graphic icons in TTY; close the left margin unless there's an icon; add a keymap to favicon; don't put mouse-face on icons. (w3m-initialize-graphic-icons): Don't make graphic icons for TTY; don't put mouse-face on icons. * w3m-favicon.el: Bind `w3m-modeline-favicon' when compiling. (w3m-favicon-set-image): Add a half space after favicon. * w3m-util.el (w3m-current-title): New function. (w3m-buffer-title): Use it. * w3m.el: Silence the byte-compiler for `w3m-info-like-map', `w3m-lynx-like-map', `w3m-minor-mode-map', `w3m-mode-map', and `w3m-setup-menu'. 2003-10-08 Katsumi Yamaoka * w3m-favicon.el: Silence the compile warning for `w3m-message'. * w3m.el (w3m-url-to-file-name): Enable it to interpret file://localhost/ urls. 2003-10-07 Yuuichi Teranishi * w3m-form.el (w3m-form-parse-and-fontify): Fix for textarea on w3mmee. 2003-10-07 Katsumi Yamaoka * w3m-e21.el (frame-current-scroll-bars): Alias to `ignore' if it is not available. (window-fringes): Ditto. (w3m-tab-width): Protect against setting illegal values. (w3m-tab-unselected-face): Don't specify the underline color. (w3m-tab-unselected-retrieving-face): Ditto. (w3m-tab-selected-face): Ditto. (w3m-tab-selected-retrieving-face): Ditto. (w3m-tab-background-face): Ditto. (w3m-tab-timer): Rename from `w3m-tab-line-timer'. (w3m-tab-half-space): New variable. (w3m-tab-separator): New variable. (w3m-tab-line): Show many tabs as far as possible. * w3m-favicon.el (w3m-favicon-retrieve): Clear the minibuffer after retrieving favicon. 2003-10-06 Katsumi Yamaoka We shouldn't use too simple elements like ".+" in the deep nested regexps. It may cause high cpu or may make Emacs hang. 2003-10-06 Katsumi Yamaoka * w3m.el (w3m-use-favicon): Modify the doc-string. (w3m-show-graphic-icons-in-mode-line): New variable. (w3m-show-graphic-icons-in-header-line): New variable. (w3m-buffer-setup): Modify the value for `mode-line-buffer-identification' not to show favicon if `w3m-show-graphic-icons-in-mode-line' is nil. * w3m-e21.el: Bind `w3m-show-graphic-icons-in-header-line' and `w3m-show-graphic-icons-in-mode-line' when compiling. (w3m-tab-line): Don't show spinners nor favicons if `w3m-show-graphic-icons-in-header-line' is nil; call `w3m-make-spinner-image' only once. (w3m-initialize-graphic-icons): Don't make graphic icons if `w3m-show-graphic-icons-in-mode-line' is nil. * w3m-xmas.el: Bind `w3m-show-graphic-icons-in-mode-line' when compiling. (w3m-initialize-graphic-icons): Don't make graphic icons if `w3m-show-graphic-icons-in-mode-line' is nil. 2003-10-05 Yuuichi Teranishi * w3m-form.el (w3m-form-replace): Call `set-buffer-modified-p'. (w3m-form-field-parse): Do nothing when fid is nil. (w3m-form-input-radio): Likewise. (w3m-form-get-by-name): New function. (w3m-form-input-map): Use it. 2003-10-04 Katsumi Yamaoka * w3m-e21.el (w3m-tab-line): Fix the logic determining whether to display favicon. 2003-10-03 Katsumi Yamaoka * w3m-e21.el (w3m-spinner-map-on-header-line): Abolish. (w3m-modeline-spinner-map): Rename from `w3m-spinner-map-on-mode-line'. (w3m-setup-header-line): Don't initialize `w3m-spinner-map-on-header-line'. (w3m-tab-spinner-map): New variable. (w3m-tab-make-keymap): Initialize it. (w3m-tab-line): Use it. 2003-10-03 Katsumi Yamaoka * w3m.el (w3m-modeline-separator): New variable. (w3m-modeline-favicon): New variable. (w3m-favicon-image): Move from w3m-favicon.el. (w3m-buffer-setup): Also call `w3m-initialize-graphic-icons' when Emacs 21 is running; simplify the value for `mode-line-buffer-identification'. * w3m-e21.el: Bind `w3m-favicon-image' and `w3m-modeline-process-status-on' when compiling. (w3m-spinner-map-on-header-line): New variable. (w3m-spinner-map-on-mode-line): New variable. (w3m-spinner-map-help-echo): New variable. (w3m-setup-header-line): Initialize the value for `w3m-spinner-map-on-header-line'; remove an excessive `list' from the value for `header-line-format'. (w3m-tab-map): New variable. (w3m-tab-make-keymap): Set the value for `w3m-tab-map' in the current buffer. (w3m-tab-line): Add a keymap to the spinner; don't call `w3m-tab-make-keymap', use `w3m-tab-map' instead. (TopLevel): Add-hook `w3m-tab-make-keymap' to `w3m-mode-setup-functions'. (w3m-space-before-modeline-icon): New variable. (w3m-modeline-process-status-on-icon, w3m-modeline-image-status-on-icon, w3m-modeline-status-off-icon, w3m-modeline-ssl-image-status-on-icon, w3m-modeline-ssl-status-off-icon): New variables. (w3m-initialize-graphic-icons): New function. (w3m-make-spinner-image): Don't initialize the value for `w3m-spinner-image-file' here; set the value for `w3m-modeline-process-status-on-icon'. * w3m-favicon.el: Bind `w3m-favicon-image' when compiling. (w3m-favicon-image): Move to w3m.el. (w3m-space-before-favicon): Move from w3m-xmas.el. (TopLevel): Make `w3m-modeline-favicon' and `w3m-favicon-image' buffer-local; modify the value or put the `risky-local-variable' property for `w3m-modeline-favicon'. (w3m-favicon-set-image): New macro. (w3m-favicon-setup): Use it. (w3m-favicon-retrieve): Use it. * w3m-xmas.el (w3m-xmas-space-before-favicon): Move to w3m-favicon.el and rename to `w3m-space-before-favicon'. (w3m-space-before-modeline-icon): Rename from `w3m-xmas-space-before-modeline-icon'. 2003-10-03 TSUCHIYA Masatoshi * w3m-proc.el (w3m-process-filter): Relax the regular expression to detect progress status. 2003-10-02 ARISAWA Akihiro * w3m.el (w3m-w3m-expand-arguments): Redefine as a function rather than a macro. (w3m-dump-head-source-command-arguments): Simplify. (w3m-halfdump-command-arguments): Ditto. 2003-10-02 TSUCHIYA Masatoshi * w3m-proc.el (w3m-process-filter): Check return value of `w3m-process-handler-parent-buffer' to move current buffer safely. 2003-10-02 Katsumi Yamaoka * w3m.el (w3m-modeline-image-status-on, w3m-modeline-process-status-on, w3m-modeline-ssl-image-status-on, w3m-modeline-ssl-status-off, w3m-modeline-status-off): Use `defvar' instead of `defconst'. (w3m-buffer-setup): Call `w3m-initialize-graphic-icons' instead of `w3m-make-spinner-image'; simplify the value for `mode-line-buffer-identification'. * w3m-xmas.el (w3m-xmas-space-before-modeline-icon): Rename from `w3m-xmas-space-before-spinner'. (w3m-modeline-process-status-on-icon, w3m-modeline-image-status-on-icon, w3m-modeline-status-off-icon, w3m-modeline-ssl-image-status-on-icon, w3m-modeline-ssl-status-off-icon): New variables. (w3m-spinner-image): Abolish. (w3m-make-spinner-image): Abolish. (w3m-initialize-graphic-icons): New function. * icons/state-00.xpm: * icons/state-01.xpm: * icons/state-10.xpm: * icons/state-11.xpm: New files. 2003-10-02 ARISAWA Akihiro * w3m.el (w3m-halfdump-command-arguments): Add "ucs_conv" option when using w3m-m17n; check w3m-output-coding-system at run time. 2003-10-02 Katsumi Yamaoka * w3m-proc.el (w3m-process-start-after): Make sure the value for `w3m-current-buffer' is non-nil. 2003-10-02 TSUCHIYA Masatoshi * w3m.el (w3m-process-modeline-format): New option. (w3m-buffer-setup): Set `mode-line-process'. * w3m-proc.el: Bind `w3m-process-modeline-format' to suppress byte-compile warning. (w3m-process-modeline-string): New buffer-local variable. (w3m-process-start-after): Reset the above variable. (w3m-process-filter): Check size of retrieved data and set the above variable. (w3m-process-modeline-format): New function. 2003-10-01 Katsumi Yamaoka * w3m-xmas.el (w3m-make-spinner-image): Make sure the gifsicle program is available. 2003-09-30 ARISAWA Akihiro * w3m.el (w3m-use-symbol): Use `w3m-mule-unicode-p'. * w3m-symbol.el (w3m-mule-unicode-symbol): Ditto. 2003-09-30 Katsumi Yamaoka * w3m-proc.el (w3m-process-stop): Redisplay the header-line. * w3m-e21.el (w3m-tab-line-format, w3m-tab-line-timer, w3m-tab-line): Revive the timer operation. (w3m-tab-line): Wobble the window size to force redisplay of the header-line using a timer; include spinner images in the return value when external processes are running. (w3m-spinner-image-file): New variable. (w3m-spinner-image-frames): New variable. (w3m-spinner-image-index): New variable. (w3m-make-spinner-image): New function. * w3m-favicon.el (w3m-favicon-retrieve): Always redraw Emacs frame using the timer; wobble the window size instead of redrawing; increase the delay time for the timer. 2003-09-30 ARISAWA Akihiro * w3m-form.el (w3m-form-parse-and-fontify): Fix problem when form_int appears after input_alt and action is specified. 2003-09-29 Katsumi Yamaoka * w3m-symbol.el (w3m-mule-unicode-symbol): Fix customization type. 2003-09-29 ARISAWA Akihiro * w3m-symbol.el: Bind `w3m-output-coding-system' when compiling. (w3m-mule-unicode-symbol): New variable. (w3m-symbol): Add it for candidate. (w3m-symbol): Use it. * w3m.el (w3m-use-symbol): Check capability for `w3m-mule-unicode-symbol'. 2003-09-29 Katsumi Yamaoka * w3m-e21.el (w3m-tab-line-format, w3m-tab-line-timer, w3m-tab-line): Remove the timer operation temporally. 2003-09-26 Hideyuki SHIRAI * w3m-xmas.el (w3m-make-spinner-image): Bind `format-alist' to nil. 2003-09-26 Katsumi Yamaoka * w3m-e21.el (w3m-tab-line-timer): New variable. (w3m-tab-line): Use it to control this function running too frequently; simplify the source code. * w3m-favicon.el (w3m-favicon-image-of): Abolish. (w3m-favicon-retrieve): Use a timer to redraw Emacs frame. * w3m-xmas.el (w3m-xmas-space-before-favicon): New user option. (w3m-xmas-space-before-spinner): New user option. (w3m-make-spinner-image): Make sure the `gif' feature is available. * w3m.el (w3m-buffer-setup): Use `w3m-xmas-space-before-spinner' and `w3m-xmas-space-before-favicon'. 2003-09-25 Katsumi Yamaoka * icons/spinner.gif: New file (without LZW compression). * icons30/spinner.gif: Ditto. * Makefile.in (install-icons, install-icons30): Also install gifs. * w3m-xmas.el (w3m-make-spinner-image): Use the spinner.gif file. * w3m-e21.el (w3m-tab-line-format): New variable (see doc-string). (w3m-tab-line): Use it; use a timer to suppress this function running too frequently. 2003-09-25 Katsumi Yamaoka * w3m-xmas.el (w3m-spinner-image): New variable. (w3m-make-spinner-image): New function. * w3m.el (w3m-buffer-setup): Call `w3m-make-spinner-image', show a spinner in the modeline under XEmacs. 2003-09-24 Yuuichi Teranishi * w3m-form.el (w3m-form-put-property): Don't call intern if it is not a string. (w3m-form-get-property): Ditto. (w3m-form-put): Added argument ID. (w3m-form-get): Changed argument from NAME to ID. (w3m-form-make-form-data): Changed process to get NAME and VALUE. (w3m-form-resume): Follow the API change in w3m-form-put and w3m-form-get. (w3m-fontify-textareas): Ditto. (w3m-form-parse-and-fontify): Ditto. (w3m-form-input): Ditto. (w3m-form-input-password): Ditto. (w3m-form-input-checkbox): Ditto. (w3m-form-input-radio): Ditto. (w3m-form-input-file): Ditto. (w3m-form-input-textarea-set): Ditto. (w3m-form-textarea-info): Ditto. (w3m-form-input-select): Ditto. (w3m-form-submit): Ditto. (w3m-form-real-reset): Follow the structure change. (w3m-form-input-select-id): New buffer local variable. (w3m-form-input-select-set): Use it. (w3m-form-field-parse): New inline function. (w3m-form-parse-and-fontify): Put id for selectinfo. (w3m-form-resume): Fixed regexp. (w3m-form-input-textarea): Fixed line number. (w3m-fontify-textareas): Put w3m-form-id property. (w3m-form-parse-and-fontify): Store id to the textareainfo. 2003-09-24 Katsumi Yamaoka * w3m-favicon.el (w3m-favicon-retrieve): Redisplay Emacs frame; rename from `w3m-retrieve-favicon'. (w3m-favicon-image): Rename from `w3m-current-favicon-image'. (w3m-favicon-setup): Rename from `w3m-setup-favicon'. (w3m-favicon-image-of): Rename from `w3m-buffer-favicon'. (w3m-favicon-convert): Rename from `w3m-convert-favicon'. (w3m-favicon-retrieve): Rename from `w3m-retrieve-favicon'. * w3m-e21.el (w3m-tab-line): Rename `w3m-buffer-favicon' with `w3m-favicon-image-of'. * w3m.el (w3m-clean-hook-options): Rename `w3m-setup-favicon' with `w3m-favicon-setup'. (w3m-buffer-setup): Rename `w3m-current-favicon-image' with `w3m-favicon-image'. 2003-09-23 OHASHI Akira * w3m.el (w3m-process-connection-type): Set nil when system-type is darwin. 2003-09-22 Katsumi Yamaoka * w3m-favicon.el: Bind `w3m-icon-data' when compiling. (w3m-current-favicon-data): Abolish. (w3m-favicon-converted): Abolish. (w3m-favicon-cache-data): Contain image data. (w3m-favicon-cache-favicon): Return an image instead of raw data. (w3m-setup-favicon): Fix the condition to check whether Emacs can display images; set the value of `w3m-current-favicon-image' instead of `w3m-current-favicon-data' for the about: pages. (w3m-buffer-favicon): Make it simply get the value of `w3m-current-favicon-image'. (w3m-convert-favicon): Accept raw data and type; simply return an image. (w3m-retrieve-favicon): Rearrange the arguments to accept url and type independently; set the value of `w3m-current-favicon-image' instead of `w3m-current-favicon-data'; store an image into `w3m-favicon-cache-data'. (w3m-favicon-save-cache-file): Save data only if they contained images; strip images from the cache for saving. (w3m-favicon-load-cache-file): Create images for all the cache. * w3m.el (w3m-buffer-setup): Use `w3m-current-favicon-image' instead of `w3m-favicon-converted' for `mode-line-buffer-identification' under XEmacs in order to check whether the favicon image is available. (w3m-examine-command-line-args): Use `member' instead of `memq' under XEmacs to check whether `command-line-args' contains the same string as the car of `command-line-args-left'. 2003-09-22 Katsumi Yamaoka * w3m-favicon.el: Autoload w3m for `w3m-expand-url' when compiling. (w3m-setup-favicon): Fix the change of 2003-09-12 which was gone to far. * w3m.el (w3m-open-all-links-in-new-session): Improve the regexp. (w3m-examine-command-line-args): Don't let it misunderstand the next command as a url string; modify the arguments in `command-line-args' instead of removing them. (w3m): Use `w3m-examine-command-line-args' even if it is called non-interactively. 2003-09-21 Katsumi Yamaoka * w3m.el (w3m-open-all-links-in-new-session): Don't use `w3m-select-buffer'. 2003-09-21 Katsumi Yamaoka * w3m.el (w3m-popup-frame-p): Make it accept the `interactive-p' argument. (w3m-examine-command-line-args): New function. (w3m): Use it. 2003-09-20 Katsumi Yamaoka * w3m-favicon.el: Bind some external variables when compiling. 2003-09-19 Yuuichi Teranishi * w3m-form.el (w3m-form-make-form-data): Insert "--" before the multipart post boundary. 2003-09-19 Hideyuki SHIRAI * w3m.el (w3m-underline-face): New face. (w3m-strike-through-face): New user variable. (w3m-fontify-strike-through): New function. (w3m-fontify): Call `w3m-fontify-strike-through' 2003-09-19 Katsumi Yamaoka * w3m-favicon.el (w3m-setup-favicon): Convert favicon data to an image for the about: pages using `w3m-convert-favicon'. (w3m-buffer-favicon): Move the data conversion procedure to `w3m-convert-favicon'. (w3m-convert-favicon): New function detached from `w3m-buffer-favicon'; make it work synchronously. (w3m-retrieve-favicon): Convert favicon data to an image. * w3m-image.el (w3m-imagick-convert-buffer): Erase buffer before calling the convert program. * w3m.el (w3m-buffer-setup): Modify the value for `mode-line-buffer-identification' in order to make it possible to show favicon under XEmacs. 2003-09-19 Katsumi Yamaoka * w3m.el (w3m-open-all-links-in-new-session): New function. Suggested by Yoichi NAKAYAMA . (w3m-view-this-url-new-session): Call `w3m-open-all-links-in-new-session' if the region is active. 2003-09-18 Katsumi Yamaoka * w3m.el (w3m-key-binding): Don't use `custom-set-default'. (w3m-use-favicon): Ditto. * w3m-favicon.el (w3m-favicon-size): Ditto. * icons/*.xpm: Remove text. 2003-09-17 Yuuichi Teranishi * w3m-form.el (w3m-form-new): Use `application/x-www-form-urlencoded' instead of `urlencoded'. (w3m-form-parse-and-fontify): Ditto. (w3m-form-make-form-data): Use `multipart/form-data' instead of `multipart'. (w3m-form-mee-new): Likewise. 2003-09-17 Katsumi Yamaoka * w3m-e21.el (w3m-e21-toolbar-configurations): Don't modify the values for `tool-bar-button-margin' and `tool-bar-button-relief'. * w3mhack.el (w3mhack-nonunix-install): Use icons30 for XEmacs. (w3mhack-make-package): Use icons30. * Makefile.in (SUBDIRS): Add icons30. (install-icons30): New rule. (install-package, install-package-ja): Use it. * icons/*.xpm: Shrink the size of all icons. * icons30/: Old icons are here. 2003-09-16 Katsumi Yamaoka * w3m-util.el (w3m-activate-zmacs-regions): New macro. * w3m.el (w3m-next-anchor, w3m-previous-anchor, w3m-next-form, w3m-previous-form, w3m-next-image, w3m-previous-image, w3m-scroll-up-or-next-url, w3m-scroll-down-or-previous-url, w3m-beginning-of-line, w3m-end-of-line): Use it. 2003-09-16 Katsumi Yamaoka * w3m-hist.el (w3m-history-backward): Return nil if there is no previous element. * w3m.el (w3m-view-previous-page): Skip the current page if it seems broken; warn if there's no more history. (w3m-copy-buffer): Use the current history for the url string if the current page seems broken. (w3m-goto-url): Use `lexical-let' to pass the history position data to the asynchronous w3m process. 2003-09-12 Katsumi Yamaoka * w3m-e21.el: Move the favicon stuff to w3m-favicon.el. * w3m-favicon.el: New file detached from w3m-e21.el. (w3m-favicon-type): Adapt it to XEmacs as well. (w3m-setup-favicon): Ditto. (w3m-buffer-favicon): Ditto. (w3m-retrieve-favicon): Replace `float-time' with `w3m-float-time'. (w3m-arrived-setup-functions): Don't add-hook it here. (w3m-arrived-shutdown-functions): Ditto. * w3m-xmas.el: Require `w3m-favicon'. * w3m.el (w3m-arrived-setup-functions): Add `w3m-favicon-load-cache-file' if w3m-favicon is loaded. (w3m-arrived-shutdown-functions): Add `w3m-favicon-save-cache-file' if w3m-favicon is loaded. * w3m-util.el (w3m-float-time): New function. * w3mhack.el (w3mhack-examine-modules): Exclude w3m-favicon.el from the files to be byte-compiled. 2003-09-02 Katsumi Yamaoka * w3m.el (w3m-view-this-url-1): Fix a window configuration only when the buffer's major mode has changed from the w3m-mode to another. (w3m-goto-url): Don't erase a buffer when retrieving a local file. 2003-08-29 Katsumi Yamaoka * w3m.el (w3m-copy-buffer): Copy the history before visiting a page in order to show the about://history/ page correctly; adjust the position in the history after copying. (w3m-goto-url): Use buffer-local properties instead of global properties for form data. (w3m-reload-this-page): Specify the history element to the `w3m-goto-url' function in order to submit the form data. 2003-08-25 Katsumi Yamaoka * w3m.el (w3m-view-this-url-1): Don't kill the emacs-w3m buffer when a process is in progress. (w3m-goto-url-new-session): Ditto. 2003-08-25 Katsumi Yamaoka * w3m.el (w3m-view-previous-page): Specify a history element of the previous page to the `w3m-goto-url' function as the 7th arg. (w3m-goto-url): Accept a history element as the 7th argument; specify nil as the 7th argument when recursively calling itself; use a given history element to examine the form data of the url to be visited. (w3m-goto-url-new-session): Specify nil to the `w3m-goto-url' function as the 7th argument. (w3m): Ditto. 2003-08-15 Katsumi Yamaoka * w3m-hist.el (w3m-history-minimize-in-new-session): New user option. (w3m-history-set-current): Redefine as an inline function rather than a macro. (w3m-history-current-1): Abolish the function. (w3m-history-current-2): Abolish the function. (w3m-history-element): New function. (w3m-history-current): Abolish the funtction. (w3m-history-backward): Don't modify the current position pointer in the `w3m-history' variable. (w3m-history-forward): Simplify using `w3m-history-backward'. (w3m-history-copy): Minimize the history when `w3m-history-minimize-in-new-session' is non-nil. (w3m-history-plist-get): Abolish the `url' argument; complement the meaning of the `local' argument. (w3m-history-add-properties): Ditto. (w3m-history-plist-put): Ditto. (w3m-history-remove-properties): Ditto. (w3m-history-store-position): Don't specify the optional arguments to `w3m-history-add-properties'. (w3m-history-restore-position): Abolish the `url' argument; don't specify the optional arguments to `w3m-history-plist-get'. (w3m-history-minimize): Simplify using `w3m-history-element'. * w3m.el (w3m-view-previous-page): Don't specify the optional arguments to `w3m-history-plist-get' and `w3m-history-restore-position'. (w3m-goto-url): Don't specify the optional arguments to `w3m-history-plist-put', `w3m-history-plist-get', `w3m-history-remove-properties' and `w3m-history-add-properties'. (w3m-reload-this-page): Don't specify the optional arguments to `w3m-history-plist-get' and `w3m-history-remove-properties'. 2003-08-14 Katsumi Yamaoka * w3m-hist.el (w3m-history-flat): Reduce the deepness of local prpoerties in the list structure. (w3m-history-assoc): Simplify; redefine as an inline function. (w3m-history-with-element): Abolish the macro. (w3m-history-current-2): New function. (w3m-history-set-plist): New function. (w3m-history-modify-properties): Rewrite. (w3m-history-seek-properties): Abolish the function. (w3m-history-seek-element): New function. (w3m-history-share-properties): Abolish the function. (w3m-history-tree): Tiny change. (w3m-history-push): Rewrite. (w3m-history-copy): Tiny change. (w3m-history-plist-get): Synch to the change of `w3m-history-flat'. (w3m-history-plist-put): Rewrite. (w3m-history-add-properties): Rewrite. (w3m-history-remove-properties): Rewrite. (w3m-history-rename-url): Abolish the function. (w3m-history-store-position): Abolish the optional argument. (w3m-history-minimize): New command. 2003-08-13 Katsumi Yamaoka * w3m-hist.el (w3m-history-current-1): Redefine as a function rather than a macro. (w3m-history-previous-position): Ditto. (w3m-history-next-position): Ditto. (w3m-history-modify-properties): Ditto. (w3m-history-save-position): Abolish the macro. (w3m-history-forward-1): Ditto. (w3m-history-backward-1): Ditto. (w3m-history-with-element): Abolish the `set-current' argument. (w3m-history-assoc): Ditto. (w3m-history-plist-get): Ditto. (w3m-history-plist-put): Ditto. (w3m-history-add-properties): Ditto. (w3m-history-remove-properties): Ditto. (w3m-history-rename-url): Ditto. (w3m-history-set-current): New macro. (w3m-history-forward): Abolish the `set-current' argument; use `w3m-history-set-current'. (w3m-history-backward): Ditto. (w3m-history-tree): Use `w3m-history-set-current' instead of `w3m-history-forward-1'. (w3m-history-push): Use `w3m-history-set-current'. (w3m-history-store-position): Don't specify the `set-current' argument to `w3m-history-add-properties'. (w3m-history-restore-position): Don't specify the `set-current' argument to `w3m-history-plist-get'. * w3m.el (w3m-view-previous-page): Don't specify the `set-current' argument to `w3m-history-plist-get'. (w3m-goto-url): Don't specify the `set-current' argument to `w3m-history-plist-put', `w3m-history-plist-get', `w3m-history-remove-properties' and `w3m-history-add-properties'. (w3m-reload-this-page): Don't specify the `set-current' argument to `w3m-history-plist-get' and `w3m-history-remove-properties'. 2003-08-12 Katsumi Yamaoka * w3m.el (w3m-view-this-url-1): Fix a window configuration if a new buffer visiting the specified url is not in the `w3m-mode'; remove a newly created buffer if it is useless. (w3m-goto-url): Don't use `save-excursion' when performing find-file directly. (w3m-goto-url-new-session): Remove a newly created buffer if it is useless. 2003-08-12 ARISAWA Akihiro * Makefile.in (what-where): Add space to avoid error on Solaris. * w3m-namazu.el (w3m-about-namazu): Fix last change. 2003-08-11 Katsumi Yamaoka * w3m-hist.el (w3m-history-previous-position): New macro. (w3m-history-next-position): New macro. (w3m-history-forward-1): Simplified using new macro(s). (w3m-history-backward-1): Ditto. (w3m-history-regenerate-pointers): Ditto. (w3m-history-assoc): Ditto. (w3m-history-current-1): Don't use old-fashioned backquotes. (w3m-history-save-position): Ditto. (w3m-history-modify-properties): Ditto. (w3m-history-with-element): Ditto. 2003-08-10 ARISAWA Akihiro * w3m-namazu.el (w3m-about-namazu): Fixed problem when further links contain "&". 2003-08-07 TSUCHIYA Masatoshi * w3m.el (w3m-w3m-get-header): Removed. (w3m-w3m-parse-header, w3m-w3m-dump-head): New function. (w3m-w3m-attributes): Call the above functions. (w3m-w3m-dump-head-source): Removed. (w3m-w3m-dump-extra): New function. (w3m-w3m-retrieve, w3m-w3m-retrieve-1): Reimplemented. (w3m-about-header): Call `w3m-w3m-dump-head' instead of `w3m-w3m-get-header'. * w3m-proc.el: Changes to support recursive call of functions creating asynchronous processes. (w3m-process-waited): Abolished. (w3m-process-handler-new): Add result slot. (w3m-process-handler-functions): Renamed from `w3m-process-handler-function'. (w3m-process-handler-result): New macro. (w3m-process-with-null-handler): Reimplemented. (w3m-process-start-and-wait): New function. (w3m-process-with-wait-handler): Reimplemented. (w3m-process-do): Reimplemented. (w3m-process-do-with-temp-buffer): Reimplemented. (w3m-process-sentinel): Accept the 3rd argument. Follow the above changes. 2003-08-08 Katsumi Yamaoka * w3m-hist.el (w3m-history-reuse-history-elements): New user option. (w3m-history-forward): Return a cons of a new history element and new position pointers of a history. (w3m-history-backward): Ditto. (w3m-history-regenerate-pointers): New function. (w3m-history-push): If `w3m-history-reuse-history-elements' is nil, sprout a new history branch even if history elements for the same url already exist. (w3m-history-add-arrived-db): Abolish the optional argument; bind `w3m-history-reuse-history-elements' to t. * w3m.el (w3m-view-previous-page): Assume `w3m-history-backward' returns cons data; bind `w3m-history-reuse-history-elements' to t; fix position pointers of a history after visiting a page. (w3m-goto-url): Fix position pointers of a history when a page is referred to by the about://history/ page. (w3m-about-history): Include position pointers in an html form. (w3m-history-highlight-current-url): Make history position data invisible. 2003-07-30 Katsumi Yamaoka * w3m.el (w3m-decode-entities): Don't trust in the `match-data' after the `w3m-entity-value' function is performed. 2003-07-29 Katsumi Yamaoka * w3m.el (w3m-command, w3m-user-agent, w3m-command-arguments, w3m-command-arguments-alist, w3m-no-proxy-domains, w3m-command-environment, w3m-fill-column, w3m-mailto-url-function, w3m-mailto-url-popup-function-alist, w3m-imitate-widget-button, w3m-pixels-per-character, w3m-coding-system, w3m-terminal-coding-system, w3m-input-coding-system, w3m-output-coding-system, w3m-file-coding-system, w3m-file-name-coding-system, w3m-default-coding-system, w3m-coding-system-priority-list, w3m-profile-directory, w3m-init-file, w3m-default-save-directory, w3m-accept-languages, w3m-icon-directory, w3m-home-page, w3m-arrived-file, w3m-keep-arrived-urls, w3m-keep-cache-size, w3m-follow-redirection, w3m-resize-image-scale, w3m-default-content-type, w3m-content-type-alist, w3m-encoding-type-alist, w3m-decoder-alist, w3m-charset-coding-system-alist, w3m-correct-charset-alist, w3m-horizontal-scroll-columns, w3m-horizontal-shift-columns, w3m-edit-function, w3m-url-local-directory-alist, w3m-pop-up-frame-parameters, w3m-horizontal-scroll-division, w3m-mbconv-command, w3m-local-find-file-regexps, w3m-local-find-file-function, w3m-local-directory-view-method, w3m-dirlist-cgi-program, w3m-add-referer-regexps, w3m-touch-command, w3m-uri-replace-alist, w3m-db-history-display-size, w3m-select-buffer-window-ratio): Improve the customizing widgets. * w3m-symbol.el (w3m-symbol-custom-type): New variable. (w3m-default-symbol, w3m-Chinese-BIG5-symbol, w3m-Chinese-CNS-symbol, w3m-Chinese-GB-symbol, w3m-Japanese-symbol, w3m-Korean-symbol): Use it. (w3m-symbol): Improve the customizing widgets. * w3m-search.el (w3m-search-engine-alist, w3m-search-default-engine): Improve the customizing widgets. * w3m-perldoc.el (w3m-perldoc-command, w3m-perldoc-pod2html-command, w3m-perldoc-pod2html-arguments): Ditto. * w3m-filter.el (w3m-filter-rules): Ditto. 2003-07-28 Katsumi Yamaoka * w3m-namazu.el (w3m-namazu-command, w3m-namazu-arguments, w3m-namazu-page-max, w3m-namazu-default-index-customize-spec, w3m-namazu-index-alist, w3m-namazu-output-coding-system, w3m-namazu-input-coding-system): Improve the customizing widgets. * w3m-image.el (w3m-imagick-convert-program): Ditto. * w3m-form.el (w3m-form-input-textarea-buffer-lines, w3m-form-input-select-buffer-lines, w3m-form-input-map-buffer-lines): Ditto. * w3m-filter.el (w3m-filter-rules): Ditto. * w3m-e21.el (w3m-favicon-size, w3m-favicon-cache-file, w3m-favicon-cache-expire-wait, w3m-favicon-type, w3m-tab-width): Diito. * w3m-dtree.el (w3m-dtree-directory-depth, w3m-dtree-indent-strings, w3m-dtree-stop-strings): Ditto. * w3m-cookie.el (w3m-cookie-accept-domains, w3m-cookie-reject-domains, w3m-cookie-accept-bad-cookies, w3m-cookie-file): Ditto. * w3m-bookmark.el (w3m-bookmark-file, w3m-bookmark-file-coding-system, w3m-bookmark-default-section): Ditto. * w3m-bitmap.el (w3m-bitmap-convert-arguments): Ditto. * w3m-antenna.el (w3m-antenna-sites, w3m-antenna-make-summary-function, w3m-antenna-sort-changed-sites-function, w3m-antenna-sort-unchanged-sites-function, w3m-antenna-file): Ditto. * mime-w3m.el (mime-w3m-safe-url-regexp): Ditto. 2003-07-27 ARISAWA Akihiro * w3m.el (w3m-accept-japanese-characters): Checked loosely. 2003-07-27 TSUCHIYA Masatoshi * Makefile.in (clean): Do not remove `shimbun-servers.el'. * w3mhack.el: Do not generate `shimbun-servers.el'. (shimbun-servers-file): Abolished. (w3mhack-compile, w3mhack-batch-compile): Do not call `w3mhack-check-shimbun-servers-file'. (w3mhack-generate-shimbun-servers-file): Removed. (w3mhack-check-shimbun-servers-file): Removed. * w3m.el (w3m-fontify-anchors): Handle `id' attributes of anchors. Thanks to Shinichiro HIDA and TAKAISHI Hayato for their reports. (w3m-fontify-bold, w3m-fontify-underline): Stricten regular expressions to detect tags. For more detail, see [emacs-w3m:05600]. 2003-07-25 Katsumi Yamaoka * mime-w3m.el (mime-w3m-display-inline-images): Improve the customizing widget. 2003-07-25 Katsumi Yamaoka * w3m.el (w3m-language, w3m-command-environment, w3m-content-type-alist, w3m-encoding-type-alist, w3m-decoder-alist, w3m-charset-coding-system-alist, w3m-correct-charset-alist, w3m-url-local-directory-alist, w3m-pop-up-frame-parameters): Improve the customizing widgets. 2003-07-25 Katsumi Yamaoka * w3mhack.el (w3mhack-generate-shimbun-servers-file): Exclude rss. 2003-07-25 TSUCHIYA Masatoshi * w3m-form.el (w3m-form-set-method): New inline function, that is a `setf' method of `w3m-form-method'. * w3mhack.el (w3mhack-examine-modules): Because Mew 2.x and later do not support Mule2.3 and Emacs19, ignore mew-shimbun.el when compiling on such Emacsen. 2003-07-24 ARISAWA Akihiro * w3m.el (w3m-output-coding-system): Changed condition to use utf-8 with w3m-m17n. (w3m-halfdump-command-arguments): Ditto. 2003-07-24 Yuuichi Teranishi * w3m-form.el (w3m-form-parse-and-fontify): Fix for the pages in which form_int appears after input_alt. 2003-07-23 Katsumi Yamaoka * w3mhack.el (w3mhack-makeinfo): Force texinfmt.elc to load texinfo.elc from the correct place. 2003-07-19 ARISAWA Akihiro * w3m-e21.el (w3m-euc-japan-encoder): Fixed comment. 2003-07-18 TSUCHIYA Masatoshi * Release emacs-w3m-1.3.6 from emacs-w3m-1_3 branch. 2003-07-18 TSUCHIYA Masatoshi * w3m-e21.el (w3m-ccl-get-ucs-codepoint-with-emacs-unicode): Remove `translate-character'. (w3m-euc-japan-encoder, w3m-iso-latin-1-encoder): Select appropriate encoders when thie file is loaded. * w3m-ccl.el (w3m-ccl-write-repeat): Use a literal list of unibyte character sets, instead of calling `charset-bytes', in order to avoid difference between FSF Emacs and XEmacs. (w3m-euc-japan-encoder, w3m-iso-latin-1-encoder): Do not overwrite, if they have already been defined. 2003-07-17 Katsumi Yamaoka * w3mhack.el (w3mhack-examine-modules): Ignore w3m-ccl.el when XEmacs doesn't provide the mule feature. 2003-07-17 Hideyuki SHIRAI * w3m.el (w3m-correct-charset-alist): New user option. (w3m-correct-charset): New inline macro. (w3m-detect-meta-charset): New function. (w3m-decode-buffer): Use `w3m-correct-charset' and `w3m-detect-meta-charset'. (w3m-create-page): Set `charset' to `w3m-current-content-charset' if it is nil. (w3m-region): If `charset' is nil, check `content-charset' in `META Tag'. 2003-07-17 TSUCHIYA Masatoshi * w3m-ccl.el (toplevel): Add autoload for `charset-id' defined at w3m-om.el. (w3m-ccl-write-repeat): Simplified. (w3m-ccl-write-euc-japan-character): Set nil, when `read-multibyte-character' is not available. (w3m-ccl-write-iso-latin-1-character): Ditto. * w3m-om.el: Remove redundant `function'. (w3m-om-character-set-alist): New variable. (charset-id): New function. * w3m.el (w3m-input-coding-system): Change its default value for Mule2.3 and Emacsen without Mule. 2003-07-17 TSUCHIYA Masatoshi * w3mhack.el (w3mhack-examine-modules): Ignore w3m-ccl.el when ccl.el is missing. * w3m-e21.el (w3m-ccl-get-ucs-codepoint-with-emacs-unicode): Import from w3m-ccl.el. * w3m-ucs.el (w3m-ccl-get-ucs-codepoint-with-mule-ucs): Import from w3m-ccl.el. * w3m-ccl.el: Export the above constants. * w3m.el (w3m-retrieve-and-render): Check current content charset before `w3m-create-page' is called. 2003-07-17 ARISAWA Akihiro TSUCHIYA Masatoshi * w3m.el (toplevel): Do not require `ccl'. (w3m-input-coding-system): Change its default value. (w3m-internal-characters-alist): Moved to w3m-ccl.el (w3m-ccl-write-repeat): Ditto. (w3m-euc-japan-decoder): Ditto. (w3m-euc-japan-encoder): Ditto. (w3m-iso-latin-1-decoder): Ditto. (w3m-iso-latin-1-encoder): Ditto. * w3m-ccl.el: New file. * w3m-ucs.el: Completely rewritten. (w3m-euc-japan-mule-ucs, w3m-iso-latin-1-mule-ucs): New coding systems. * w3m-e21.el (toplevel): Require `w3m-ccl'. (w3m-euc-japan-encoder, w3m-iso-latin-1-encoder): New encoder. * w3m-om.el, w3m-e20.el, w3m-xmas.el (toplevel): Require `w3m-ccl'. 2003-07-17 Hideyuki SHIRAI * w3m.el (w3m-about-db-history): Call `w3m-arrived-time' with string. 2003-07-16 Katsumi Yamaoka * w3m.el (w3m-uri-replace-alist): Improve the customizing widget. 2003-07-16 TSUCHIYA Masatoshi * w3m.el (w3m-copy-buffer): Fix the logical error installed by the last change at 2003-07-15. 2003-07-15 TSUCHIYA Masatoshi * w3m.el (w3m-image-only-page): Abolished. (w3m-show-error-information): Return nil. (w3m-create-text-page): Return 'text-page. (w3m-create-image-page): Return 'image-page. (w3m-create-page): Return 'external-view when `w3m-external-view' is called. (w3m-goto-url): Do not encode a given URL when it points a local page. Bind `w3m-current-buffer' locally. Follow the change of `w3m-create-page'. (w3m-copy-buffer): Wrap `w3m-goto-url' with `w3m-process-with-wait-handler', to avoid unexpected asynchronous processes. (w3m-region): Bind `w3m-current-buffer' locally. * w3m-util.el (w3m-url-local-p): Stricten its regexp. (w3m-url-dtree-p): Removed. 2003-07-10 Katsumi Yamaoka * w3m.el (w3m-uri-replace-alist): Revert 2003-07-09 change; improve the customizing widget. * doc/ptexinfmt.el (texinfo-discard-command-and-arg): New function for old Emacsen. 2003-07-09 TSUCHIYA Masatoshi * w3m.el (w3m-decoder-alist): Simplified. 2003-07-09 Katsumi Yamaoka * w3m.el (w3m-decoder-alist): Look for the newest inflate command. 2003-07-09 Hideyuki SHIRAI * mew-w3m.el (w3m-mew-support-cid): Check `mew-version-number'. (mew-w3m-cid-retrieve): Support Mew 4.0.53 and later. Thanks to Kazu YAMAMOTO for his patch. 2003-07-09 TSUCHIYA Masatoshi * w3m.el (w3m-uri-replace-alist): Add `rpm', `waei', `eiwa', `kokugo' and `eiei'. (w3m-input-url): Do not encode its return value. (w3m-goto-url): Call `w3m-url-transfer-encode-string' to encode a given URL. 2003-07-05 TSUCHIYA Masatoshi * Release emacs-w3m-1.3.5 from emacs-w3m-1_3 branch. 2003-07-04 Katsumi Yamaoka * w3m.el (w3m-view-this-url-1): Simply copy buffer's contents to the new session rather than to call `w3m-goto-url'. 2003-07-03 TSUCHIYA Masatoshi * w3m.el (w3m-local-file-type): Check whether a regular expression is specified, before matching it on a URL. * Following changes are to check whether required libraries are available. * w3mhack.el (toplevel): Do not create `shimbun/shimbun-servers.el' and `w3m-kwds.el' only when this file is loaded, to suppress excessive messages. (w3mhack-check-shimbun-servers-file): New function. (w3mhack-check-colon-keywords-file): New function. (w3mhack-compile): Call these functions explicitly. (w3mhack-batch-compile, w3mhack-locate-library, w3mhack-print-status): New functions. * configure.in: Check that egrep is available and that regexp-opt.el and xml.el are available. * aclocal.m4 (AC_EMACS_LISP): Add `-q' option and `-no-site-file' option. (AC_ADD_LOAD_PATH): Define `--with-attic' option. (AC_CHECK_ELISP): New function. * Makefile.in (.el.elc): Call `w3mhack-batch-compile' instead of `batch-byte-compile'. (very-slow): Always call `keywords' target. (keywords): Call `w3mhack-check-colon-keywords-file'. 2003-07-03 TSUCHIYA Masatoshi * w3m-antenna.el (w3m-about-antenna): Fix the expression to decide changed sites. * w3m.el (w3m-retrieve-and-render): Do not overwrite an arrived time with a modified time, even if the modified time is newer than the arrived time. Store a real URL to arrived DB. (w3m-about-db-history): Small clean up. * attic/xml.el: Import contrib/xml.el of Oort Gnus. Require cl and poe. 2003-07-02 TSUCHIYA Masatoshi * w3m-bookmark.el (w3m-bookmark-add): Encode special characters included in a URL and a title. * w3m-antenna.el (w3m-antenna-check-all-sites): Use `w3m-antenna-alist' instead of `w3m-antenna-sites'; this change must have no ill effects because `w3m-use-setup' merges site informations kept by `w3m-antenna-sites' into `w3m-antenna-alist'. (w3m-about-antenna): Fix. (w3m-antenna-add-current-url): Encode special characters included in `w3m-current-title'. * w3m.el: Changes of functions handling the arrived database, and clean up w3m-retrieve-and-render() and related parts. (w3m-content-type-alist): Change spec. (w3m-attributes): Strip authentication part from URL before checking charsets given by a user. (w3m-arrived-add-1): Removed. (w3m-arrived-add): Reimplemented. (w3m-arrived-modify): Removed. (w3m-arrived-time): Define its `setf' method. (w3m-arrived-get, w3m-arrived-put): New inline functions. (w3m-arrived-title): Define as a macro using `w3m-arrived-get'. (w3m-arrived-last-modified): Ditto (w3m-arrived-content-charset): Ditto (w3m-arrived-content-type): Ditto. (w3m-arrived-shutdown): Modify a predicate used for comparing arrived elements, to ensure that every URL precedes its variants with fragments. (w3m-encode-specials-string): New function. (w3m-safe-decode-buffer): New function. (w3m-rendering-extract-title): Simplified. (w3m-rendering-half-dump): Define as a normal function. (w3m-rendering-buffer): Do not call `w3m-filter'. (w3m-retrieve-and-render): Reimplemented. (w3m-show-error-information): Change its argument spec. (w3m-content-prepare-functions): Abolished. (w3m-prepare-content): Reimplemented. (w3m-prepare-text-content, w3m-prepare-image-content): Removed. (w3m-create-text-page, w3m-create-image-page): New functions; the successors of the aboves. (w3m-create-page): New function. (w3m-goto-url): Follow above changes and clean up. (w3m-redisplay-and-reset): Call `setf' methods instead of using `w3m-arrived-modify'. (w3m-redisplay-with-charset): Ditto. (w3m-redisplay-with-content-type): Ditto. (w3m-about-header): Strip authentication part from URL before extracting titles. (w3m-about-history): Encode special characters included in a title. (w3m-about-db-history): Encode special characters in the title. Ignore URLs that include fragments. 2003-07-01 TAKAHASHI Kaoru * doc/ptexinfmt.el: @verb, @tie, @/ support. (ptexinfmt-broken-facility): Abolish NO-NOTICE argument. Use `ptexinfmt-disable-broken-notice-flag' instead. 2003-07-01 Hideyuki SHIRAI * mew-w3m.el (mew-mime-text/html-w3m): Add CHARSET argument of `w3m-region' when no w3m-m17n. 2003-07-01 TSUCHIYA Masatoshi * mime-w3m.el (mime-w3m-preview-text/html): Call `w3m-region' with `charset' option. 2003-07-01 Katsumi Yamaoka * w3m.el (w3m-goto-url): Use `w3m-url-strip-fragment' instead of `w3m-base-url' for local files. 2003-07-01 TSUCHIYA Masatoshi * w3m.el (w3m-arrived-load-list): Check that `w3m-arrived-file' exists before deleting it. (w3m-check-refresh-attribute): Condition relaxed. (w3m-region): Disable checking refresh attribute. 2003-06-30 TSUCHIYA Masatoshi * w3m.el: Some miscellaneous changes and large changes to make a filter module cooperate with w3mmee and w3m-m17n. (w3m-language): Stricten its customize spec. (w3m-attributes): Call `w3m-url-strip-fragment' instead of using a literal regular expression. (w3m-arrived-load-list): New function. (w3m-arrived-setup, w3m-arrived-shutdown): Use the above. (w3m-url-decode-string): Call `vector' instead of `string' to avoid making unexpected multibyte characters. (w3m-decode-buffer): Do not call `w3m-decode-get-refresh'. (w3m-decode-get-refresh): Removed. (w3m-check-refresh-attribute): New function, the successor of the above. (w3m-rendering-half-dump): Encode a content for w3mmee and w3m-m17n with `w3m-current-coding-system' instead of giving it as a binary data. Because `w3m-current-coding-system' keeps a coding system used to decode the current buffer, all characters should be recovered by this encoding. (w3m-rendering-buffer-1): Removed. (w3m-rendering-buffer): New function, the successor of the above. (w3m-rendering-unibyte-buffer): Removed. (w3m-rendering-multibyte-buffer): Removed. (w3m-prepare-text-content): Always call `w3m-decode-buffer'. Call `w3m-rendering-buffer' instead of `w3m-rendering-unibyte-buffer'. (w3m-goto-url): Fix regular expressions. (w3m-region): Accept the 4th optional argument, `charset'. Set `w3m-current-coding-system' to the coding system based on the given charset. Call `w3m-rendering-buffer' with the charset. 2003-06-26 Katsumi Yamaoka * w3mhack.el (w3mhack-makeinfo): Include other files first. 2003-06-23 Katsumi Yamaoka * w3mhack.el (w3mhack-shimbun-modules-using-rss): Don't use `with-temp-buffer'. 2003-06-22 TSUCHIYA Masatoshi * w3mhack.el (w3mhack-shimbun-modules-using-rss): New function. (w3mhack-examine-modules): Call the above instead of a literal list. 2003-06-20 Katsumi Yamaoka * doc/Makefile.in (install): Don't run install-info for non- existent info files. * w3mhack.el (w3mhack-examine-modules): Also examine "sb-pukiwiki-rss.el". 2003-06-19 TSUCHIYA Masatoshi * w3m-namazu.el (w3m-namazu-complete-index): Consider `predicate' option. * w3m-weather.el (w3m-weather-completion-table): Add `oki' as the shortend form of `shimanekenoki'. 2003-06-18 TSUCHIYA Masatoshi * w3m.el (w3m-fontify-anchors): Do not encode fragment parts. 2003-06-18 Katsumi Yamaoka * w3mhack.el (w3mhack-examine-modules): Ignore the shimbun modules which need xml.el if it is not available. 2003-06-18 Katsumi Yamaoka * w3mhack.el (w3mhack-makeinfo): Improve the last change. 2003-06-18 TSUCHIYA Masatoshi * Release emacs-w3m-1.3.4 from emacs-w3m-1_3 branch. 2003-06-18 TSUCHIYA Masatoshi * w3m.el (w3m-arrived-ignored-regexp): Use "\`" instead of "^". (w3m-history-ignored-regexp): Ditto. (w3m-url-transfer-encode-string): New inline function. (w3m-fontify-anchors): Encode URL with the attribute `charset'. (w3m-input-url): Encode URL with `w3m-default-coding-system'. (w3m-about-header): Display the current anchor information. * w3m-form.el (w3m-form-parse-and-fontify): Encode URL with the attribute `charset'. 2003-06-17 Katsumi Yamaoka * w3mhack.el (w3mhack-makeinfo): Encode messages to terminal while formatting info pages. 2003-06-12 Katsumi Yamaoka * w3m.el (w3m-w3m-attributes): Improve the regexp to extract content-types. 2003-06-08 Yuuichi Teranishi * w3m-form.el (w3m-form-parse-and-fontify): Apply `w3m-decode-anchor-string' to the form action url. 2003-06-05 TSUCHIYA Masatoshi * doc/emacs-w3m.texi, doc/emacs-w3m-ja.texi: Their license is changed from GNU Free Documentation License to GNU General Public License. 2003-05-30 Yuuichi Teranishi * octet.el (toplevel): Require poe. (octet-filter-call1): Use `make-temp-file' instead of `make-temp-name'. (octet-filter-call2): Ditto. (octet-filter-call2-extra): Ditto. (octet-temp-directory): Changed default value to `temporary-file-directory'. 2003-05-29 TSUCHIYA Masatoshi * Makefile.in (DOCS): FAQ, FAQ.ja, README.namazu.ja, README.shimbun.ja, TIPS and TIPS.ja are merged into Info. 2003-05-29 TSUCHIYA Masatoshi * doc/Makefile.in (dvi): New target to create dvi files; related targets and macros are installed. * doc/.cvsignore: Ignore dvi files. * configure.in: Check whether texi2dvi, ptex and jbibtex exists. 2003-05-28 TSUCHIYA Masatoshi * .cvsignore: Ignore tarballs. * Makefile.in (SUBDIRS): New macro. (tarball): Refer the above macro, and put texinfo sources into a tarball. * aclocal.m4 (AC_ADD_LOAD_PATH): Use the variable `EGREP' instead of the literal `grep'. 2003-05-27 Katsumi Yamaoka * w3mhack.el (byte-optimizer for match-string-no-properties): `lenght' -> `length'. 2003-05-27 TSUCHIYA Masatoshi * w3m.el: Simplify functions that rewrite URIs. (toplevel): Autoload `w3m-search-uri-replace' instead of `w3m-search-quick-search-handler'. (w3m-uri-replace-alist): Changed its default value and its customize spec. (w3m-pattern-uri-replace): New function. (w3m-uri-replace): Reimplemented. * w3m-search.el (w3m-search-quick-search-engine-alist): Abolished. (w3m-search-quick-search-engines): Removed. (w3m-search-quick-search-handler): Removed. (w3m-search-uri-replace): New function. 2003-05-26 Katsumi Yamaoka * w3m.el (w3m-highlight-current-anchor): Don't infloop even if a w3m buffer is narrowed. 2003-05-22 Katsumi Yamaoka * w3mhack.el (w3mhack-make-package): Make it work under non-Mule XEmacs. 2003-05-19 Hideyuki SHIRAI * mew-w3m.el (mew-w3m-use-safe-url-regexp): New variable. (mew-w3m-view-inline-image, mew-mime-text/html-w3m): Use `mew-w3m-use-safe-url-regexp' for `w3m-safe-url-regexp'. 2003-05-12 Hideyuki SHIRAI * w3m.el (Top): Use w3m-treat-drive-letter for `w3m-expand-path-name'. 2003-05-12 TSUCHIYA Masatoshi * mime-w3m.el (mime-w3m-preview-text/html): Apply the patch posted by Yoichi NAKAYAMA in [emacs-w3m:04836], that correct the wrong usage of `message'. 2003-05-06 Katsumi Yamaoka * w3m.el (w3m-fontify-anchors): Invalidate the widget keymap in XEmacs; add a help-echo to the widget button. (w3m-make-minor-mode-keymap): Bind [down-mouse-2] to `undefined' to invalidate the `widget-button-click' command in FSF Emacs. 2003-04-30 Katsumi Yamaoka * w3m.el (w3m-imitate-widget-button): New variable. (w3m-imitate-widget-button): New function. (w3m-fontify-anchors): Imitate the widget button. (w3m-next-anchor): Look for the widget button. (w3m-previous-anchor): Ditto. 2003-04-30 TSUCHIYA Masatoshi * w3m.el (w3m-retrieve-and-render): Hide a exit status from an error message unless `w3m-process-exit-status'. 2003-04-30 Katsumi Yamaoka * w3m.el (w3m-goto-url): Improve and bug fix the find-file code. 2003-04-16 Chihiro Kuroda * w3m.el (w3m-download): Download a directory url to index.html (by default) instead of signaling an error. 2003-04-11 Katsumi Yamaoka * w3m.el (w3m-local-find-file-regexps): New user option. (w3m-local-find-file-function): New user option. (w3m-goto-url): Use the function specified by the `w3m-local-find-file-function' variable for local files when the file name matches the `w3m-local-find-file-regexps' variable. 2003-04-04 Hideyuki SHIRAI * w3m-search.el (w3m-search-engine-alist): Change coding-system to `euc-japan' of "waei" and "kokugo". Tnx, Mr. Saito (sai@yedo.com) for his report. 2003-03-26 TSUCHIYA Masatoshi * w3m-antenna.el (w3m-antenna-check-all-sites): Call `make-symbol' instead of `gensym', in order to make this function free from runtime CL functions. 2003-03-07 Katsumi Yamaoka * w3m-bug.el (report-emacs-w3m-bug): Make it possible to send a bug report even if emacs-w3m is not running. 2003-03-03 Michael Shields * w3m-xmas.el (w3m-create-image): Protect against images which are not permitted to be loaded according to `w3m-safe-url-regexp'. 2003-02-28 Hideyuki SHIRAI * w3m-util.el (w3m-get-server-hostname): Rename and move from `w3m-process-get-server-root' in `w3m-proc.el'. * w3m-proc.el (w3m-process-set-authinfo, w3m-process-read-user) (w3m-process-read-passwd, w3m-process-y-or-n-p): Use `w3m-get-server-hostname' instead of `w3m-process-get-server-root'. * w3m.el (w3m-show-error-information): New customized variable. (w3m-w3m-attributes): Message strange `Location:' like lynx. (w3m-retrieve-and-render): When error occur, show error message in `w3m buffer' to be accompanied by `w3m-show-error-information'. (w3m-show-error-information): New function. (w3m-reload-this-page, w3m-redisplay-this-page) (w3m-redisplay-and-reset, w3m-redisplay-with-charset) (w3m-view-source, w3m-view-header): If `w3m-current-url' is nil, dont' execute command. (w3m): Guard from the bug of `select-frame-set-input-focus' in Emacs-21.3.x. If `w3m-current-url' is nil in `w3m buffer' 2003-02-27 Katsumi Yamaoka * w3mhack.el (w3mhack-generate-shimbun-servers-file): Exclude fml, glimpse, lump, mailarc, mailman, mhonarc and text; indent. (w3mhack-generate-colon-keywords-file): indent. 2003-02-26 Katsumi Yamaoka * w3m-search.el (w3m-search-engine-alist): Add www.alltheweb.com suggested by Chris Beggy ; make the default value more suitable to the language environment; don't use the old fashioned backquotes. (w3m-search-default-engine): Always default to google. (w3m-search-prefer-japanese-site): Remove. (w3m-search-inhibited-japanese-engines): Remove. (w3m-search): Bind `completion-ignore-case' to t. (w3m-search-quick-search-handler): Remove `w3m-search-prefer-japanese-site' and `w3m-search-inhibited-japanese-engines'. 2003-02-26 Hideyuki SHIRAI * w3m.el (w3m-w3m-attributes): Allow imperfect Status-Line like no Reason-Phrase. Guard broken header like no location field. 2003-02-25 Hideyuki SHIRAI * w3m-util.el (w3m-url-local-p): Use `\`' instead of `^'. 2003-02-21 Hideyuki SHIRAI * w3m.el (w3m-local-dirlist-cgi): Treat a `local cookie file', again. 2003-02-16 ARISAWA Akihiro * w3m.el (w3m-type): Support "release candidate" of w3m. 2003-02-14 Katsumi Yamaoka * w3m-xmas.el (w3m-insert-image): Use `map-extents' instead of `extent-at' repeatedly. (w3m-remove-image): Ditto. 2003-02-05 Hideyuki SHIRAI * w3m-form.el (w3m-form-submit): Remove `!CURRENT_URL!' from action tag. 2003-02-04 Katsumi Yamaoka * w3mhack.el (TopLevel): Don't gererate the w3m-kwds.el file if there is no permission to write. * Makefile.in (clean): Remove shimbun/shimbun-servers.el. 2003-02-04 Yoichi NAKAYAMA Katsumi Yamaoka * w3mhack.el (w3mhack-generate-shimbun-servers-file): New function. (TopLevel): Call it. 2003-02-04 Yoichi NAKAYAMA * w3mhack.el (shimbun-servers-file): New constant. 2003-02-04 Hideyuki SHIRAI * w3m.el (w3m-mode): Bind `auto-hscroll-mode' for Emacs-21.3. 2003-01-30 Katsumi Yamaoka * w3m.el (w3m-image-type): Move forward. (w3m-fontify-images): Use `w3m-action' and `w3m-anchor' instead of `get-text-property'. (w3m-toggle-inline-images-internal): Use `w3m-image' instead of `get-text-property'. (w3m-toggle-inline-image): Don't specify the arg to `w3m-image'. (w3m-resize-inline-image-internal): Use `w3m-image' instead of `get-text-property'. (w3m-zoom-in-image): Don't specify the arg to `w3m-image'. (w3m-zoom-out-image): Ditto. (w3m-view-this-url): Don't bother to call `w3m-anchor' if it is needless. (w3m-print-this-url): Don't pull-in the point into the link if it is called non-interactively. (w3m-highlight-current-anchor-1): Use `w3m-anchor-sequence' instead of `get-text-property'. (w3m-next-anchor): Don't put `nil' element into `w3m-goto-anchor-hist'; use `push' instead of `cons'. (w3m-previous-anchor): Ditto. (w3m-next-form): Use `w3m-action' instead of `get-text-property'; don't put `nil' element into `w3m-goto-anchor-hist'; specify the current position to `w3m-action'; use `push' instead of `cons'. (w3m-goto-previous-form): indent. (w3m-previous-form): Use `w3m-action' instead of `get-text-property'; don't put `nil' element into `w3m-goto-anchor-hist'; specify the current position to `w3m-action'; use `push' instead of `cons'. (w3m-next-image): Use `w3m-image' instead of `get-text-property'; don't put `nil' element into `w3m-goto-anchor-hist'; specify the current position to `w3m-image'; use `push' instead of `cons'. (w3m-previous-image): Ditto. * w3m-form.el (w3m-form-resume): Use `w3m-action' instead of `get-text-property'; specify the current position to `w3m-action'. (w3m-fontify-textareas): Use `w3m-anchor-sequence' instead of `get-text-property'. (w3m-form-replace): Use `w3m-action' instead of `get-text-property'. (w3m-form-textarea-info): Use `get-text-property' instead of `w3m-get-text-property-around'. (w3m-form-reset): Use `w3m-action' instead of `get-text-property'. * w3m-util.el (w3m-get-text-property-around): Always search for the text prop around there and pull-in the point into the position where the prop exists. (w3m-action, w3m-anchor, w3m-image, w3m-submit): Use `get-text-property' if the argument is omitted. (w3m-image-scale): Abolished. (w3m-anchor-sequence): Simplified. * mime-w3m.el (mime-w3m-mode-map): Bind it when compiling. 2003-01-28 Katsumi Yamaoka * w3mhack.el (top): Move the last addition (modifying the value for `shell-file-name') just after loading `cl'. 2003-01-28 Hideyuki SHIRAI * w3mhack.el (top): Set `cmdproxy.exe' to `shell-file-name' when Win32 environment. 2003-01-28 Hideyuki SHIRAI * w3m.el (w3m-local-dirlist-cgi): Treat a `local cookie file'. 2003-01-27 Hideyuki SHIRAI * w3m-ucs.el (w3m-ucs-to-char): Guard error for Mule-UCS 0.85. 2003-01-26 Katsumi Yamaoka * w3mhack.el (w3mhack-byte-optimize-letX): Add `pathname-coding-system' to be removed from `let' bindings. 2003-01-26 MIYOSHI Masanori * w3m-e21.el (w3m-favicon-type): Add BMP at the head of the list. (w3m-favicon-type): Undo the last change and make the priority of BMP the lowest. 2003-01-24 Katsumi Yamaoka * w3mhack.el (w3mhack-makeinfo): Withdraw the change of 2003-01-09. 2003-01-24 TSUCHIYA Masatoshi * w3mhack.el (w3mhack-examine-modules, w3mhack-load-path): Check the existence of Gnus for shimbun/nnshimbun.el. 2003-01-21 Katsumi Yamaoka * w3m-util.el (w3m-function-max-args): Don't use the arglist destructively. * mime-w3m.el (kill-new): Don't refer to the whole arglist of the original function. 2003-01-21 Masatake YAMATO * w3m.el (w3m-scroll-down-or-previous-url): Added doc string. 2003-01-19 TSUCHIYA Masatoshi * w3m.el (toplevel): Strict checking that buggy `w3m-time-parse-string' is used. 2003-01-14 Katsumi Yamaoka Suggested by KURIHARA Kenichi . * w3m.el (w3m-async-exec): Always default to `t'. (w3m-process-connection-type): Default to `nil' under MacOS X. 2003-01-09 Katsumi Yamaoka * w3mhack.el (w3mhack-makeinfo): Insert one excessive newline after a @foo{bar} thing to prevent clinging of a line and a line (old texinfmt bug?) if it should be considered only one thing in a line. 2003-01-07 Hideyuki SHIRAI * mew-w3m.el (mew-w3m-ext-url-show): Use `mew-buffer-message' instead of `mew-window-configure'. 2003-01-06 Hideyuki SHIRAI * mew-w3m.el (mew-w3m-ext-url-show): New funcition. (mew-w3m-ext-url-fetch): Ditto. (top): Modify comment. Avoid byte-compile warning for `mew-window-configure'. 2002-12-20 Hideyuki SHIRAI * w3m.el (w3m-about-db-history): Display the information of page. 2002-12-19 Hideyuki SHIRAI * w3m.el (w3m-local-dirlist-cgi): Treat a local cookie. 2002-12-18 Hideyuki SHIRAI * w3m-e21.el (w3m-favicon-type): Change default value and type of custom. (w3m-favicon-type-alist): New internal variable. (w3m-setup-favicon): Don't check 'xpm. (w3m-buffer-favicon): Decide image type of Emacs use `w3m-favicon-type-alist'. 2002-12-17 Hideyuki SHIRAI * w3m.el (w3m-type): Suppert `stable version notation' of w3m-m17n. 2002-12-12 ARISAWA Akihiro * w3m.el (w3m-use-favicon): Moved from w3m-e21.el. * w3m-image.el (w3m-favicon-usable-p): Moved from w3m-e21.el. * w3m-e21.el : Bind `w3m-use-favicon' when compiling. (w3m-favicon-usable-p): Moved to w3m-image.el. (w3m-use-favicon): Moved to w3m.el. 2002-12-07 Yuuichi Teranishi * w3m-form.el (w3m-form-text-chop): Added nil check. 2002-12-06 Katsumi Yamaoka * w3mhack.el (w3mhack-what-where): Don't say [-ja] especially. 2002-12-03 Katsumi Yamaoka * doc/ptexinfmt.el: Modify it not to use APEL functions. * w3mhack.el (w3mhack-makeinfo): Remove last temporal mod. 2002-12-02 Katsumi Yamaoka * w3mhack.el (w3mhack-makeinfo): Temporally fix to help users who don't have APEL that use texinfmt if loading doc/ptexinfmt.el is failed. 2002-12-02 ARISAWA Akihiro * doc/Makefile.in: Remove GNU make things. 2002-12-02 Katsumi Yamaoka * w3mhack.el (w3mhack-makeinfo): Don't format Japanes info if the mule feature is not provided. * aclocal.m4 (AC_PATH_LISPDIR, AC_PATH_ICONDIR): Undo last change. * doc/Makefile.in (INSTALL_INFO): New variable. (install): Use it. 2002-11-29 Katsumi Yamaoka * Makefile.in (srcdir): New variable. (FLAGS): Specify an absolute path to w3mhack.el. (all-en): New rule. (all-ja): Made it make only Japanese info. (info-en): New rule. (install-en): New rule. (install-ja): Made it install only Japanese info. (install-lisp): Use `$(srcdir)/' instead of `./'. (install-icons): Ditto. (install-info-en): New rule. (Makefile): Use `$(srcdir)/' instead of `./'. (config.status): Ditto. (very-slow): Specify an absolute path to attic/addpath.el. * doc/.cvsignore: Add version.texi. * doc/ChangeLog: Removed. * doc/Makefile.in (srcdir, subdir, top_srcdir): New variables. (FLAGS): Specify an absolute path to w3mhack.el. (EMACSINFO): Use `$(top_srcdir)' instead of `..'. (INFO_DEPS): Include both emacs-w3m.info and emacs-w3m-ja.info. (INFO_DEPS_EN): New variable. (en): New rule. (version.texi): New rule. (emacs-w3m.info): Made it depend on version.texi. (emacs-w3m-ja.info): Ditto. (install): Use `$(top_srcdir)/' instead of `../'. (install-en): New rule. * doc/version.texi: Removed from the CVS repository. 2002-11-29 TSUCHIYA Masatoshi * doc/Makefile.in (clean): Fix target. 2002-11-29 ARISAWA Akihiro * w3mhack.el (w3mhack-nonunix-install): Create parent directories. 2002-11-28 Katsumi Yamaoka * doc/texinfo.tex: Replaced with the latest version. 2002-11-28 Katsumi Yamaoka * w3m.el (w3m-header-line-map): Prevent tool-bar from being doubled under Emacs 21. 2002-11-28 Katsumi Yamaoka * Makefile.in (infodir): Add a variable. (default): Use `all'. (all, all-ja): New rules. (lisp): Renamed from `default'. (what-where): Pass `infodir' to `w3mhack-what-where'. (info, info-ja): New rules. (install): Use `install-lisp' and `install-info'. (install-ja): New rule. (install-lisp): Renamed from `install'. (install-info, install-info-ja): New rules. (install-package): Use `install-lisp' instead of `install'; install info files as well. (install-package-ja): New rule. (clean): Remove info files as well. (distclean): Remove doc.Makefile as well. * aclocal.m4 (AC_PATH_LISPDIR, AC_PATH_ICONDIR): Modify a message for `install-package'. * configure.in: Check for the makeinfo command; create doc/Makefile. * w3mhack.el (w3mhack-make-package): Add info file names into a MANIFEST file. (w3mhack-what-where): Show where info files will go. (w3mhack-makeinfo): New function. 2002-11-28 Katsumi Yamaoka * doc/Makefile.in, .cvsignore: New file. * doc/emacs-w3m.texi, emacs-w3m-ja.texi: Correct copyright holder. * doc/emacs-w3m.texi: Renamed from emacs-w3m-en.texi. * doc/txi.tex: Renamed from txi-en.tex. 2002-11-27 Katsumi Yamaoka * w3m-search.el (w3m-search-engine-alist): Specify coding-system for the waei and kokugo entries. Suggested by Hideyuki SHIRAI. 2002-11-27 Katsumi Yamaoka * doc/emacs-w3m-en.texi, emacs-w3m-en.texi: Convert to GFDL. 2002-11-27 Yoichi NAKAYAMA * doc/emacs-w3m-en.texi: New files. * doc/emacs-w3m-ja.texi: * doc/ptexinfmt.el: * doc/texinfo.tex: * doc/txi-en.tex: * doc/txi-ja.tex: * doc/version.texi: 2002-11-27 Katsumi Yamaoka * w3m-tabmenu.el (w3m-tab-menubar-update): Do nothing when there's no menubar. 2002-11-18 Hideyuki SHIRAI * w3m.el (w3m-view-this-url-1): Keep position when new-session and `w3m-view-this-url-new-session-in-background' is non-nil. 2002-11-17 Hideyuki SHIRAI * mew-w3m.el (mew-mime-text/html-w3m): Use `match-string-no-properties' if it exist. 2002-11-15 Katsumi Yamaoka * w3m.el (w3m-goto-url): Use an optional argument and the function `interactive' to examine whether it is called interactively instead of the function `interactive-p'. Suggested by TSUCHIYA Masatoshi. (w3m-goto-url-new-session): Ditto. (w3m): Ditto. (w3m-select-buffer-show-this-line): Ditto. 2002-11-14 Hideyuki SHIRAI * w3m.el (w3m-w3m-attributes): Bind `case-fold-search' to t. 2002-11-14 Katsumi Yamaoka * w3m-search.el (w3m-search-engine-alist): Add some dictionaries. (w3m-search-default-engine): Default to google. (w3m-search-quick-search-engine-alist): Add iij-archie; add customization type. (w3m-search-prefer-japanese-site): New user option. (w3m-search-inhibited-japanese-engines): New user option. (w3m-search-quick-search-engines): New function. (w3m-search-quick-search-handler): Maybe use a Japanese site; use `w3m-search-quick-search-engines' to merge `w-s-engine-alist' and `w-s-quick-search-engine-alist'. * w3m.el (w3m): Allow quicksearch urls if interactive. 2002-11-12 Katsumi Yamaoka * w3.el (w3m-view-this-url-1): Copy `w3m-current-url' into a copied buffer. (w3m-goto-url): Allow the 7th argument `qsearch'; use it to recursive call the function itself if the quicksearch feature is permitted. (w3m-goto-url-new-session): Specify the 7th arg of `w3m-goto-url' if it is called interactively. 2002-11-08 Romain FRANCOISE * w3m-search.el (w3m-search-engine-alist): Add "google groups". (w3m-search-quick-search-engine-alist): New user option. (w3m-search-quick-search-handler): New function. * w3m.el: Autoload `w3m-search-quick-search-handler'. (w3m-goto-url): Use `w3m-search-quick-search-handler' to parse quicksearch url schemes. 2002-11-06 TSUCHIYA Masatoshi * w3m-bookmark.el (w3m-bookmark-safe-string): Abolish its 2nd `coding' argument. Instead of it, use the coding system to be used for encoding the buffer contents on saving. (w3m-bookmark-write-file): Follow the above change. 2002-11-06 Yuuichi Teranishi * w3m-form.el (w3m-fontify-textareas): Replace textarea string only when form data contains non-nil data. 2002-11-05 Yuuichi Teranishi * w3m.el (toplevel): Added autoload setting for `w3m-fontify-textareas'. (w3m-fontify): Don't remove tag strings in the textareas; Call `w3m-fontify-textareas'. * w3m-form.el (w3m-form-treat-textarea-size): New option. (w3m-form-resume): Do nothing if forms is nil. (w3m-fontify-textareas): New function. (w3m-form-parse-and-fontify): Decode entities for form value; Record textarea rows as text property. (w3m-form-parse-and-fontify): Treat CRLF as a newline character. (w3m-form-search-textarea): New function. (w3m-form-textarea-replace): Rewrite. (w3m-form-textarea-info): Ditto. 2002-11-05 TSUCHIYA Masatoshi * w3m-bookmark.el (w3m-bookmark-file-coding-system): Fix its docstring. (w3m-bookmark-verify-modtime): Keep buffer modified status. (w3m-bookmark-safe-string): New function. (w3m-bookmark-write-file): Call it to make given strings be safe. 2002-11-03 TSUCHIYA Masatoshi * w3m-bookmark.el: Use non-visiting working buffer; Auto-detection of bookmark file coding system. (w3m-bookmark-file-coding-system): Fix its docstring. (w3m-bookmark-buffer-file-name): New internal variable. (w3m-bookmark-mode): Add documents for commands. (w3m-bookmark-mode-setter): Set `default-directory'. (w3m-bookmark-buffer): Use non-visiting working buffer. (w3m-bookmark-sections): Follow the above change. (w3m-bookmark-kill-entries): Likewise. (w3m-bookmark-file-modtime, w3m-bookmark-verify-modtime) (w3m-bookmark-save-buffer): New functions. (w3m-bookmark-write-file): Use it; Stricten check. (w3m-bookmark-add-current-url-group): Call `w3m-bookmark-add' without 2nd argument. (w3m-about-bookmark): Give unique id to sections. (w3m-bookmark-current-number): Follow the above change. (w3m-bookmark-kill-entry): If the bookmark file is reverted, reload it. (w3m-bookmark-undo): Ditto. (w3m-bookmark-edit): New function. 2002-11-02 TSUCHIYA Masatoshi * w3m-bookmark.el (w3m-about-bookmark): Fix. (w3m-bookmark-current-number): Return nil on no entry line. (w3m-bookmark-kill-entry): On no entry line, do not call `w3m-bookmark-kill-entries'. (w3m-bookmark-kill-entries): Fix. 2002-11-01 TSUCHIYA Masatoshi * w3m-namazu.el (w3m-namazu): Change prompt. (w3m-namazu): Change prompt; Small fix. * w3m-bookmark.el: Experimental bookmark editer. (w3m-bookmark-read-file): Removed. (w3m-bookmark-buffer): New function. (w3m-bookmark-sections): Use it. (w3m-bookmark-write-file): Use it; Call `basic-save-buffer'. (w3m-bookmark-view): View about://bookmark/ instead of w3m-bookmark-file directly. (w3m-about-bookmark, w3m-bookmark-current-number) (w3m-bookmark-kill-entry, w3m-bookmark-kill-entries) (w3m-bookmark-undo): New functions. (w3m-bookmark-mode, w3m-bookmark-mode-map): New variables. (w3m-bookmark-mode-hook): New hook. (w3m-bookmark-mode): New minor mode. (w3m-bookmark-mode-setter): New function. (toplevel): Register it to `w3m-display-functions'. 2002-10-30 TSUCHIYA Masatoshi * w3mhack.el (w3mhack-generate-colon-keywords-file): Protect against unexpected data structure. 2002-10-28 TSUCHIYA Masatoshi * w3m.el (w3m-w3m-attributes): Remove workaround for servers which do not support HEAD operations. 2002-10-25 TSUCHIYA Masatoshi * Release emacs-w3m-1.3.3 from emacs-w3m-1_3 branch. 2002-10-25 Katsumi Yamaoka * w3m-xmas.el (find-charset): Alias to ignore if no-Mule. 2002-10-25 Hideyuki SHIRAI * w3m.el (w3m-entity-alist): Use `w3m-mule-unicode-p' instead of `w3m-use-mule-ucs'. * w3m-xmas.el (w3m-mule-unicode-p): New function. * w3m-fsf.el (w3m-mule-unicode-p): New function. * w3m-om.el (w3m-mule-unicode-p): Set aliase to `ignore'. * w3m-e19.el (w3m-mule-unicode-p): Set aliase to `ignore'. 2002-10-25 Masayuki Ataka * w3m.el (w3m-entity-alist): Support all entities using Mule-UCS. 2002-10-24 TSUCHIYA Masatoshi * mew-w3m.el: Cancel the last change. Use `w3m-minor-mode'. * mime-w3m.el (mime-w3m-display-inline-images): Fix its docstring. (mime-w3m-safe-url-regexp): Fill its docstring. (mime-w3m-setup-hook): New hook. (mime-w3m-setup): Do not initialize `mime-w3m-mode-map'; Run the above hook. (mime-w3m-mode-map): It is not defined for XEmacs and Emacs21. (mime-w3m-local-map-property): New function. (mime-w3m-preview-text/html): Call it. * w3m.el (w3m-key-binding): Cancel the last change. (w3m-region): Change the interactive form; Do not process tag by itself. (w3m-minor-mode-command-alist): Cancel the last change. (w3m-minor-mode-map, w3m-minor-mode-hook, w3m-minor-mode): Revival. 2002-10-23 Hideyuki SHIRAI * w3m.el (w3m-toggle-inline-images-internal) (w3m-toggle-inline-image, w3m-view-this-url, w3m-view-this-url) (w3m-submit-form, w3m-external-view, w3m-view-image) (w3m-save-image, w3m-view-url-with-external-browser) (w3m-download-this-url, w3m-edit-this-url, w3m-goto-url) (w3m-goto-url-with-timer, w3m-safe-view-this-url) (w3m-safe-view-this-url): Check validity of the URL. (w3m-print-current-url, w3m-edit-current-url): Check `w3m-current-url'. * w3m-util.el (w3m-url-fallback-base): Move from `w3m.el'. (w3m-url-invalid-regexp): New constant. (w3m-url-valid): New inline function. * mew-w3m.el (mew-mime-text/html-w3m): Remove any properties from `xref'. 2002-10-23 Katsumi Yamaoka * w3m-om.el (coding-system-list): Use `defalias' and `lambda' instead of `defun'; allow an optional dummy argument; don't ignore `*noconv*'. (read-passwd): Use `defalias' and `lambda' instead of `defun'. (compose-mail): Ditto. 2002-10-22 TSUCHIYA Masatoshi * w3m.el (w3m-key-binding): Remove the code to reset `w3m-minor-mode-map'. (w3m-minor-mode-command-alist): Update its docstring. (w3m-minor-mode-map, w3m-minor-mode-hook, w3m-minor-mode): Abolished. (w3m-minor-mode): Removed. * mime-w3m.el (mime-w3m-setup): Call `w3m-make-minor-mode-keymap' without using `w3m-minor-mode-map'. * mew-w3m.el (mew-use-w3m-minor-mode): Update its docstring. (mew-w3m-minor-mode-map): New variable. (toplevel): Revival the code to add a minor mode. (mew-w3m-minor-mode-setter): Cancel the last change. 2002-10-22 TSUCHIYA Masatoshi * w3m.el (w3m-key-binding): Revival the code to reset `mime-w3m-mode-map'. * mime-w3m.el (mime-w3m-mode-map): Revival. (mime-w3m-setup): Initialize `mime-w3m-mode-map' based on `w3m-minor-mode-map'; Modify it to set its parent map to `mime-view-mode-default-map'. (mime-w3m-preview-text/html) [XEmacs,Emacs21]: Unify `local-map' as text property. * w3m.el (w3m-make-minor-mode-keymap): Call `make-spase-keymap' instead of `make-keymap'. 2002-10-22 Shun-ichi GOTO * w3m.el (w3m-entity-regexp): As simple regexp. Existance of final semi-collon is to be detected. (w3m-entity-value): 2nd argument STRICT is added. If not STRICT, find entity from db by maxmum length matching, and returns it with appending unused chars. Returns nil if not match. And also use defun instead of defsubst. (w3m-decode-entities): Use new `w3m-entity-value' with 2nd arg. 2002-10-22 TSUCHIYA Masatoshi * w3m.el (w3m-minor-mode): Define without `define-minor-mode'. (w3m-minor-mode): Ditto. (w3m-minor-mode-hook): Ditto. (w3m-entity-regexp): Set 3000 to `max-specpdl-size' locally to avoid max-specpdl-size error. * w3m-e19.el: Cancel the last change to define `define-minor-mode'. * w3m-fsf.el: Ditto. * w3m-om.el: Ditto. * attic/easy-mmode.el: Removed. 2002-10-22 Katsumi Yamaoka * w3m-e19.el: Require `easy-mmode'; make the alias `define-minor-mode' to `easy-mmode-define-minor-mode'. * w3m-fsf.el: Ditto. * w3m-om.el: Ditto. * attic/easy-mmode.el: New file imported from Emacs 20.7. 2002-10-22 TSUCHIYA Masatoshi * w3m.el (w3m-lynx-like-map, w3m-info-like-map): Add [tab] for `w3m-next-anchor'. (w3m-safe-view-this-url, w3m-mouse-safe-view-this-url): New command. (w3m-minor-mode-command-alist): New constant. (w3m-make-minor-mode-keymap): New function. (w3m-minor-mode-map): New keymap. (w3m-minor-mode): New function. * mime-w3m.el (mime-w3m-mode-map): Abolished. (mime-w3m-mode-command-alist): Abolished. (mime-w3m-mode-dont-bind-keys): Abolished. (mime-w3m-mode-ignored-keys): Abolished. (mime-w3m-setup): Do not initialize `mime-w3m-mode-map'. (mime-w3m-preview-text/html): Use `w3m-minor-mode-map' instead of `mime-w3m-mode-map'. (mime-w3m-view-this-url, mime-w3m-mouse-view-this-url): Removed. * mew-w3m.el (mew-w3m-minor-mode): Abolished. (mew-w3m-minor-mode-setter): Call `w3m-minor-mode'. 2002-10-21 Katsumi Yamaoka * w3m-e19.el: Cancel last change for providing the base64 codec. 2002-10-21 Yuuichi Teranishi * w3m.el (w3m-goto-url): Use 'group:' scheme instead of 'about://group/...'; Use url encoding for the member of URL group instead of base64 encoding. * w3m-bookmark.el (w3m-bookmark-add-current-url-group): Follow the change above. 2002-10-21 Katsumi Yamaoka * w3m-e19.el: Require `poe' and `path-util'; attempt to define the functions `base64-decode-string' and `base64-encode-string'. * w3m-util.el (w3m-display-progress-message): New function. * w3m.el (w3m-goto-url-new-session): Use it. (w3m): Use it. 2002-10-21 Yuuichi Teranishi * w3m.el (w3m-goto-url): Process 'about://group/...'. * w3m-bookmark.el (w3m-bookmark-add-current-url-group): New function. 2002-10-21 Katsumi Yamaoka * w3m.el (w3m-delete-buffer): Run `w3m-delete-buffer-hook' only when a buffer is killed. (w3m-pack-buffer-numbers): Arrange buffers sequentially from 1 instead of 0. (w3m-select-buffer-next-line): Update gutter tabs for XEmacs. (w3m-select-buffer-delete-buffer): Run `w3m-delete-buffer-hook'. * w3m-util.el (w3m-buffer-number): Assume the buffer number has begun from 1 instead of 0. (w3m-buffer-set-number): Ditto. (w3m-buffer-name-lessp): Ditto. 2002-10-19 Masayuki Ataka * w3m.el (w3m-entity-alist): Support Greek. 2002-10-20 TSUCHIYA Masatoshi * w3m.el (w3m-goto-url): Display a help message to stop asynchronous process. 2002-10-18 Katsumi Yamaoka * w3m-form.el (w3m-form-input-textarea-keymap): Don't bind C-g. (w3m-form-input-select-keymap): Ditto. (w3m-form-input-map-keymap): Ditto. * w3m.el (w3m-select-buffer-mode): Add some key descriptions to the doc-string. 2002-10-17 ARISAWA Akihiro * icons/db-history-up.xpm: Add missing comma. 2002-07-19 ARISAWA Akihiro * w3m-symbol.el: New file. * w3m.el: Autoload "w3m-symbol" for `w3m-replace-symbol'. (w3m-use-symbol): New variable. (w3m-fontify): Call `w3m-replace-symbol'. * w3mhack.el (w3mhack-examine-modules): Don't byte-compile w3m-symbol.el if no-MULE. 2002-10-17 TSUCHIYA Masatoshi * w3m-e21.el (w3m-buffer-favicon): Bind local null handler with `w3m-process-with-null-handler' instead of `lexical-let'. 2002-10-16 Hideyuki SHIRAI * w3m-proc.el (w3m-process-push, w3m-process-start): Fix last change. 2002-10-16 TSUCHIYA Masatoshi * w3m.el (w3m-rendering-half-dump): To decide whether `w3m-treat-image-size' is ignored, use `w3m-display-inline-images-p' instead of `w3m-display-graphic-p'. Thanks to Mito for his report. (w3m-about): Add `witdh' and `height' property to tag. 2002-10-16 Katsumi Yamaoka * w3m.el (w3m-emacs-w3m-icon): Use helvetica-bold to widen image. 2002-10-15 TSUCHIYA Masatoshi * w3m.el (w3m-lynx-like-map): Don't define key bindings for `w3m-zoom-out-image' and `w3m-zoom-in-image' when emacs-w3m in running in non-graphical display. (w3m-info-like-map): Ditto. 2002-10-15 TSUCHIYA Masatoshi Mito * w3m.el (w3m-rendering-half-dump): Ignore `w3m-treat-image-size' when emacs-w3m is running in non-graphical display. 2002-10-13 TSUCHIYA Masatoshi * w3m.el (w3m-local-dirlist-cgi): Follow the change of `w3m-process-start'. (w3m-w3m-get-header): Ditto. (w3m-w3m-dump-head-source): Ditto. * w3m-image.el (w3m-imagick-convert-async-exec): Abolished. (w3m-imagick-start): Removed. (w3m-imagick-start-convert-buffer): Call `w3m-process-start' instead of the above function. * w3m-proc.el (w3m-process-push): Accept `command' argument. (w3m-process-start): Ditto. 2002-10-12 TSUCHIYA Masatoshi * w3m.el (w3m-w3m-dump-head-source): Do not display the help message when `w3m-process-with-wait-handler' is evaluated. (w3m-make-separator): New function. (w3m-about-header): Use the above function. * w3m-proc.el (w3m-process-waited): New variable. (w3m-process-error-handler): New function. (w3m-process-with-wait-handler): Wrap the critical part with `condition-case' to clean running processes up when `quit' signal is occured. 2002-10-10 TSUCHIYA Masatoshi * w3m.el (w3m-w3m-dump-head-source): Display the message which describes how to stop asynchronous process. (w3m-lynx-like-map): Changed the key binded to `w3m-process-stop' from `C-c C-g' to `C-c C-k'. (w3m-info-like-map): Ditto. 2002-10-08 MIYOSHI Masanori * README.shimbun.ja: Add notice that f1express requires Mule-UCS. * README.shimbun.ja: Ditto. 2002-10-04 Katsumi Yamaoka * w3m.el (w3m-toggle-inline-images-internal): Simplify the code. (w3m-resize-inline-image-internal): Remove an existing bitmap image first. * w3m-bitmap.el (w3m-bitmap-image-insert): Replace `insert-before-markers' with `insert' (return to the state before 2002-04-15). 2002-10-03 Katsumi Yamaoka * w3m-bitmap.el (w3m-create-resized-image): Return nil when resizing is failed; set buffer multibyte before converting xbm to bitmap. * w3m-xmas.el (w3m-create-resized-image): Return nil when resizing is failed. * w3m-image.el (w3m-resize-image-by-rate): Undo last change. 2002-10-03 Katsumi Yamaoka * w3m-bitmap.el (w3m-create-resized-image): New function. * w3m-e19.el (w3m-create-resized-image): Alias to `ignore'. * w3m-e20.el (w3m-create-resized-image): Alias to `ignore' if the BITMAP-MULE is not available. * w3m-om.el (w3m-create-resized-image): Ditto. * w3m-image (w3m-resize-image-by-rate): Limit the minimum scale. * w3m.el (w3m-resize-inline-image-internal): Remove an existing image only for XEmacs. 2002-10-02 Katsumi Yamaoka * w3m-xmas.el (w3m-create-resized-image): New function. * w3m.el (w3m-resize-inline-image-internal): Remove an existing image before resizing. 2002-10-01 Hideyuki SHIRAI * w3m-e21.el (w3m-favicon-type): New user variable. (w3m-setup-favicon): Check `w3m-favicon-type'. (w3m-buffer-favicon): Convert image to `w3m-favicon-type' instead of 'xpm. 2002-10-01 Katsumi Yamaoka * w3m-filter.el (w3m-filter-server-regexp): Fix the value; translate the comment into English. 2002-10-01 Katsumi Yamaoka * w3m.el (w3m-lynx-like-map): Bind key M-] to `w3m-zoom-in-image'; bind key M-[ to `w3m-zoom-out-image'. (w3m-info-like-map): Ditto. (w3m-mode): Document those new keys. 2002-09-30 KURODA Chihiro * w3m.el (w3m-resize-image-scale): New user option. (w3m-toggle-inline-image): Call `w3m-zoom-in-image' without resizing. (w3m-resize-inline-image-internal): New inline function. (w3m-zoom-in-image): New command. (w3m-zoom-out-image): New command. * w3m-util.el (w3m-image-scale): New macro. * w3m-image.el (w3m-resize-image-by-rate): New function. * w3m-e21.el (w3m-create-resized-image): New function. 2002-09-21 Kahlil HODGSON * w3m.el (ffap-url-regexp): Make sure it is non-nil. 2002-09-27 Katsumi Yamaoka Follow the change in Gnus. * mime-w3m.el (mime-w3m-mode-ignored-keys): New variable. (mime-w3m-setup): Use it. 2002-09-27 TSUCHIYA Masatoshi * w3m.el (w3m-lynx-like-map): Unbind the key "N" to the command `w3m-namazu' in order to avoid binding collision to `w3m-view-next-page'. Thanks to Satoshi TAOKA for his report. (w3m-mode): Fix its docstring for `w3m-antenna-add-current-url'. Thanks to Satoshi TAOKA and Yoichi NAKAYAMA for the advice. 2002-09-25 Katsumi Yamaoka * w3mhack.el: Ignore byte-compile warnings for the dummy autoloads, mis-judging of cl run-time functions and the obsoleteness of `make-local-hook' under Emacs CVS. 2002-09-25 Hideyuki SHIRAI * w3mhack.el (w3mhack-examine-modules): Do not compile `mew-shimbun.el' with old Mew. * mew-w3m.el (top): Avoid byte-compile error and warning for old Mew. Do not push 'mew-w3m-cid-retrieve' for old Mew. 2002-09-24 TSUCHIYA Masatoshi * w3m.el (w3m-arrived-setup): Use 0 instead of nil as the initial value for the new obarray. * w3m-filter.el (w3m-filter-setup): Use 0 instead of nil as the initial value for the new obarray. 2002-09-22 TSUCHIYA Masatoshi * w3m.el (w3m-mode): Fix typo in its docstring. 2002-09-20 Kahlil HODGSON * w3m.el (w3m-fontify-bold): Permit class attributes, newlines or whitespaces in the tag. (w3m-fontify-underline): Ditto. 2002-09-18 Hideyuki SHIRAI * w3m.el (w3m-treat-drive-letter): New constant. (w3m-url-to-file-name): Check `w3m-treat-drive-letter'. * w3m-dtree.el (w3m-dtree-directory-name): Check `w3m-treat-drive-letter'. 2002-09-12 Hideyuki SHIRAI * w3m-filter.el (w3m-filter-rules): Add 'assahi shimbun' rule. (w3m-filter-asahi-shimbun): New function. 2002-09-05 TSUCHIYA Masatoshi * w3m-antenna.el (w3m-antenna-setup): Check new entries registered in `w3m-antenna-sites'. (w3m-antenna-shutdown): Return the value of `w3m-antenna-alist'. (w3m-antenna-check-all-sites): Simplified. (w3m-about-antenna): Do not call `w3m-antenna-setup'. 2002-09-03 TSUCHIYA Masatoshi * Release emacs-w3m-1.3.2 from emacs-w3m-1_3 branch. * w3m.el (w3m-init-file): Changed its default value. * Makefile.in (PACKAGE): Use `emacs-w3m' instead of `w3m_el'. * w3m-antenna.el (w3m-antenna-make-summary-function): Use `function-item' instead of `const'. (w3m-antenna-sort-changed-sites-function): Ditto. (w3m-antenna-sort-unchanged-sites-function): Ditto. (w3m-antenna-hns-last-modified): Asynchronized. (w3m-antenna-last-modified): Removed. (w3m-antenna-check-site): New function (w3m-antenna-check-site-after): New function. (w3m-antenna-check-sites): Removed. (w3m-antenna-check-all-sites): New function. (w3m-about-antenna): Asynchronized. (w3m-about-antenna-edit): Reset post-data after its content is displayed. (w3m-antenna-edit-reset-post-data): New function. 2002-09-02 TSUCHIYA Masatoshi * w3m.el (w3m-init-file): Changed its default value. (toplevel): When Emacs is running without interactive terminal, do not load the startup file and do not evaluate `w3m-load-hook'. Load a byte compiled startup file safely. 2002-09-02 Katsumi Yamaoka * w3m.el (w3m-mailto-url-popup-function-alist): New user option. (w3m-view-this-url-1): Don't save a window configuration for mailto urls here. (w3m-goto-mailto-url): Save a window configuration while composing a mail message; popup a mail window if the major-mode of a mail buffer matches to `w3m-mailto-url-popup-function-alist'. 2002-09-01 Andrew M. Scott * w3m-weather.el (w3m-weather-default-area): Fix typo in its docstring. 2002-08-30 Katsumi Yamaoka * w3m.el: Provide the feature `w3m' before loading an init file or evaluating `w3m-load-hook'. Suggested by Seiichi NAMBA . 2002-08-30 TSUCHIYA Masatoshi * w3m.el (w3m-init-file, w3m-load-hook): New option. (toplevel): Load `w3m-init-file' and run `w3m-load-hook'. 2002-08-29 Katsumi Yamaoka * w3m-util.el: Require `custom' for Emacs 19 because of the function `custom-initialize-set'. 2002-08-29 TSUCHIYA Masatoshi * w3m.el: Clean up hook options. (toplevel): Define the dummy function of `w3m-update-tab-line'. (w3m-mode-hook, w3m-fontify-after-hook, w3m-select-buffer-hook): Clean up its default value to nil. (w3m-display-hook, w3m-delete-buffer-hook): Minimize its default value and use `w3m-custom-hook-initialize' as the initialize function. (w3m-arrived-setup-hook, w3m-arrived-shutdown-hook): Abolished. (w3m-arrived-setup-functions, w3m-arrived-shutdown-functions, w3m-mode-setup-functions, w3m-display-functions): New interanal variables. (w3m-arrived-setup): Refer `w3m-arrived-setup-functions' instead of `w3m-arrived-setup-hook'. (w3m-arrived-shutdown): Refer `w3m-arrived-shutdown-functions' instead of `w3m-arrived-shutdown-hook'. (w3m-fontify): Call `w3m-header-line-insert' by itself. (w3m-next-buffer, w3m-delete-buffer, w3m-delete-other-buffers): Call `w3m-select-buffer-update' by itself. (w3m-clean-hook-options): New function. (w3m-mode): Call `w3m-clean-hook-options', and run functions registered to `w3m-mode-setup-functions'. (w3m-goto-url): Call `w3m-select-buffer-update' by itself, and Run functions registered to `w3m-display-functions'. (w3m-select-buffer-update): Call `w3m-update-tab-line'. * w3m-util.el (w3m-custom-hook-initialize): New function. * w3m-xmas.el: Cancel the last change and refer `w3m-display-functions' instead of `w3m-display-hook'. * w3m-e21.el (toplevel): Add `w3m-setup-favicon' to `w3m-display-functions', `w3m-favicon-load-cache-file' to `w3m-arrived-setup-functions', `w3m-favicon-save-cache-file' to `w3m-arrived-shutdown-functions', and add `w3m-setup-header-line' and `w3m-setup-widget-faces' to `w3m-mode-setup-functions' * w3mhack.el (w3mhack-load-path) [Mule]: Add the path of bitmap.el to `load-path'. * w3m.el (w3m-select-buffer-hook): Renamed from `w3m-change-buffer-hook'. (w3m-next-buffer): Accept a numerical argument. (w3m-previous-buffer): Accept a numerical argument, and call `w3m-next-buffer'. (w3m-delete-buffer): Call `w3m-next-buffer' instead of `w3m-previous-buffer'. * w3m.el (w3m-delete-buffer-hook): Change its default value. (w3m-change-buffer-hook): New option. (w3m-delete-other-buffers-hook, w3m-previous-buffer-hook, w3m-next-buffer-hook): Abolished. (w3m-next-buffer): Run `w3m-change-buffer-hook' instead of `w3m-next-buffer-hook'. (w3m-previous-buffer): Run `w3m-change-buffer-hook' instead of `w3m-previous-buffer-hook'. (w3m-delete-buffer): Not call `w3m-select-buffer-update', which is added to `w3m-delete-buffer-hook'. (w3m-delete-other-buffers): Likewise. Run `w3m-delete-buffer-hook' instead of `w3m-delete-other-buffers-hook'. 2002-08-28 TSUCHIYA Masatoshi * w3m.el (toplevel): Remove expressions to register hook functions to `w3m-delete-buffer-hook', `w3m-delete-other-buffers-hook', `w3m-display-hook', and `w3m-fontify-after-hook'. (w3m-mode-hook, w3m-fontify-after-hookk, w3m-display-hook, w3m-arrived-setup-hook, w3m-arrived-shutdown-hook, w3m-delete-buffer-hook, w3m-delete-other-buffers-hook, w3m-previous-buffer-hook, w3m-next-buffer-hook): Changed their default values to avoid inconsistency of their customize. (w3m-toolbar): Fix its help messages. (w3m-arrived-file, w3m-keep-arrived-urls, w3m-db-history-display-size): Fix their docstrings. (w3m-history): Moved to avoid a byte compile warning. * w3m-xmas.el (toplevel): Remove an expression to register `w3m-xmas-update-tab-in-gutter' to `w3m-display-hook'. (w3m-xmas-show-current-title-in-buffer-tab): Remove expressions to handle `w3m-display-hook' from the form to change its value. * w3m-e21.el (toplevel): Remove expressions to register hook functions to `w3m-display-hook', `w3m-arrived-setup-hook', `w3m-arrived-shutdown-hook', `w3m-mode-hook', `w3m-fontify-after-hook', `w3m-next-buffer-hook', `w3m-previous-buffer-hook', `w3m-delete-buffer-hook' and `w3m-delete-other-buffers-hook'. 2002-08-28 Yuuichi Teranishi * w3m.el (w3m-delete-buffer-hook): New hook. (w3m-other-delete-buffers-hook): Ditto. (w3m-previous-buffer-hook): Ditto. (w3m-next-buffer-hook): Ditto. (w3m-view-this-url-new-session-in-background): Fixed docstring. (w3m-next-buffer): Run `w3m-next-buffer-hook'. (w3m-previous-buffer): Run `w3m-previous-buffer-hook'. (w3m-delete-buffer): Run `w3m-delete-buffer-hook'. (w3m-delete-other-buffers): Run `w3m-delete-other-buffers-hook'. (w3m-pack-buffer-numbers): New function. (w3m-delete-buffer-hook): Add `w3m-pack-buffer-numbers'. (w3m-delete-other-buffer-hook): Add `w3m-pack-buffer-numbers'. * w3m-util.el (w3m-buffer-number): New inline function. (w3m-buffer-set-number): Ditto. * w3m-e21.el (w3m-update-tab-line): New function. (w3m-mode-hook): Add `w3m-update-tab-line'. (w3m-fontify-after-hook): Ditto. (w3m-previous-buffer-hook): Ditto. (w3m-next-buffer-hook): Ditto. (w3m-delete-buffer-hook): Ditto. (w3m-delete-other-buffers-hook): Ditto. (w3m-tab-width): Changed default value to 16. (w3m-tab-line): Calculate tab width dynamically. 2002-08-27 Hideyuki SHIRAI * w3m.el (w3m-output-coding-system, w3m-halfdump-command-arguments): Use 'utf-8 when `w3m-m17n' with Mule-UCS environment. (w3m-charset-coding-system-alist): Add Windows Code Point. (w3m-current-content-charset): New buffer-local variable. (w3m-clear-local-variables, w3m-copy-local-variables): Handle it. (w3m-decode-buffer): Set `w3m-current-content-charset'. (w3m-rendering-half-dump): Use `w3m-current-content-charset' when `w3m-m17n' or `w3mmee'. 2002-08-27 Katsumi Yamaoka * w3m.el (w3m-lynx-like-map): Change the key `C-c w' to `C-c M-w' for the command `w3m-delete-other-buffers'. (w3m-info-like-map): Ditto. 2002-08-27 TSUCHIYA Masatoshi * w3m.el (emacs-w3m-version): Reset for development series toward emacs-w3m-1.4. 2002-08-27 Hideyuki SHIRAI * w3m.el (w3m-history): Call `w3m-db-history' instead of goto `about://db-history/'. 2002-08-27 Katsumi Yamaoka * w3m.el (w3m-delete-other-buffers): New user command. (w3m-lynx-like-map): Bind the key `C-c w' to the command `w3m-delete-other-buffers'. (w3m-info-like-map): Ditto. (w3m-select-buffer-mode-map): Bind the key to the command `w3m-select-buffer-delete-other-buffers'. (w3m-select-buffer-delete-other-buffers): New user command. 2002-08-27 TSUCHIYA Masatoshi * w3m.el (w3m-check-header-tags): Ignore case of tags. (w3m-about-db-history): Accept range specification in URL. (w3m-db-history-display-size): New option. (w3m-db-history): Refer it. * w3m-antenna.el (w3m-antenna-html-skeleton): Add link to about://antenna-edit/. (w3m-about-antenna-edit): New function. This is an experimental imprement of the editor for Antenna sites. 2002-08-27 Katsumi Yamaoka * w3mhack.el (char-after): Byte-optimize it for old Emacsen. (char-before): Ditto. 2002-08-23 Yuuichi Teranishi * w3m.el (w3m-view-this-url-new-session-in-background): New user option. (w3m-view-this-url-1): Use it; enclose `w3m-goto-url' with `save-window-excursion'. * w3m-form.el (w3m-form-resume): Confirm `value' for text form is a string. 2002-08-22 Hideyuki SHIRAI * w3m.el (ffap-url-regexp): Fix last change. 2002-08-22 Katsumi Yamaoka * w3m.el (ffap-url-regexp): Modify the value to make it match to nntp urls. 2002-08-22 Katsumi Yamaoka * Makefile.in (very-slow): New rule. * attic/addpath.el: New file. 2002-08-22 Katsumi Yamaoka * w3m-e21.el: Require `cl' when compiling to provide the function `gensym'. It is needed to byte-compile this file alone because of the w3m-proc macros. * w3m-image.el: Ditto. * w3m-bitmap.el: Don't bother to load cl-macs. 2002-08-21 Katsumi Yamaoka * w3m-util.el (w3m-display-message-enable-logging): New variable. (w3m-display-message): Use it. 2002-08-08 TSUCHIYA Masatoshi * w3m.el (w3m-w3m-retrieve-1): Do not make error but return nil, even if decoding is failed. 2002-08-08 Nishimoto Masaki * w3m-proc.el (w3m-process-with-environment): Copy `process-environment' before `getenv' is called, in order to avoid putting side effects to environment variables. 2002-07-17 Katsumi Yamaoka * w3m-e21.el (w3m-ucs-to-char): Return char for tilde by default. 2002-07-17 TSUCHIYA Masatoshi * Release emacs-w3m-1.3.1 from emacs-w3m-1_3 branch. 2002-07-16 TSUCHIYA Masatoshi * mime-w3m.el (toplevel): Bind `mime-preview-condition' to avoid byte-compile warnings. (mime-w3m-insinuate): Install code to overwrite `mime-preview-condition' which is already initialized before this functions is called. 2002-07-11 TSUCHIYA Masatoshi * w3m.el (w3m-image-viewer): New option. (w3m-content-type-alist): Refer it. 2002-07-09 Katsumi Yamaoka * w3m.el (w3m-decoder-alist): Don't examine the existence of w3m command when compiling. (w3m-dirlist-cgi-program): Ditto. 2002-07-09 Hironori FUJII * w3m.el (w3m-highlight-current-anchor): Don't infloop at the beginning of a buffer. 2002-07-09 TSUCHIYA Masatoshi * w3m-perldoc.el (w3m-about-perldoc): Install workaround to specify the place in which pod2html generates its cache files. Adjust links pointing other perldocs. 2002-07-08 Hideyuki SHIRAI * w3m.el (w3m-mode): Make `list-buffers-directory' to buffer local variable. (w3m-goto-url): Set title of the URL to `list-buffers-directory'. * w3m-tabmenu.el (w3m-switch-buffer): Bind `completion-ignore-case' to `t'. 2002-07-08 OKAZAKI Tetsurou * configure.in: Use `AC_PATH_EMACS' instead of `AC_CHECK_EMACS'. * aclocal.m4 (AC_PATH_EMACS): New macro. (AC_CHECK_EMACS): Removed. 2002-07-07 TSUCHIYA Masatoshi * Release emacs-w3m-1.3 from emacs-w3m-1_3 branch. 2002-07-04 Katsumi Yamaoka * w3mhack.el (byte-optimize-form-code-walker): Advise to make it optimize throughout the and/or forms. (max-specpdl-size): Increase the value by 5 times for Mule 2. 2002-07-03 Katsumi Yamaoka * w3m.el (w3m-accept-japanese-characters): Don't call the external command when compiling. (examining the value for `w3m-command'): Ditto. 2002-07-01 Katsumi Yamaoka * w3m.el (w3m-lynx-like-map): Use the key `(control space)' instead of `C- ' for the command `w3m-history-store-position' under XEmacs. 2002-06-29 TSUCHIYA Masatoshi * w3mhack.el (w3mhack-nonunix-lispdir): New option. (w3mhack-nonunix-icondir): Ditto. (w3mhack-nonunix-dryrun): Ditto. (w3mhack-nonunix-install): New function. 2002-06-28 TSUCHIYA Masatoshi * Makefile.in (DOCS): Add `TIPS'. 2002-06-26 Ando Tsutomu * w3m-weather.el (w3m-weather-completion-table): Fix typo. 2002-06-27 TSUCHIYA Masatoshi * w3m.el (w3m-info-like-map): Remove redundant code. 2002-06-27 Hideyuki SHIRAI * w3m.el (w3m-fontify-anchors): Put `w3m-name-anchor' property to point-max(). (w3m-fontify): Remove `w3m-name-anchor' handling. (w3m-search-name-anchor): Move in the screen. 2002-06-26 Tadashi Watanabe * w3m.el (w3m-info-like-map): Don't use FSF Emacs style key format for XEmacs. 2002-06-26 TSUCHIYA Masatoshi * w3m.el (toplevel): Stricten the pattern to detect w3m version. (w3m-info-like-map): Changed key bindings of `w3m-shift-left' and `w3m-shift-right'. 2002-06-25 TSUCHIYA Masatoshi * w3m.el (w3m-use-ange-ftp): Chenged its default value to nil. 2002-06-21 Yuuichi Teranishi * w3m.el (w3m-w3m-retrieve-1): Specify -no-cookie option only when the w3m command is configured to accept it. 2002-06-20 Yuuichi Teranishi * octet.el (octet-type-filter-alist): Fixed parenthesis. (octet-filter-call1, octet-filter-call2, octet-filter-call2-extra): Enclose call-process with as-binary-process. 2002-05-31 Hiroya Murata * octet.el (octet-find-file): Bind `buffer-read-only', only while calling `octet-buffer'. 2002-06-20 TSUCHIYA Masatoshi * Release emacs-w3m-1.2.8 from emacs-w3m-1_2 branch. 2002-06-19 Katsumi Yamaoka * w3m-bug.el: Require `w3m-e19' for Emacs 19 to be able to compile this module alone. 2002-06-18 Katsumi Yamaoka * w3m-search.el (w3m-search): Don't extract a default word from the header line. 2002-06-18 Katsumi Yamaoka * w3m.el (w3m-header-line-insert): Use the property `keymap' instead of `local-map' for the recent Emacsen; add a help echo; fix a typo. * w3m-xmas.el (w3m-setup-header-line): Remove. 2002-06-13 Katsumi Yamaoka * w3m-e19.el: Remove many emulating functions on the condition that APEL should be used; require `cl' only when compiling; require `pcustom' instead of `custom'. (compose-mail): New function. (read-passwd): Autoload "ange-ftp". * w3m-proc.el (read-passwd): Autoload "w3m-e19" for Emacs 19. * w3m-util.el (cancel-timer): Autoload "timer" for not only Mule 2 but also Emacs 19. * w3m.el: Require `w3m-e19' for Emacs 19. * w3mhack.el (w3mhack-emacs-major-version): New constant. (TopLevel): Silence the byte-compiler for not only Mule 2 but also Emacs 19. (w3mhack-mdelete): New function. (w3mhack-examine-modules): Use it to make the code simple. (w3mhack-generate-colon-keywords-file): Be sure to go to the beginning of each file before looking for colon keywords (I noticed that `insert-file-contents' doesn't always position point to the top). * README.ja: Update for the use of Emacs 19. 2002-05-30 Kevin Rodgers NOTE: The following changes have been posted to the emacs-w3m mailing list, they were not installed in the CVS repository at the time. The original article has been archived in: http://emacs-w3m.namazu.org/ml/msg03472.html * w3m-e19.el: New file. * w3m.el: Require `w3m-e19' for Emacs 19. (w3m-key-binding): Replace the widget `other' with `const'. * w3mhack.el (w3mhack-examine-modules): Include w3m-e19.el in the listing for Emacs 19. * README: Update for the use of Emacs 19. 2002-06-13 ARISAWA Akihiro * w3m.el (w3m-prepare-content): When cdr of `w3m-content-prepare-functions' element is not function, call `w3m-prepare-content' recursively. (w3m-content-prepare-functions): Add "application/xhtml+xml" entry. 2002-06-12 ARISAWA Akihiro * w3m.el (w3m-uri-replace-alist): New user option. (w3m-uri-replace): New function. (w3m-goto-url): Call `w3m-uri-replace'. 2002-06-02 ARISAWA Akihiro * w3m-e21.el (w3m-ucs-to-char): Don't define it when already defined. * w3m-xmas.el (w3m-ucs-to-char): Ditto. 2002-06-03 TSUCHIYA Masatoshi * Release emacs-w3m-1.2.7 from emacs-w3m-1_2 branch. * w3m-weather.el: Require CL when this module is byte-compiled. (w3m-weather-completion-table): Fix typos, which are noticed by Ando Tsutomu in [emacs-w3m:03487]. 2002-05-31 Mito * w3m-weather.el (w3m-weather-completion-table): Fix "niigata-kaetsu". 2002-05-30 Katsumi Yamaoka * w3m-xmas.el (w3m-make-ccl-coding-system): Make it recallable for the existing coding-systems (we can now reload w3m.elc under XEmacs 21.5-b6 and later). 2002-05-29 Hideyuki SHIRAI * w3m.el (w3m-w3m-retrieve-1): Don't decode the contents when redirect. 2002-05-29 Katsumi Yamaoka * w3m-xmas.el (define-ccl-program): Remove advice when non-MULE. It might be specified by pccl.elc if it has been mis-compiled for XEmacs with MULE. * w3m.el (w3m-delete-frame-maybe): Don't delete the current frame if it is the sole frame in the screen. 2002-05-28 Katsumi Yamaoka * w3m-xmas.el (unicode-to-char): Shut XEmacs 21.5-b5 and earlier up when compiling. 2002-05-28 ARISAWA Akihiro * w3m-e21.el (w3m-ucs-to-char): New function. * w3m-xmas.el (w3m-ucs-to-char): New function for XEmacs-21.5. 2002-05-16 Katsumi Yamaoka * Makefile.in (tarball): Chmod 755 configure. 2002-05-16 Hideyuki SHIRAI * w3m.el (w3m-auto-show): Check multiple command like a `previous|next-line' or `beginning|end-of-buffer' at the buffer's edge. (w3m-window-hscroll): New function to rescue for XEmacs with Mule. (w3m-current-column, w3m-set-window-hscroll): Chenge method of the calculation point. the difference points. (w3m-horizontal-scroll, w3m-horizontal-on-screen) (w3m-horizontal-recenter): Use `w3m-window-hscroll'. (w3m-redisplay-this-page): Don't handle store|restore position. (w3m-goto-url): If reload or redisplay, restore position of history. 2002-05-15 Hideyuki SHIRAI * w3m.el (w3m-after-cursor-move-hook): Add `w3m-auto-show'. (w3m-auto-show, w3m-horizontal-scroll-division): New options. (w3m-next-anchor, w3m-previous-anchor, w3m-next-form) (w3m-previous-form, w3m-next-image, w3m-previous-image): Call `w3m-horizontal-on-screen'. (w3m-mode): Bind many variables for automatic scrolling when `w3m-auto-show' is non-nil. (w3m-scroll-left, w3m-scroll-right, w3m-shift-left) (w3m-shift-right): Call `w3m-horizontal-scroll'. (w3m-horizontal-scroll-done): New buffer local variable. (w3m-current-position): Modify initial value. (w3m-auto-show, w3m-horizontal-scroll, w3m-horizontal-on-screen): New functions. (w3m-horizontal-recenter, w3m-beginning-of-line) (w3m-end-of-line): Use `w3m-set-window-hscroll' and `w3m-current-column'. (w3m-store-current-position): Set markers of beginning of line and end of line. (w3m-check-current-position): Check car of `w3m-current-position'. (w3m-current-column, w3m-set-window-hscroll): New functions to rescue for XEmacs with Mule. 2002-05-15 Katsumi Yamaoka * w3m-form.el (w3m-form-replace): Don't pad the form slot with spaces if a string is longer than that width. 2002-05-14 TSUCHIYA Masatoshi * w3m.el (w3m-arrived-p): Move its definition in order to avoid byte-compile warning. * Makefile.in (default, what-where): Change order. 2002-05-14 Katsumi Yamaoka * w3mhack.el: Modify the error message that XEmacs APEL package versions 1.23 and later can barely be used to run emacs-w3m. 2002-05-13 Katsumi Yamaoka * w3m.el (w3m-mode): Suppress compile warning under old Emacsen. * Makefile.in (what-where): New rule. * w3mhack.el (w3mhack-what-where): New function. (locate-library): Make the function silent for Mule first. 2002-05-13 Hideyuki SHIRAI * w3m.el (w3m-horizontal-shift-columns): New user option. (w3m-shift-left, w3m-shift-right): New commands. (w3m-lynx-like-map, w3m-info-like-map): Add keybind `w3m-shift-left' and `w3m-shift-right'. (w3m-mode): Modify doc-string for new commands. Bind `auto-show-mode' to nil. 2002-05-09 Katsumi Yamaoka * w3m-hist.el (w3m-history-add-arrived-db): Force update the page. 2002-05-08 Katsumi Yamaoka * w3m-bug.el (report-emacs-w3m-bug-system-informations): Don't include useless infos; eval the value for each time to load it. (report-emacs-w3m-bug): Bind `print-length' and `print-level' with nil. 2002-05-07 Katsumi Yamaoka * w3m.el (w3m-menubar): Modify the label for report-emacs-w3m-bug. (w3m-lynx-like-map): Replace the key `C-c C-b' with `C-c C-v' for `w3m-history-restore-position'; replace the key `C-c b' with `C-c C-b' for `report-emacs-w3m-bug'. (w3m-info-like-map): Ditto. (w3m-mode): Add a document for `report-emacs-w3m-bug'. * w3mhack.el: Check for the validity on APEL also for XEmacs with MULE. * w3m-bug.el (report-emacs-w3m-bug-system-informations): Add (featurep 'mule) and (featurep 'file-coding). 2002-05-07 Hideyuki SHIRAI * w3m.el (w3m-download): Modify string of the prompt. (w3m-prepare-content): Add 5th optional argument `retry'. If not determine content-type, ask its. 2002-04-30 Katsumi Yamaoka * w3m-bug.el (report-emacs-w3m-bug): Bind `after-load-alist' to nil while loading the file itself; examine system info in the `w3m-mode' buffer. 2002-04-27 Hideyuki SHIRAI * w3m-bug.el (report-emacs-w3m-bug-system-informations): Add `mule-version' and `Meadow-version'. (report-emacs-w3m-bug): Fix when info is a function. * w3m.el (w3m-menubar): Add many functions. 2002-04-26 Katsumi Yamaoka * w3m-bug.el: New file. * w3m.el: Autoload "w3m-bug" for `report-emacs-w3m-bug'. (w3m-lynx-like-map): Bind `report-emacs-w3m-bug' to C-cb.< (w3m-info-like-map): Ditto. * w3m-om.el (compose-mail): New function. * w3mhack.el: Check for the validity on APEL. 2002-04-26 Hideyuki SHIRAI * w3m.el (w3m-arrived-modify): New function. (w3m-local-attributes): If set Content-type in arrived DB, return it. (w3m-redisplay-this-page, w3m-redisplay-and-reset) (w3m-redisplay-with-content-type): New commands. (w3m-redisplay-with-charset): Use `w3m-arrived-modify'. (w3m-lynx-like-map): Bind all new commands and modify bind for `w3m-redisplay-with-charset'. (w3m-info-like-map): Ditto. (w3m-mode): Document them. (w3m-goto-url): If reload is 'redisplay, do redisplay only. Modify content-type decided method at local URL. (w3m-about-header): Display `Modifer Information'. (w3m-header-line-insert): Display modifers when type are setting. 2002-04-25 Katsumi Yamaoka * w3m.el (w3m-horizontal-recenter): New command. (w3m-beginning-of-line): New command. (w3m-end-of-line): New command. (w3m-lynx-like-map): Bind them. (w3m-info-like-map): Bind them. (w3m-mode): Document them. 2002-04-24 Katsumi Yamaoka * w3m-bitmap.el (w3m-bitmap-image-face-inherit): Default to t. * w3m-om.el (w3m-om-use-overstrike-to-make-face-bold): New var. (custom-declare-face): Advise it to use `set-face-bold-p' to make faces bold by overstriking. * w3m-util.el (w3m-default-face-colors): New constant. * w3m.el (w3m-bold-face, w3m-underline-face): Use it. 2002-04-24 Katsumi Yamaoka * w3m-bitmap.el (w3m-bitmap-image-insert): Don't put the transparent face except for Emacs 20. * w3m.el (w3m-key-binding): Don't manipulate key bindings if w3m.elc has not been loaded (it will fix the problem that the face colors might not be specified under Mule 2). 2002-04-23 Katsumi Yamaoka * w3m-bitmap.el (w3m-bitmap-transparent-face): Remove. (w3m-bitmap-image-insert): Use the list form instead of `w3m-bitmap-transparent-face' to make the overlay transparent. 2002-04-23 Hideyuki SHIRAI * w3m-bitmap.el (w3m-bitmap-convert-arguments) (w3m-bitmap-image-face-inherit): New customize values. (w3m-create-image): Append argument `w3m-bitmap-convert-arguments' when call `w3m-imagick-start-convert-buffer'. (w3m-insert-image): If `w3m-bitmap-image-face-inherit' is non-nil, inherit the face of bitmap image from the face of text at point. 2002-04-23 Katsumi Yamaoka * Makefile.in (distclean): Remove autom4te*.cache rather than autom4te.cache. * w3m-bitmap.el (w3m-bitmap-transparent-face): New face. (w3m-bitmap-image-insert): Put `w3m-bitmap-transparent-face' to overlays; don't use overlays to highlight bitmap images. (w3m-insert-image): Add `w3m-bitmap-image-face' to a bitmap image as a text property. 2002-04-23 Hideyuki SHIRAI * w3m.el (w3m-toggle-inline-images-internal): Call `w3m-insert-image' with the url of image. * w3m-xmas.el (w3m-insert-image): Add dummy argument. * w3m-e21.el (w3m-insert-image): Add dummy argument. * w3m-bitmap.el (w3m-bitmap-cache-image-hook): New hook. (w3m-create-image): Run `w3m-bitmap-cache-image-hook' with `url' when use the cached image. (w3m-insert-image): Add 4th argument `url'. Do nothing which have no 'w3m-image property or differ its url. 2002-04-23 Katsumi Yamaoka Make emacs-w3m can be compiled by `make slow' with no warnings. * Makefile.in (slow): Don't echo the values for EMACS and FLAGS. * octet.el: Require `w3m-util' for `w3m-insert-string'. * w3m-bitmap.el: Autoload w3m-om for `move-to-column-force'. * w3m-hist.el: Load w3m-kwds.el for old Emacsen. * w3m-image.el: Require `pcustom' for old Emacsen; bind some external vars when compiling. * w3m.el: Enclose the definitions for `w3m-current-title' and `w3m-current-url' with `eval-and-compile', and move them forward. (w3m-url-at-point): Enclose with `eval-and-compile'. (w3m-add-local-hook): Ditto. (w3m-about-retrieve): Call `base64-decode-string' indirectly to avoid compile warn under old Emacsen. * w3m-util.el (w3m-insert-string): Fix doc-string. 2002-04-22 Hideyuki SHIRAI * w3m.el (w3m-region): Call `w3m-process-stop' first. * mew-w3m.el (mew-w3m-view-inline-image): Toggle `mew-w3m-auto-insert-image'. (mew-w3m-cid-retrieve-hook): New customize hook. (mew-w3m-cid-retrieve): Run `mew-w3m-cid-retrieve-hook'. 2002-04-22 Katsumi Yamaoka * w3m-util.el (w3m-insert-string): Prevent doubling expansion on the arg. 2002-04-20 Hiroya Murata * mime-w3m.el (mime-w3m-cid-retrieve): Use `w3m-insert-string' instead of `insert' to prevent multibyte/unibyte problems. * octet.el (mime-preview-octet, mime-view-octet): Ditto. * w3m-util.el (w3m-insert-string): Moved from shimbun/shimbun.el. 2002-04-20 ARISAWA Akihiro * w3m.el (w3m-w3m-attributes): Set type to downcase. 2002-04-19 Katsumi Yamaoka * w3m.el (w3m-about-header): Don't use `make-string' to make a separator text under Mule. 2002-04-19 Hideyuki SHIRAI * mew-w3m.el (mew-w3m-cid-retrieve): Support w3m-bitmap.el when retrieve `cid image' (Mew cache has multibyte strings, but work buffer is unibyte). 2002-04-19 Katsumi Yamaoka * w3mhack.el (TopLevel): Not to get the byte-code for `current-column' inlined under old Emacsen. * w3m-bitmap.el (w3m-bitmap-emacs-broken-p): Use `ad-Orig-current-column' rather than `current-column' if it has already been defined. (TopLevel): Not to get the byte-code for `current-column' inlined under the broken Emacsen in case when compiling manually. 2002-04-19 Katsumi Yamaoka * w3m-bitmap.el (TopLevel) Require `cl' and possibly load cl-macs. The following changes are for old Emacsen. (w3m-bitmap-emacs-broken-p): New constant. (TopLevel): Warn if Emacs has a bug on managing column numbers. (w3m-bitmap-move-to-column): Allow the 3rd arg `strictly'; don't modify the buffer contents unless the 3rd arg has been set. (w3m-bitmap-defadvice-if-broken): New macro; use it to advise the functions `current-column', `move-to-column', `move-to-column-force', `next-line' and `previous-line' to work under the broken Emacsen. (w3m-bitmap-byte-indexed-characters-p): Remove. (TopLevel): Don't alias `w3m-bitmap-current-column' to `current-column'; don't alias `w3m-bitmap-move-to-column-force' to `move-to-column-force'. (w3m-bitmap-substitute-key-definitions): Remove. (w3m-bitmap-image-insert): Replace `w3m-bitmap-current-column' with `current-column'; replace `w3m-bitmap-move-to-column-force' with `move-to-column-force'. (w3m-bitmap-image-delete-internal): Ditto. * w3m-om.el (move-to-column-force): New function using `move-to-column-strictly'. 2002-04-18 Katsumi Yamaoka * w3m-bitmap.el (w3m-bitmap-next-line): Handle `temporary-goal-column'. 2002-04-18 Hideyuki SHIRAI * w3m.el (w3m-halfdump-command-arguments): Fix last change. 2002-04-17 Katsumi Yamaoka * w3m-bitmap.el (w3m-bitmap-byte-indexed-characters-p): New macro. The following changes are for old Emacsen. (w3m-bitmap-move-to-column): New function. (w3m-bitmap-move-to-column-force): Use it. (w3m-bitmap-next-line): New command. (w3m-bitmap-previous-line): New command. (w3m-bitmap-substitute-key-definitions): New function; add it to `w3m-mode-hook' as the one-shot function. 2002-04-17 Hideyuki SHIRAI * w3m.el (w3m-halfdump-command-arguments): Add `-I e' option to w3m under Japanese environment. 2002-04-17 Katsumi Yamaoka * mime-w3m.el (mime-w3m-cid-retrieve): Use `mime-decode-string', `mime-entity-body' and `mime-entity-encoding' instead of `mime-insert-entity-content' to make it work even if the entity buffer is multibyte. 2002-04-16 Yuuichi Teranishi * w3m.el (w3m-check-header-tags): Renamed from w3m-check-link-tags. (w3m-check-header-tags): Parse base tag too. (w3m-rendering-buffer-1): Use it. (w3m-prepare-text-content): Don't use w3m-base-url. 2002-04-15 Katsumi Yamaoka * w3m-bitmap.el (w3m-bitmap-image-insert): Replace `insert' with `insert-before-markers'. (w3m-bitmap-image-delete-internal): Delete trailing newlines. (w3m-insert-image): Don't check for the existence of an image. * w3m.el (w3m-history-current-url-face): Provide `font' temporally to avoid loading it and `cl'. 2002-04-12 Katsumi Yamaoka * w3m-bitmap.el (w3m-bitmap-image-get-overlay): Don't clear the `evaorate' property here. (w3m-bitmap-image-insert-internal): Rename to `w3m-bitmap-image-insert'; change the meaning of the 2nd arg `image' (see docs); allow the optional arg `ovr'; don't scan for an overlay here; handle `w3m-bitmap-image-count'; use overlays to highlight bitmap images. (w3m-bitmap-image-insert): Remove old one. (w3m-bitmap-image-delete-internal): Allow the 2nd arg `ovr'; don't scan for an overlay here; clear the `evaorate' property here. (w3m-bitmap-image-delete): Allow the 2nd arg `ovr'; don't scan for an overlay here; don't delete an overlay. (w3m-bitmap-image-delete-string): Remove. (w3m-insert-image): Scan for an overlay here; don't use text props to highlight bitmap images. (w3m-remove-image): Scan for an overlay here. 2002-04-12 Katsumi Yamaoka * w3m-bitmap.el (w3m-bitmap-image-cleanup): Remove. (w3m-bitmap-image-get-overlay): Clear the `evaorate' property in an overlay temporally. (w3m-bitmap-image-insert-internal): Put the `evaorate' property in an overlay; return an overlay. (w3m-bitmap-image-insert): Use the return value of `w3m-bitmap-image-insert-internal' instead of to call `w3m-bitmap-image-get-overlay'. (w3m-bitmap-image-insert-string): Remove. (w3m-insert-image): Use `w3m-modify-plist' to cleanup plist; don't move the point. (w3m-remove-image): Replace `w3m-bitmap-image-insert-string' with `w3m-bitmap-image-insert-internal'. * w3m-util.el (w3m-modify-plist): New function. 2002-04-12 Hideyuki SHIRAI * w3m-proc.el (w3m-process-kill-surely): New internal variable. (w3m-process-kill-process): When `w3m-process-kill-surely' is non-nil, wait for the completion to kill process surely. 2002-04-10 Katsumi Yamaoka * w3m-bitmap.el (w3m-bitmap-image-get-overlay): Speed up a bit. (w3m-bitmap-image-insert-internal): Replace `current-column' with `w3m-bitmap-current-column'; call `w3m-add-text-properties' only when props are specified; use `overlay-end' dynamically (fix a bug I've made); replace `move-to-column-force' with `w3m-bitmap-move-to-column-force'. (w3m-bitmap-image-delete-internal): Make the 2nd arg optional; replace `current-column' with `w3m-bitmap-current-column'; replace `move-to-column-force' with `w3m-bitmap-move-to-column-force'; guess the end position of an overlay by itself when the 2nd arg is omitted. (w3m-bitmap-image-delete): Remove the 2nd arg. (w3m-bitmap-image-delete-string): Alias to `w3m-bitmap-image-delete-internal' instead of defining as a function. (w3m-insert-image): Don't use the length of a bitmap image. (w3m-remove-image): Ditto. * w3m-om.el (move-to-column-force): Remove. 2002-04-10 Hideyuki SHIRAI * w3m-image.el (w3m-imagick-convert-async-exec): Change default value for Meadow. 2002-04-10 Yuuichi Teranishi * w3m-e21.el (w3m-favicon-converted): New buffer-local variable. (w3m-setup-favicon): Set w3m-favicon-converted as nil. (w3m-buffer-favicon): If w3m-favicon-converted is non-nil, don't start conversion. Set w3m-favicon-converted as t before conversion. 2002-04-10 Hideyuki SHIRAI * w3m.el (w3m-about-retrieve): Change behavior according to whether the return value of `base64-decode-string' is multibyte or not. * w3m-image.el (w3m-imagick-convert-async-exec): New user option. (w3m-imagick-start): Use `call-process' when `w3m-imagick-convert-async-exec' is nil. (w3m-imagick-convert-buffer): Don't use stdin because `convert' can not handle an animation GIF that it input from stdin. 2002-04-10 Yuuichi Teranishi * w3m-bitmap.el (w3m-create-image): Use w3m-process-do-with-temp-buffer instead of w3m-process-do. (w3m-create-image): Don't call `set-buffer-multibyte' if old mule. * w3m-image.el (w3m-imagick-start-convert-buffer): Removed needless `concat'. * w3m-bitmap.el (w3m-create-image): Call `w3m-imagick-start-convert-buffer' instead of `w3m-imagick-convert-data'. 2002-04-10 Katsumi Yamaoka * w3m-bitmap.el (w3m-bitmap-current-column): New function for old Emacsen; alias to `current-column' for the recent Emacsen. (w3m-bitmap-move-to-column-force): New function for old Emacsen; alias to `move-to-column-force' for the recent Emacsen. 2002-04-10 Yuuichi Teranishi * w3m-image.el (w3m-imagick-convert-data): Check buffer size. (w3m-imagick-start-convert-data): Ditto. (w3m-imagick-start-convert-buffer): Don't use output file (Because it sometimes causes multiple files). 2002-04-10 Hideyuki SHIRAI * w3mhack.el (w3mhack-examine-modules): Reverse the turn of the load with `bitmap' and `un-define'. 2002-04-09 Katsumi Yamaoka * w3m-bitmap.el (w3m-bitmap-image-face): New face. (w3m-bitmap-image-insert-internal): Put text properties. (w3m-bitmap-image-insert): Pass text properties argument to `w3m-bitmap-image-insert-internal'. (w3m-bitmap-image-add-text-properties): Remove. (w3m-insert-image): Pass text properties to `w3m-bitmap-image-insert'. 2002-04-09 Katsumi Yamaoka * w3m-bitmap.el (w3m-bitmap-image-get-overlay): Use `line-beginning-position' and/or `line-end-position'. (w3m-bitmap-image-insert-internal): Ditto. (w3m-bitmap-image-delete-internal): Ditto. (w3m-bitmap-image-add-text-properties): Ditto. * w3m-om.el: Require `w3m-bitmap' if BITMAP-MULE is available. (move-to-column-force): Define it if void. 2002-04-09 Hideyuki SHIRAI * w3m-bitmap.el: Convert CRLF to LF. (w3m-display-graphic-p): Ruturn nil if no window-system. (w3m-image-type-available-p): Ruturn nil if not found "convert". * w3mhack.el (w3mhack-examine-modules): Don't byte-compile w3m-bitmap.el under XEmacs or FSF Emacs-21. * w3m.el (w3m-fontify): When delete duplicated empty line, keep 'w3m-name-anchor property surely. * w3m-e20.el (top): Require 'w3m-bitmap if have BITMAP. 2002-04-09 Taiki SUGAWARA * w3mhack.el (w3mhack-examine-modules): Don't byte-compile w3m-bitmap.el if bitmap.el is not installed. (w3mhack-examine-modules): Add condition to w3m-bitmap.el check. * w3m-bitmap.el: New file. * w3m-e20.el (w3m-create-image, w3m-insert-image, w3m-remove-image, w3m-image-type-available-p, w3m-display-graphic-p, w3m-display-inline-images-p): Alias to `ignore'. Bitmap image implementation is moved to w3m-bitmap.el. (w3m-bitmap-image-cache-alist, w3m-bitmap-image-use-cache, w3m-bitmap-image-cleanup, w3m-bitmap-image-buffer, w3m-bitmap-image-get-overlay, w3m-bitmap-image-insert-internal, w3m-bitmap-image-insert, w3m-bitmap-image-insert-string, w3m-bitmap-image-delete-internal, w3m-bitmap-image-delete, w3m-bitmap-image-delete-string, w3m-bitmap-image-add-text-properties): Move to w3m-bitmap.el. 2002-04-09 Taiki SUGAWARA * w3m-e20.el (w3m-create-image): Return nil if w3m-imagick-convert-buffer is failed. (w3m-insert-image): Not insert image if image is nil. 2002-04-08 Hideyuki SHIRAI * w3m.el (w3m-coding-system): Change default value to 'iso-2022-7bit-ss2 when use w3mmee under mule environment. 2002-04-08 Yuuichi Teranishi * w3m-xmas.el (w3m-create-image): Resize gif images, too. 2002-04-08 Katsumi Yamaoka * w3m-xmas.el (w3m-make-glyph): Remove unused var. 2002-04-08 Yuuichi Teranishi * w3m-form.el (w3m-char-to-int): New alias. (w3m-form-mee-attr-unquote): Use it. (w3m-form-mee-new): Ditto. * w3m-xmas.el (toplevel): Require 'w3m-image. (w3m-make-glyph): New inline function. (w3m-create-image): Resize images when w3m-resize-images is non-nil. * w3m-form.el (w3m-string-to-char-list)[XEmacs]: Use string-to-list instead of string-to-char-list. (w3m-int-to-char): New alias. (w3m-form-mee-select-value): Use it. 2002-04-08 Taiki SUGAWARA * w3m-e20.el (w3m-bitmap-image-insert-internal): Begin the overlay on `begion-of-line'. 2002-04-08 Yuuichi Teranishi * octet.el: Update URL for xlhtml. 2002-04-08 Katsumi Yamaoka * w3m-util.el: Don't require `pcustom'. 2002-04-08 Yuuichi Teranishi * w3m-image.el: New file. * w3m.el (w3m-halfdump-command-arguments): Specify single-row-image dump option instead of image. (w3m-goto-mailto-url): Added optional post-data argument and use it. (w3m-goto-url): Set post-data of w3m-goto-mailto-url. * w3m-util.el (w3m-imagick-convert-program, w3m-imagick-convert-buffer, w3m-imagick-convert-data): Moved to w3m-image.el. * w3m-e21.el (toplevel): Require 'w3m-image. (w3m-resize-images, w3m-imagick-start-convert-data, w3m-imagick-start-convert-buffer, w3m-imagick-start, w3m-resize-image): Moved to w3m-image.el; (w3m-create-image): Follow the change in w3m-resize-image. (w3m-favicon-usable-p): Renamed from w3m-imagick-convert-usable-p. (w3m-use-favicon): Follow the change above. (w3m-favicon-cache-data): Fixed typo. (w3m-favicon-cache-retrieved): Ditto. (w3m-retrieve-favicon): Ditto. * w3m-e20.el (w3m-image): Require 'w3m-image. 2002-04-08 Katsumi Yamaoka * w3m-xmas.el (multibyte-string-p): Alias to `stringp' if MULE, otherwise `ignore'. * w3m-om.el (multibyte-string-p): Alias to `stringp'. * w3m-util.el: Require `pcustom' for old Emacsen. 2002-04-05 Yuuichi Teranishi * w3m.el (w3m-w3m-retrieve): Revert previous change. (w3m-w3m-dump-head-source): Add argument orig-url; Cache header and body using orig-url. (w3m-w3m-retrieve): Don't cache header here; Return error response when follow redirection number exceeds w3m-follow-redirection; Pass orig-url to w3m-w3m-retrieve-1. (w3m-w3m-retrieve-1): Add argument orig-url; Call w3m-dump-head-source with orig-url argument. (w3m-redirect-with-get): Changed default value to t. 2002-04-05 Taiki SUGAWARA * w3m-e20.el (w3m-bitmap-image-insert): Fix (point) -> pos. 2002-04-04 Yuuichi Teranishi * w3m-form.el (w3m-form-input-map): If menu string is empty, use href string instead. * w3m.el (w3m-w3m-dump-head-source): Fixed caching logic. (w3m-w3m-retrieve): Use cache if available after redirection. 2002-04-04 Hideyuki SHIRAI * w3m-e20.el (top): Avoid byte-compile warnings when not found `bitmap'. (w3m-image-type-available-p): Return nil if not have `bitmap'. 2002-04-04 Yuuichi Teranishi * w3m.el (w3m-fontify-anchors): Set default icon type as ico. * w3m-e21.el (w3m-buffer-favicon): Asynchronous implementation. 2002-04-04 Hideyuki SHIRAI * w3mhack.el (top): Avoid byte-compile error for `w3m-ucs.el' with Emacs20 when it has `un-define' and `bitmap'. (w3mhack-load-path): Add the path of `bitmap.el' on Emacs20. 2002-04-04 Yuuichi Teranishi * w3m.el (w3m-request-arguments): Use -header option if no cookie nor no body. (w3m-w3m-retrieve-1): Delete temp-file only when it exists. * w3m-e21.el (w3m-imagick-start-convert-data): Don't use string-as-unibyte (no use). 2002-04-04 Taiki SUGAWARA * w3m.el (w3m-toggle-inline-images-internal): Support w3m-bitmap-image. * w3m-e21.el (w3m-imagick-convert-program): Move to w3m-util.el. (w3m-imagick-convert-buffer): Ditto. (w3m-imagick-convert-data): Ditto. * w3m-util.el (w3m-imagick-convert-program): Move from w3m-e21.el. (w3m-imagick-convert-buffer): Ditto. (w3m-imagick-convert-data): Ditto. * w3m-e20.el (w3m-bitmap-image-cache-alist): New variable. (w3m-bitmap-image-use-cache): Ditto. (w3m-bitmap-image-cleanup): New function. (w3m-bitmap-image-buffer): Ditto. (w3m-bitmap-image-get-overlay): Ditto. (w3m-bitmap-image-insert-internal): Ditto. (w3m-bitmap-image-insert): Ditto. (w3m-bitmap-image-insert-string): Ditto. (w3m-bitmap-image-delete-internal): Ditto. (w3m-bitmap-image-delete): Ditto. (w3m-bitmap-image-delete-string): Ditto. (w3m-bitmap-image-add-text-properties): Ditto. (w3m-display-graphic-p): New implementation. (w3m-display-inline-images-p): Ditto. (w3m-image-type-available-p): Ditto. (w3m-create-image): New implementation. It use w3m-bitmap-image-*. (w3m-insert-image): Ditto. (w3m-remove-image): Ditto. 2002-04-03 Hideyuki SHIRAI * w3m.el (w3m-fontify): Put invisible and intangible properties at the duplicated empty lines instead of delete them. 2002-04-03 Yuuichi Teranishi * w3m-e21.el (w3m-resize-image): Asynchronous implementation. (w3m-imagick-start-convert-data): New function. (w3m-imagick-start-convert-buffer): Ditto. (w3m-imagick-start): Ditto. (w3m-create-image): Rewrite to resize images asynchronously. (w3m-insert-image): Don't resize. 2002-04-03 TSUCHIYA Masatoshi * w3m.el (w3m-check-link-tags): Relax the pattern to detect headers. 2002-04-02 Yuuichi Teranishi * w3m-form.el (w3m-form-submit): Confirm when posting from secure page to normal page. * w3m.el (w3m-redirect-with-get): New user option. (w3m-w3m-retrieve): If w3m-redirect-with-get is non-nil, use GET method after redirection; Ask user to use POST data after redirection. (w3m-w3m-attributes): Set w3m-current-redirect as a cons cell of (CODE . LOCATION). (w3m-w3m-dump-head-source): Don't cache content if the response code is one of 302, 303, 307. (w3m-w3m-retrieve): Change POST redirection behavior according to response code. (w3m-retrieve-and-render): Confirm leaving secure pages. * octet.el (mime-preview-octet): Change behavior according to whether the return value of mime-entity-content is multibyte or not. (mime-view-octet): Ditto. * w3m.el (w3m-w3m-retrieve): Don't call w3m-cache-request-header when type is nil. 2002-04-01 Yuuichi Teranishi * w3m.el (w3m-follow-redirection): New user option. (w3m-w3m-attributes): Set w3m-current-redirect as nil. (w3m-cookie-command-arguments): Abolish. (w3m-request-arguments): Use cookie only when w3m-use-cookies is non-nil. (w3m-header-arguments): New function. (w3m-w3m-retrieve): Treat redirection when w3m-follow-redirection is non-nil. (w3m-w3m-retrieve-1): Renamed from w3m-w3m-retrieve. (w3m-prepare-content): Don't care w3m-current-redirect. (w3m-goto-url): Ditto. * w3m-form.el (w3m-form-new): Added argumnet enctype. (w3m-form-enctype): New macro. (w3m-form-plist): Changed definition. (w3m-form-put-property): Ditto. (w3m-form-make-form-data): Removed optional argument urlencode; Encode form data acording to w3m-form-enctype. (w3m-form-mee-new): Set enctype field. (w3m-form-parse-and-fontify): Parse enctype. (w3m-form-submit): Don't pass enctype argumnet. 2002-04-01 Hideyuki SHIRAI * w3m.el (w3m-fontify-anchors): Put a property of `w3m-name-anchor' as a list. (w3m-move-point-for-localcgi): Use `w3m-search-name-anchor'. (w3m-search-name-anchor): Use `member' when compare a name with `w3m-name-anchor'. Fix continuous name-anchor. 2002-03-29 Hideyuki SHIRAI * mew-w3m.el (mew-mime-text/html-w3m): Use `match-string' instead of `mew-match'. * w3m.el (w3m-fontify-anchors): Modify the point for 'w3m-name-anchor property when its has an empty body. 2002-03-28 Yuuichi Teranishi * w3m.el (w3m-dump-head-source-command-arguments)[w3mmee]: Don't add Accept-Language header option. (w3m-cookie-command-arguments)[w3mmee]: Don't add Cookie header option. (w3m-request-arguments): New function to generate -request option. (w3m-w3m-retrieve)[w3mmee]: Use w3m-request-arguments to make request header and body. 2002-03-28 Katsumi Yamaoka * w3m.el (w3m-url-at-point (ffap)): Strip text props under XEmacs. (ffap-url-regexp): Modify the value to make it match to https urls for Emacs 19, 20 and XEmacs. 2002-03-27 Yuuichi Teranishi * w3m-e21.el (w3m-tab-drag-mouse-function): Fix problem when dragged mouse position is outside of the original frame. * w3m.el (w3m-version): New variable. (toplevel): Detect w3m version. (w3m-user-agent): New user option. (w3m-add-user-agent): Ditto. (w3m-w3m-retrieve): Add User-Agent: field if w3m-add-user-agent is non-nil. * w3m-e21.el (w3m-tab-drag-mouse-function): New function. (w3m-tab-make-keymap): Add mouse-1, mouse-2, drag-mouse-1 and drag-mouse-2. * w3m-cookie.el (w3m-cookie-set): Fixed docstring. 2002-03-26 Katsumi Yamaoka * w3m-xmas.el (w3m-find-coding-system): Alias to ignore if the function `find-coding-system' is not available. (w3m-make-ccl-coding-system): Check whether the function `make-ccl-coding-system' is available instead of checking the feature `mule' to determine what function should be aliased to. (coding-system-list): Alias to ignore if it is not available. (define-ccl-program): Check whether it is available instead of checking the feature `mule' to determine if it is aliased to `ignore'. (w3m-detect-coding-with-priority): Quote `w3m-default-coding-system'. 2002-03-24 Nix * w3m-xmas.el (w3m-detect-coding-with-priority): New macro, handle non-MULE XEmacsen. (w3m-detect-coding-region): Use it. 2002-03-26 Yuuichi Teranishi * w3m-cookie.el (w3m-cookie-1-set): Fixed problem when no `Expires', ignore is ignored. 2002-03-26 TSUCHIYA Masatoshi * w3m-cookie.el (w3m-cookie-url, w3m-cookie-domain, w3m-cookie-secure, w3m-cookie-name, w3m-cookie-value, w3m-cookie-path, w3m-cookie-version, w3m-cookie-expires, w3m-cookie-ignore): Define as macro. (w3m-cookie-set-url, w3m-cookie-set-domain, w3m-cookie-set-secure, w3m-cookie-set-name, w3m-cookie-set-value, w3m-cookie-set-path, w3m-cookie-set-version, w3m-cookie-set-expires, w3m-cookie-set-ignore): Removed. (w3m-cookie-create): New implementation. (w3m-about-cookie): Call `setf' instead of `w3m-cookie-set-ignore'. 2002-03-26 Yuuichi Teranishi * w3m.el (w3m-fontify-anchors): Changed anchor name property position. (w3m-lynx-like-map): Bind w3m-cookie as `M-k'. (w3m-info-like-map): Ditto. 2002-03-26 Hideyuki SHIRAI * w3m-cookie.el (w3m-cookie-save): Use `w3m-time-newer-p' instead of `w3m-time-lapse-seconds'. 2002-03-26 Yuuichi Teranishi * w3m-cookie.el (w3m-cookie): New command. (w3m-about-cookie): Do nothing if w3m-use-cookies is nil. * w3m.el (toplevel): Added autoload setting for w3m-about-cookie; Added autoload setting for w3m-cookie. * w3m-cookie.el (w3m-cookie-store): Don't replace if ignored cookie. (w3m-cookie-retrieve): Don't use cookie which is ignored. (w3m-about-cookie): New function. * w3m-e21.el (w3m-setup-favicon): Do nothing when w3m-current-url is nil. * w3m.el (w3m-goto-url): Force reload if w3m-current-redirect is set. (w3m): If w3m-current-url is nil, erase buffer. * w3m-util.el (w3m-time-less-p): Abolish. (w3m-assoc-ignore-case): Moved from w3m-cookie.el and rewrote not to use assoc* (because it's cl function). * w3m-cookie.el (w3m-cookie-retrieve): Use w3m-time-newer-p instead of w3m-time-less-p. (w3m-cookie-1-set): Ditto. (w3m-assoc-ignore-case): Moved to w3m-util.el. 2002-03-25 Yuuichi Teranishi * w3m-cookie.el (w3m-cookie-1-set): Use w3m-time-less-p instead of w3m-time-lapse-seconds. (w3m-cookie-retrieve): Ditto. * w3m-util.el (w3m-time-less-p): New inline function. * w3m.el (w3m-current-redirect): New buffer local variable. (w3m-clear-local-variables): Add w3m-current-redirect. (w3m-copy-local-variables): Treat w3m-current-redirect. (w3m-w3m-attributes): Set w3m-current-redirect instead of w3m-current-refresh when 30x response. (w3m-prepare-content): Use w3m-current-redirect instead of w3m-current-refresh. (w3m-goto-url): Do nothing but w3m-goto-url after retrieval if w3m-current-redirect is set. 2002-03-25 TSUCHIYA Masatoshi * w3m-cookie.el (w3m-cookie-file): Changed default value. (w3m-cookie-save): Follow the above change. (w3m-cookie-load): Ditto. 2002-03-25 Yuuichi Teranishi * w3m.el (w3m-w3m-attributes): Don't call w3m-cookie-set. (w3m-w3m-dump-head-source): Call w3m-cookie-set. (w3m-cookie-command-arguments): Set `-no-cookie'; Don't set cookie_accept_domains, cookie_reject_domains. * w3m-cookie.el (toplevel): Require 'w3m. (w3m-cookie-accept-domains): Moved from w3m.el. (w3m-cookie-reject-domains): Ditto. (w3m-cookie-accept-bad-cookies): New user option. (w3m-cookie-file): Ditto. (w3m-cookie-set-ignore): Fix. (w3m-cookie-retrieve): Remove expired cookies. (w3m-cookie-trusted-host-p): Fixed domain match. (w3m-cookie-1-set): Treat all cookies. Accept bad cookies according to w3m-cookie-accept-bad-cookies. (w3m-cookie-init): New variable. (w3m-cookie-clear): New function. (w3m-cookie-save): Ditto. (w3m-cookie-load): Ditto. (w3m-cookie-setup): Ditto. (w3m-cookie-shutdown): Rewrite. (w3m-cookie-set): Call w3m-cookie-setup; Changed API. (w3m-cookie-get): Call w3m-cookie-setup. * w3m.el (w3m-goto-url): Don't resume form from history when POST. 2002-03-24 Yuuichi Teranishi * w3m-cookie.el: New file. * w3m-form.el (w3m-form-resume): Use cdr of forms if car is t (Just in case). (w3m-form-parse-and-fontify)[w3m]: Search form structure according to fid. * w3m.el (toplevel): Added autoload setting for w3m-cookie. (w3m-use-cookies): New user option. (w3m-cookie-accept-domains): Ditto. (w3m-cookie-reject-domains): Ditto. (toplevel): Bind system-time-locale as "C" while calling format-time-string. (w3m-w3m-attributes): Call w3m-cookie-set; When 30x response is received, set w3m-current-refresh as (0 . Location). (w3m-cookie-command-arguments): New function. (w3m-w3m-retrieve): Use it. (w3m-retrieve-and-render): Mark w3m-current-forms as `not history' if retrieval failed. (w3m-prepare-content): If w3m-current-refresh rate is 0, do nothing. (w3m-quit): Call `w3m-cookie-shutdown'. 2002-03-24 TSUCHIYA Masatoshi * w3m.el (w3m-decode-encoded-contents): Convert encoding to lower case before checking alist. 2002-03-24 TSUCHIYA Masatoshi * w3m.el (w3m-remove-redundant-spaces): New implementation. (w3m-about-retrieve): Call `insert-buffer-substring' instead of `insert-buffer'. (w3m-rendering-unibyte-buffer): Ditto. (w3m-rendering-multibyte-buffer): Ditto. (w3m-prepare-text-content): Ditto. 2002-03-22 Katsumi Yamaoka * w3m.el (w3m-w3m-attributes): Ignore trailing whitespaces in header lines. 2002-03-20 Yuuichi Teranishi * w3m.el (w3m-view-this-url): Eval action even when anchor is set. * w3m-form.el (w3m-form-parse-and-fontify): Clear mapval if it is set. * w3m.el (w3m-halfdump-command-arguments)[w3mmee]: Add `image' to the -dump argument only if `w3m-treat-image-size' is non-nil. 2002-03-20 Hideyuki SHIRAI * w3m-form.el (w3m-form-parse-and-fontify): If not detect `usemap' attribute of `img_alt', use `value' attribute of `input_alt' for the select map name; W3M removes `usemap' attribute when "display_image=off". 2002-03-19 Hideyuki SHIRAI * w3m.el (w3m-w3m-attributes): Ignore `w3m-document-charset' when w3m-m17n. 2002-03-19 Yuuichi Teranishi * w3m.el (w3m-fontify-images): Parse width and height attributes of img_alt. (w3m-toggle-inline-images-internal): Set `size' argument of w3m-create-image. (w3m-highlight-current-anchor): Fixed logic. * w3m-xmas.el (w3m-create-image): Added optional argument `size' (ignored currently). * w3m-e21.el (w3m-imagick-convert-program): Use w3m-which to set initial value. (w3m-resize-images): New user option. (w3m-resize-image): New function. (w3m-create-image): Added optional argument `size'; Changed return value. (w3m-insert-image): Call w3m-resize-image if size is specified. (w3m-imagick-convert-buffer): Accept nil for from-type and to-type. 2002-03-18 Yuuichi Teranishi * w3m-form.el (w3m-form-mee-select-value): Fix. (w3m-form-parse-and-fontify): If w3m-type is not w3mmee, use last form object as current form. 2002-03-18 Yuuichi Teranishi * w3m.el (w3m-highlight-current-anchor): New implementation. (w3m-highlight-current-anchor-1): New function. * w3m-form.el (w3m-form-replace): Fixed problem when string is nil. 2002-03-16 Yuuichi Teranishi * w3m-form.el (w3m-string-to-char-list): Fixed. 2002-03-15 Yuuichi Teranishi * w3m-form.el (w3m-form-mee-select-value): Use w3m-output-coding-system instead of w3m-current-coding-system. (w3m-form-parse-and-fontify)[w3mmee]: Ditto. (w3m-form-mee-select-value): Fixed select value. (w3m-form-resume): Fixed checkbox resuming. (w3m-form-parse-and-fontify): Use `form' instead of `(car forms)'; Search the form which corresponds to input_alt by fid; Use `nconc' instead of `push'. * w3m-form.el (w3m-form-mee-select-value): New function. (w3m-form-parse-and-fontify)[w3mmee]: Set select value. * w3m.el (w3m-halfdump-command-arguments)[w3mmee]: Added image. * w3m-form.el (w3m-form-parse-and-fontify): Set the value of form only if the method is not internal; Add internal form to the w3m-current-forms; Treat input type `image' as same as `submit'. (w3m-form-mee-attr-unquote): New function. (w3m-string-to-char-list): New function/alias. (w3m-form-mee-new): New function. (w3m-form-parse-and-fontify): Parse w3mmee's form info. (w3m-form-input-textarea-keymap): Bind C-g. (w3m-form-input-select-keymap): Bind C-g, h,j,k,l. (w3m-form-input-map-keymap): Ditto. (w3m-form-parse-and-fontify): Set textarea value. 2002-03-13 Katsumi Yamaoka * w3m-form.el (w3m-form-resume): Typo. 2002-03-13 Yuuichi Teranishi * w3m.el (toplevel): Removed autoload setting for `w3m-form-parse-buffer'. (w3m-clear-local-variables): Don't treat w3m-current-forms any more. (w3m-copy-local-variables): Ditto. (w3m-additional-command-arguments): Fixed problem when no-proxy host has port number other than 80. (w3m-rendering-buffer-1): Don't call w3m-form-parse-buffer. (w3m-goto-url): Setup w3m-current-forms from history structure. * w3m-form.el (w3m-form-parse-buffer): Abolish. (w3m-form-parse-forms): Ditto. (w3m-form-resume): Set value of `w3m-current-forms'. (w3m-fontify-forms): Call `w3m-form-parse-and-fontify' instead of `w3m-form-fontify'. (w3m-form-parse-and-fontify): New function. (w3m-form-input-select): Fix problem when candidate label is "". 2002-03-13 Katsumi Yamaoka Suggested by HAYASHI Chifumi . * w3m-form.el (w3m-form-new): Ignore the 2nd arg `action' if it is nil. (w3m-form-parse-forms): Don't parse the value of `w3m-current-url' if it is nil. 2002-03-12 TSUCHIYA Masatoshi * Release emacs-w3m-1.2.6 from emacs-w3m-1_2 branch. 2002-03-11 ARISAWA Akihiro * w3m-ucs.el (w3m-euc-japan-encoder): Treat japanese-jisx0208-1978 as japanese-jisx0208. 2002-03-11 Katsumi Yamaoka * w3m.el (w3m-view-this-url, w3m-goto-url-new-session, w3m-select-buffer-copy-buffer): Remove unused non-global variables. 2002-03-11 Katsumi Yamaoka Suggested by Yuuichi Teranishi with mod. * w3m.el (w3m-no-proxy-domains): New user option renamed from `w3m-no-proxy-hosts' and changed the meaning. (w3m-additional-command-arguments): Refer to it. 2002-03-10 TSUCHIYA Masatoshi * Makefile.in (tarball): Fix permissions. 2002-03-08 Katsumi Yamaoka * w3m.el (w3m-command-arguments-alist): Change the meaning that the car of each element will be compared with a url instead of a hostname. (w3m-no-proxy-hosts): New user option. (w3m-additional-command-arguments): Look into it. 2002-03-08 Katsumi Yamaoka * w3m.el (w3m-command-arguments-alist): New user option. (w3m-additional-command-arguments): New function. (w3m-w3m-retrieve): Use it. (w3m-history-current-url-face, w3m-copy-buffer, w3m-about-header): Remove unused non-global variables. 2002-03-08 ARISAWA Akihiro * w3m.el (w3m-w3m-attributes) [w3mmee]: Fetch content-encoding from "x-w3m-content-encoding" filed. 2002-03-07 Hideyuki SHIRAI * mew-w3m.el (mew-w3m-cid-retrieve): Return lowercase string always because `w3m-image-type-alist' has lowercase keys. 2002-03-07 Yoichi NAKAYAMA * w3m.el (w3m-lynx-like-map): Switch J and K so as to behave like w3m. 2002-03-07 Katsumi Yamaoka * aclocal.m4 (AC_EXAMINE_PACKAGEDIR): Use `(eq 0 foo)' instead of `(zerop foo)' because foo might not be a number. (AC_PATH_ICONDIR): Ditto. 2002-03-07 Hideyuki SHIRAI * w3m.el (w3m-decoder-alist): Change default commands to `gzip' and `bzip2' instead of `gunzip' and `bunzip2' because some broken OS and its environment does not work them. 2002-03-07 Katsumi Yamaoka * Makefile.in (datadir): New variable. 2002-03-06 Hideyuki SHIRAI * w3m-proc.el (w3m-process-filter): Modify a regexp for "Password:". 2002-03-06 Katsumi Yamaoka * Makefile.in (install): Don't chdir to shimbun/ while installing shimbun modules. (install-icons): Don't chdir to icons/ while installing icons. 2002-03-05 Katsumi Yamaoka * Makefile.in (install): Install all ChangeLog files. * w3mhack.el (w3mhack-make-package): List all ChangeLog files in the manifest. 2002-03-05 Hideyuki SHIRAI * w3m.el (w3m-local-dirlist-cgi): Set `w3m-current-url' for avoid error in `w3m-process-start-process()'. (w3m-goto-url): When use w3m-dtree and the URL is local directory, change the URL to `about://dtree' securely. 2002-03-04 Katsumi Yamaoka * w3m-util.el (w3m-function-max-args): Alias to `function-max-args' under XEmacs, otherwise define it as a function. (symbol-for-testing-whether-colon-keyword-is-available-or-not): Use `dont-compile' instead of `eval'. 2002-03-02 TSUCHIYA Masatoshi * Release emacs-w3m-1.2.5 from emacs-w3m-1_2 branch. 2002-03-01 Yuuichi Teranishi * octet.el (octet-find-file): Decode even in the read-only buffer. 2002-02-26 TSUCHIYA Masatoshi * Makefile.in (DOCS): Add ChangeLog.1. Local Variables: coding: iso-2022-7bit fill-column: 79 indent-tabs-mode: t End: emacs-w3m-emacs-w3m-4f27810/ChangeLog.1000066400000000000000000007405721434375002100173040ustar00rootroot000000000000002002-02-25 TSUCHIYA Masatoshi * w3m-proc.el (w3m-process-filter): Use `ignore-errors' instead of `condition-case'. (w3m-process-y-or-n-p): Regist answers only when they have non-nil values. 2002-02-24 TSUCHIYA Masatoshi * w3m-perldoc.el: New file. * w3m.el (top): Add autoload for `w3m-perldoc.el'. (w3m-tmp-urluser-alist): Abolished. (w3m-read-file-name): Call `w3m-url-strip-query'. (w3m-download): Ditto. (w3m-w3m-get-header): Accept URLs which includes authentication information like scheme://user:pass@netloc/. Set `w3m-current-url' before `w3m-process-start' is called. (w3m-w3m-dump-head-source): Ditto. (w3m-retrieve): Call `w3m-url-strip-fragment'. (w3m-retrieve-and-render): Modified to accept URLs which includes authentication information. Do not set `w3m-current-url'. (w3m-goto-url): Modified to accept URLs which includes authentication information and to pass them through to sub-routines. (w3m): Small modified to accept URLs which includes authentication information. * w3m-util.el (w3m-url-authinfo-regexp): New internal constant. (w3m-url-authinfo): New function. (w3m-url-strip-authinfo): Ditto. (w3m-url-strip-fragment): Ditto. (w3m-url-strip-query): Ditto. * w3m-proc.el (top): No bind `w3m-tmp-urluser-alist'. (w3m-process-authinfo-alist): Renamed from `w3m-process-user-alist'. (w3m-process-accept-list): Abolished. (w3m-process-accept-alist): New internal variable. (w3m-process-user-counter): Abolished. (w3m-process-start-process): In order to set `w3m-process-user' and `w3m-process-passwd' call `w3m-url-authinfo', instead of refering `w3m-tmp-urluser-alist'. (w3m-process-stop): Reset `w3m-process-authinfo-alist' and `w3m-process-accept-alist'. (w3m-process-sentinel): Regist an authentication information only when `w3m-process-realm' is set. (w3m-process-filter): Call `w3m-process-y-or-n-p' instead of `w3m-process-accept-get' and `w3m-process-accept-set'. When a user name and a password of a proxy server are reasked, their old values are discarded. Reconstruct the part checking user names and passwords. (w3m-process-get-server-root): Its regular expression are small modified. Call `w3m-url-strip-authinfo'. (w3m-process-get-user): Removed. (w3m-process-get-passwd): Ditto. (w3m-process-set-user): Ditto. (w3m-process-accept-get): Ditto. (w3m-process-accept-set): Ditto. (w3m-process-set-authinfo): New function. (w3m-process-read-user): Ditto. (w3m-process-read-passwd): Ditto. (w3m-process-y-or-n-p): Ditto. 2002-02-14 Hideyuki SHIRAI * w3m.el (w3m-modeline-ssl-image-status-on) (w3m-modeline-ssl-status-off): New constants. (w3m-current-ssl): New buffer local variable. (w3m-clear-local-variables, w3m-copy-local-variables): Handling `w3m-current-ssl'. (w3m-w3m-attributes): When detect `W3m-ssl-certificate:' header, set `w3m-current-ssl'. Skip reading of folded lines of each header. (w3m-buffer-setup): Display SSL indicator at mode-line. (w3m-about-header): Display SSL information when exist `W3m-ssl-certificate:' header. 2002-02-13 Katsumi Yamaoka * w3m.el (w3m-read-file-name): Strip the query part from a default file name. (w3m-download): Ditto. (w3m-url-components-regexp): Move forward. * mime-w3m.el: Always require `font' under XEmacs. 2002-02-12 Katsumi Yamaoka * w3m.el (w3m-async-exec): Default to nil under MacOS X. 2002-02-12 Hideyuki SHIRAI * w3m-e21.el (w3m-setup-favicon): Fix handling of `w3m-about-xxxx-favicon'. 2002-02-08 Yuuichi Teranishi * w3m.el (w3m-icon-data): New buffer local variable. (w3m-clear-local-variables): Add `w3m-icon-data'. (w3m-copy-local-variables): Ditto. (w3m-fontify-anchors): Setup `w3m-icon-data'. (w3m-check-link-tags): Parse `type' of link attribute; Set `w3m-icon-data' if `icon' rel attribute exist. (w3m-goto-url): Added local variable real-data. * w3m-e21.el (w3m-favicon-cache-favicon): Added compatibility code. (w3m-setup-favicon): Use w3m-icon-data if it exists; Changed first argument for `w3m-retrieve-favicon'. (w3m-buffer-favicon): Use car of `w3m-current-favicon-data' as image data and cdr as image type. (w3m-retrieve-favicon): Changed first argument to cons cell of image data and its type. 2002-02-08 Katsumi Yamaoka * w3m.el (w3m-save-list): Allow the 4th arg `escape-ctl-chars'. (w3m-arrived-shutdown): Call it with the 4th arg. * w3m-antenna.el (w3m-antenna-shutdown): Call `w3m-save-list' with the 4th arg. 2002-02-08 Yuuichi Teranishi * w3m.el (w3m-pixels-per-line): Renamed from w3m-pixel-per-line; Fixed custom type. (w3m-pixels-per-character): Likewise. (w3m-rendering-half-dump): Follow the changes above. 2002-02-08 TSUCHIYA Masatoshi * w3m.el (w3m-type): Considerd as an internal variable. (w3m-options): Removed. (w3m-compile-options): New internal variable. (toplevel): Set `w3m-compile-options' instead of `w3m-options'. (w3m-treat-image-size): Refer `w3m-compile-options' instead of `w3m-options'. (w3m-rendering-half-dump): Ditto. (w3m-local-file-type): When a remote URL is passed, refer its non-directory part to decide its content type. (w3m-touch-file): Bind `default-directory' locally. 2002-02-08 Yuuichi Teranishi * w3m.el (w3m-pixel-per-line): New user option. (w3m-rendering-half-dump): Use `w3m-pixel-per-line' as the -ppl argument of the w3m command. (w3m-pixel-per-character): New user option. (w3m-rendering-half-dump): Use `w3m-pixel-per-character' as the -ppc argument of the w3m command. 2002-02-07 Yuuichi Teranishi * w3m-e21.el (w3m-favicon-size): Set default value to nil. (w3m-buffer-favicon): If w3m-favicon-size is nil, detect frame char height and use it. * w3m.el (w3m-command): Set default value to nil. (w3m-type): Ditto. (w3m-options): New user option. (toplevel): Set w3m-command, w3m-type and w3m-options. (w3m-treat-image-size): New user option. (w3m-rendering-half-dump): Set rendering options -o display_image=on/off, -ppc, -ppl according to the value of `w3m-treat-image-size'. 2002-02-07 Katsumi Yamaoka * w3m-util.el (w3m-display-message): New macro. * w3m.el (w3m-make-help-echo): Clear the echo area when Emacs 21 is running; use the modern styles of backquote. (w3m-make-balloon-help): Use the modern styles of backquote. (w3m-toggle-inline-image): Use `w3m-display-message' instead of `message' to say a trivial message. (w3m-view-this-url): Ditto. (w3m-submit-form): Ditto. (w3m-view-image): Ditto. (w3m-save-image): Ditto. (w3m-download-this-url): Ditto. (w3m-print-current-url): Ditto. (w3m-print-this-url): Ditto. (w3m-edit-this-url): Ditto. (w3m-quit): Ditto. (w3m-goto-ftp-url): Ditto. (w3m-select-buffer): Ditto. (w3m-select-buffer-show-this-line): Ditto. (w3m-select-buffer-show-this-line-and-switch): Ditto. 2002-02-07 TSUCHIYA Masatoshi * w3m.el (w3m-after-cursor-move-hook): New option. (w3m-check-current-position): New function. (w3m-print-this-url-after-command): Removed. (w3m-buffer-setup): Set `w3m-check-current-position' to `post-command-hook', instead of `w3m-print-this-url-after-command'. (w3m-add-local-hook): Check version of Emacsen dynamically. * w3m-e21.el (w3m-add-local-hook): New function. 2002-02-07 Yuuichi Teranishi * w3m.el (w3m-fontify-images): Changed regexp to more generic one to search img_alt tag. (w3m-toggle-inline-images-internal): Fixed image redisplay flickers. 2002-02-06 Katsumi Yamaoka * w3m.el (w3m-halfdump-command-common-arguments): Replace `frame-width' with `window-width'. (w3m-about-db-history): Ditto. 2002-02-05 Hideyuki SHIRAI * w3m-proc.el (w3m-process-accept-list): New internal variable. (w3m-process-filter): Watch `accept? (y/n)' for certification. (w3m-process-accept-get, w3m-process-accept-set): New functions. 2002-02-05 Katsumi Yamaoka * w3m-xmas.el (w3m-make-ccl-coding-system): Alias to `ignore' if no-MULE (the feature `mule' is not provided). (coding-system-category): Ditto. (define-ccl-program): Define it as an empty macro if no-MULE. * w3m.el (TopLevel): Don't require `ccl' if no-MULE. (w3m-accept-japanese-characters): Default to nil if no-MULE. (w3m-coding-system): Default to `iso-8859-1' if no-MULE. (w3m-output-coding-system): Ditto. (w3m-file-coding-system): Ditto. (w3m-toolbar): Don't express some Japaneses chars directly. * w3mhack.el (w3mhack-examine-modules): Don't byte-compile w3m-ucs.el, shimbun modules, mime-w3m.el, octet.el and w3m-weather.el if no-MULE. 2002-02-05 TSUCHIYA Masatoshi * w3m.el (w3m-meta-content-type-charset-regexp) (w3m-meta-charset-content-type-regexp) (w3m-meta-refresh-content-regexp) (w3m-meta-content-refresh-regexp): Remove redundant double quote. * w3m.el (w3m-content-prepare-functions): New internal contsant. (w3m-prepare-content): Refer it. (w3m-prepare-text-content): New function. (w3m-prepare-image-content): Ditto. 2002-02-05 Hideyuki SHIRAI * w3m.el (w3m-meta-charset-content-type-regexp) (w3m-meta-content-refresh-regexp): Allow broken quotation mark. 2002-02-05 TSUCHIYA Masatoshi * w3m.el (w3m-touch-file): Robust checking. 2002-02-05 Hideyuki SHIRAI * w3m-util.el (w3m-which-command): If called with `not string', return nil. 2002-02-05 TSUCHIYA Masatoshi * w3m.el (w3m-touch-file-avaiable-p): New internal variable. (w3m-touch-file): Check the validity of `touch' command. 2002-02-05 ARISAWA Akihiro * w3m.el (w3m-touch-file): Call touch command with "-t time" instead of "-d time". 2002-02-05 TSUCHIYA Masatoshi * w3m.el (w3m-touch-command): New option. (w3m-touch-file): New function. (w3m-download): Call it. (w3m-toggle-inline-images-internal): Fix inconsistency of text properties when images are not downloaded. (w3m-toggle-inline-image): Simplified. (w3m-toggle-inline-images): Ditto. 2002-02-04 Katsumi Yamaoka * w3m-util.el (w3m-prin1): New function. * w3m.el (w3m-save-list): Use it instead of `prin1'. * w3mhack.el, w3m.el, w3m-xmas.el, w3m-om.el: Say emacs-w3m not Emacs-W3M. 2002-02-04 Katsumi Yamaoka * mime-w3m.el (mime-w3m-mode-dont-bind-keys): New variable. (mime-w3m-setup): Don't bind keys listed in the above. * w3m.el (w3m-key-binding): Switch key bindings also in w3m-mode buffers when customizing; don't manipulate keymaps when Emacs is running in the batch mode. 2002-02-01 Yuuichi Teranishi * octet.el (octet-suffix-type-alist): Added lzh, tar, pdf. (octet-type-filter-alist): Ditto. (octet-content-type-alist): Added application/x-msexcel, text/html, application/x-tar, application/pdf. (octet-magic-type-alist): Fixed magic for html. (octet-tar-mode): New function. (octet-guess-type-from-name): Downcase suffix. (octet-mime-setup): Add action for application/vnd.ms-powerpoint. 2002-02-01 Katsumi Yamaoka * mime-w3m.el (mime-w3m-safe-url-regexp): New user option. (mime-w3m-preview-text/html): Use it. * w3m.el (w3m-key-binding): Don't eval a part of the `set:' form when compiling nnshimbun.el in the Gnus source tree. 2002-02-01 Yuuichi Teranishi * octet.el (octet-buffer): Fixed problem when 'Quit'. (mime-preview-octet-hook): New hook. (mime-preview-octet): Run it. (w3m-about-octet-attachments): Fixed problem when there's no octet-attachment which corresponds to the src url. (mime-view-octet): Set content-type argument for `octet-buffer'. (mime-preview-octet): Ditto. 2002-02-01 Katsumi Yamaoka * mime-w3m.el (mime-w3m-preview-text/html): Bind `w3m-force-redisplay' with nil. 2002-02-01 Yuuichi Teranishi * octet.el (octet-buffer): Set default of `completing-read'. 2002-02-01 Katsumi Yamaoka * w3m.el (w3m-key-binding): Switch `w3m-mode-map', `mime-w3m-mode-map' and `mm-w3m-mode-map' when customizing. 2002-01-31 Katsumi Yamaoka * mime-w3m.el (mime-w3m-mode-command-alist): New variable. (mime-w3m-setup): Use it; invalidate widget button in `mime-w3m-mode-map'. (mime-w3m-keymap-property): Removed. (mime-w3m-preview-text/html): Add `text-rendered-by-mime-w3m' text property to the rendered area. (kill-new): Strip keymap properties from a killed string only if it has `text-rendered-by-mime-w3m' property. 2002-01-31 Hideyuki SHIRAI * w3m.el (w3m-url-at-point): Remove all text-properties from url. * w3m-search.el (w3m-search): Remove all text-properties from default search value. 2002-01-31 TSUCHIYA Masatoshi * w3m-search.el (w3m-search-word-at-point): New option. (w3m-search): Refer `w3m-search-word-at-point'. 2002-01-31 Yuuichi Teranishi * octet.el (octet-content-type-alist): Added text/html. (octet-magic-type-alist): Likewise. (octet-type-filter-alist): Likewise; Added `guess'; Changed result type of gzip as `guess'. (octet-find-file-hook): New hook. (octet-find-file): Run it. (octet-filter-guess): New function. (octet-buffer): Fix. 2002-01-30 Yuuichi Teranishi * octet.el (toplevel): Require 'static. (octet-html-render-function): Changed default value to `octet-w3m-region.' (octet-type-filter-alist): Changed filter function to `octet-filter-call2-extra'. (octet-attachments): New buffer-local variable. (w3m-about-octet-attachments): New function. (octet-w3m-region): Ditto. (octet-filter-call2-extra): New function. (octet-find-file): Do nothing when buffer is read-only. * w3m.el (w3m-about-retrieve): Decode buffer only if the content-type is text. * octet.el (octet-guess-type-from-name): Return nil if guess failed. (octet-buffer): Ask octet type if guess failed. (octet-content-type-alist): New variable. (octet-guess-type-from-content-type): New function. (octet-buffer): Added optional argument `content-type'. (octet-buffer): Ignore `quit'. (octet-suffix-type-alist): Added images. (octet-content-type-alist): Ditto. (octet-type-filter-alist): Ditto. (octet-magic-type-alist): Renamed from mime-magic-type-alist. (octet-decode-image): New function. (octet-guess-type-from-magic): New function. (octet-buffer): Use it. (octet-insert-buffer): New function. (mime-preview-octet): Use it. 2002-01-29 Yuuichi Teranishi * octet.el (octet-type-filter-alist): Changed default value for xlhtml and ppthtml. (octet-filter-call2): Fixed problem when return value of call-process is not numeric. (octet-filter-call1): Ditto. (octet-find-file): Use unwind-protect. (octet-filter-call2): Fixed docstring. (octet-filter-call1): Ditto. (octet-buffer): Fixed argument for `interactive'. 2002-01-29 TSUCHIYA Masatoshi * w3m.el (w3m-encoding-type-alist): New option. (w3m-local-file-type): New function. (w3m-local-content-type): New implementation. (w3m-local-attributes): Call `w3m-local-file-type' instead of `w3m-local-content-type'. (w3m-download): `url' is lexically binded. Call `message' to display error messages. * w3mhack.el (w3mhack-examine-modules): Fix to avoid that octet.el is byte-compiled repeatedly. 2002-01-29 Yuuichi Teranishi * w3mhack.el (w3mhack-examine-modules): Add octet.el to the module list if FLIM is installed. * octet.el: New file. 2002-01-25 Yuuichi Teranishi * w3m.el (w3m-highlight-current-anchor): Don't search for the anchor points which are out of sight. 2002-01-25 Hideyuki SHIRAI * w3m.el (w3m-tmp-urluser-alist): New variable. (w3m-goto-url): If URL include user and passwd, set `w3m-tmp-urluser-alist' for process handling. Remove passwd from URL. (w3m): Remove passwd from URL when insert it in buffer. * w3m-util.el (w3m-get-user-passwd-from-url) (w3m-remove-passwd-from-url): New functions. * w3m-proc.el (top): Define `w3m-tmp-urluser-alist' to avoid byte-compile warning. (w3m-process-start-process): If URL include user or passwd, set them to default values. (w3m-process-filter): Use default values of `w3m-process-user' and `w3m-process-passwd'. (w3m-process-get-server-root): Remove `about://.../' from server root. * w3m-search.el (w3m-search): Insert default string in minibuffer. 2002-01-25 Yuuichi Teranishi * w3m.el (w3m-about-history): Don't add to history if url is nil. (w3m-print-this-url-after-command): Call `w3m-highlight-current-anchor'. (w3m-delete-all-overlays): New macro. (w3m-highlight-current-anchor): New function. (w3m-current-anchor-face): New face. (w3m-arrived-anchor-face): Removed underline property. (w3m-anchor-face): Ditto. 2002-01-18 OHASHI Akira * w3m.el (w3m-header-line-map): Inherit `w3m-mode-map'. 2002-01-15 TSUCHIYA Masatoshi * w3m-e21.el (w3m-setup-favicon): Reversed the condition that decide whether favicons are used. 2002-01-15 Hideyuki SHIRAI * w3m-e21.el (w3m-setup-favicon): If url is `ftp://', not retrieve a favicon data. * w3m.el (w3m-current-directory): New function. (w3m-goto-url): Use `w3m-current-directory' when set `default-directory'. 2002-01-12 TSUCHIYA Masatoshi * w3m.el (w3m-use-ange-ftp): New option. (w3m-w3m-attributes): Handle ftp scheme URLs. (w3m-download): Refer `w3m-use-ange-ftp'. (w3m-goto-url): Ditto. 2002-01-11 Hideyuki SHIRAI * w3m.el (w3m-read-file-name): Remove an optional argument `initial'. Call `read-file-name' without `default' option. 2002-01-11 ARISAWA Akihiro * w3m.el (w3m-url-encode-string): Fixed for Mule2. * w3m-util.el (w3m-truncate-string): New function. * w3m-form.el (w3m-form-replace): Use `w3m-truncate-string' instead of `truncate-string'. 2002-01-11 TSUCHIYA Masatoshi * w3m.el (w3m-region): Process tag. 2002-01-09 Hideyuki SHIRAI * w3m.el (w3m-local-content-type): Fix handling of the remote url. (w3m-file-directory-p): New function. (w3m-goto-ftp-url): Use `w3m-file-directory-p' instead of `file-directory-p'. 2002-01-08 TSUCHIYA Masatoshi * Release emacs-w3m-1.2.4 from emacs-w3m-1_2 branch. 2002-01-08 ARISAWA Akihiro * w3m.el (w3m-arrived-setup-hook): New hook. (w3m-arrived-shutdown-hook): Ditto. (w3m-arrived-setup): Run `w3m-arrived-setup-hook'. (w3m-arrived-shutdown): Run `w3m-arrived-shutdown-hook'. (w3m-quit): Don't remove `w3m-arrived-shutdown' from `kill-emacs-hook'. * w3m-e21.el (w3m-favicon-cache-expire-wait): New user option. (w3m-favicon-cache-p): New macro. (w3m-favicon-cache-favicon): Ditto. (w3m-favicon-cache-retrived): Ditto. (w3m-retrieve-favicon): Don't use old cache data. (w3m-favicon-cache-data): Renamed from `w3m-favicon-data-cache'. (w3m-favicon-save-cache-file): Follow above change. (w3m-favicon-load-cache-file): Ditto. (w3m-arrived-setup-hook): Regist `w3m-favicon-load-cachee-faile'. (w3m-arrived-shutdown-hook): Regist `w3m-favicon-save-cache-file'. 2002-01-08 TSUCHIYA Masatoshi * w3m.el (w3m-goto-url): Use a URL-like string under the cursor as the initial value of the target URL when interactively called. (w3m-view-this-url): When a URL-like string is found under the cursor, view it. (w3m-view-this-url-1): New internal function. 2002-01-08 Hideyuki SHIRAI * w3m.el (w3m-display-hook): Change default variable to `nil'. (top): Use `add-hook' when `w3m-history-highlight-current-url', `w3m-move-point-for-localcgi' and `w3m-select-buffer-update' set to `w3m-display-hook'. (w3m-local-dirlist-cgi): When use `dirlist.cgi', decode filename tag. 2002-01-07 TSUCHIYA Masatoshi * w3m.el (w3m-url-to-file-name): When the pointed file is not found, decode the specified URL and recheck it. 2002-01-07 Shiro Takeda * w3m.el (w3m-bold-face, w3m-underline-face): New faces. (w3m-fontify-bold): Use `w3m-bold-face' instead of `bold'. (w3m-fontify-underline): Use `w3m-underline-face' instead of `underline'. 2002-01-07 Hideyuki SHIRAI * w3m.el (w3m-w32-browser-with-fiber): Fix handling of the local url. * w3m-util.el (w3m-url-local-p): Fix its regexp for Windows. 2002-01-07 TSUCHIYA Masatoshi * w3m.el (w3m-about-header): Protect against null title. (w3m-arrived-setup): Ignore database of arrived URLs in too old style. 2002-01-05 TSUCHIYA Masatoshi * w3m.el (w3m-url-encode-string): Add a period to the set of characters which are not encoded. From Fabrice Bauzac 2001-12-31 TSUCHIYA Masatoshi * w3m.el (w3m-add-local-hook): New function. (w3m-current-position): New buffer local variable. (w3m-store-current-position): New hook function. (w3m-print-this-url-after-command): New hook funtcion. (w3m-buffer-setup): Regist these hook functions. (w3m-header-line-location-title-face): Integrated with the defition in w3m-e21.el (w3m-header-line-location-content-face): Ditto. (w3m-header-line-map): Ditto. (w3m-header-line-insert): Renamed from `w3m-insert-header-line'. * w3m-e21.el (w3m-header-line-location-title-face): Integrated to the defition in w3m.el. (w3m-header-line-location-content-face): Ditto. (w3m-header-line-map): Ditto. (w3m-setup-header-line): Clean up. (w3m-insert-header-line): Removed. 2001-12-30 Hideyuki SHIRAI * w3m.el (w3m-url-to-file-name): Fix its regexp. 2001-12-30 TSUCHIYA Masatoshi * w3m.el (w3m-print-this-url): Display a message when it is called interactively. 2001-12-29 OHASHI Akira * w3m.el (w3m-print-this-url): Don't print any messages when there is no url or form under point. 2001-12-29 TSUCHIYA Masatoshi * w3m.el (w3m-url-local-directory-alist): Renamed from `w3m-edit-url-directory-alist'. (w3m-url-to-file-name): Return nil, when the specified URL points no local file. (w3m-url-completion): Modified its regexp. Fix completion of dot files. (w3m-edit-url): Simplified. (w3m-goto-url): Removed the redundant local variable. Set `default-directory' to the local directory to which the current URL is related by `w3m-url-local-directory-alist'. (w3m-about-history): Installed the ad-hoc workaround. * w3m-util.el (w3m-url-dtree-p): Modified its regexp. 2001-12-26 Hideyuki SHIRAI * w3m.el (w3m-decode-get-refresh): Not run Refresh timer if the URI is matched `about://', . (w3m-goto-url): Modify the timing to call `w3m-cancel-refresh-timer'. 2001-12-26 Katsumi Yamaoka * w3m-util.el: Autoload "timer" for the function `cancel-timer' when Mule 2 is running. 2001-12-26 Hideyuki SHIRAI * w3m.el (w3m-refresh-at-time): Run `w3m-goto-url-with-timer' immediately, if the delay of refresh is zero. * w3m-xmas.el (w3m-refresh-at-time): Removed. 2001-12-25 Hideyuki SHIRAI * w3m.el (w3m-use-refresh): New user option. (w3m-refresh-timer, w3m-current-refresh): New buffer-local variables. (w3m-clear-local-variables, w3m-copy-local-variables): Handle `w3m-current-refresh'. (w3m-meta-refresh-content-regexp) (w3m-meta-content-refresh-regexp): New constant. (w3m-decode-buffer): Call `w3m-decode-get-refresh' first. (w3m-decode-get-refresh): New function. (w3m-view-previous-page): Bind `w3m-use-refresh' to nil. (w3m-quit, w3m-close-window): Call `w3m-cancel-refresh-timer' at any buffers. (w3m-goto-url): Call `w3m-cancel-refresh-timer' first. Call `w3m-refresh-at-time' at last; start REFRESH timer. (w3m-goto-url-with-timer): New function. (w3m-refresh-at-time): New function for FSF Emacs. * w3m-xmas.el (w3m-refresh-at-time): New function for XEmacs. * w3m-util.el (w3m-cancel-refresh-timer): New function. (w3m-current-refresh, w3m-refresh-timer, w3m-use-refresh): Avoid byte-compiled warnings. * w3m-proc.el (w3m-process-stop): Call `w3m-cancel-refresh-timer'. 2001-12-24 ARISAWA Akihiro * w3m.el (w3m-dump-head-source-command-arguments) [w3mmee]: Support `w3m-accept-languages'. 2001-12-21 TSUCHIYA Masatoshi * Release emacs-w3m-1.2.3 from emacs-w3m-1_2 branch. 2001-12-21 TSUCHIYA Masatoshi * w3m.el (w3m-type): Changed condition to decide type. (w3m-decoder-alist): Call `file-name-nondirectory' before `w3m-command' is refered. (w3m-dirlist-cgi-program): Ditto. 2001-12-21 ARISAWA Akihiro * w3m.el (w3m-type): Changed condition to decide type. (w3m-decoder-alist): Use `w3m-command' for inflate command path. (w3m-dirlist-cgi-program): Use `w3m-command'. (w3m-dump-head-source-command-arguments) [w3mmee]: Don't add "-o accept_language=xxx". 2001-11-16 OKAZAKI Tetsurou * w3m.el (w3m-type): Use "w3m-m17n" if exists. 2001-12-21 Katsumi Yamaoka * w3m.el (w3m-goto-mailto-url): Use the property `composefunc' to get the function to compose a mail from `mail-user-agent'. 2001-12-20 Katsumi Yamaoka * w3m.el (w3m-load-list): Removed a bogus code for XEmacs; don't bind the value of `file-coding-system-for-read' if the optional arg is nil and `w3m-file-coding-system-for-read' is nil. 2001-12-19 Katsumi Yamaoka * w3mhack.el (w3m-use-favicon): Don't bind it. * w3m-e21.el (w3m-use-favicon): Set it to nil anyway when Emacs is running in the batch mode. (w3m-imagick-convert-buffer): Reverted. 2001-12-19 Katsumi Yamaoka * w3m-e21.el (w3m-imagick-convert-buffer): Don't growl errors when Emacs is running in the batch mode. 2001-12-18 ARISAWA Akihiro * w3m-e21.el (w3m-favicon-use-cache-file): New user option. (w3m-favicon-cache-file): Ditto. (w3m-favicon-data-cache): New variable. (w3m-retrieve-favicon): Use `w3m-favicon-data-cache' or store it. (w3m-favicon-save-cache-file): New function. (w3m-favicon-load-cache-file): Ditto. 2001-12-17 Katsumi Yamaoka * w3m-e21.el (w3m-e21-toolbar-configurations): Replace `auto-resize-tool-bar' to `auto-resize-tool-bars'. 2001-12-17 OHASHI Akira * README.shimbun.ja: Add information for sb-debian-jp.el and sb-debian.el. 2001-12-17 Taiki SUGAWARA TSUCHIYA Masatoshi * w3m-form.el (w3m-form-parse-forms): Change the separater string for option tag. 2001-12-12 Taiki SUGAWARA * w3m-form.el (w3m-form-parse-forms): If not find selected, first element is made into default. 2001-12-14 Hideyuki SHIRAI * w3m-dtree.el (w3m-about-dtree): Ignore arguments on and after 4th. 2001-12-14 Katsumi Yamaoka Suggested by NAKAJIMA Mikio . * w3m-e21.el (w3m-use-favicon): Default to t, but it will be altered to nil automatically if ImageMagick does not support a favicon; never use ImageMagick if it has been set to nil. * w3mhack.el (w3m-use-favicon): Bind it to nil to inhibit the use of ImageMagick. 2001-12-12 Kazuyoshi Koreeda * w3m-weather.el (w3m-weather-insert-seikatu-sisu): New function. (w3m-weather-get-seikatu-sisu): Ditto. 2001-12-10 ARISAWA Akihiro * w3m-form.el (w3m-form-parse-forms): Use `w3m-decode-entities-string' to value in the textarea and option menu. 2001-12-11 Mito * w3m.el (w3m-scroll-left): Modify doc-string. (w3m-scroll-right): Ditto. 2001-12-07 Katsumi Yamaoka * w3m-e21.el (w3m-imagick-convert-usable-p): New function. (w3m-use-favicon): Use it. 2001-12-06 ARISAWA Akihiro , TSUCHIYA Masatoshi * w3m-e21.el (top): Installed the check of the validity of ImageMagick. 2001-12-06 TSUCHIYA Masatoshi * Release emacs-w3m-1.2.2 from emacs-w3m-1_2 branch. 2001-12-06 TSUCHIYA Masatoshi * w3m.el (w3m-type): Follow the new official release of w3m. (w3m-attributes): Follow the change of error symbols which are defined in w3m-proc.el. (w3m-retrieve): Ditto. (w3m-about-header): Likewise. Ignore optional arguments safely. (w3m-message): Display message only when original w3m buffer is displayed. (w3m-about-retrieve): Asynchronized. (w3m-retrieve-and-render): Follow the change of `w3m-message'. (w3m-prepare-content): Install the measure against narrowed buffers. * w3m-proc.el (w3m-process-start-process): Accept the 2nd optional argument to reset the sentinel funtcion for the generated asynchronous process. (w3m-process-failure): Removed. (w3m-process-timeout): Simplified its error condition. (w3m-process-with-wait-handler): No sentinel function is registered and the sentinel function is called from this macro itself. * w3m-weather.el (w3m-weather-filter-functions): Add `w3m-weather-expand-anchors'. (w3m-about-weather): Asynchronized. (w3m-weather-remove-headers): Follow changes of original content. (w3m-weather-remove-footers): Ditto. (w3m-weather-expand-anchors): New filter function. 2001-12-06 Katsumi Yamaoka * w3m.el (w3m-emacs-w3m-icon): Made it interlaced and endlessly animated. 2001-12-06 ARISAWA Akihiro * w3m.el (w3m-decode-buffer): When content-charset is unknown, detect coding-system automatically. 2001-12-04 ARISAWA Akihiro * w3m-e21.el (w3m-buffer-favicon): Reset `w3m-current-favicon-data' to nil when conversion was failure. 2001-12-04 Katsumi Yamaoka * w3m-e21.el (w3m-imagick-convert-buffer): Say errors and return nil if the process returns a non-zero status (possibly a string). 2001-12-03 Hideyuki SHIRAI * w3m-xmas.el (w3m-create-image): Bind some arguments lexically for w3m-fix-gif(). 2001-12-04 Yuuichi Teranishi * w3m-e21.el (w3m-setup-favicon): Fix for "about://" url. (w3m-buffer-favicon): Renamed local variable. (w3m-tab-line): Call `w3m-buffer-favicon' only when w3m-use-favicon is non-nil. 2001-12-03 Hideyuki SHIRAI * w3m.el (w3m-modeline-process-status-on): Modify default value. (w3m-buffer-setup): Simplified `mode-line-buffer-identification'. 2001-11-29 Yuuichi Teranishi * w3m-e21.el (w3m-imagick-convert-program): New user option. (w3m-favicon-size): Ditto. (w3m-use-favicon): Ditto. (w3m-favicon-name): New constant. (w3m-current-favicon-data): New buffer local variable. (w3m-current-favicon-image): Ditto. (w3m-display-hook): Added 'w3m-setup-favicon. (w3m-imagick-convert-buffer): New function. (w3m-imagick-convert-data): Ditto. (w3m-setup-favicon): Ditto. (w3m-buffer-favicon): Ditto. (w3m-retrieve-favicon): Ditto. (w3m-tab-line): Display favicon on tab. 2001-11-28 Yuuichi Teranishi * w3m-xmas.el (w3m-insert-image): Rewrite. (if displayed images exist on the right side, keep them and display again) (w3m-remove-image): Call `delete-extent' to destroy extents. 2001-11-27 Yoichi NAKAYAMA * TIPS: New file. 2001-11-27 Hideyuki SHIRAI * w3m.el (w3m-download-this-url): Fix a problem of broken URL. 2001-11-22 TSUCHIYA Masatoshi * w3m.el (top, w3m-about): Change the URL of w3m's official page. 2001-11-21 Hideyuki SHIRAI * w3m.el (w3m-max-anchor-sequence): New buffer local variable. (w3m-copy-local-variables, w3m-clear-local-variables): Handle `w3m-max-anchor-sequence'. (w3m-fontify-anchors): Reset `w3m-max-anchor-sequence' to zero. Use the text-property `w3m-anchor-sequence' insted of `w3m-cursor-anchor'. (w3m-goto-next-anchor, w3m-next-anchor, w3m-goto-previous-anchor) (w3m-previous-anchor): Rewrite use the text-property `w3m-anchor-sequence'. (w3m-next-form, w3m-goto-next-image, w3m-next-image) (w3m-previous-image): Fix mistake as modified last time. * w3m-util.el (w3m-anchor-sequence): New macro. (w3m-cursor-anchor) Remove macro. * w3m-form.el (w3m-form-fontify): Use the text-property `w3m-anchor-sequence' insted of `w3m-cursor-anchor'. 2001-11-21 TSUCHIYA Masatoshi * w3m.el (w3m-download-this-url): Wrap the form which is evaluated in asynchronous context with `w3m-process-with-null-handler', to fix the bug reported by Hideyuki SHIRAI . * w3m-xmas.el (w3m-create-image): Modified to avoid calling `w3m-process-with-wait-handler'. 2001-11-20 TSUCHIYA Masatoshi * w3m-proc.el (w3m-process-push): Set the buffer-local variable `w3m-process-object' in the appropriate buffer. (w3m-process-sentinel): Removed redundant call of `with-current-buffer'. * Makefile.in (default): Reintroduce of checking time stamps of w3m-util.elc and w3m-proc.elc. * w3m-proc.el (w3m-process-temp-file): Abolished. * w3m.el (w3m-content-charset, w3m-content-encoding, w3m-content-length, w3m-content-type, w3m-last-modified, w3m-real-url): Fixed asynchrounization. (w3m-download): Changed the argument spec and the body to accept an asynchrounous context. (w3m-external-view): Follow change of `w3m-download'. (w3m-external-view-file): Changed the argument spec and the body; `w3m-process-temp-file' is not refered. (w3m-download-this-url): Follow change of `w3m-download'. (w3m-scroll-left, w3m-scroll-right): Use `call-interactively' to avoid a strange behavior of Emacs21. This change is suggested by Hironori FUJII . * w3m-proc.el (w3m-process-failure): New error symbol. (w3m-process-timeout): Change its error condition. (w3m-process-with-wait-handler): Install adhoc workaround. * w3m.el (w3m-attributes, w3m-retrieve, w3m-about-header): Follow change of `w3m-process-with-wait-handler'. 2001-11-19 Hideyuki SHIRAI * w3m.el (w3m-modeline-process-status-on): New constant. (w3m-modeline-status-off): Rename from `w3m-modeline-image-status-off'. (w3m-buffer-setup): Show the string of `w3m-modeline-process-status-on' when process running. (w3m-download): Add 4th argument `extview' for w3m-external-view(). If `extview' is gived, apply `extview' on process-sentinel like (apply (car extview) (cdr extview)). (w3m-external-view): When execute `w3m-download', call with `extview' argument. (w3m-external-view-file): New function. 2001-11-19 Hideyuki SHIRAI * w3m.el (w3m-print-this-url): View current image info. (w3m-goto-next-image, w3m-next-image, w3m-goto-previous-image) (w3m-previous-image): New functions. (w3m-lynx-like-map, w3m-info-like-map): Bind "}" as the key to call `w3m-next-image'. Bind "{" as the key to call `w3m-previous-image'. (w3m-mode): Modify dos-string. 2001-11-19 Masatake YAMATO * w3m.el (w3m-goto-next-form, w3m-next-form) (w3m-goto-previous-form, w3m-previous-form): New functions. (w3m-lynx-like-map, w3m-info-like-map): Bind "]" as the key to call `w3m-next-form'. Bind "[" as the key to call `w3m-previous-form'. 2001-11-19 Kazuhiko * w3m-xmas.el (w3m-create-image): Fix a problem in handling XBM on XEmacs. 2001-11-18 TSUCHIYA Masatoshi * w3m.el (w3m-attributes): Establish the error handler for `w3m-process-timeout' when the argument `handler' is equal to nil. (w3m-retrieve): Ditto. (w3m-about-header): Establish the error handler for `w3m-process-timeout' before `w3m-w3m-get-header' is called. (w3m-select-buffer-close-window): Check whether the menu's window exists. * w3m-proc.el: Changes to avoid endless loop. (w3m-process-start-process): Changed the spec of its return value. (w3m-process-timeout): New error symbol. (w3m-process-with-wait-handler): Bind `inhibit-quit' to nil, in order to accept user's quit; Signal `w3m-process-timeout' when time out is detected. (w3m-process-do): Accept null variable. (w3m-process-do-with-temp-buffer): Ditto. * Makefile.in (default): Cancel the last change. 2001-11-16 TSUCHIYA Masatoshi * Makefile.in (default): When files which define macros and inline functions such as w3m-util.el and w3m-proc.el are newer than their byte-compiled files, run clean target before compile. * w3m.el (w3m-about-db-history-today): Removed. (w3m-about-db-history): Call `w3m-time-lapse-seconds' to classify entries. * w3m-proc.el: Changes to avoid endless loop. (w3m-process-inhibit-quit): New internal variable. (w3m-process-timeout): New variable. (w3m-process-with-wait-handler): Strict check when asynchrounous processes finish; Refer `w3m-process-timeout' to check idle time. (w3m-process-sentinel): Bind `inhibit-quit' according to `w3m-process-sentinel'. * w3m-e21.el: Changes to display tabs which are retieving contents in the other face. (top): Define `w3m-current-process' to avoid byte-compile warning. (w3m-tab-unselected-retrieving-face): New face. (w3m-tab-selected-retrieving-face): Ditto. (w3m-tab-line): Refer `w3m-current-process' in order to select the face of the tab which is retriving some pages. * w3m-util.el (w3m-time-lapse-seconds): New inline function. * w3m-antenna.el (top): Add autoload of `w3m-filter' to avoid byte-compile warning. 2001-11-16 Hideyuki SHIRAI * w3m.el (w3m-select-buffer): If nomsg eq 'update, don't save selected-window; so called `w3m-select-buffer-update' any window to differ original window executed process, is broken `w3m-select-buffer-window'. (w3m-select-buffer-update): Call `w3m-select-buffer' with 'update. 2001-11-16 TSUCHIYA Masatoshi * mime-w3m.el (mime-w3m-keymap-property): New macro. (mime-w3m-preview-text/html, kill-new): Use the above macro instead of `w3m-static-if'. 2001-11-16 Hideyuki SHIRAI * w3m.el (w3m-select-buffer-window-ratio): New user option. (w3m-select-buffer-window-size): Remove user option. (w3m-select-buffer-window-size): New function. (w3m-select-buffer-toggle-style): Ditto. (w3m-select-buffer): Use `w3m-select-buffer-window-size' when calculate window size. When call with prefix argument, toggle `w3m-select-buffer-horizontal-window'. (w3m-select-buffer-show-this-line): Use `w3m-select-buffer-window-size' when calculate window size. If exist w3m-buffer another window under control, use it. (w3m-select-buffer-mode-map): Modify the key binding 'C-cC-s' for toggle `w3m-select-buffer-horizontal-window'. (w3m-select-buffer-update): Call `w3m-select-buffer' with two arguments. (w3m-select-buffer-mode): Modify doc-string. * w3m-tabmenu.el (w3m-switch-buffer): Change the rule of detecting default buffer. (w3m-tab-menubar-make-items): Ditto. 2001-11-16 TSUCHIYA Masatoshi * mime-w3m.el: Changes to make installation of this module be easy; Comments updated; Initialize code is moved to `mime-w3m-setup'; Changed requirement of other modules. (mime-w3m-display-inline-images): Changed the default value. (mime-w3m-insinuate, mime-w3m-setup): New function. (mime-w3m-preview-text/html): Call `mime-w3m-setup'. 2001-11-15 Katsumi Yamaoka * w3m-search.el: Require `cl' when compiling. 2001-11-15 TSUCHIYA Masatoshi * w3m.el: Changes to avoid that multi async processes are started in the same buffer. (w3m-current-process): New internal variable to protect parallel retriving. (w3m-attributes, w3m-base-url, w3m-content-charset, w3m-content-encoding, w3m-content-length, w3m-content-type, w3m-last-modified, w3m-real-url): Asynchronized. (w3m-toggle-inline-images-internal): Set `w3m-current-buffer' to this buffer locally, in order to classify the generated async process to the appropriate buffer. (w3m-toggle-inline-images): Stop processes which are retrieving images of this buffer. (w3m-retrieve-and-render): Remove redundant `let'. (w3m-view-this-url): Refontify anchor. (w3m-lynx-like-map, w3m-info-like-map): Bind `C-cC-g' as the key to call `w3m-process-stop'. (w3m-goto-url): Check `w3m-current-process' to avoid reenterant and set it to the value of `w3m-retrieve-and-render'; Before the retrieving process of the next page is started, select this buffer in the current window and stop processes which are retrieving images of this buffer. (w3m): Not select this buffer in the current window. * w3m-proc.el (top): Define `w3m-current-process' to avoid byte-compile warning. (w3m-process-queue-registrable-p): Abolished. (w3m-process-new): Its argument spec is changed; Changed the strucuture of `w3m-process' object. (w3m-process-command): New macro. (w3m-process-arguments): Follow the structural change of `w3m-process' object. (w3m-process-push): Likewise; Follow change of `w3m-process-new'; No check for `w3m-process-queue-registrable-p'. (w3m-process-kill-process): Check process status before stopping them. (w3m-process-start-process): Follow the structural change of `w3m-process' object. (w3m-process-stop): Ditto; Start queued processes. (w3m-process-with-null-handler): No check for `w3m-process-queue-registrable-p'. * w3m-util.el (w3m-kill-buffer): Fix code to kill this buffer. 2001-11-15 Hideyuki SHIRAI * w3m.el (w3m-select-buffer): Fix window height calculation when w3m-select-buffer-horizontal-window is nil. (w3m-select-buffer-mode-map): Add the key bind of `w3m-select-buffer-show-this-line-and-down'. Modify the key bind of `w3m-select-buffer-show-this-line'. (w3m-select-buffer-show-this-line): Fix window height calculation when w3m-select-buffer-horizontal-window is nil. If already displayed w3m-buffer and call interactively, call `w3m-scroll-up-or-next-url'. (w3m-select-buffer-show-this-line-and-down): New function. 2001-11-15 TSUCHIYA Masatoshi * Merge experimental-async branch to main trunk. * w3m-util.el: Rename from w3m-macro.el; Require `poe' and `poem' module for XEmacs and Mule; Import some functions from w3m.el and w3m-proc.el. * w3m.el: Require `w3m-util' instead of `w3m-macro'; Export `w3m-kill-all-buffer' to w3m-util.el. (w3m-work-binary-buffer-name): Removed. (w3m-rendering-half-dump): Accept an optional argument for w3mmee and w3m-m17n. (w3m-rendering-buffer-1): Accept two optional arguments for w3mmee and w3m-m17n. (w3m-rendering-unibyte-buffer): Generate a new working buffer for w3mmee and w3m-m17n, in order to avoid racing. (w3m-rendering-multibyte-buffer): Ditto. * w3m-proc.el: Require `w3m-util' instead of `w3m-macro'; Export `w3m-buffer-title', `w3m-buffer-name-lessp' and `w3m-list-buffers' to w3m-util.el. * mime-w3m.el, w3m-antenna.el, w3m-bookmark.el, w3m-e21.el, w3m-form.el, w3m-tabmenu.el, w3m-xmas.el: Require `w3m-util' instead of `w3m-macro'. * w3mhack.el (w3mhack-examine-modules): Handle w3m-util.el instead of w3m-macro.el. 2001-11-14 TSUCHIYA Masatoshi * w3m.el (top): Colon keywords definition are moved to `w3m-macro.el'. (w3m-process-connection-type): Imported from `w3m-proc.el'. (w3m-next-buffer, w3m-previous-buffer): Simplified. (w3m-delete-buffer): Call `w3m-quit' when the number of w3m-mode buffers is equal to 1. (w3m-quit): Kill all w3m-mode buffers. (w3m-close-window): Call `w3m-select-buffer-close-window'. (w3m-select-buffer-generate-contents): Simplified. (w3m-select-buffer-close-window): New function. * w3m-tabmenu.el (w3m-tab-menubar-make-items): Use `w3m-buffer-title' and `w3m-list-buffers'. * w3m-proc.el (top): Require `poe' module in XEmacs; Require `w3m-om' in Mule; Define `w3m-current-title' to avoid byte-compile warning. (w3m-process-connection-type): Exported to `w3m.el'. (w3m-buffer-title, w3m-buffer-name-lessp, w3m-list-buffers): New functions. * w3m-macro.el (top): Colon keywords definition are imported from `w3m.el'. (w3m-pullout-buffer-number): Removed. * w3m-e21.el (w3m-tab-line): Use `w3m-buffer-title' and `w3m-list-buffers'. * w3m.el (w3m-attributes): Wrap `w3m-w3m-attributes' with `w3m-process-with-wait-handler'. (w3m-w3m-attributes): Changed the argument spec. Now, this function can be used only in asynchronous context. (w3m-rendering-unibyte-buffer): Changed the argument spec, and the first argument `url' is refered instead of `w3m-current-url'. This change is made to avoid using `w3m-process-with-wait-handler' in asynchronous context. (w3m-prepare-content): Follow the change of `w3m-rendering-unibyte-buffer'. 2001-11-14 Hideyuki SHIRAI * w3m.el (w3m-next-buffer): Use `w3m-pullout-buffer-number' when sort buffer-name. (w3m-previous-buffer): Ditto. (w3m-select-buffer): Change the turn to call of functions. (w3m-select-buffer-generate-contents): Use `w3m-pullout-buffer-number' when sort buffer-name. Use text-property instead of point when move to point. (w3m-select-buffer-recheck): Fix read-only error. (w3m-select-buffer-copy-buffer): Rewrite. * w3m-tabmenu.el (w3m-tab-menubar-make-items): Use `w3m-pullout-buffer-number' instead of `w3m-tab-menubar-pull-bufnum'. (w3m-tab-menubar-pull-bufnum): Remove. * w3m-macro.el (w3m-pullout-buffer-number): New defsubst. * w3m-e21.el (w3m-tab-line): Use `w3m-pullout-buffer-number' when sort buffer-name. 2001-11-14 Katsumi Yamaoka * w3m.el (w3m-parse-attributes): Moved it again to w3m-macro.el. * w3m-macro.el: The opposite of above. 2001-11-14 Katsumi Yamaoka * w3m.el: Moved back some macros and inline functions from w3m-macro.el. * w3m-macro.el (w3m-parse-attributes, w3m-real-url, w3m-last-modified, w3m-content-type, w3m-content-length, w3m-content-encoding, w3m-content-charset, w3m-base-url, w3m-attributes): Moved back to w3m.el. 2001-11-14 TSUCHIYA Masatoshi * w3m.el (w3m-w3m-retrieve) Call `w3m-w3m-attributes' instead of `w3m-attributes'. * w3m-proc.el (w3m-process-with-wait-handler): Reimplemented. 2001-11-14 Katsumi Yamaoka * w3m.el: Moved some macros and inline functions to w3m-macro.el. * w3m-macro.el (w3m-time-newer-p, w3m-url-local-p, w3m-url-dtree-p, w3m-parse-attributes, w3m-real-url, w3m-last-modified,w3m-content-type, w3m-content-length, w3m-content-encoding, w3m-content-charset, w3m-base-url, w3m-attributes, w3m-cursor-anchor, w3m-submit, w3m-image, w3m-anchor, w3m-action, w3m-get-text-property-around): Moved from w3m.el. (w3m-condition-case): Use old-fashioned backquotes. * w3m.el, w3m-xmas.el, w3m-tabmenu.el, w3m-form.el, w3m-e21.el, w3m-bookmark.el, w3m-antenna.el, mime-w3m.el: Require `w3m-macro'. 2001-11-14 TSUCHIYA Masatoshi * w3m.el (w3m-w3m-get-header, w3m-w3m-attributes): Asynchronized. (w3m-w3m-retrieve): Argument spec is changed. (w3m-w3m-dump-head-source): Follow change of `w3m-w3m-attributes'. (w3m-copy-buffer): Removed redundant code. (w3m-about-header): Follow change of `w3m-w3m-get-header'. * w3m-proc.el (w3m-process-do): The generated asynchronous process in the post handler is started at the end of `w3m-process-sentinel'. (w3m-process-do-with-temp-buffer): Ditto. (w3m-process-sentinel): Fixed. * w3m.el (w3m-download): Use `progn' instead of `inline', in order to make debugging be easy. (w3m-retrieve-and-render): Ditto. * w3m-proc.el: Changed the order of asynchronous form evaluation and starting asynchronous processes. (w3m-process-queue): Renamed from `w3m-processes'. (w3m-process-queue-registrable-p): New internal variable. (w3m-process-with-coding-system): New macro. (w3m-process-with-environment): Redefine with new backquote style. (w3m-process-push): Refer `w3m-process-queue-registrable-p' to add the handler to processes registered in `w3m-process-queue' safely. (w3m-process-start-process): New internal function. (w3m-process-start-queued-processes): Renamed from `w3m-process-start-internal'; Call `w3m-process-start-process'; Follow renaming of variables. (w3m-process-stop, w3m-process-shutdown): Follow renaming of variables. (w3m-process-with-null-handler): Start asynchronous processes at the end of this macro. (w3m-process-do, w3m-process-do-with-temp-buffer): Reimplemented. (w3m-process-start): Reimplemented. Asynchronous processes are not started in this function. (w3m-process-start-after): New internal function. (w3m-process-sentinel): Follow renaming of variables and functions. 2001-11-13 Katsumi Yamaoka * w3m-macro.el (w3m-condition-case): New macro. 2001-11-13 TSUCHIYA Masatoshi * Makefile.in: Fix the macro rule to generate *.elc files. * w3m.el (w3m-display-hook): Add `w3m-select-buffer-update'. (w3m-select-buffer-name): Move the definition position to avoid byte-compile warning. (w3m-goto-url): Removed the code to update the select buffer. (w3m-select-buffer-update): New function. * w3m-proc.el (w3m-process-with-wait-handler): Adhoc workaround. (w3m-process-start): Fix. 2001-11-13 Hideyuki SHIRAI * w3m.el (w3m-lynx-like-map): Bind `C-cC-a' as the key to call `w3m-switch-buffer'. (w3m-info-like-map): Ditto. Bind `\C-c\C-@' and `C-c\C- ' as the key to call `w3m-history-store-position'. Bind `C-cC-b' as the key to call `w3m-history-restore-position'. (w3m-mode): Modify doc-string. (w3m-select-buffer-show-this-line-and-switch): New function. (w3m-select-buffer-name): New internal constant. (w3m-select-buffer-mode-map): Bind `w' and `h' as the key to call `w3m-select-buffer-show-this-line-and-switch'. (w3m-select-buffer-mode): Modify doc-string. (w3m-select-buffer): Use `w3m-select-buffer-name'. If alive select-buffer, use it. Add optional argument `nomsg'. (w3m-select-buffer-generate-contents): If w3m-current-title is `', use w3m-current-url. (w3m-select-buffer-show-this-line): Return selected buffer. (w3m-select-buffer-quit): Always pop up the w3m window when quit. (w3m-select-buffer-show-this-line-and-quit): Rewrite. (w3m-goto-url): If alive w3m-select-buffer, update it. (w3m-copy-buffer): If w3m-pop-up-windows is nil, use switch-to-buffer. Block to change w3m-select-buffer to w3m buffer, if w3m-pop-up-windows is t. (top): Add autoload of `w3m-setup-tab' and `w3m-switch-buffer'. (w3m-setup-menu): Call `w3m-setup-tab-menu' when w3m-use-tab-menubar is t. (w3m-mode): Remove to call `w3m-setup-tab-menu'. * w3m-e21.el (TOP): Remove `(require 'w3m-tabmenu)'. * w3m-e20.el (TOP): Ditto. * w3m-om.el (TOP): Ditto. * w3m-xmas.el (w3m-setup-tab-menu, w3m-tab-menubar-pull-bufnum) (w3m-tab-menubar-make-items, w3m-select-buffer): Remove. (w3m-setup-menu): Call `w3m-setup-tab-menu' when w3m-use-tab-menubar is t. * w3mhack.el (w3mhack-examine-modules): Revival byte-compile `w3m-tabmenu.el' when XEmacs. * w3m-tabmenu.el (ALL): Full rewrite to use `easymenu'. 2001-11-13 TSUCHIYA Masatoshi * w3m.el (w3m-select-buffer-horizontal-window): New user option. (w3m-select-buffer-window-size): Ditto. (w3m-lynx-like-map): Bind `C-cC-b' as the key to call `w3m-switch-buffer. (w3m-info-like-map): Ditto. (w3m-select-buffer-window): New internal variable. (w3m-select-buffer-message): New internal constant. (w3m-select-buffer): New implementation. (w3m-select-buffer-generate-contents): New function. (w3m-select-buffer-mode-map): New keymap. (w3m-select-buffer-mode): New function. (w3m-select-buffer-recheck): New command. (w3m-select-buffer-current-buffer): New macro. (w3m-select-buffer-show-this-line): New command. (w3m-select-buffer-next-line): Ditto. (w3m-select-buffer-previous-line): Ditto. (w3m-select-buffer-copy-buffer): Ditto. (w3m-select-buffer-delete-buffer): Ditto. (w3m-select-buffer-quit): Ditto. (w3m-select-buffer-show-this-line-and-quit): Ditto. * w3m-xmas.el (w3m-switch-buffer): Renamed from `w3m-select-buffer'. * w3m-tabmenu.el (w3m-switch-buffer): Renamed from `w3m-select-buffer'. 2001-11-12 Hideyuki SHIRAI * w3m-e20.el (w3m-display-inline-images-p): Renamed from `w3m-display-inline-image-p'. * w3m-om.el (w3m-display-inline-images-p): Ditto. 2001-11-12 Yuuichi Teranishi * mew-w3m.el (mew-mime-text/html-w3m): Bind `w3m-display-inline-images' instead of `w3m-current-image-status'. * mime-w3m.el (mime-w3m-display-inline-images): Renamed from `mime-w3m-display-inline-image'. (mime-w3m-preview-text/html): Follow the change above; Bind `w3m-display-inline-images' instead of `w3m-current-image-status'. * w3m-xmas.el (w3m-display-inline-images-p): Renamed from `w3m-display-inline-image-p'; Refer `w3m-display-inline-images' instead of `w3m-current-image-status'. * w3m-e21.el (w3m-display-inline-images-p): Renamed from `w3m-display-inline-image-p'; Refer `w3m-display-inline-images' instead of `w3m-current-image-status'. * w3m.el (w3m-display-inline-image): Abolish. (w3m-current-image-status): Ditto. (w3m-display-inline-images): New buffer local variable. (w3m-default-display-inline-images): New user option. (w3m-toggle-inline-images-permanently): Ditto. (w3m-toggle-inline-image): Added docstring. (w3m-toggle-inline-images): Ditto; Refer `w3m-display-inline-images' instead of `w3m-current-image-status'. (w3m-view-url-with-external-browser): Ditto. (w3m-goto-url): Ditto. (w3m-toggle-inline-images): Change the value of `w3m-display-inline-images' even when displaying images is not completed. (w3m-copy-buffer): Set `w3m-display-inline-images' according to `w3m-toggle-inline-images-permanently'. (w3m-mode): Set value of `w3m-display-inline-images' according to `w3m-default-display-inline-images'. (w3m-goto-url): Set `w3m-display-inline-images' according to `w3m-toggle-inline-images-permanently'; Use `w3m-display-inline-images-p' instead of `w3m-display-inline-image-p'. (w3m-redisplay-with-charset): Use `w3m-display-inline-images' instead of `w3m-display-inline-image'. (w3m-region): Use `w3m-display-inline-images-p' instead of `w3m-display-inline-image-p'. 2001-11-12 Hideyuki SHIRAI * w3m.el (Top): Abolished autoload of `w3m-setup-tab'. (w3m-use-tab-menubar): Revival. (w3m-lynx-like-map): Bind `C-cC-s' as the key to call `w3m-select-buffer'. (w3m-info-like-map): Ditto. (w3m-mode): Update the doc-string for the commands `w3m-next-buffer', `w3m-previous-buffer', `w3m-delete-buffer' and `w3m-select-buffer'. Use `w3m-use-tab-menubar' and `w3m-setup-tab-menu()'. * w3m-e21.el (Top): Require `w3m-tabmenu'. * w3m-e20.el (Top): Ditto. * w3m-om.el (Top): Ditto. * w3m-tabmenu.el: Rename from `w3m-tab.el'. (w3m-setup-tab-menu): Rename from `w3m-setup-tab'. (w3m-tab-menubar-make-items): Add new option `nomenu' for w3m-select-buffer(). (w3m-select-buffer): New function. * w3m-xmas.el (w3m-setup-tab-menu): Use `defun' insted of `ignore' to avoid byte-compile warnings. (w3m-tab-menubar-pull-bufnum, w3m-tab-menubar-make-items) (w3m-select-buffer): Copy from w3m-tabmenu.el * w3mhack.el (w3mhack-examine-modules): Don't byte-compile `w3m-tabmenu.el' when XEmacs. 2001-11-12 TSUCHIYA Masatoshi * Release emacs-w3m-1.2.1 from emacs-w3m-1_2 branch. 2001-11-12 TSUCHIYA Masatoshi * w3m.el (w3m-expand-url): Remove the last segment of the base URL before concatination the specified URL which has only a query part and the base URL. 2001-11-12 TSUCHIYA Masatoshi * w3m-proc.el (w3m-process-new): Argument spec is changed. (w3m-process-process): New macro. (w3m-process-handlers): Follow the change of `w3m-process-new'. (w3m-process-kill-process): New inline function. (w3m-process-start-internal): Strict checking. (w3m-process-stop): Fixed. (w3m-process-with-wait-handler): Simplified. (w3m-process-do): Strict checking of redundant evaluation. (w3m-process-do-with-temp-buffer): Ditto. (w3m-process-start): Not bind `w3m-process-exit-status' as a local variable. (w3m-process-sentinel): Ensure that this function will be never called repeatedly; Strict checking. 2001-11-12 Hideyuki SHIRAI * w3m-e21.el (top): Abolished a ignore() of `w3m-use-tab'. 2001-11-12 TSUCHIYA Masatoshi * w3m.el (w3m-w3m-dump-head-source): Fix the problem which occurs when no content is retrieved. 2001-11-11 TSUCHIYA Masatoshi * w3mhack.el (w3mhack-examine-modules): Handle `w3m-proc.el'. * w3m.el: Modified to retrieve contents asynchronously. (top): Require `w3m-proc.el' instead of `w3m-macro.el'. (w3m-command-environment): Old name is `w3m-process-environment'. (w3m-display-hook): Changed the default value. (w3m-current-buffer): New internal variable. (w3m-arrived-user-alist): Renamed to `w3m-process-user-alist' and exported to `w3m-proc.el'. (w3m-process-connection-type, w3m-process-user, w3m-process-passwd, w3m-process-user-counter, w3m-process-realm, w3m-process-temp-file, w3m-process-exit-status): Exported to `w3m-proc.el'. (w3m-toggle-inline-images-internal): Follow change of `w3m-create-image'. (w3m-exec-process): Removed. (w3m-exec-get-user): Renamed to `w3m-process-get-user' and exported to `w3m-proc.el'. (w3m-exec-get-passwd): Renamed to `w3m-process-get-passwd' and exported to `w3m-proc.el'. (w3m-exec-set-user): Renamed to `w3m-process-set-user' and exported to `w3m-proc.el'. (w3m-get-server-root): Renamed to `w3m-process-get-server-root' and exported to `w3m-proc.el'. (w3m-proxy-user): Renamed to `w3m-process-proxy-user' and exported to `w3m-proc.el'. (w3m-proxy-passwd): Renamed to `w3m-process-proxy-passwd' and exported to `w3m-proc.el'. (w3m-exec-filter): Renamed to `w3m-process-filter' and exported to `w3m-proc.el'; Slightly modified to protect illegal type of `w3m-current-url'. (w3m-decode-encoded-contents, w3m-x-moe-decode-buffer, w3m-local-dirlist-cgi, w3m-rendering-half-dump): Use `w3m-process-with-environment' to adjust the environment variables. (w3m-local-retrieve, w3m-cid-retrieve): Insert the retrieved content to this current buffer. (w3m-w3m-get-header): Call `w3m-process-start' instead of `w3m-exec-process'. (w3m-w3m-dump-head-source, w3m-w3m-retrieve, w3m-about-retrieve, w3m-retrieve, w3m-download): Reconstructed to support asynchronous operation. (w3m-exec): Removed. (w3m-retrieve-and-render, w3m-prepare-content): New function. (w3m-quit): Call `w3m-process-shutdown'. (w3m-buffer-setup): New inline function. (w3m-goto-url): Accept the 6th optional argument, and modified for asynchronous processing. (w3m-goto-url-localcgi-movepoint): Removed. (w3m-move-point-for-localcgi): New function. (w3m): Removed redundant quote from the definition of `focusing-function'; Display the browsing buffer. (w3m-region): Set `w3m-current-buffer' to this current buffer. (w3m-about, w3m-about-header): Insert the generated content to this current buffer. (w3m-about-history, w3m-about-db-history): To access buffer-local variables, refer the value of `w3m-current-buffer'. * w3m-xmas.el (top): Require `w3m-proc.el' instead of `w3m-macro.el'. (w3m-create-image): Accept the 4th optional argument, and modified for asynchronous processing. * w3m-weather.el (w3m-about-weather): Insert the generated content to this current buffer. * w3m-proc.el: New file. * w3m-namazu.el (w3m-about-namazu): Insert the generated content to this current buffer. * w3m-macro.el (w3m-with-work-buffer): Removed. (w3m-kill-buffer): New inline function. * w3m-filter.el (w3m-filter): Filtering the content in this current buffer. * w3m-e21.el (top): Require `w3m-proc.el' instead of `w3m-macro.el'. (w3m-create-image): Accept the 4th optional argument, and modified for asynchronous processing. * w3m-antenna.el (w3m-about-antenna): Insert the generated content to this current buffer. * mime-w3m.el (mime-w3m-cid-retrieve): Insert the retrieved content to this current buffer. * mew-w3m.el (mew-w3m-cid-retrieve): Insert the retrieved content to this current buffer. 2001-11-10 TSUCHIYA Masatoshi * w3m.el (w3m-use-tab-menubar): Abolished. (w3m-pop-up-windows): Changed the expression to decide its default value. (w3m-setup-menu): Removed the code to set the menubar item of TAB. (w3m-fontify-images): Accept an image-type input tag. (w3m-fontify): To accept an image-type input tag, changed the order of calling fontify functions. (top): Add autoload of `w3m-setup-tab'. (w3m-mode): Call `w3m-setup-tab'. (w3m-tab-menubar-open-buffer): Moved to `w3m-tab.el'. (w3m-tab-menubar-update): Ditto. (w3m-tab-menubar-pull-bufnum): Ditto. (w3m-tab-menubar-make-items): Ditto. * w3m-tab.el: New file. * w3m-e21.el (top): Define `w3m-use-tab' to avoid byte-compile warning. (w3m-use-tab): Moved to `w3m.el'. (w3m-setup-tab): Define as a dummy function. * w3m-xmas.el (w3m-setup-tab): Define as a dummy function. * w3m-form.el: Changes of the structure of the `w3m-form' object. (w3m-form-put-property): New inline function. (w3m-form-get-property): New macro. (w3m-form-put): Use `w3m-form-put-property'. (w3m-form-get): Use `w3m-form-get-property'. (w3m-form-make-form-data): Follow change of structure of the `w3m-form' object. (w3m-form-parse-forms): Accept an image-type input tag. (w3m-form-resume): Ditto. (w3m-form-fontify): Ditto. 2001-11-09 Hideyuki SHIRAI * w3m.el (w3m-use-tab-menubar): New user variable. (w3m-setup-menu): Handling tab-menubar. (w3m-tab-menubar-open-buffer, w3m-tab-menubar-update, w3m-tab-menubar-make-items): New functions. (w3m-tab-menubar-pull-bufnum): New macro. (top-level): Add define-key-after() to avoid byte-compile warnings, if XEmacs. 2001-11-08 Masayuki Ataka * w3m.el (w3m-start-url, w3m-contents-url): New buffer-local vars. (w3m-clear-local-variables): Also clear `w3m-start-url' and `w3m-contents-url'. (w3m-copy-local-variables): Also copy `w3m-start-url' and `w3m-contents-url'. (w3m-fontify-anchors, w3m-check-link-tags): Add support the tags "previous", "start" and "contents". 2001-11-02 Masatake YAMATO * w3m.el (autoload): Added w3m-antenna-add-current-url. (w3m-lynx-like-map): Likewise. (w3m-info-like-map): Likewise. (w3m-mode): Added w3m-antenna-add-current-url to doc string. * w3m-antenna.el (string-with-default): New widget. (string-with-default-value-create): New function. (w3m-antenna-sites): Use string-with-default widgets instead of string widgets. (w3m-antenna-tmp-url): New variable. (w3m-antenna-tmp-title): New variable. (w3m-antenna-add-current-url): New function. (w3m-antenna-add): New function. 2001-11-08 ARISAWA Akihiro * w3m-form.el (w3m-form-replace): Don't use `save-excursion' because point at start time may be deleted at end time. (w3m-form-textarea-replace): Ditto. (w3m-form-textarea-info): Use `w3m-get-text-property-around'. 2001-11-08 Katsumi Yamaoka * w3m.el (w3m-goto-ftp-url): Rewrote. (w3m-download): Use `w3m-goto-ftp-url' for ftp files. * w3m-e20.el (w3m-make-ccl-coding-system): Copied from w3m-fsf.el; don't call `make-coding-system' if a coding-system already exists. * w3m-e21.el (w3m-make-ccl-coding-system): Moved from w3m-fsf.el. * w3m-fsf.el (w3m-make-ccl-coding-system): Moved to w3m-e21.el. 2001-11-08 TSUCHIYA Masatoshi * w3m.el (top): Removed autoload of `w3m-remove-image'. * w3m-om.el (w3m-remove-image): Define as a dummy function. * w3m-e20.el (w3m-remove-image): Define as a dummy function. * w3m.el (w3m-quick-start): New option. (w3m-input-url): When the default string is equal to nil, it is not displayed in the prompt. (w3m): Refer `w3m-quick-start' to decide the action when interactively called. 2001-11-08 Katsumi Yamaoka * w3m.el (w3m-current-title, w3m-current-url): Define them before loading the version specific modules. 2001-11-07 TSUCHIYA Masatoshi * w3m-xmas.el (format-buffers-tab-line): Protect aginst errors caused by the illegal type of `w3m-current-url'. * w3m-e21.el (top): Define `w3m-current-url' and `w3m-current-title' to avoid byte-compile warnings. (w3m-insert-header-line): Protect aginst errors caused by the illegal type of `w3m-current-url'. (w3m-tab-line): Protect aginst errors caused by illegal types of `w3m-current-url' and `w3m-current-title'. 2001-11-07 Katsumi Yamaoka * w3m-xmas.el (format-buffers-tab-line): Don't use the value of `w3m-current-title' if it is nil. 2001-11-07 Hideyuki SHIRAI * w3m.el (w3m-exec-filter): Modify regexp pattern of "Wrong username or passwd". 2001-11-06 TSUCHIYA Masatoshi * Release emacs-w3m-1.2 from emacs-w3m-1_2 branch. * w3m.el (emacs-w3m-version): Modified. (top): Protect against the error occurs when `w3m-ucs.el' isn't found. 2001-11-06 Hideyuki SHIRAI * README.shimbun.ja (mew-shimbun.el): Modify description. 2001-11-03 Yuuichi Teranishi * w3m.el (w3m-copy-buffer): Added argument `empty'. (w3m-goto-url-new-session): Call `w3m-copy-buffer' with argument `empty' non-nil; If new url has `name' portion, goto the base url first. (w3m-view-this-url): Likewise. 2001-11-03 TSUCHIYA Masatoshi * Makefile.in (DOCS): Add `FAQ'. 2001-11-02 ARISAWA Akihiro * w3m-form.el (w3m-form-parse-forms): Decode value of input tag. (w3m-form-replace): Use `w3m-get-text-property-around'. * w3m.el (w3m-parse-attributes): Add :decode-entity attribute. (w3m-decode-entities-string): New function. 2001-11-02 Yuuichi Teranishi * w3m.el (w3m-lynx-like-map): Remove binding of `C-tab' and `C-S-tab' Bind `C-cC-t' as the key to call `w3m-copy-buffer'. Bind `C-cC-p' as the key to call `w3m-previous-buffer'. Bind `C-cC-n' as the key to call `w3m-next-buffer'. Bind `C-cC-w' as the key to call `w3m-delete-buffer'. (w3m-info-like-map): Ditto. 2001-11-02 Hideyuki SHIRAI * w3m.el (w3m-reload-this-page): When execute with prefix argument, clear post-data certainty. 2001-11-01 ARISAWA Akihiro * w3m.el (w3m-goto-url): Remove processing url's forms from the history when post data. (w3m): Use `select-frame-set-input-focus' instead of `x-focus-frame'. * w3m-form.el (w3m-form-resume): Fix typo. 2001-11-01 Yuuichi Teranishi * w3m.el (w3m-delete-buffer): New function. (w3m-copy-buffer): Call `w3m-goto-url' instead of copying buffer content. 2001-10-31 ARISAWA Akihiro * w3m-form.el (w3m-form-resume): Remove submit button status to support forms containing multiple submit buttons. 2001-10-31 Katsumi Yamaoka * w3m.el (w3m-accept-languages): Don't use config file if there are no contents for "accept_language". 2001-10-31 Yuuichi Teranishi * w3m-e21.el (w3m-tab-unselected-face): Setup color for tty. (w3m-tab-selected-face): Ditto. (w3m-tab-background-face): Ditto. * w3m.el (w3m-next-buffer): New function. (w3m-previous-buffer): Ditto. (w3m-lynx-like-map): Bind `C-tab' as the key to call `w3m-next-buffer'; Bind `C-S-tab' as the key to call `w3m-previous-buffer'. (w3m-info-like-map): Ditto. 2001-10-31 TSUCHIYA Masatoshi * w3m.el (w3m-accept-languages): New option. (w3m-dump-head-source-command-argument): Abolished. (w3m-dump-head-source-command-arguments): New constant. (w3m-w3m-expand-arguments): New macro. (w3m-w3m-dump-head-source): To generate command arguments for w3m, use `w3m-w3m-expand-arguments' and refer `w3m-dump-head-source-command-arguments'. (w3m-rendering-half-dump): To generate command arguments for w3m, use `w3m-w3m-expand-arguments'. 2001-10-31 Hideyuki SHIRAI * w3m.el (w3m-reload-this-page): Change the semantic of the prefix argument to `clear form and post datas'. 2001-10-31 Yuuichi Teranishi * w3m.el (w3m-pop-up-windows): Changed default value (See [emacs-w3m: 01999]). * w3m-e21.el (w3m-tab-unselected-face): Changed underline color. (w3m-tab-selected-face): Ditto. (w3m-tab-background-face): Ditto. (w3m-tab-line): Removed needless local variable `len'. 2001-10-30 Yuuichi Teranishi * w3m-e21.el (w3m-header-line-location-title-face): Specify background color. (w3m-header-line-location-title-face): Ditto. (w3m-use-tab): New user option. (w3m-tab-width): Ditto. (w3m-tab-unselected-face): New face. (w3m-tab-selected-face): Ditto. (w3m-tab-background-face): Ditto. (w3m-header-line-map): New variable. (w3m-setup-header-line): If w3m-use-tab is non-nil, use header-line as a tab area. (w3m-insert-header-line): New function. (w3m-tab-make-keymap): New function. (w3m-tab-line): New function. (w3m-fontify-after-hook): Add 'w3m-insert-header-line. 2001-10-30 Hideyuki SHIRAI * w3m.el (w3m-reload-this-page): If form data exist, ask to make use of its. Check form data modified. * README.shimbun.ja (mew-shimbun.el): Modify description. 2001-10-30 TSUCHIYA Masatoshi * w3m-form.el (w3m-form-parse-forms): Dismantle `w3m-current-url' of its query part before the rest is refered as the default value of the action. * w3m.el (w3m-ccl-write-repeat): Accept optional arguments to avoid difference between Emacesn on CCL. (w3m-iso-latin-1-decoder): Call `w3m-ccl-write-repeat' with optional argument. 2001-10-30 Hideyuki SHIRAI * README.shimbun.ja: Add information for mew-shimbun.el 2001-10-29 ARISAWA Akihiro * w3m.el (w3m-terminal-coding-system): Changed default value for w3m(en). (w3m-input-coding-system): Ditto. (w3m-default-coding-system): Ditto. (w3m-iso-latin-1-decoder): Fixed for latin-iso8859-1 under old Emacsen. (w3m-ccl-write-repeat): Ditto. 2001-10-29 ORI Manabu * w3m.el (w3m-type): Added the expression to detect `w3m-m17n'. 2001-10-29 TSUCHIYA Masatoshi * w3m.el (w3m-accept-japanese-characters): Use `-halfdump' option instead of `-dump' option in order to detect the real internal character set of `w3m-command'. (w3m-profile-directory): Fixed the expression to determine the default value for the environment where `w3m-command' includes redundant suffixes. (w3m-default-save-directory): Ditto. (w3m-euc-japan-encoder): Define in the old-style backquote. (w3m-iso-latin-1-encoder): Ditto. * w3m.el (w3m-use-mule-ucs): Simplified. (w3m-ccl-write-repeat): Fixed. (w3m-euc-japan-decoder): Ditto. 2001-10-29 Katsumi Yamaoka * w3m.el (w3m-ccl-write-repeat): Avoid a byte-compile warning. 2001-10-28 TSUCHIYA Masatoshi * w3m.el (w3m-info-like-map): Bind `\M-g' as the key to call `goto-line'. * w3m.el (w3m-use-mule-ucs): More safe default value. (w3m-accept-japanese-characters): Improved automatic detection. (w3m-ccl-write-repeat): Fix typo. * w3m.el (w3m-type): Use the default value which detected automatically. (w3m-accept-japanese-characters): New internal variable. (w3m-terminal-coding-system): Changed the default value for w3m which doesn't accept Japanese characters. (w3m-input-coding-system): Ditto. (w3m-output-coding-system): Ditto. (w3m-default-coding-system): Changed the default value for the environment that `w3m-language' doesn't equal to "Japanese". (w3m-internal-characters-alist): New constant. (w3m-ccl-write-repeat): New internal function to generate a part of CCL decoder. (w3m-euc-japan-decoder): Modified. (w3m-iso-latin-1-decoder): New CCL program. (w3m-iso-latin-1-encoder): New CCL program which is used when `w3m-use-mule-ucs' equals to nil. (w3m-iso-latin-1): New coding system. * w3m-ucs.el (w3m-ucs-generate-ncr-program): New constant. (w3m-euc-japan-encoder): Refer `w3m-ucs-generate-ncr-program'. (w3m-iso-latin-1-encoder): New CCL program. * w3m-macro.el (w3m-static-when): New macro. (w3m-static-unless): Ditto. * w3m-e21.el (w3m-setup-header-line): Protect aginst the error occurs when `w3m-current-url' isn't string. 2001-10-26 Hideyuki SHIRAI * mew-w3m.el (mew-mime-text/html-w3m): Support `Xref' header in SHIMBUN article. 2001-10-25 Katsumi Yamaoka * w3m.el (w3m): Call `w3m-mode' for a new session; use `generate-new-buffer' instead of `get-buffer-create' for a new session; allow the optional 2nd arg NEW-SESSION. (w3m-goto-url-new-session): New command. (w3m-goto-url): Always set the value of `mode-line-buffer-identification'. (w3m-mode): Update the doc-string for the new command `w3m-goto-url-new-session'. (w3m-info-like-map): Bind the key "G" to the command `w3m-goto-url-new-session'. (w3m-lynx-like-map): Bind the key "G" to the command `w3m-goto-url-new-session'; replace the key "G" to "\M-g" for the command `goto-line'. (w3m-copy-buffer): Make all the arguments optional; make the 1st arg BUF default to the current buffer. (w3m-view-this-url): Call `w3m-copy-buffer' with the 1st arg nil. (w3m-region, w3m-find-file, w3m-browse-url, w3m-gohome, w3m-download): Add autoload magic cookie. (w3m-popup-frame-p): Allow the optional arg FORCE. 2001-10-25 Katsumi Yamaoka * w3mhack.el (w3mhack-examine-modules): Don't byte-compile w3m-ucs.el when the version of XEmacs is not greater than or equal to 21.2.37. * w3m.el (w3m-pop-up-frames, w3m-pop-up-windows): Add a recommendation to the doc-string about the use of XEmacs's buffers tab. * w3m-xmas.el (w3m-xmas-update-tab-in-gutter): New function; add it to `w3m-display-hook'. (format-buffers-tab-line): Advise the function to show the current title string in the buffer tab. (w3m-xmas-show-current-title-in-buffer-tab): New user option. (TopLevel): When compiling, use `autoload' "w3m" for the void functions instead of the use of `defalias' to `ignore'; autoload "gutter-items" for `update-tab-in-gutter'. 2001-10-24 Katsumi Yamaoka * w3m.el (w3m-copy-buffer): Bind `pop-up-windows' to the value of `w3m-pop-up-windows'. (w3m-pop-up-windows): New user option. 2001-10-24 TSUCHIYA Masatoshi * w3m.el (w3m-rendering-buffer-1): Redundant argument is removed. 2001-10-24 Katsumi Yamaoka * w3m.el (w3m-view-this-url): Fixed the interactive spec. 2001-10-24 Katsumi Yamaoka Suggested by Clifford Caoile . * w3m.el (w3m-info-like-map, w3m-lynx-like-map): Bind S-SPC key to the command `w3m-scroll-down-or-previous-url'. 2001-10-23 TSUCHIYA Masatoshi * w3m.el (w3m-use-mule-ucs): Changed. (w3m-url-encode-string): Refer `w3m-default-coding-system' and `w3m-coding-system' when `coding' argument is lacked. (w3m-url-decode-string): Ditto. (w3m-rendering-buffer-1): Define as a normal function. (w3m-lynx-like-map): Changed the key which calls `w3m-save-image' from `M-I' to `M-i'. (w3m-info-like-map): Ditto; Registerd `O' as the key which calls `w3m-db-history'. * aclocal.m4 (AC_ADD_LOAD_PATH): Remove empty lines from auto detection result. * Makefile.in (DOCS): Add FAQ.ja, README.namazu.ja and README.shimbun.ja. (tarball): Handle attic/ and patches/. 2001-10-23 Katsumi Yamaoka * w3m.el (w3m-mode): Update the doc-string about making a new session. (w3m-info-like-map, w3m-lynx-like-map): Bind keys for the new commands to make a new session. (w3m-mouse-view-this-url-new-session): New command. (w3m-view-this-url-new-session): New command. (w3m-mouse-view-this-url): Make it can create a new session. (w3m-view-this-url): Ditto. 2001-10-23 TSUCHIYA Masatoshi * w3m.el (top): Add autoload for `w3m-form-parse-buffer'. (w3m-display-hook): New option. (w3m-decoder-alist): Reindent. (w3m-use-form): Changed default value. (w3m-dirlist-cgi-program): Changed the expression to get default path. (w3m-work-binary-buffer-name): New constant. (w3m-attributes): Handle URLs which start `about://source/'; It isn't defined as an inline function but a normal function to avoid byte-compile error. (w3m-arrived-add): Fixed codes to remove fragments in the specified URL. (w3m-local-retrieve): Clean up. (w3m-about-retrieve): Handle URLs which start `about://source/'. (w3m-retrieve): Doesn't call `w3m-filter'. (w3m-remove-meta-charset-tags): Renamed from `w3m-remove-meta-tags'. (w3m-rendering-region): Removed. (w3m-rendering-extract-title): New function. (w3m-rendering-half-dump): Ditto. (w3m-rendering-buffer-1): Ditto. (w3m-rendering-unibyte-buffer): Ditto. (w3m-rendering-multibyte-buffer): Ditto. (w3m-exec): Call `w3m-rendering-unibyte-buffer' instead of `w3m-rendering-region'. (w3m-edit-url): Improved to handle URLs which start `about://source/' or `about://header/'. (w3m-goto-url): Removed code to highlight current line in the history; Call hook functions in `w3m-display-hook'. (w3m-region): Call `w3m-rendering-multibyte-buffer' instead of `w3m-rendering-region'. (w3m-about): Clean up. (w3m-about-source): Removed. (w3m-view-source): Make URLs which start `about:' available. (w3m-about-header): Simplified. (w3m-history-highlight-current-url): New function. * w3m-form.el (w3m-form-parse-buffer): New function. (w3m-form-parse-region): Removed. * w3m-filter.el (w3m-filter-rules): Add the rule to call `w3m-filter-www.zdnet.co.jp'. (w3m-filter): Protect against wrong type argument. (w3m-filter-www.zdnet.co.jp): New function. * w3m-antenna.el (w3m-antenna-size): Call `w3m-remove-comments' and `w3m-filter' before checking size of contents. * w3mhack.el (w3mhack-load-path): Search `un-define' instead of `un-define.el' to check the path where Mule-UCS is installed. 2001-10-22 Hideyuki SHIRAI * w3mhack.el (w3mhack-examine-modules): Handle `mew-shimbun.el'. * w3m-dtree.el (w3m-dtree-indent-strings, w3m-dtree-stop-strings): Throw out the "Japanese Character" for non-mule's environments. 2001-10-19 TSUCHIYA Masatoshi * aclocal.m4 (AC_ADD_LOAD_PATH): When `yes' or null string is passed as an argument, call `w3mhack-load-path' to search places of required modules automatically. * w3mhack.el (w3mhack-load-path): New function. 2001-10-17 Katsumi Yamaoka * w3m-xmas.el (w3m-create-image): Call `w3m-fix-gif' if `w3m-should-convert-interlaced-gifs' is non-nil. (w3m-fix-gif): Renamed from `w3m-unoptimize-animated-gif'; convert an interlaced gif to be non-interlaced as well as unoptimization. (w3m-cache-fixed-gif-images-max-length): Renamed from `w3m-cache-unoptimized-gif-images-max-length'. (w3m-cache-fixed-gif-images): Renamed from `w3m-cache-unoptimized-gif-images'. (w3m-should-convert-interlaced-gifs): New variable. 2001-10-16 ARISAWA Akihiro * README.ja: Add description about "new custom". * README: Ditto. * w3m.el (w3m-attributes): When URL matches `about://source/', returns nil as its content-charset. (w3m-about-retrieve): When URL matches `about://source/', don't call `encode-coding-region'. (w3m-about-source): Don't call `w3m-decode-region'. (w3m-exec): Use `set-buffer-file-coding-system' instead of to set `buffer-file-coding-system'. 2001-10-16 TSUCHIYA Masatoshi * w3m.el (w3m-exec): Substitute `w3m-current-coding-system' for `buffer-file-coding-system' to show the current coding system in the mode line. 2001-10-16 Katsumi Yamaoka * w3m.el (w3m-use-mule-ucs): Don't use Mule-UCS package for XEmacs versions prior to 21.2.37. 2001-10-16 TSUCHIYA Masatoshi * w3m.el (top): It doesn't require `thingatpt'. (w3m-url-at-point): New function. (w3m-input-url): Call `w3m-url-at-point' instead of `thing-at-point'; The 4th optional argument is added. (w3m): Call `w3m-input-url' with the 4th argument. 2001-10-15 NAKAJIMA Mikio * README: Add description about ftp site of FLIM. 2001-10-15 Hideyuki SHIRAI * mew-w3m.el (mew-w3m-auto-insert-image): Change from 'defcont' to 'defcustom', again. (mew-w3m-safe-url-regexp): New constant. (mew-w3m-view-inline-image): Rewrite. (mew-mime-text/html-w3m): Bind 'w3m-safe-url-regexp' to 'mew-w3m-safe-url-regexp'. 2001-10-15 NAKAJIMA Mikio * README.ja: Divided original section 2. a) into two parts, 2. a) and 2. b). Add new section 2. c), 2. e) about APEL, FLIM, shimbun library. * README: Ditto. * FAQ.ja (Q. ~~~~ Emacs ~?): Add description about where to get APEL. 2001-10-15 TSUCHIYA Masatoshi * w3m.el (w3m-expand-url): Accept URL which has the scheme part only. 2001-10-15 Akihiro Arisawa * w3m.el (w3m-url-components-regexp): Don't except `\' for scheme, authority and path. 2001-10-15 TSUCHIYA Masatoshi * w3m.el (top): Removed autoload for `regexp-opt'. * w3m-weather.el (top): Likewise. * w3m-om.el (top): Add autoload for `regexp-opt'. 2001-10-14 Katsumi Yamaoka * w3m.el (w3m-entity-regexp): Unified to the use of `regexp-opt'; autoload regexp-opt for old Emacsen. * attic/regexp-opt.el: New file. * README.ja, README: Emacs-w3m requires the module regexp-opt. * w3m-weather.el: Autoload regexp-opt for old Emacsen. 2001-10-13 TSUCHIYA Masatoshi * w3m.el (w3m-safe-url-regexp): New variable. (w3m-retrieve): When `w3m-safe-url-regexp' has non-nil value and it matches the requested URL, doesn't fetch its contents. * mime-w3m.el (mime-w3m-display-inline-image): New option. (mime-w3m-preview-text/html): In order to avoid web bug which is described in [mew-dist 19267], restrict accesible URLs. * mew-w3m.el (mew-mime-text/html-w3m): Likewise. * w3m-weather.el (w3m-weather-url-alist): Abolished. (w3m-weather-completion-table): New constant. (w3m-weather-default-area): Refer `w3m-weather-completion-table' instead of `w3m-weather-url-alist' to decide customize spec. (w3m-weather-input-history): New variable. (w3m-weather-input-area): New function. (w3m-weather-area-completion): Ditto. (w3m-weather): Call `w3m-weather-input-area'. (w3m-about-weather): Refer `w3m-weather-completion-table' instead of `w3m-weather-url-alist' to convert the area to the real URL. 2001-10-12 Hideyuki SHIRAI * mew-w3m.el (mew-w3m-auto-insert-image): Change from 'defcustom' to 'defconst' and default value to 'nil'. (mew-w3m-view-inline-image): New function. 2001-10-12 TSUCHIYA Masatoshi * w3m.el (w3m-input-url): Accept the 3rd optional argument. (w3m): Improved interactive form. 2001-10-12 Yuuichi Teranishi , TSUCHIYA Masatoshi * w3m-e21.el (w3m-form-button-keymap): Renamed from `w3m-widget-keymap'. (w3m-form-make-button): Fixed. (w3m-setup-widget-faces): Revived. 2001-10-12 Katsumi Yamaoka * w3m.el (w3m): Always prompts user for a URL string. 2001-10-12 TSUCHIYA Masatoshi * w3m-weather.el (w3m-weather-url-alist): Refer `http://weather.yahoo.co.jp'. (w3m-weather-default-area): Change default region. (w3m-weather-filter-functions): Change default value. (w3m-about-weather): Accept `no-cache' argument. (w3m-weather-remove-headers): Modified for Yahoo. (w3m-weather-remove-footers): Ditto. (w3m-weather-insert-title): Ditto. (w3m-weather-remove-weather-images): Removed. (w3m-weather-remove-washing-images): Removed. (w3m-weather-remove-futon-images): Removed. (w3m-weather-remove-week-weather-images): Removed. * w3m-e21.el (w3m-widget-keymap): New keymap. (w3m-form-make-button): Set `w3m-widget-keymap' as keymap on buttons; Fix condition to make buttons. (w3m-setup-widget-faces): Removed. 2001-10-11 Katsumi Yamaoka * mew-w3m.el, w3m-form.el, w3m.el: Remove useless whitespaces. 2001-10-11 Katsumi Yamaoka * w3m.el (w3m-local-dirlist-cgi): Replace `re-search-forward' to `search-forward'; bind `beg' as a non-global variable. 2001-10-11 Hideyuki SHIRAI * w3m.el (w3m-local-dirlist-cgi): Remove .... 2001-10-11 TSUCHIYA Masatoshi * w3m.el (w3m-expand-path-name): Fix incompatibility of drive letter. 2001-10-11 Yuuichi Teranishi * w3m-e21.el (toplevel): Require 'wid-edit. (w3m-form-button-face): Set background and foreground color; Set box line-width as 2. (w3m-form-button-pressed-face): Ditto. (w3m-form-button-mouse-face): New face. (w3m-form-button): New widget button. (w3m-form-make-button): Use `widget-convert-button' to put w3m-form-button. (w3m-setup-widget-faces): New function. (w3m-mode-hook): Add `w3m-setup-widget-faces'. (w3m-form-make-button): Don't check :box attribute when w3m-form-use-fancy-faces is non-nil. 2001-10-11 Hideyuki SHIRAI * w3m.el (w3m-decoder-alist): Fix for Windows or OS/2 environments. 2001-10-11 TSUCHIYA Masatoshi * w3m.el (w3m-display-inline-image): Update document. (w3m-decoder-alist): Change default value. (w3m-current-image-status): New buffer-local variable. (w3m-which-command): Export to w3m-macro.el. (w3m-decode-encoded-contents): Small change. (w3m-expand-url): Fix to remove an empty query part and an empty fragment part correctly. (w3m-toggle-inline-images): Refer `w3m-current-image-status' instead of `w3m-display-inline-image'. (w3m-view-url-with-external-browser): Ditto. (w3m-goto-url): Ditto. (w3m-reload-this-page): Ditto. (w3m-redisplay-with-charset): Ditto. * w3m-e21.el (top, w3m-display-inline-image-p): Refer `w3m-current-image-status' instead of `w3m-display-inline-image'. * w3m-om.el (w3m-expand-path-name): Add 2nd optional argument. * w3m-macro.el (w3m-which-command): Import from w3m.el. * w3m-xmas.el (top, w3m-display-inline-image-p): Refer `w3m-current-image-status' instead of `w3m-display-inline-image'. * mew-w3m.el (mew-mime-text/html-w3m): Refer `w3m-current-image-status' instead of `w3m-display-inline-image'. 2001-10-10 TSUCHIYA Masatoshi * w3m.el (w3m-cache-header): Add 3rd optional argument. (w3m-w3m-dump-head-source): Call `w3m-cache-header' with `overwrite' option. * w3m.el (w3m-cache-header-delete-variable-part): New function. (w3m-cache-header): Remove cached contents when inconsistency between new header and cached header is found. * w3m.el (w3m-expand-url): Fix the last change. (w3m-url-hierarchical-schemes): Add `file'. (w3m-goto-url): Use `\`' instead of `^' as a meta character. * w3m.el (w3m-fontify-anchors): Fix. (w3m-url-fallback-base): New constant. (w3m-expand-url): Make it robust against illegal base-URL. * w3m.el (w3m-url-components-regexp): New constant. (w3m-url-hierarchical-schemes): Ditto. (w3m-expand-url): Reimplemented. (w3m-view-this-url): Remove a redundant local variable. (w3m-mouse-view-this-url): Call `w3m-view-this-url'. (w3m-goto-url): Refer `w3m-url-components-regexp' to delete a fragment part of URL. * mime-w3m.el (mime-w3m-view-this-url): When there is an inline image under point, display it. (mime-w3m-mouse-view-this-url): Call `mime-w3m-view-this-url'. 2001-10-09 Katsumi Yamaoka * w3m.el (w3m-expand-url): Emergency fixed. 2001-10-09 Katsumi Yamaoka * w3m.el (w3m-expand-url): Make it work correctly when a url begins with "//". 2001-10-09 TSUCHIYA Masatoshi * w3m.el (w3m-language): New option. (w3m-default-coding-system): Refer `w3m-language' to decide default value. (w3m-coding-system-priority-list): Ditto. (w3m-toolbar): Ditto. (w3m-url-to-file-name): Moved to avoid byte-compile warnings. (w3m-expand-file-name-as-url): Ditto. (w3m-url-local-p): Ditto. (w3m-url-dtree-p): Ditto. (w3m-view-this-url): When there is an inline image under point, display it. (w3m-mouse-view-this-url): Ditto. (w3m-view-url-with-external-browser): Renamed from `w3m-view-current-url-with-external-browser'. Handle an inline image under point. (w3m-download-this-url): Handle an inline image under point. (w3m-info-like-map): Reconstructed. * w3m-search.el (w3m-search-default-coding-system): Abolished. (w3m-search-engine-alist): Refer `w3m-language' to decide default value. (w3m-search-escape-query-string): Refer `w3m-default-coding-system' instead of `w3m-search-default-coding-system'. 2001-10-05 TSUCHIYA Masatoshi * w3m-form.el (w3m-form-use-fancy-faces): New option. (w3m-form-make-button): New function. (w3m-form-fontify): Call `w3m-form-make-button'. * w3m-e21.el (w3m-form-button-face): New face. (w3m-form-button-pressed-face): Ditto. (w3m-form-make-button): New function. 2001-10-04 Katsumi Yamaoka * w3m-om.el (read-string): Unify the advice form. (w3m-om-coding-system-alist): Fix doc-string. 2001-10-04 Katsumi Yamaoka * w3m-om.el (read-string): Don't modify the value of `current-load-list' when advising it. * mime-w3m.el (mime-w3m-remove-text-properties): Don't modify the value of `current-load-list' when advising the function `kill-new'; add a doc-string. * w3m.el (w3m-decode-entities): Save-match-data when `w3m-entity-value' is called. 2001-10-03 ARISAWA Akihiro * w3m-xmas.el (w3m-detect-coding-region): Return just the return value of `detect-coding-with-priority' if it is not a list, again. 2001-10-03 Katsumi Yamaoka * w3m-om.el (read-string): Advise the function to allow the 4th argument `default-value'. 2001-10-03 TSUCHIYA Masatoshi * mime-w3m.el (mime-w3m-remove-text-properties): New advice to protect `kill-ring-save' against the `local-map' text property. 2001-10-03 Katsumi Yamaoka * w3m-om.el (w3m-detect-coding-region): Use the fixed value for the list of coding-categories; suppress the duplication of coding- categories. (TopLevel): Protect against non-existent coding-systems when creating the modern coding-systems. (w3m-om-coding-category-alist): Reinforce the default value. (w3m-om-coding-categories): Abolish. (w3m-om-coding-system-alist): Add some new coding-systems. * w3m-fsf.el (w3m-detect-coding-region): Suppress the duplication of coding-categories. * w3m-xmas.el (w3m-detect-coding-region): Ditto; use `coding-system-category' instead of `coding-system-type'. 2001-10-03 Yuuichi Teranishi * w3m.el (w3m-show-inline-images-before-hook, w3m-show-inline-images-after-hook, w3m-remove-inline-images-before-hook, w3m-remove-inline-images-after-hook): Abolished. (w3m-modeline-image-status-on): New constant. (w3m-modeline-image-status-off): Ditto. (w3m-image-only-page): New buffer local variable. (w3m-display-inline-image-status): Abolished. (w3m-fontify-images): Put `w3m-image-status property'. (w3m-toggle-inline-images-internal): New inline function. (w3m-exec): Set w3m-image-only-page as t. (w3m-lynx-like-map): Bind "T" to 'w3m-toggle-inline-images and "t" to 'w3m-toggle-inline-image. (w3m-goto-url): Set w3m-image-only-page as nil at first; Setup modeline to display image display status; Display image if w3m-image-only-page is nil. * w3m-e21.el (w3m-cache-underline-faces): Abolished. (w3m-insert-image): Set text property 'w3m-undeline-face to the image instead of setting up w3m-cache-underline-faces. (w3m-remove-image): Recover underline faces. (w3m-fontify-before-hook, w3m-show-inline-images-before-hook, w3m-show-inline-images-after-hook, w3m-remove-inline-images-after-hook): Don't set up. 2001-10-02 Katsumi Yamaoka * w3m-om.el (w3m-detect-coding-region): Make it work. * w3m-xmas.el (w3m-detect-coding-region): Return just the return value of `detect-coding-with-priority' if it is not a list, otherwise the car of the value. 2001-10-02 ARISAWA Akihiro * w3m.el (w3m-coding-system-priority-list): New user option. (w3m-decode-buffer): Use it. * w3m-fsf.el (w3m-detect-coding-region): Remove argument `highest'; always return the first possible coding system. Add new optional argument `priority-list'. Use `detect-coding-with-priority'. * w3m-xmas.el (w3m-detect-coding-region): Ditto. * w3m-om.el (w3m-detect-coding-region): Remove argument `highest'; always return the first possible coding system. Add new optional argument `priority-list'. 2001-10-02 Katsumi Yamaoka * w3m-om.el (w3m-detect-coding-region): Return a non-list of a coding-system if the number of return value is only one; use `w3m-om-modernize-coding-system' and `w3m-om-coding-categories'; use `code-detect-region' instead of `detect-coding-region'. (w3m-om-modernize-coding-system): New function. (w3m-om-coding-category-alist): Use `w3m-om-coding-categories'. (w3m-om-coding-categories): New constant. (w3m-om-coding-system-alist): Add `emacs-mule'. 2001-10-01 Katsumi Yamaoka * w3m.el (TopLevel): Don't byte-compile the source form to bind colon keywords for old Emacsen. 2001-10-01 Masatake YAMATO * w3m.el (w3m-mode): Added `w3m-toggle-inline-images' to the mode description. 2001-10-01 TSUCHIYA Masatoshi * w3m.el (w3m-edit-url-directory-alist): New option. (w3m-edit-url): New function. (w3m-edit-current-url): Call `w3m-edit-url'. (w3m-edit-this-url): Ditto. 2001-10-01 Katsumi Yamaoka * w3m-om.el (w3m-detect-coding-region): Prefer the coding-category that the value of `w3m-default-coding-system' belongs to. (w3m-om-coding-category-alist): New variable. (w3m-om-coding-system-alist): New variable. * w3m.el (w3m-default-coding-system): Default to `shift_jis' when Mule2 is running. 2001-09-30 TSUCHIYA Masatoshi * w3mhack.el (w3mhack-examine-modules): Handle `w3m-fsf.el'. * w3m.el (w3m-default-coding-system): New option. (w3m-decode-buffer): Call `w3m-detect-coding-region' instead of `detect-coding-region'. (w3m-make-ccl-coding-system): Export it to `w3m-fsf.el'. * w3m-xmas.el (coding-system-category): Removed. (w3m-detect-coding-region): New function. * w3m-om.el (coding-system-category): Removed. (w3m-detect-coding-region): New function. * w3m-fsf.el: New file. * w3m-form.el (w3m-form-default-coding-system): Abolished. (w3m-form-make-form-data): Refer `w3m-default-coding-system' instead of `w3m-form-default-coding-system'. * w3m-e21.el (top): Require `w3m-fsf'. (w3m-find-coding-system): Export it to `w3m-fsf.el'. * w3m-e20.el (top): Require `w3m-fsf'. (w3m-find-coding-system): Export it to `w3m-fsf.el'. * w3m.el (w3m-goto-url): Change effect of the 3rd argument `charset'. (w3m-redisplay-with-charset): Reimplemented. (w3m-view-source): Improved to handle `about://header/...'. (w3m-about-header): Show title etc. (w3m-view-header): Improved to handle `about://source/...'. 2001-09-28 kkonishi * w3m-search.el (w3m-search-engine-alist): New search engines, `excite-ja', `lycos-ja', `altavista' and `freebsd-users-jp'. 2001-09-28 TSUCHIYA Masatoshi * w3m.el (w3m-goto-url): Speed up the action to refer a name anchor in the same document. 2001-09-27 TSUCHIYA Masatoshi * w3m.el (w3m-copy-local-variables): Simplified. (w3m-region): Set `w3m-current-base-url'. * w3m.el: Fix the bug reported in [emacs-w3m:01564]. (w3m-current-base-url): New buffer-local variable. (w3m-clear-local-variables): Handle `w3m-current-base-url'. (w3m-copy-local-variables): Ditto. (w3m-attributes): Change spec of return value. (w3m-w3m-attributes): Ditto. (w3m-local-attributes): Ditto. (w3m-base-url): New macro. (w3m-expand-url): Make the second argument `base' optional, and refer `w3m-current-base-url' when a relative URL is canonicalized. (w3m-fontify-anchors): Follow change of `w3m-expand-url'. (w3m-fontify-images): Ditto. (w3m-toggle-inline-images): Ditto. (w3m-exec): Call `w3m-base-url' to set `w3m-current-base-url'. * w3m-form.el (w3m-form-new): Canonicalize `action' whenever this function is called. (w3m-form-parse-forms): Follow change of `w3m-form-new'. (w3m-form-submit): Ditto. (w3m-form-input-map-set): Follow change of `w3m-expand-url'. 2001-09-26 Katsumi Yamaoka * w3m.el (w3m-goto-url): Position point to the current url and highlight the line when the page is for listing the history (suggested by SHIRAI-san). (w3m-history-current-url-face): New face. (w3m-image-face, w3m-arrived-anchor-face, w3m-anchor-face): Fix doc-string. 2001-09-26 Hideyuki SHIRAI * w3m.el (w3m-about-db-history-today): New defsubst. (w3m-about-db-history): If arrived time within 18 hours, display with "HH:MM:SS". 2001-09-18 ARISAWA Akihiro * w3m-ucs.el (w3m-euc-japan-encoder): Convert lain-jisx0201 to ASCII; Avoid deep nesting. (TopLevel): Don't require `w3m-macro'. 2001-09-18 TSUCHIYA Masatoshi * w3m-om.el (w3m-expand-path-name): Cancel last change. 2001-09-17 TSUCHIYA Masatoshi * w3m.el (w3m-expand-path-name): Except Mule2, define alias of `expand-file-name'. * w3m-om.el (w3m-expand-path-name): Re-implemented. * w3m-e20.el (w3m-expand-path-name): Removed. * w3m-e21.el (w3m-expand-path-name): Ditto. * w3m-xmas.el (w3m-expand-path-name): Ditto. 2001-09-17 Katsumi Yamaoka * w3mhack.el (w3mhack-generate-colon-keywords-file): Renamed from `w3mhack-bind-colon-keywords'; generate a file which contains a list of colon keywords; don't bind colon keywords. (w3mhack-colon-keywords-file): New constant. * w3m.el: Load w3m-kwds.el if a colon keyword is not avaulable. (w3m-colon-keywords): Abolished. * Makefile.in (keywords): Create w3m-kwds.el instead of w3mkwds.el; don't remove w3m-kwds.el in advance. (clean): Remove w3m-kwds.el instead of w3mkwds.el. (install): Install w3m-kwds.el if it exists. 2001-09-17 Yuuichi Teranishi * w3m.el (w3m-expand-url): Use `w3m-expand-path-name' instead of `expand-file-name'. * w3m-om.el (w3m-expand-path-name): New function. * w3m-e20.el (w3m-expand-path-name): New alias. * w3m-xmas.el (w3m-expand-path-name): Ditto. * w3m-e21.el (w3m-expand-path-name): Ditto. 2001-09-17 TSUCHIYA Masatoshi * w3m-search.el (w3m-search-engine-alist): Changed default value of `google'. Add new engines `debian-pkg', `debian-bts', and `iij-archie'. 2001-09-17 Masayuki Ataka * w3m-search.el (w3m-search-engine-alist): Changed default value of `google-ja'. 2001-09-16 TSUCHIYA Masatoshi * w3m.el (top): Require `ccl'. (w3m-make-ccl-coding-system): New function for Emacs20 / Emacs21. (w3m-euc-japan): Define with `w3m-make-ccl-coding-system'. * w3m-macro.el (top): Delete garbage. * w3m-e21.el (top): Fix to avoid byte-compile warnings. * w3m-xmas.el (top): Require `pccl' and fix to avoid byte-compile warnings. (w3m-make-ccl-coding-system): New alias to `make-ccl-coding-system'. * w3m-om.el (top): Require `pccl'. (w3m-make-ccl-coding-system): New alias to `make-ccl-coding-system'. * w3m-search.el (w3m-search): Fixed search engine specification error when interactively called with prefix arguments. 2001-09-15 TSUCHIYA Masatoshi * w3m-macro.el (w3m-with-work-buffer): Keep `w3m-history' and `w3m-history-flat' through buffers. * w3m.el (w3m-current-buffer): Abolished. (w3m-goto-url): Don't set `w3m-current-buffer'. (w3m-region): Ditto. (w3m-about-history): Don't refer `w3m-current-buffer'. * w3m-form.el (w3m-form-parse-region): Simplified. (w3m-form-parse-forms): Accept
" nil t) (delete-region (line-beginning-position) (point-max)) (throw 'stop nil)) (if (search-backward "" nil t) (delete-region (line-beginning-position) (line-end-position)) (throw 'stop nil)) (save-restriction (narrow-to-region (point-min) (point)) (goto-char (point-min)) (let (field value start value-beg end) (while (and (setq start (point)) (re-search-forward "\\(.*\\):" nil t) (setq field (match-string 2)) (re-search-forward (concat "") nil t) (setq value-beg (point)) (search-forward "" nil t) (setq end (point))) (setq value (buffer-substring value-beg (progn (search-backward "") (point)))) (delete-region start end) (cond ((string= field "Date") (shimbun-header-set-date header value)) ((string= field "From") (shimbun-header-set-from header value)) ((string= field "Subject") (shimbun-header-set-subject header value)) ((string= field "Message-Id") (shimbun-header-set-id header value)) ((string= field "References") (shimbun-header-set-references header value)) (t (insert (concat field ": " (shimbun-header-normalize value t) "\n"))))) (goto-char (point-min)) (shimbun-header-insert shimbun header) (insert "Content-Type: text/html; charset=ISO-2022-JP\nMIME-Version: 1.0\n")) (goto-char (point-max)))) (insert "
")
  (goto-char (point-max))
  (insert "
\n") (encode-coding-string (buffer-string) (mime-charset-to-coding-system "ISO-2022-JP"))) (provide 'sb-fml) ;;; sb-fml.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-geocrawler.el000066400000000000000000000142411434375002100221010ustar00rootroot00000000000000;;; sb-geocrawler.el --- shimbun backend for geocrawler.com. ;; Copyright (C) 2002, 2003, 2005, 2017, 2019, 2022 ;; TSUCHIYA Masatoshi ;; Author: TSUCHIYA Masatoshi ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Before reading any group which is archived at geocrawler.com, call ;; `shimbun-geocrawler-add-group'. ;;; Code: (require 'shimbun) (luna-define-class shimbun-geocrawler (shimbun) ()) (defvar shimbun-geocrawler-url "http://www.geocrawler.com/archives/") (defcustom shimbun-geocrawler-group-alist nil "Table of mailing lists which is archived by geocrawler.com." :group 'shimbun :type '(repeat (group :indent 0 (string :format "Name: %v") (string :format " List ID: %v") (radio :format " Reply-To: %v" (const :format "None " nil) (string :format "Address: %v")) (radio :format " X-Face: %v" (const :format "None " nil) (string :format "%t: %v"))))) (defvar shimbun-geocrawler-content-start "

 

") (defvar shimbun-geocrawler-content-end "") (luna-define-method shimbun-groups ((shimbun shimbun-geocrawler)) (mapcar 'car shimbun-geocrawler-group-alist)) (luna-define-method shimbun-index-url ((shimbun shimbun-geocrawler)) (concat shimbun-geocrawler-url "3/" (nth 1 (assoc (shimbun-current-group-internal shimbun) shimbun-geocrawler-group-alist)) "/")) (luna-define-method shimbun-reply-to ((shimbun shimbun-geocrawler)) (nth 2 (assoc (shimbun-current-group-internal shimbun) shimbun-geocrawler-group-alist))) (luna-define-method shimbun-x-face ((shimbun shimbun-geocrawler)) (nth 3 (assoc (shimbun-current-group-internal shimbun) shimbun-geocrawler-group-alist))) (luna-define-method shimbun-headers ((shimbun shimbun-geocrawler) &optional range) (shimbun-geocrawler-headers shimbun range)) (defun shimbun-geocrawler-headers (shimbun &optional range) (cond ((eq range 'last) (setq range 1)) ((eq range 'all) (setq range nil))) (let ((url (shimbun-index-url shimbun)) (years) (headers) (newest-index t) (case-fold-search t)) (catch 'stop (with-temp-buffer (shimbun-retrieve-url url) (while (re-search-forward "" nil t) (push (match-string 1) years)) (dolist (year years) (let ((url (concat url year "/")) (indexes)) (erase-buffer) (shimbun-retrieve-url url) (while (re-search-forward "" nil t) (push (match-string 1) indexes)) (dolist (index indexes) (and range (< (setq range (1- range)) 0) (throw 'stop nil)) (let ((url (concat url index))) (while (when url (erase-buffer) (shimbun-retrieve-url url newest-index)) (setq newest-index nil) (while (re-search-forward "]*> *  *" nil t) (let ((xref (concat "http://www.geocrawler.com/mail/msg_raw.php3?msg_id=" (match-string 1))) (id (concat "<" (match-string 1) "@geocrawler.com>")) (eol (line-end-position))) (when (shimbun-search-id shimbun id) (throw 'stop nil)) (push (shimbun-make-header 0 (shimbun-mime-encode-string (buffer-substring (point) (progn (search-forward "" nil eol) (match-beginning 0)))) (shimbun-mime-encode-string (buffer-substring (point) (progn (search-forward "" nil eol) (match-beginning 0)))) (when (looking-at "\\([0-9][0-9]\\)/\\([0-9][0-9]\\)/\\([0-9][0-9][0-9][0-9]\\) \\([0-9][0-9]:[0-9][0-9]:[0-9][0-9]\\)") (shimbun-make-date-string (string-to-number (match-string 3)) (string-to-number (match-string 1)) (string-to-number (match-string 2)) (match-string 4))) id nil nil nil xref) headers))) (setq url (when (re-search-forward "Next Results" nil t) (shimbun-expand-url (concat (match-string 1) "/") url)))))))))) headers)) (defun shimbun-geocrawler-add-group () "Add an group to `shimbun-geocrawler-group-alist' interactively." (interactive) (let ((url (shimbun-expand-url "/lists/3/" shimbun-geocrawler-url)) (categories) (groups) (case-fold-search t)) (with-temp-buffer (shimbun-retrieve-url url) (while (re-search-forward "]*>  " nil t) (let* ((id (match-string 1)) (group (buffer-substring (point) (progn (search-forward "" nil t) (match-beginning 0))))) (push (cons group id) groups))) (let ((ginfo (assoc (completing-read "Group: " groups nil t) groups))) (if (assoc (car ginfo) shimbun-geocrawler-group-alist) (message "%s has already been registerd." (car ginfo)) (customize-save-variable 'shimbun-geocrawler-group-alist (sort (cons (list (car ginfo) (cdr ginfo) nil nil) shimbun-geocrawler-group-alist) (lambda (a b) (string< (downcase (car a)) (downcase (car b))))))))))) (provide 'sb-geocrawler) ;;; sb-geocrawler.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-glimpse.el000066400000000000000000000041641434375002100214120ustar00rootroot00000000000000;;; sb-glimpse.el --- shimbun backend class for Glimpse archive ;; Copyright (C) 2001-2003, 2019 Akihiro Arisawa ;; Author: Akihiro Arisawa ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-incf (require 'shimbun) (require 'sb-mhonarc) (luna-define-class shimbun-glimpse (shimbun-mhonarc) ()) (luna-define-method shimbun-index-url ((shimbun shimbun-glimpse)) (concat (shimbun-url-internal shimbun) (shimbun-current-group-internal shimbun) "/")) (luna-define-method shimbun-get-headers ((shimbun shimbun-glimpse) &optional range) (let ((case-fold-search t) (path (if (string-match "http://[^/]+\\(/.*\\)" (shimbun-index-url shimbun)) (match-string 1 (shimbun-index-url shimbun)) "/")) (pages (shimbun-header-index-pages range)) (count 0) headers auxs) (while (and (if pages (<= (cl-incf count) pages) t) (re-search-forward (concat "\\[Index\\]") nil t)) (setq auxs (append auxs (list (match-string 1))))) (catch 'stop (dolist (aux auxs) (let ((url (shimbun-expand-url (concat aux "/") (shimbun-index-url shimbun)))) (shimbun-retrieve-url url 'reload) (shimbun-mhonarc-get-headers shimbun url headers aux)))) headers)) (provide 'sb-glimpse) ;;; sb-glimpse.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-gnome.el000066400000000000000000000105031434375002100210510ustar00rootroot00000000000000;;; sb-gnome.el --- shimbun backend for mail.gnome.org ;; Copyright (C) 2001-2004, 2019 Yuuichi Teranishi ;; Author: Yuuichi Teranishi ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-incf (require 'shimbun) (require 'sb-mhonarc) (luna-define-class shimbun-gnome (shimbun-mhonarc) ()) (defvar shimbun-gnome-url "http://mail.gnome.org/archives") (defvar shimbun-gnome-groups '("balsa-list" "calendar-list" "cvs-commits-list" "foundation-announce" "foundation-list" "fplan-list" "gconf-list" "gdome" "gnome-1.4-list" "gnome-announce-list" "gnome-components-list" "gnome-db-list" "gnome-de" "gnome-debugger-list" "gnome-devel-list" "gnome-doc-list" "gnome-gui-list" "gnome-hackers" "gnome-hackers-readonly" "gnome-hackers-test" "gnome-i18n" "gnome-i18n-tools" "gnome-kde-list" "gnome-list" "gnome-office-list" "gnome-pilot-list" "gnome-sound-list" "gnome-themes-list" "gnome-ui-hackers" "gnome-web-list" "gnome-webmaster-list" "gnome-workshop-list" "gnomecc-list" "gnumeric-list" "gtk-app-devel-list" "gtk-devel-list" "gtk-doc-list" "gtk-i18n-list" "gtk-list" "gtk-perl-list" "guppi-list" "libart" "libart-hackers" "orbit-list" "vote" "wm-spec-list" "xml" "xslt")) (luna-define-method shimbun-index-url ((shimbun shimbun-gnome)) (concat (shimbun-url-internal shimbun) "/" (shimbun-current-group-internal shimbun) "/index.html")) (luna-define-method shimbun-reply-to ((shimbun shimbun-gnome)) (concat (shimbun-current-group-internal shimbun) "@gnome.org")) ;; (luna-define-method shimbun-get-headers ((shimbun shimbun-gnome) &optional range) (let ((case-fold-search t) (pages (shimbun-header-index-pages range)) (count 0) headers months) (goto-char (point-min)) (while (and (if pages (<= (cl-incf count) pages) t) (re-search-forward "" nil t)) (push (match-string 1) months)) (catch 'stop (dolist (month months) (shimbun-retrieve-url (concat (shimbun-url-internal shimbun) "/" (shimbun-current-group-internal shimbun) "/" month "/date.html") 'reload) (let (date date-next date-parsed beg end id) (goto-char (point-min)) (while (or date-next (re-search-forward "\\([^<]+\\)" nil t)) (setq beg (match-end 0)) (setq date (or date-next (concat (match-string 1) " 00:00:00" ))) (if (re-search-forward "\\([^<]+\\)" nil t) (progn (setq date-next (concat (match-string 1) " 00:00:00")) (setq end (point))) (setq date-next nil) (setq end (point-max))) (save-restriction (narrow-to-region beg end) (goto-char (point-min)) (while (re-search-forward "

  • \\([^<]*\\)\\([^<]*\\)
  • " nil t) (save-match-data (setq date-parsed (timezone-parse-date date))) (setq id (format "<%s%s%s%s%%%s@mail.gnome.org>" (match-string 1) (aref date-parsed 0) (aref date-parsed 1) (aref date-parsed 2) (shimbun-current-group-internal shimbun))) (if (shimbun-search-id shimbun id) (throw 'stop (nreverse headers))) (push (shimbun-make-header 0 (shimbun-mime-encode-string (match-string 3)) ; subject (shimbun-mime-encode-string (match-string 4)) ; from date id "" 0 0 (concat "/" (shimbun-current-group-internal shimbun) "/" month "/" (match-string 2))) headers)))))) (nreverse headers)))) (provide 'sb-gnome) ;;; sb-gnome.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-haiku-os.el000066400000000000000000000043551434375002100214740ustar00rootroot00000000000000;;; sb-haiku-os.el --- shimbun backend for haiku-os.org ;; Copyright (C) 2004, 2006 Yoichi NAKAYAMA ;; Author: Yoichi NAKAYAMA ;; Keywords: news ;; Created: Jul 30, 2004 ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-haiku-os (shimbun-rss) ()) (defvar shimbun-haiku-os-group-alist '(("news" "http://haiku-os.org/rss.php?channel=news" "" "") ("forums" "http://haiku-os.org/rss.php?channel=forums" "" "") ("newsletters" "http://haiku-os.org/rss.php?channel=newsletters" "" "")) "Alist of readable groups and URLs of their RSSs.") (luna-define-method shimbun-groups ((shimbun shimbun-haiku-os)) (mapcar 'car shimbun-haiku-os-group-alist)) (luna-define-method shimbun-index-url ((shimbun shimbun-haiku-os)) (nth 1 (assoc (shimbun-current-group shimbun) shimbun-haiku-os-group-alist))) (luna-define-method shimbun-rss-process-date ((shimbun shimbun-haiku-os) date) date) (luna-define-method shimbun-make-contents :around ((shimbun shimbun-haiku-os) &optional header) (let ((entry (assoc (shimbun-current-group shimbun) shimbun-haiku-os-group-alist))) (shimbun-set-content-start-internal shimbun (nth 2 entry)) (shimbun-set-content-end-internal shimbun (nth 3 entry)) (luna-call-next-method))) (provide 'sb-haiku-os) ;;; sb-haiku-os.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-hash.el000066400000000000000000000102051434375002100206660ustar00rootroot00000000000000;;; sb-hash.el --- shimbun backend for contents hashing -*- coding: utf-8 -*- ;; Copyright (C) 2006, 2009 Tsuyoshi CHO ;; Author: Tsuyoshi CHO ;; Keywords: shimbun ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; method memo ;; hash save/restore ;; shimbun-hash-set-item shimbun id item ;; shimbun-hash-get-item shimbun id ;; # if item is existence, call update method ;; item update ;; shimbun-hash-update-items shimbun ;; shimbun-hash-update-items-impl (generic) shimbun ;; # page fetched,require hash creation. ;; shimbun-hash-contents-url ;; # normaly,using `shimbun-index-url' ;;; recommend ;; shimbun-get-headers ;; # if runnable, shimbun-hash-update-items call(re-use loaded page) ;; shimbun-make-contents ;; # hashed item from hash(if nil,call update) loaded to buffer. ;; # work only mail body orthopedics. ;;; Code: (require 'shimbun) (eval-and-compile (luna-define-class content-hash () (hash)) (luna-define-internal-accessors 'content-hash)) (defvar content-hash-content-hash-length 31) (luna-define-method initialize-instance :after ((content content-hash) &rest init-args) (content-hash-set-hash-internal content (make-vector content-hash-content-hash-length 0)) content) (luna-define-generic content-hash-get-item (content id) "Return target ID related contents.") (luna-define-method content-hash-get-item ((content content-hash) id) (let ((sym (intern-soft id (content-hash-hash-internal content)))) (when sym (symbol-value sym)))) (luna-define-generic content-hash-set-item (content id item) "Save ID related contents ITEM to hash.") (luna-define-method content-hash-set-item ((content content-hash) id item) (set (intern id (content-hash-hash-internal content)) item)) (luna-define-generic content-hash-contents-url (content shimbun) "Return contents url.") (luna-define-method content-hash-contents-url ((content content-hash) shimbun) (shimbun-index-url shimbun)) (luna-define-generic content-hash-update-items (content shimbun) "Update hash items. Call timing for `shimbun-get-headers' and `content-hash-shimbun-article' (`shimbun-make-contents'). Need implements `content-hash-update-items-impl'.") (luna-define-method content-hash-update-items ((content content-hash) shimbun) (with-temp-buffer (erase-buffer) (shimbun-retrieve-url (content-hash-contents-url content shimbun) 'reload) (content-hash-update-items-impl content shimbun))) (luna-define-generic content-hash-update-items-impl (content shimbun) "Update hash items main routine (need implements).") (defun content-hash-shimbun-article (content shimbun header &optional outbuf) (when (shimbun-current-group-internal shimbun) (with-current-buffer (or outbuf (current-buffer)) (w3m-insert-string (or (with-temp-buffer (erase-buffer) (let ((buf-string nil) id) (setq id (shimbun-header-id header)) (setq buf-string (content-hash-get-item content id)) (unless buf-string (content-hash-update-items content shimbun) (setq buf-string (content-hash-get-item content (shimbun-header-id header)))) (when buf-string (insert buf-string) (shimbun-message shimbun "shimbun: Make contents...") (goto-char (point-min)) (prog1 (shimbun-make-contents shimbun header) (shimbun-message shimbun "shimbun: Make contents...done"))))) ""))))) (provide 'sb-hash) ;;; sb-hash.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-heise.el000066400000000000000000000156571434375002100210600ustar00rootroot00000000000000;;; sb-heise.el --- heise online shimbun backend ;; Copyright (C) 2004, 2005, 2008, 2009 David Hansen ;; Author: David Hansen ;; Keywords: news ;; This file is a part of shimbun. ;; This is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (luna-define-class shimbun-heise (shimbun) ()) (defvar shimbun-heise-url "http://www.heise.de") (defvar shimbun-heise-group-path-alist '(("news" . "/newsticker/") ("telepolis" . "/tp/"))) (defvar shimbun-heise-content-start "\\(\\|\\|<[^>]*HEISETEXT[^>]*>\\)") (defvar shimbun-heise-content-end "\\(\\|\ \\|<[^>]*/HEISETEXT[^>]*>\\)") (defvar shimbun-heise-x-face-alist '(("default" . "X-Face: #RVD(kjrS;RY\"2yH]w.1U,ZC_DbR,9{tQnhyYe|,\\J)\"\ C*o1{%`*]WwtAuo;reeq_koTr=oIKXFB4#bS'tSdz.Mc%t~-@873uYV>SMjL7D6K$M4L0Up{D\ _rBgD*Xj,t;iPKWh:!B}ijDOoCxs!}rs&(r-TLwU8=>@[w^H(>^u$wM*}\":9LANQs)1\"cZP\ 6ftp?9>b&|rkGR+VWIlD:%?,Fvi8h?q2H+pVqq5#Z9*k2q7.P)0$x!A)T"))) (defvar shimbun-heise-groups (mapcar 'car shimbun-heise-group-path-alist)) (luna-define-method shimbun-index-url ((shimbun shimbun-heise)) (concat shimbun-heise-url (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-heise-group-path-alist)))) (defun shimbun-heise-get-newsticker-headers (shimbun) (let ((regexp "]*>\\([^<]+\\)") (from "Heise Online News ") (date "") (longurl) (id) (url) (subject) (headers)) (catch 'stop (while (re-search-forward regexp nil t nil) (setq longurl (match-string 1)) (setq id (md5 longurl)) (setq url (shimbun-expand-url longurl (shimbun-index-url shimbun))) (setq subject (match-string 2)) (setq id (concat "")) (when (shimbun-search-id shimbun id) (throw 'stop nil)) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) (shimbun-mime-encode-string from) date id "" 0 0 url) headers))) headers)) (defconst shimbun-heise-date-re "]+class=\"date-cell\"\\s-*>\\sw*,\ \\s-*\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\s-*") (defconst shimbun-heise-author-re "\\(.*?\\)

    ") (defconst shimbun-heise-url-re ".*?\

    ") (defun shimbun-heise-get-telepolis-headers (shimbun) (let (headers (limit (re-search-forward shimbun-heise-date-re nil t))) (catch 'stop (while limit (goto-char limit) (let ((day (match-string 1)) (month (match-string 2)) (year (match-string 3))) (setq limit (save-excursion (re-search-forward shimbun-heise-date-re nil t))) (save-match-data (while (re-search-forward shimbun-heise-url-re limit t) (let ((url (match-string 1)) (mid (concat "<" (match-string 2) "x" (match-string 3) "@heise.de>")) (subj (match-string 4))) (when (shimbun-search-id shimbun mid) (throw 'stop nil)) (when (re-search-forward shimbun-heise-author-re limit t) (let ((author (match-string 1))) (push (shimbun-create-header 0 subj author (shimbun-make-date-string (string-to-number year) (string-to-number month) (string-to-number day) "00:00" ;; FIXME: timezone is always wrong, slightly better ;; than the default "+0900" "+0000") mid "" 0 0 url) headers))))))))) headers)) (luna-define-method shimbun-get-headers ((shimbun shimbun-heise) &optional range) (if (equal (shimbun-current-group-internal shimbun) "news") (shimbun-heise-get-newsticker-headers shimbun) (shimbun-heise-get-telepolis-headers shimbun))) (defun shimbun-heise-wash-newsticker-article (header) (save-excursion ;; get the real date (let ((regexp-date-begin "
    ") (regexp-date-end "
    ") (regexp-date (concat "\\([0-9]+\\)\\.\\([0-9]+\\)\\." "\\([0-9]+\\)[ \t]+\\([0-9]+\\:[0-9]+\\)")) (tmp-point) (bound-point)) (when (setq tmp-point (re-search-forward regexp-date-begin nil t nil)) (when (setq bound-point (re-search-forward regexp-date-end nil t nil)) (goto-char tmp-point) (when (re-search-forward regexp-date bound-point t nil) (shimbun-header-set-date header (shimbun-make-date-string (string-to-number (match-string 3)) ; year (string-to-number (match-string 2)) ; month (string-to-number (match-string 1)) ; day (match-string 4) ; time ;; FIXME: timezone is always wrong, slightly better than the ;; default "+0900" "+0000")))))) ;; get the real from (let ((regexp-from-begin "") (regexp-from-end "
    "))))))) (shimbun-remove-tags "" "
    ") (shimbun-remove-tags "" ""))) (defun shimbun-heise-wash-telepolis-article (header) (save-excursion ;; strip nasty "download" images (goto-char (point-min)) (while (re-search-forward "" nil t nil) (delete-region (point) (re-search-forward "" nil t nil))) (goto-char (point-min)) (while (re-search-forward "" nil t) (set (intern id (shimbun-hns-content-hash-internal shimbun)) (concat "

    " (buffer-substring start (point)))))))) (if (boundp (setq sym (intern-soft uniq (shimbun-hns-content-hash-internal shimbun)))) (symbol-value sym))))))) (luna-define-method shimbun-x-face ((shimbun shimbun-hns)) (or (shimbun-x-face-internal shimbun) (shimbun-set-x-face-internal shimbun (or (nth 3 (assoc (shimbun-current-group-internal shimbun) shimbun-hns-group-alist)) (cdr (assoc (shimbun-current-group-internal shimbun) (shimbun-x-face-alist-internal shimbun))) (cdr (assoc "default" (shimbun-x-face-alist-internal shimbun))) shimbun-x-face)))) (luna-define-method shimbun-article ((shimbun shimbun-hns) header &optional outbuf) (when (shimbun-current-group-internal shimbun) (with-current-buffer (or outbuf (current-buffer)) (w3m-insert-string (with-temp-buffer (insert (or (shimbun-hns-article shimbun (shimbun-header-xref header)) "")) (shimbun-make-mime-article shimbun header) (buffer-string)))))) (luna-define-method shimbun-close :after ((shimbun shimbun-hns)) (shimbun-hns-set-content-hash-internal shimbun nil)) (provide 'sb-hns) ;;; sb-hns.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-ibm-dev.el000066400000000000000000000100071434375002100212660ustar00rootroot00000000000000;;; sb-ibm-dev.el --- shimbun backend for www-6.ibm.com/ja/developerworks ;; Copyright (C) 2001, 2003, 2005, 2007, 2010, 2019 ;; NAKAJIMA Mikio ;; Author: NAKAJIMA Mikio ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (luna-define-class shimbun-ibm-dev (shimbun) ()) (defvar shimbun-ibm-dev-url "http://www.ibm.com/jp/developerworks/") (defvar shimbun-ibm-dev-groups '("autonomic" "java" "linux" "opensource" "webservices" "xml")) (defvar shimbun-ibm-dev-coding-system 'japanese-shift-jis-unix) (defvar shimbun-ibm-dev-content-start "") (defvar shimbun-ibm-dev-content-end "") (luna-define-method shimbun-index-url ((shimbun shimbun-ibm-dev)) (shimbun-expand-url (concat (shimbun-current-group shimbun) "/library.html") (shimbun-url-internal shimbun))) (luna-define-method shimbun-from-address ((shimbun shimbun-ibm-dev)) (concat "IBM developerWorks (" (shimbun-current-group shimbun) ")")) (luna-define-method shimbun-get-headers ((shimbun shimbun-ibm-dev) &optional range) (catch 'stop (let ((case-fold-search t) (base (shimbun-index-url shimbun)) (indexes) (headers)) (let ((pages (shimbun-header-index-pages range))) (goto-char (point-min)) (while (when (or (not pages) (< (length indexes) pages)) (re-search-forward "[0-9]+綛" nil t)) (push (shimbun-expand-url (match-string 1) base) indexes))) (let ((pattern (format "/jp/developerworks/%s/" (regexp-quote (shimbun-current-group shimbun))))) (dolist (index (nreverse indexes)) (unless (string= index base) (erase-buffer) (shimbun-fetch-url shimbun index)) (goto-char (point-min)) (while (re-search-forward "\\([^<>]+\\)" nil t) (let ((url (shimbun-expand-url (match-string 1) index)) (subject (match-string 2))) (when (string-match pattern url) (let ((id (concat "<" (md5 url) "%" (shimbun-current-group shimbun) "@" (shimbun-server shimbun) ".shimbun.namazu.org>"))) (when (shimbun-search-id shimbun id) (throw 'stop headers)) (push (shimbun-create-header nil subject (shimbun-from-address shimbun) nil id "" 0 0 url) headers))))))) headers))) (luna-define-method shimbun-clear-contents :around ((shimbun shimbun-ibm-dev) header) (goto-char (point-min)) (when (re-search-forward "" nil t) (shimbun-header-set-date header (shimbun-make-date-string (string-to-number (match-string 1)) (string-to-number (match-string 2)) (string-to-number (match-string 3))))) (when (re-search-forward "\\([^<>]+\\)" nil t) (let ((name (match-string 1))) (shimbun-header-set-from header (if (looking-at "[^\n]*") (concat name " <" (match-string 1) ">") name)))) (when (luna-call-next-method) (shimbun-remove-tags "" "") (shimbun-remove-tags "script" t) t)) (provide 'sb-ibm-dev) ;;; sb-ibm-dev.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-impress.el000066400000000000000000000177211434375002100214370ustar00rootroot00000000000000;;; sb-impress.el --- shimbun backend for www.watch.impress.co.jp ;; Copyright (C) 2001-2006, 2008, 2009, 2019 ;; Yuuichi Teranishi ;; Author: Yuuichi Teranishi ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-impress (shimbun-rss) ()) (defvar shimbun-impress-url "http://www.watch.impress.co.jp/") (defvar shimbun-impress-groups-alist '( ;; group (rss | link-regexp) start end address? ("enterprise" rss "" "" "http://enterprise.watch.impress.co.jp/cda/rss/enterprise.rdf") ("pc" rss "" "" "http://pc.watch.impress.co.jp/sublink/pc.rdf") ("dc" rss "" "" "http://dc.watch.impress.co.jp/cda/rss/digicame.rdf") ("akiba" "]*\\)\\)\">" "" "\\(\\|\\)") ("av" rss "\\(\\|
    \\)" "\\(\\|\\)" "http://www.watch.impress.co.jp/av/sublink/av.rdf") ("game" rss "" "\\(\\|\\)" "http://www.watch.impress.co.jp/game/sublink/game.rdf") ("k-tai" rss "" "" "http://k-tai.impress.co.jp/cda/rss/ktai.rdf") ("internet" rss "" "" "http://internet.watch.impress.co.jp/cda/rss/internet.rdf") ("bb" rss "" "" "http://bb.watch.impress.co.jp/cda/rss/broadband.rdf") ("forest" rss "" "" "http://www.forest.impress.co.jp/rss.xml") ("robot" rss "" "" "http://robot.watch.impress.co.jp/cda/rss/robot.rdf") ("kaden" rss "" "" "http://kaden.watch.impress.co.jp/cda/rss/kaden.rdf") ("car" rss "" "" "http://car.watch.impress.co.jp/docs/car.rdf") )) (defvar shimbun-impress-groups (mapcar 'car shimbun-impress-groups-alist)) (defvar shimbun-impress-from-address "www-admin@impress.co.jp") (defvar shimbun-impress-x-face-alist '(("default" . "X-Face: F3zvh@X{;Lw`hU&~@uiX9J0dwTeROiIz\ oSoe'Y.gU#(EqHA5K}v}2ah,QlHa[S^}5ZuTefR\n ZA[pF1_ZNlDB5D_D\ JzTbXTM!V{ecn<+l,RDM&H3CKdu8tWENJlbRm)a|Hk+limu}hMtR\\E!%r\ 9wC\"6\n ebr5rj1[UJ5zDEDsfo`N7~s%;P`\\JK'#y.w^>K]E~{`wZru"))) ;;(defvar shimbun-impress-expiration-days 7) (defvar shimbun-impress-ignored-subject "\\`\\(AD\\|PR\\):") (luna-define-method shimbun-index-url ((shimbun shimbun-impress)) (or (nth 4 (assoc (shimbun-current-group-internal shimbun) shimbun-impress-groups-alist)) (concat (shimbun-url-internal shimbun) (shimbun-current-group-internal shimbun) "/"))) (luna-define-method shimbun-rss-build-message-id ((shimbun shimbun-impress) url &optional date) (concat "<" (md5 url) "%" (shimbun-current-group shimbun) "@www.watch.impress.co.jp>")) (defun shimbun-impress-get-headers (shimbun &optional range) "Get headers without RSS." (let ((case-fold-search t) (regexp (nth 1 (assoc (shimbun-current-group-internal shimbun) shimbun-impress-groups-alist))) ids headers) (goto-char (point-min)) (while (re-search-forward regexp nil t) (let ((apath (match-string 1)) (year (string-to-number (match-string 2))) (month (string-to-number (match-string 3))) (mday (string-to-number (match-string 4))) (uniq (match-string 5)) (pos (point)) subject id) (when (re-search-forward "" nil t) (setq subject (buffer-substring pos (match-beginning 0)) subject (with-temp-buffer (insert subject) (goto-char (point-min)) (when (re-search-forward "
    \\(\\|\\).*" nil t) (replace-match "") (goto-char (point-min))) (while (re-search-forward "[\r\n]" nil t) (replace-match "")) (shimbun-remove-markup) (buffer-string)))) (setq id (format "<%d%d%d%s%%%s@www.watch.impress.co.jp>" year month mday uniq (shimbun-current-group-internal shimbun))) (unless (member id ids) (setq ids (cons id ids)) (push (shimbun-create-header 0 (or subject "") (shimbun-from-address shimbun) (shimbun-make-date-string year month mday) id "" 0 0 (shimbun-expand-url apath (shimbun-index-url shimbun))) headers)))) headers)) (luna-define-method shimbun-headers :around ((shimbun shimbun-impress) &optional range) (if (eq (nth 1 (assoc (shimbun-current-group-internal shimbun) shimbun-impress-groups-alist)) 'rss) (luna-call-next-method) (with-temp-buffer (shimbun-fetch-url shimbun (shimbun-index-url shimbun) t) (shimbun-remove-tags "") ;; clear comment-outed html source (shimbun-impress-get-headers shimbun range)))) (luna-define-method shimbun-article-url :around ((shimbun shimbun-impress) header) (shimbun-real-url (luna-call-next-method))) (luna-define-method shimbun-make-contents :around ((shimbun shimbun-impress) &optional header) (let ((entry (assoc (shimbun-current-group-internal shimbun) shimbun-impress-groups-alist)) (case-fold-search t)) (shimbun-set-content-start-internal shimbun (nth 2 entry)) (shimbun-set-content-end-internal shimbun (nth 3 entry)) ;; Fix broken image tags. Should it be moved to shimbun.el? (goto-char (point-min)) (while (re-search-forward (eval-when-compile (let ((s0 "[\t\n\f\r ]*") (s1 "[\t\n\f\r ]+")) (concat "<" s0 "\\(img\\)" s1 "\\(src\\)" s0 "=" s0 "\"" s1 "/"))) nil t) (replace-match "<\\1 \\2=\"/")) (goto-char (point-min)) (when (and (re-search-forward "" nil t) (or (re-search-forward "[^(鐚]*[(鐚]\\([0-9][0-9]\\)/\ \\([0-9][0-9]\\)/\\([0-9][0-9]\\)[ ]*\\([0-9][0-9]:[0-9][0-9]\\)?" nil t) (re-search-forward "[^<]*
    [^0-9]*\\([0-9][0-9][0-9][0-9]\\)/\ \\([0-9][0-9]\\)/\\([0-9][0-9]\\) *\\([0-9][0-9]:[0-9][0-9]\\)?" nil t) (re-search-forward "\\([0-9][0-9][0-9][0-9]\\)/\ \\([0-9][0-9]\\)/\\([0-9][0-9]\\) *\\([0-9][0-9]:[0-9][0-9]\\)?" nil t))) (let ((year (string-to-number (match-string-no-properties 1))) (month (string-to-number (match-string-no-properties 2))) (day (string-to-number (match-string-no-properties 3))) (time (or (match-string-no-properties 4) "00:00")) (date nil)) (when (> 100 year) (if (< 70 year) (setq year (+ year 1900)) (setq year (+ year 2000)))) (setq date (shimbun-make-date-string year month day time)) (when date (shimbun-header-set-date header date)))) (goto-char (point-min)) (luna-call-next-method))) (provide 'sb-impress) ;;; sb-impress.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-infoshop.el000066400000000000000000000040411434375002100215710ustar00rootroot00000000000000;;; sb-infoshop.el --- infoshop shimbun backend ;; Copyright (C) 2005-2007, 2019 David Hansen ;; Author: David Hansen ;; Keywords: news ;; This file is a part of shimbun. ;; This is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-infoshop (shimbun-rss) ()) (defvar shimbun-infoshop-url "http://www.infoshop.org/inews/backend/news.rdf") (defvar shimbun-infoshop-groups '("news")) (defvar shimbun-infoshop-from-address "invalid@infoshop.org") (defvar shimbun-infoshop-coding-system (or (shimbun-find-coding-system 'windows-1252) (shimbun-find-coding-system 'iso-8859-1)) "Coding system used to decode article contents.") (luna-define-method shimbun-index-url ((shimbun shimbun-infoshop)) shimbun-infoshop-url) (luna-define-method shimbun-rss-build-message-id :around ((shimbun shimbun-infoshop) url &optional date) (if (string-match "\\?story=\\(.*+\\)\\'" url) (concat "<" (match-string 1 url) "@news.infoshop.org>") (luna-call-next-method))) (luna-define-method shimbun-get-headers :around ((shimbun shimbun-infoshop) &optional range) (mapcar (lambda (header) (shimbun-header-set-xref header (concat (shimbun-header-xref header) "&mode=print")) header) (luna-call-next-method))) (provide 'sb-infoshop) ;;; sb-infoshop.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-itmedia.el000066400000000000000000000264531434375002100213730ustar00rootroot00000000000000;;; sb-itmedia.el --- shimbun backend for ITmedia -*- coding: utf-8 -*- ;; Copyright (C) 2004-2011, 2013, 2019 Yuuichi Teranishi ;; Author: TSUCHIYA Masatoshi , ;; Yuuichi Teranishi , ;; ARISAWA Akihiro , ;; Katsumi Yamaoka ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was nnshimbun.el written by ;; TSUCHIYA Masatoshi . ;;; Code: (require 'shimbun) (require 'sb-rss) (require 'sb-multi) (luna-define-class shimbun-itmedia (shimbun-multi shimbun-rss) ()) (defvar shimbun-itmedia-group-alist `(,@(mapcar (lambda (group) (list (concat "news." group) (concat "news_" group))) '("bursts" "domestic" "foreign" "products" "technology" "web20" "nettopics" "society" "security" "industry" "research" "sp_amd")) ("anchordesk" "anchordesk") ("bizid" "bizid") ("enterprise" "enterprise") ,@(mapcar (lambda (group) (list (concat "+D." group) group)) '("plusd" "mobile" "pcupdate" "lifestyle" "games" "docomo" "au_kddi" "vodafone" "shopping")) ,@(mapcar (lambda (def) (nconc (list (concat "+D.lifestyle.column." (car def)) nil) def)) '(("asakura" "藝糸紕" "http://www.itmedia.co.jp/keywords/emma.html") ("honda" "育筝") ("kobayashi" "違") ("kodera" "絨鎛坂拭" "http://www.itmedia.co.jp/keywords/kodera_nobuyoshi.html") ("nishi" "茱炊") ("ogikubo" "紫" "http://plusd.itmedia.co.jp/lifestyle/features/satuei/") ("tachibana" "罘緇" "http://plusd.itmedia.co.jp/lifestyle/features/jibara/") ("takemura" "腴号茘") ("unakami" "羌隙綽" "http://plusd.itmedia.co.jp/lifestyle/features/keyword/"))))) (defvar shimbun-itmedia-x-face-alist '(("\\+D" . "X-Face: #Ur~tK`JhZFFHPEVGKEi`MS{55^~&^0KUuZ;]-@WQ[8\ @,Ex'EeAAE}6xF\\|
    ") (defvar shimbun-itmedia-content-end "
    ") (defvar shimbun-itmedia-retry-fetching 1) (defvar shimbun-itmedia-ignored-subject "\\`PR:") (luna-define-method initialize-instance :after ((shimbun shimbun-itmedia) &rest init-args) (shimbun-rss-initialize-ignored-subject shimbun)) (luna-define-method shimbun-groups ((shimbun shimbun-itmedia)) (mapcar 'car shimbun-itmedia-group-alist)) (luna-define-method shimbun-from-address ((shimbun shimbun-itmedia)) (let ((group (shimbun-current-group-internal shimbun))) (format "ITmedia (%s)" (or (nth 3 (assoc group shimbun-itmedia-group-alist)) group)))) (luna-define-method shimbun-index-url ((shimbun shimbun-itmedia)) (let ((def (assoc (shimbun-current-group-internal shimbun) shimbun-itmedia-group-alist))) (or (nth 4 def) (if (nth 1 def) (format "http://rss.itmedia.co.jp/rss/2.0/%s.xml" (nth 1 def)) (format "http://plusd.itmedia.co.jp/lifestyle/column/%s.html" (nth 2 def)))))) (luna-define-method shimbun-headers :around ((shimbun shimbun-itmedia) &optional range) (if (string-match "\\.xml\\'" (shimbun-index-url shimbun)) ;; Use the function defined in sb-rss.el. (luna-call-next-method) ;; Use the default function defined in shimbun.el. (funcall (intern "shimbun-headers" (luna-class-obarray (luna-find-class 'shimbun))) shimbun range))) (luna-define-method shimbun-get-headers :around ((shimbun shimbun-itmedia) &optional range) (if (string-match "\\.xml\\'" (shimbun-index-url shimbun)) (luna-call-next-method) (let ((case-fold-search t) (group (nth 2 (assoc (shimbun-current-group-internal shimbun) shimbun-itmedia-group-alist))) (from (shimbun-from-address shimbun)) headers) (goto-char (point-min)) (let ((regexp "\ -]+\\)?[\t\n ]*-+>[\t\n ]*")) (when (re-search-forward regexp nil t) (delete-region (point-min) (match-end 0))) (goto-char (point-max)) (when (re-search-backward regexp nil t) (delete-region (match-beginning 0) (point-max))) (goto-char (point-min)) (setq regexp (if (string-equal group "kodera") "\\(?:[\t\n ]*\\|[\t\n ]*[\t\n ]*\\)\\([^<]+\\)" "\\(?:[\t\n ]*\\|[\t\n ]*[\t\n ]*\\)\\([^<]+\\)")) (while (re-search-forward regexp nil t) (push (shimbun-create-header 0 (match-string 6) from (shimbun-make-date-string (+ (string-to-number (match-string 2)) 2000) (string-to-number (match-string 3)) (string-to-number (match-string 4))) (concat "<20" (match-string 2) (match-string 3) (match-string 4) "." (match-string 5) "." group ".column.lifestyle@itmedia.shimbun.namazu.org>") "" 0 0 (match-string 1)) headers))) headers))) (luna-define-method shimbun-multi-next-url ((shimbun shimbun-itmedia) header url) (goto-char (point-min)) (when (re-search-forward "罨<若\ \\|罨<若吾" nil t) (let ((next (or (match-string 1) (match-string 2)))) (prog1 (shimbun-expand-url next url) ;; Remove navigation button. (goto-char (point-min)) (when (and (re-search-forward "\ ]+[\t\n ]+\\)*id=\"notice\"" nil t) (shimbun-end-of-tag "div" t) (save-match-data (re-search-backward (concat "[\t\n ]href=\"" (regexp-quote next) "\"") (match-beginning 0) t))) (replace-match "\n")))))) (luna-define-method shimbun-multi-clear-contents ((shimbun shimbun-itmedia) header has-previous-page has-next-page) (let (credit) (when (and (not has-previous-page) (progn (goto-char (point-min)) (re-search-forward "[\t\n ]*" nil t)) (looking-at "]+>[^\n]+")) (setq credit (match-string 1)) (when (string-match "\\[ITmedia\\]" credit) (setq credit nil))) (when (shimbun-clear-contents shimbun header) (goto-char (point-min)) (when credit (insert "\n")) ;; Remove navigation buttons. (while (and (re-search-forward "\ ]+[\t\n ]+\\)*class=\"ctrl\"" nil t) (shimbun-end-of-tag "div" t) (save-match-data (re-search-backward "[罨≦]若吾" (match-beginning 0) t))) (replace-match "\n")) (goto-char (point-min)) (when has-previous-page (insert " ") ;; ^L ;; Remove tags that likely cause a newline preceding a page. (when (and (looking-at "[\t\n ]*<\\(h[0-9]+\\|p\\)[\t\n >]") (shimbun-end-of-tag (match-string 1) t)) (replace-match "\n\\3\n"))) t))) (luna-define-method shimbun-clear-contents :around ((shimbun shimbun-itmedia) header) (or (luna-call-next-method) ;; Extract the article body and return t if successful. (let ((case-fold-search t) start end md) (goto-char (point-min)) (when (and (re-search-forward "]+[\t\n ]+\\)*\ id=\"cms\\(?:Abstract\\|Byline\\|\\(Body\\)\\)\"" nil t) (progn (setq start (match-beginning 0)) (or (match-beginning 1) (re-search-forward "\ ]+[\t\n ]+\\)*id=\"cmsBody\"" nil t))) (shimbun-end-of-tag "div" t)) (setq end (match-end 1)) (goto-char start) (delete-region (if (re-search-forward "[\t\n ]*[\t\n ]*∫" end t) (match-beginning 0) end) (point-max)) (delete-region (point-min) start) (goto-char (point-max)) (insert "\n") (shimbun-remove-tags "" "") (shimbun-remove-tags "" "") (shimbun-remove-tags "\ ]*SRC=\"http:/[^\"]*/\\(ad\\.itmedia\\.co\\.jp\\|\ a1100\\.g\\.akamai\\.net\\)/[^>]+>") (shimbun-remove-tags "\ ]*HREF=\"http:/[^\"]*/\\(ad\\.itmedia\\.co\\.jp\\|\ a1100\\.g\\.akamai\\.net\\)/[^>]+>[^<]*") ;; Insert line-break after images. (goto-char (point-min)) (while (re-search-forward "\\(]+>\\(?:[\t\n ]*<[^>]+>\\)*\\)[\t\n ]*" nil t) (when (or ;; Look forward for . (progn (setq start (point) md (match-data)) (and (re-search-forward "\\)[\t\n ]*" nil t) (or (match-beginning 1) (progn (goto-char start) (set-match-data md) nil)))) ;; Look backward for . (re-search-backward "\\(]+>\\)[\t\n ]*" (match-beginning 1) t)) (goto-char (match-end 0))) (unless ;; Check if there's a tag that is likely to cause ;; the line-break. (looking-at "\\(?:]+>[\t\n ]*\\)*\ <\\(?:br\\|div\\|h[0-9]+\\|p\\)\\(?:[\t\n ]*>\\|[\t\n ]\\)") (replace-match "\\1
    \n"))) (let ((hankaku (shimbun-japanese-hankaku shimbun))) (when (and hankaku (not (memq hankaku '(header subject)))) (shimbun-japanese-hankaku-buffer t))) t)))) (luna-define-method shimbun-make-contents :before ((shimbun shimbun-itmedia) header) (when (re-search-forward "\\([0-9]+\\)綛\\([0-9]+\\)\\([0-9]+\\) \ \\([0-9]+\\)\\([0-9]+\\) 贋" nil t) (shimbun-header-set-date header (shimbun-make-date-string (string-to-number (match-string 1)) (string-to-number (match-string 2)) (string-to-number (match-string 3)) (concat (match-string 4) ":" (match-string 5)))))) (luna-define-method shimbun-footer :around ((shimbun shimbun-itmedia) header &optional html) (if html (concat "
    \n-- 
    \n\ 荐篋茫御┤ ITmedia 障宴箴絽医障
    у障\n
    \n") (concat "-- \n\ 荐篋茫御┤ ITmedia 障宴箴絽医障\n\ 篁ヤ贋у障:\n" (shimbun-article-base-url shimbun header) "\n"))) (provide 'sb-itmedia) ;;; sb-itmedia.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-japantimes.el000066400000000000000000000065451434375002100221120ustar00rootroot00000000000000;;; sb-japantimes.el --- shimbun backend for www.japantimes.co.jp ;; Author: Hidetaka Iwai , ;; KASUGA Toru ;; Keywords: news ;;; Copyright: ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was nnshimbun.el written by ;; TSUCHIYA Masatoshi . ;;; Code: (require 'shimbun) (luna-define-class shimbun-japantimes (shimbun) ()) (defvar shimbun-japantimes-url "http://www.japantimes.co.jp/") (defvar shimbun-japantimes-groups '("general" "business")) (defvar shimbun-japantimes-from-address "webmaster@japantimes.co.jp") (defvar shimbun-japantimes-content-start "
    \\|
    ") (defvar shimbun-japantimes-content-end "^
    ") (defvar shimbun-japantimes-group-table '(("general" "news.htm" "nn") ("business" "news.htm" "nb"))) (defvar shimbun-japantimes-expiration-days 7) (luna-define-method shimbun-index-url ((shimbun shimbun-japantimes)) (concat (shimbun-url-internal shimbun) (nth 1 (assoc (shimbun-current-group-internal shimbun) shimbun-japantimes-group-table)))) (luna-define-method shimbun-get-headers ((shimbun shimbun-japantimes) &optional range) (let ((regexp (format (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "" ;; 7. subject s0 "\\([^[<>]+\\)" s0 ""))) (nth 2 (assoc (shimbun-current-group-internal shimbun) shimbun-japantimes-group-table)))) (case-fold-search t) url serial year month day tag subject id date headers) (goto-char (point-min)) (while (re-search-forward regexp nil t) (setq url (match-string 1) serial (match-string 2) year (match-string 3) month (match-string 4) day (match-string 5) tag (match-string 6) subject (match-string 7) id (format "<%s%s%s%s%s%%%s.japantimes.co.jp>" serial year month day tag (shimbun-current-group-internal shimbun)) date (shimbun-make-date-string (string-to-number year) (string-to-number month) (string-to-number day))) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) (shimbun-from-address shimbun) date id "" 0 0 url) headers)) headers)) (provide 'sb-japantimes) ;;; sb-japantimes.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-javaconf.el000066400000000000000000000047761434375002100215520ustar00rootroot00000000000000;;; sb-javaconf.el --- shimbun backend class for java-conference archive. ;; Copyright (C) 2001-2004, 2007, 2019 ABE Yasushi ;; Author: ABE Yasushi ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-incf (require 'shimbun) (require 'sb-mhonarc) (luna-define-class shimbun-javaconf (shimbun-mhonarc) ()) (defvar shimbun-javaconf-url "http://www.java-conf.gr.jp/archives/") (defvar shimbun-javaconf-groups '("servlet-ml" "business-ml" "duke-in-the-box-ml" "jfriends-ml" "JGT-ml" "jini-ml" "ejb-ml" "cm-ml" "horb-ml" "talk-ml")) (defvar shimbun-javaconf-reverse-flag nil) (defvar shimbun-javaconf-litemplate-regexp "\\([^<]+\\)\n \\([^<]+\\)\n") (defmacro shimbun-javaconf-concat-url (shimbun url) `(concat (shimbun-url-internal ,shimbun) (shimbun-current-group-internal ,shimbun) "/" ,url)) (luna-define-method shimbun-get-headers ((shimbun shimbun-javaconf) &optional range) (let* ((group (shimbun-current-group-internal shimbun)) (regexp (format " ;; Author: NAKAJIMA Mikio ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-mailman) (luna-define-class shimbun-jpilot (shimbun-mailman) ()) (defvar shimbun-jpilot-url "http://www.jpilot.org/pipermail/jpilot/") (defvar shimbun-jpilot-groups '("main")) (provide 'sb-jpilot) ;;; sb-jpilot.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-jpo.el000066400000000000000000000255411434375002100205440ustar00rootroot00000000000000;;; sb-jpo.el --- shimbun backend for http://www.jpo.go.jp ;; Copyright (C) 2003-2005, 2019 NAKAJIMA Mikio ;; Author: NAKAJIMA Mikio ;; Keywords: news ;; Created: Apr. 28, 2003 ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; ;; This shimbun backend categorizes the Japan Patent Office web site ;; to virtual four news groups. Following is table of a site map ;; (summaerized page of http://www.jpo.go.jp/sitemap/index.htm) and ;; mapped virtual groups. ;; ;; 九墾膣剛 ...lawguide ;; 咲絲祉絲ゃ脂蚊障 ...details ;; 壕┗綺膣剛 ;; 壕┗綺腟 ;; 合肴; ...news ;; 羈篁ゆ号cャ ...revision ;; 綺宴綺 ...news ;; ... ...details ;; ;; 莖絎 ...details ;; ;; 贋医吋罩 ;; ゃゃ ;; 茯翠宴糸 ;; 頳鐚祉潟<潟 ;; 壕┗糸恰檎え ;; 腴茵炊篋冴綏ユキ罔膩演え ;; ∫c若若吾潟 ;; х壕┗綺若若 ;; 糸水膩腦o膩茵睡∞絮鐚 ;; 泣ゃゃ ;;; Code: (require 'shimbun) (luna-define-class shimbun-jpo (shimbun) ()) (defconst shimbun-jpo-url "http://www.jpo.go.jp/") (defvar shimbun-jpo-groups '("news" ;合肴; 綺宴綺 "revision" ;羈篁ゆ号cャ "lawguide" ;九墾膣剛 "details" ; 咲絲祉絲ゃ脂蚊障 壕┗綺腟 莖絎 )) (defvar shimbun-jpo-from-address "webmaster@jpo.go.jp") (defvar shimbun-jpo-coding-system 'japanese-shift-jis) (defvar shimbun-jpo-content-start "") (defvar shimbun-jpo-content-end "<\/body>") ;;(luna-define-method shimbun-reply-to ((shimbun shimbun-jpo)) ;; (shimbun-from-address-internal shimbun)) (defvar shimbun-jpo-debugging t) (defun shimbun-jpo-retrieve-url (url &optional no-cache no-decode) (if shimbun-jpo-debugging (let (w3m-async-exec) (shimbun-retrieve-url url no-cache no-decode)) (shimbun-retrieve-url url no-cache no-decode))) (luna-define-method shimbun-headers ((shimbun shimbun-jpo) &optional range) (shimbun-jpo-headers shimbun)) (defun shimbun-jpo-headers (shimbun) (let ((group (shimbun-current-group-internal shimbun)) (url shimbun-jpo-url) headers) (with-temp-buffer (if (string= group "news") (progn (setq url (concat url "torikumi/torikumi_list.htm")) (shimbun-jpo-retrieve-url url 'reload) (setq headers (shimbun-jpo-headers-1 shimbun url "\\(hiroba/.*\\)")) (erase-buffer) (setq url (concat shimbun-jpo-url "torikumi/puresu/puresu_list.htm")) (shimbun-jpo-retrieve-url url 'reload) (setq headers (nconc headers (shimbun-jpo-headers-1 shimbun url)))) (if (string= group "details") (setq headers (shimbun-jpo-headers-group-details shimbun)) (if (string= group "revision") (setq url (concat url "torikumi/kaisei/kaisei2/kaisei_list.htm")) (if (string= group "lawguide") (setq url (concat url "seido/seido_list.htm")) (error "unknown group %s" group))) (shimbun-jpo-retrieve-url url 'reload) (setq headers (shimbun-jpo-headers-1 shimbun url))))) headers)) (defun shimbun-jpo-headers-1 (shimbun origurl &optional urlregexp unmatchregexp) (let ((case-fold-search t) (from (shimbun-from-address shimbun)) (group (shimbun-current-group-internal shimbun)) (regexp (format "\\(.*\\)[ ]*\\([.0-9]+\\)" (or urlregexp "\\(.*\\)"))) (urlprefix (when (string-match "\\`\\(http:\/\/.+\\/\\)[^\/]+\\.html*" origurl) (match-string 1 origurl))) headers id pagename subject tempdate date url) ;; 壕┗羈膈筝号c羈緇筝処ャ絎推擦罅ゃ2003.4.21 ;; getting URL and SUBJECT (goto-char (point-min)) (while (re-search-forward regexp nil t) (catch 'next (setq pagename (match-string-no-properties 1) subject (match-string-no-properties 3) date (match-string-no-properties 4)) (when (and unmatchregexp (string-match unmatchregexp pagename)) (throw 'next nil)) (setq url (shimbun-expand-url pagename urlprefix) subject (with-temp-buffer (insert subject) (shimbun-remove-markup) (buffer-string))) ;; getting DATE (if (not (string-match "\\([0-9]+\\)\\.\\([0-9]+\\)\\(\\.[0-9]+\\)?" date)) (throw 'next nil) ; unknown date format (setq tempdate (list (string-to-number (match-string 1 date)) (string-to-number (match-string 2 date)))) (setq date (nconc tempdate (list (if (not (match-string 3 date)) 1 (string-to-number (substring (match-string 3 date) 1))))))) ;; building ID (setq id (format "<%04d%02d%02d%%%s%%%s@jpo>" (car date) (nth 1 date) (nth 2 date) (if (string-match "\\`http:\/\/.+\\/\\([^\/]+\\.html*\\)" pagename) (match-string 1 pagename) pagename) group)) (unless (shimbun-search-id shimbun id) (setq date (apply 'shimbun-make-date-string date)) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) from date id "" 0 0 url) headers)) (forward-line 1))) headers)) (defun shimbun-jpo-headers-group-details (shimbun) (let ((case-fold-search t) (urllist '("torikumi/torikumi_list.htm" "tetuzuki/tetuzuki_list.htm" "shiryou/shiryou_list.htm")) (exceptions-alist (list (cons "torikumi/" (list "kaisei/" "puresu/" "hiroba/")))) url headers pages urlprefix temp exceptions) (while urllist (when (string-match "\\/" (car urllist)) (setq urlprefix (substring (car urllist) 0 (1+ (match-beginning 0))))) (setq url (shimbun-expand-url (car urllist) shimbun-jpo-url)) (erase-buffer) (shimbun-jpo-retrieve-url url 'reload) (setq exceptions (cdr (assoc urlprefix exceptions-alist))) (goto-char (point-min)) ;; gathering header information of articles in the current page. (setq headers (nconc headers (shimbun-jpo-headers-1 shimbun url nil (when exceptions (concat "\\(" (mapconcat 'regexp-quote exceptions "\\|") "\\)"))))) (goto-char (point-min)) (while (re-search-forward ;;合肴; "[^<>]+<\/a><\/font><\/td>" nil t nil) ;; getting sub-categories. (catch 'next (setq temp (match-string 1)) (dolist (ex exceptions) (when (string-match ex temp) (throw 'next nil))) (setq pages (cons (shimbun-expand-url temp (concat shimbun-jpo-url urlprefix)) pages)))) (while pages (setq url (car pages)) (erase-buffer) (shimbun-jpo-retrieve-url url 'reload) ;; getting header information of articles in pages of the sub-categories. (setq headers (nconc headers (shimbun-jpo-headers-1 shimbun url))) (setq pages (cdr pages))) (setq urllist (cdr urllist))) headers)) (luna-define-method shimbun-clear-contents :around ((shimbun shimbun-jpo) header) (when (luna-call-next-method) (goto-char (point-min)) (when (re-search-forward ;;鐚モmail鐚PA0A00@jpo.go.jp
    ;;E-mail鐚
    PA0420@jpo.go.jp
    ;;E-mail: PA0A00@jpo.go.jp
    "\\(糸<若\\|[鐚ワEe][-]*[鐚鐔Mm][鐚¥Aa][鐚鐔Ii][鐚鐔Ll]\\)[鐚:] * *\\2" nil t nil) (shimbun-header-set-from header (match-string 2))) (shimbun-jpo-cleanup-article) t)) (defun shimbun-jpo-cleanup-article () (save-excursion (let ((case-fold-search t)) (goto-char (point-min)) ;; 若吾 (while (re-search-forward "" nil t nil) (delete-region (progn (beginning-of-line) (point)) (progn (end-of-line) (point)))) (goto-char (point-min)) ;; HOME > 壕┗綺腟随壕┗羈膃鐚鐚∞域с紊宴箴紊鐚≪鐚 >

    ;; HOME > 壕┗綺 (while (re-search-forward "HOME<\/a> *\\>" nil t nil) (delete-region (match-beginning 0) (progn (end-of-line) (point)))) (goto-char (point-min)) (while (re-search-forward "\n+]+\">\\(<\/a>\\)?<\/td>\n+<\/tr>" nil t nil) (delete-region (match-beginning 0) (match-end 0))) (goto-char (point-min)) (while (re-search-forward "^\\(\\)?\n+\ ]+\">\\(<\/a>\\)?<\/td>\n+<\/tr>" nil t nil) (delete-region (match-beginning 0) (match-end 0)))))) (provide 'sb-jpo) ;;; sb-jpo.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-kantei.el000066400000000000000000000474061434375002100212330ustar00rootroot00000000000000;;; sb-kantei.el --- shimbun backend for kantei blog backnumber ;; Copyright (C) 2001-2012, 2019 Yuuichi Teranishi ;; Author: Yuuichi Teranishi ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (luna-define-class shimbun-kantei (shimbun) ()) (defvar shimbun-kantei-url "http://www.kantei.go.jp/") (defvar shimbun-kantei-groups '("blog-en" "blog-ja" "blog-en.kan" "blog-ja.kan" "m-magazine-cn.hatoyama" "m-magazine-kr.hatoyama" "m-magazine-en.hatoyama" "m-magazine-ja.hatoyama" "m-magazine-en.aso" "m-magazine-ja.aso" "m-magazine-en.fukuda" "m-magazine-ja.fukuda" "m-magazine-en.abe" "m-magazine-ja.abe" "m-magazine-en.koizumi" "m-magazine-ja.koizumi" ;; Backward compatibility. "m-magazine") "List of the groups subscribing to the blog of Japan's Cabinet. Old e-mail magazines' archive are also supported. Note that the `m-magazine-ja.koizumi' is the same as `m-magazine' which is for the backward compatibility.") (defvar shimbun-kantei-x-face-alist ;; Don't change the order of the faces. See the method function that ;; is applied to `shimbun-make-contents'. '(("default" . "X-Face: )y>~@`/54G8A3vhuan6E%su\\r]&ACV[`\"4|_2e\"!\ KcK5c8:G'\"C6<;7ovb1YWG4B%BY?:^r\n p[nt=j!$4c:Buz#]][;-i&P66^9aC\ \\CtF^uD20*Y9SqW'lFN,mTLp[\"0`9Z?bS,BJ-CaA@a||]\n Oe]\";W)D3whpcUo(?a\ &S|i=u\"r>{N9/GRtw'OC2W9M%5t_>") ("\\.kan\\'" . "X-Face: #Mk`n~UfLBs/5u+Pl'tnaO~4.\";)nt-Ip-+H&X}D\ u!TN~u*]-#PJ(Xo'uKzpq-l]6pac=~T\n hm-vH$Bh88Kq<[!1tY7\\wVW{fV=9ad4!`|\ xnRw$tl:?a{01+wd:6ysB*[Mms:Gv%\\Dj-a<{MY{vKJK\n /*t91Ighysyc8}Z2NG#X]\ W9fUoRI<7zrQw") ("\\.hatoyama\\'" . "X-Face: Bhu:2dJ9#&[pX@hMRh=$pF|O>-,*d\"V+@u\"gB5\n ]}Yxh$n#S1BM\ o,8|XYsIrL4grl\\|6JV6fq3!B`28KP2,M/.Tsh") ("\\.aso\\'" . "X-Face: #(b'i|jCr9M1k*o`B1YbD.C*%\\T3~.mUK@q?}o4.\ TC*~*~fPaHg\\]V+Q2$3wu$=:[HZ'C/&9e15i*4e>OV4`\n pdAVvpz`w<$QCu9'~:}|\ h`SEZv\\U]f']V(QbE5'%u$InJltT4~|Ru\\vs~g!;y;1uY#8v<8|eGbb*i=\n a/RMY:'\"^)0:;L!2x8j|br~q/E=j.s!FBI-6xr") ("\\.fukuda\\'" . "X-Face: R![ems6?kedF&(},`\";7nbUIT6Uyt2A9jSQ'\\\ $=;,n.9vM+PFYQB}O\n x=IKEqN%\n 3EL93@D{*BW-{GE88b7{d^m-%v9}=-7=^M\ #$?zJm$]Yy07J^}:#V?9t_<{fhavZVZQ1^1=SLQf3X=<\n z|Af_njD},U!m}4V}$]L_7\ a!b>X!RW$['xZs$r=G?o|=M^O)IJoOurt|UKUu[UuQFT/r&vygySYUmf\n Jm;kjj") ("\\.koizumi\\'\\|\\`m-magazine\\'" . "X-Face: .bsmj'!8A`wI\\o+KF\ !)#0.a0,f1MA~PH/5T0fu$Mg+)_5G~NSk4.0t]&|f@^c3l8-Fuz8'|\n kr;td_Jn7|Gw\ REbDs'H9$Iy#yM#*J2c'L},(m8K:8?$vTPC%D}YJ[bV#7xw|{\"DJ:_?`V1m_4^+;7+\n\ JOf6v&x6?mU-q=0}mTK5@\"-bFGuD}2Y/(lR/V#'?HRc2Jh2UrR,oIR~NL!})|^%kw"))) (luna-define-method shimbun-index-url ((shimbun shimbun-kantei)) (let* ((group (shimbun-current-group-internal shimbun)) (url (cond ((string-equal group "blog-en") "http://nodasblog.kantei.go.jp/") ((string-equal group "blog-ja") "http://kawaraban.kantei.go.jp/") ((string-equal group "blog-en.kan") "http://kansblog.kantei.go.jp/archives.html") ((string-equal group "blog-ja.kan") "http://kanfullblog.kantei.go.jp/archives.html") ((string-equal group "m-magazine-cn.hatoyama") "http://www.mmz.kantei.go.jp/\ foreign/m-magazine/backnumber_ch/hatoyama_index.html") ((string-equal group "m-magazine-kr.hatoyama") "http://www.mmz.kantei.go.jp/\ foreign/m-magazine/backnumber_ko/hatoyama_index.html") ((string-equal group "m-magazine-en.hatoyama") "http://www.mmz.kantei.go.jp/\ foreign/m-magazine/backnumber/hatoyama.html") ((string-equal group "m-magazine-ja.hatoyama") "http://www.mmz.kantei.go.jp/\ jp/m-magazine/backnumber/hatoyama.html") ((string-equal group "m-magazine-en.aso") "http://www.mmz.kantei.go.jp/\ foreign/m-magazine/backnumber/aso.html") ((string-equal group "m-magazine-ja.aso") "http://www.mmz.kantei.go.jp/\ jp/m-magazine/backnumber/aso.html") ((string-equal group "m-magazine-en.fukuda") "http://www.mmz.kantei.go.jp/\ foreign/m-magazine/backnumber/fukuda.html") ((string-equal group "m-magazine-ja.fukuda") "http://www.mmz.kantei.go.jp/\ jp/m-magazine/backnumber/hukuda.html") ((string-equal group "m-magazine-en.abe") "foreign/m-magazine/backnumber/abe.html") ((string-equal group "m-magazine-ja.abe") "jp/m-magazine/backnumber/abe.html") ((string-equal group "m-magazine-en.koizumi") "foreign/m-magazine/backnumber/koizumi.html") ((string-equal group "m-magazine-ja.koizumi") "jp/m-magazine/backnumber/koizumi.html") ;; Backward compatibility. ((string-equal group "m-magazine") "jp/m-magazine/backnumber/koizumi.html") ;; Default. (t "jp/m-magazine/backnumber/")))) (cond ((string-match "\\`blog-\\(?:en\\|ja\\)\\'" group) (concat url (format-time-string "%Y/%02m/"))) ((string-match "\\`http:" url) url) (t (concat (shimbun-url-internal shimbun) url))))) (luna-define-method shimbun-from-address ((shimbun shimbun-kantei)) (let ((group (shimbun-current-group-internal shimbun))) (cond ((string-equal group "blog-en") "Yoshihiko Noda") ((string-equal group "blog-ja") "遺蹴綵") ((string-equal group "blog-en.kan") "Naoto Kan") ((string-equal group "blog-ja.kan") "岩査") ((string-equal group "m-magazine-cn.hatoyama") "藐絮援援昏紊") ((string-equal group "m-magazine-kr.hatoyama") "朱 れ") ((string-equal group "m-magazine-en.hatoyama") "Yukio Hatoyama") ((string-equal group "m-magazine-ja.hatoyama") "薐絮援援紊") ((string-equal group "m-magazine-en.aso") "Taro Aso") ((string-equal group "m-magazine-ja.aso") "藝紫紊") ((string-equal group "m-magazine-en.fukuda") "Yasuo Fukuda") ((string-equal group "m-magazine-ja.fukuda") "胼医嵯紊") ((string-equal group "m-magazine-en.abe") "Shinzo Abe") ((string-equal group "m-magazine-ja.abe") "絎筝") ((string-equal group "m-magazine-en.koizumi") "Junichiro Koizumi") ((string-equal group "m-magazine-ja.koizumi") "絨閿膣筝") ((string-equal group "m-magazine") ;; Backward compatibility. "絨閿膣筝") (t "遺蹴綵")))) (luna-define-method shimbun-get-headers ((shimbun shimbun-kantei) &optional range) (let* ((group (shimbun-current-group-internal shimbun)) (enp (string-match "\\`m-magazine-en" group)) (cnp (string-match "\\`m-magazine-cn" group)) (krp (string-match "\\`m-magazine-kr" group)) (regexp (cond ((string-equal group "blog-en") (eval-when-compile (concat "]*>[\t\n ]*" ;; 6. subject "\\(\\(?:\\(?:[^<]*\\)+[^<]*\\)\\|[^<]+\\)"))) ((string-equal group "blog-ja") (eval-when-compile (concat "]*>[\t\n ]*" ;; 6. subject "\\([^<]+\\)"))) (enp (eval-when-compile (concat "]*>[\t\n ]*" ;; 5. subject "\\(\\(?:[^\t\n <]+[\t\n ]+\\)*[^\t\n <]+\\)" "[\t\n ]*[\t\n ]*[\t\n ]*"))) (cnp (eval-when-compile (concat "]*>[\t\n ]*" ;; 5. subject "\\(\\(?:[^\t\n <]+[\t\n ]+\\)*[^\t\n <]+\\)" "[\t\n ]*[\t\n ]*[\t\n ]*"))) (krp (eval-when-compile (concat "]*>[\t\n ]*" ;; 5. subject "\\(\\(?:[^\t\n <]+[\t\n ]+\\)*[^\t\n <]+\\)" "[\t\n ]*[\t\n ]*[\t\n ]*"))) (t (eval-when-compile (concat "]*>[\t\n ]*[^]+[\t\n ]*" ;; 6. subject "\\([^<]+\\)"))))) (parent (shimbun-index-url shimbun)) (murl parent) (from (shimbun-from-address shimbun)) unreads time year month mday url subject rev id prev headers) (catch 'stop (while t ;; Remove commented areas. (while (re-search-forward "" year month mday group)) (setq year (string-to-number (match-string 2)) month (string-to-number (match-string 3)) mday (string-to-number (match-string 4)) url (match-string 1) subject (replace-regexp-in-string "[\t\n ]+" " " (match-string 6)) rev (match-string 5)) (if (and (member group '("blog-en" "blog-ja")) (prog2 (setq prev (match-end 0)) (re-search-forward "\ ]+[\t\n ]+\\)?class=\"time\"[^>]*>\ \\(\\([012]?[0-9]\\):\\([0-5]?[0-9]\\)\\)" nil t) (goto-char prev))) (setq time (match-string 1) id (format "<%d%02d%02d%02d%02d%s.%s%%kantei.go.jp>" year month mday (string-to-number (match-string 2)) (string-to-number (match-string 3)) (if rev (concat "-" rev) "") group)) (setq id (format "<%d%02d%02d%s.%s%%kantei.go.jp>" year month mday (or rev "") group)))) (unless (and (string-match "\\`blog-\\(?:en\\|ja\\)\\'" group) (shimbun-search-id shimbun id)) (push (shimbun-create-header 0 subject from (shimbun-make-date-string year month mday time) id "" 0 0 (if (string-match "\\`http:" url) url (shimbun-expand-url url parent))) unreads))) (if unreads (setq headers (nconc unreads headers) unreads nil) (throw 'stop nil)) (if (string-match "\\`blog-\\(?:en\\|ja\\)\\'" group) (if (string-match "/\\(20[1-9][0-9]\\)/\\([01][0-9]\\)/\\'" murl) (progn (setq year (string-to-number (match-string 1 murl)) month (1- (string-to-number (match-string 2 murl)))) (when (<= month 0) (setq month 12 year (1- year))) (if (and (= year 2011) (< month 9)) (throw 'stop nil) (setq murl (format "%s/%d/%02d/" (substring murl 0 (match-beginning 0)) year month)) (erase-buffer) (shimbun-retrieve-url murl))) (throw 'stop nil)) (throw 'stop nil)))) (shimbun-sort-headers headers))) (luna-define-method shimbun-clear-contents :around ((shimbun shimbun-kantei) header) (let ((case-fold-search t) (group (shimbun-current-group-internal shimbun)) start end section) (if (and (search-forward "
    " nil t)
    	     (progn
    	       (setq start (match-beginning 0))
    	       (goto-char (point-max))
    	       (search-backward "
    " nil t))) (progn (delete-region (match-end 0) (point-max)) (insert "\n") (delete-region (point-min) start) t) (if (re-search-forward "[\t\n ]*\ \\(?:<[^>]+>[\t\n ]*\\)*" nil t) (progn (setq start (match-end 0)) (re-search-forward "\\(?:[\t\n ]*<[^>]+>\\)*[\t\n ]*\ \\(?:]+>[\t\n ]*\ go[\t\n ]+to[\t\n ]+top[\t\n ]+of[\t\n ]+the[\t\n ]+page[\t\n ]*\ \\|]+>[\t\n ]*subscription[\t\n ]*\ \\|\\)" nil t) (delete-region (match-beginning 0) (point-max)) (insert "\n") (delete-region (point-min) start))) (goto-char (point-min)) (if (and (re-search-forward "[\t\n ]*" nil t) (progn (setq section (regexp-quote (match-string 1)) start (match-end 0)) (re-search-forward (concat "[\t\n ]*") nil t))) (progn (setq end (match-beginning 0)) (while (when (re-search-forward "[\t\n ]*" nil t) (setq section (regexp-quote (match-string 1))) (delete-region end (match-end 0)) (insert "\n \n") (and (re-search-forward (concat "[\t\n ]*") nil t) (setq end (match-beginning 0))))) (if (and (re-search-forward "\ ]+[\t\n ]+\\)*align=\"center\"" nil t) (shimbun-end-of-tag "div" t)) (progn (delete-region (match-end 1) (point-max)) (insert "\n") (goto-char end) (delete-region end (match-beginning 3)) (insert "\n
    \n-- 
    \n")) (delete-region end (point-max)) (insert "\n")) (delete-region (point-min) start)) ;; Remove style sheet. (shimbun-remove-tags "style" t) ;; Remove navigation button. (shimbun-remove-tags "\\(td\\|span\\)\ \\(?:[\t\n ]+[^\t\n >]+\\)*[\t\n ]+class=\"breadcrumbs\"" t)) ;; Remove useless tags. (goto-char (point-min)) (while (re-search-forward "[\t\n ]*[\t\n ]*" nil t) (replace-match "
    \n")) (goto-char (point-min)) (while (re-search-forward "\ [\t\n ]*]+\\)?>[\t\n ]*" nil t) (replace-match "\n")) (goto-char (point-min)) (while (re-search-forward "[\t\n ]*]+>[\t\n ]*" nil t) (replace-match "\n

    ")) (goto-char (point-min)) (while (re-search-forward "[\t\n ]*]+>[\t\n ]*" nil t) (replace-match "\n")) (goto-char (point-min)) (while (re-search-forward "^[\t ]+\n" nil t) (delete-region (match-beginning 0) (match-end 0))) (goto-char (point-min)) (while (re-search-forward "\\([\t\n ]*]*\\)?>\\)\ \\(?:[\t\n ]*]*\\)?>\\)+[\t\n ]*\\(]\\)" nil t) (replace-match "\\1\\2")) (goto-char (point-min)) (skip-chars-forward "\t\n ") (delete-region (point-min) (point)) (while (re-search-forward "[\t\n ]+\n" nil t) (replace-match "\n")) ;; Insert newlines around images. (goto-char (point-min)) (while (re-search-forward "[\t\n ]*\\(\\(?:<[^/][>]+>[\t\n ]*\\)*\ ]+>\\(?:[\t\n ]*<[^/][>]+>\\)*\\)[\t\n ]*" nil t) (replace-match "
    \n\\1
    \n")) ;; Shrink boundary lines. (let ((limit (when (display-graphic-p) (frame-char-width)))) (when limit (setq limit (* limit (1- (window-width)))) (goto-char (point-min)) (while (re-search-forward "]+\\)*[\t\n ]+height=\"1\"" nil t) (when (shimbun-end-of-tag) (goto-char (match-beginning 0)) (if (re-search-forward "width=\"\\([0-9]+\\)\"" (match-end 0) t) (when (> (string-to-number (match-string 1)) limit) (replace-match (concat "width=\"" (number-to-string limit) "\""))) (goto-char (match-end 0))))))) (cond ((string-match "\\`blog-\\(?:en\\|ja\\)\\'" group) (goto-char (point-min)) (when (and (or (re-search-forward "\ ]+[\t\n ]+\\)*class=\"block article\"" nil t) (re-search-forward "\ ]+[\t\n ]+\\)*class=\"block header\"" nil t)) (shimbun-end-of-tag "div")) (goto-char (setq start (match-beginning 2))) (when (re-search-forward "[\t\n ]*\ ]+[\t\n ]+\\)*class=\"footer\"" nil t) (delete-region (match-beginning 0) (point-max)) (insert "\n") (delete-region (point-min) start)))) ((string-match "\\`blog-" group) (goto-char (point-min)) (when (and (re-search-forward "\ ]+[\t\n ]+\\)*class=\"entry-body\"" nil t) (shimbun-end-of-tag "div" t)) (delete-region (match-end 2) (point-max)) (insert "\n") (delete-region (point-min) (match-beginning 2)) (goto-char (point-min)) (while (re-search-forward "\ [\t\n ]*

    \\(?:[\t\n ]*\\|[\t\n ]* [\t\n ]*\\)

    [\t\n ]*" nil t) (replace-match ""))))) ;; Zenkaku ASCII -> Hankaku (unless (memq (shimbun-japanese-hankaku shimbun) '(header subject nil)) (shimbun-japanese-hankaku-buffer t))))) (luna-define-method shimbun-make-contents :around ((shimbun shimbun-kantei) header) (if (string-match "\\`m-magazine-\\(?:cn\\|en\\|ja\\|kr\\)\\'" (shimbun-current-group-internal shimbun)) ;; Choose a face according to the author. (let ((shimbun-x-face-database-function (or shimbun-x-face-database-function (let ((from (shimbun-header-from header t))) `(lambda (ignore) ,(cdr (nth (cond ((member from '("Naoto Kan" "岩査")) 1) ((member from '("Yukio Hatoyama" "薐絮援援紊" "藐絮援援昏紊" "朱 れ")) 2) ((member from '("Taro Aso" "藝紫紊")) 3) ((member from '("Yasuo Fukuda" "胼医嵯紊")) 4) ((member from '("Shinzo Abe" "絎筝")) 5) ((member from '("Junichiro Koizumi" "絨閿膣筝")) 6) (t 0)) shimbun-kantei-x-face-alist))))))) (luna-call-next-method)) (luna-call-next-method))) (provide 'sb-kantei) ;;; sb-kantei.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-kde.el000066400000000000000000000055411434375002100205150ustar00rootroot00000000000000;;; sb-kde.el --- shimbun backend for www.KDE.gr.jp ;; Copyright (C) 2002, 2003, 2019 NAKAJIMA Mikio ;; Authors: NAKAJIMA Mikio ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-decf (require 'shimbun) (require 'sb-mhonarc) (luna-define-class shimbun-kde (shimbun-mhonarc) ()) (defvar shimbun-kde-url "http://www.KDE.gr.jp/ml/") (defvar shimbun-kde-groups '("Kdeveloper" "Kuser")) (defvar shimbun-kde-coding-system 'euc-jp) (defvar shimbun-kde-reverse-flag t) (defvar shimbun-kde-litemplate-regexp "\\([^<]+\\) \\([^<]+\\)") (defvar shimbun-kde-x-face-alist '(("default" . "X-Face: $kq]+,^4o0}[`AQ*4!ml,:9v\ :\\1JvC:xf^dG6rsim7uO\\sFNext Page\\]") (months '("index.html")) headers) (if (shimbun-mhonarc-reverse-flag-internal shimbun) (progn (goto-char (point-min)) (while (and (or (not pages) (>= (cl-decf pages) 0)) (re-search-forward regexp nil t)) (push (match-string 1) months))) (goto-char (point-max)) (while (and (or (not pages) (>= (cl-decf pages) 0)) (re-search-backward regexp nil t)) (push (match-string 1) months))) (setq months (nreverse months)) (catch 'stop (dolist (month months) (let ((url (concat (shimbun-index-url shimbun) month))) (erase-buffer) (shimbun-retrieve-url url t) (shimbun-mhonarc-get-headers shimbun url headers month)))) headers)) (provide 'sb-kde) ;;; sb-kde.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-kyoko-np.el000066400000000000000000000100601434375002100215110ustar00rootroot00000000000000;;; sb-kyoko-np.el --- shimbun backend for Kyoko Shimbun News ;; Copyright (C) 2015, 2018 Katsumi Yamaoka ;; Author: Katsumi Yamaoka ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-kyoko-np (shimbun-rss) ()) (defvar shimbun-kyoko-np-url "http://kyoko-np.net/") (defvar shimbun-kyoko-np-server-name "罕域腓") (defvar shimbun-kyoko-np-x-face-alist '(("default" . "\ X-Face: $5)ftJ]QIPSQ!1hvb}7KtjG$iAuk>KI.2ajuPB*&}act=uLSq#1kf\\|Y@8Zf\ h,:y~(ZRL6_\n !]+_+:*w'FH/kkX~]Wd>*Og6Q:)\"M&Kngqb%I\"V-k_@?Y5r5ESY8k>"))) (defvar shimbun-kyoko-np-groups '("rss")) (defvar shimbun-kyoko-np-expiration-days nil) (defvar shimbun-kyoko-np-japanese-hankaku t) (luna-define-method shimbun-index-url ((shimbun shimbun-kyoko-np)) (concat shimbun-kyoko-np-url "index.xml")) (luna-define-method shimbun-headers :around ((shimbun shimbun-kyoko-np) &optional range) (prog2 (shimbun-message shimbun (concat shimbun-checking-new-news-format "...")) (luna-call-next-method) (shimbun-message shimbun (concat shimbun-checking-new-news-format "...done")))) (luna-define-method shimbun-get-headers ((shimbun shimbun-kyoko-np) &optional range) (let ((fn (symbol-function 'shimbun-rss-node-text)) headers xref) (fset 'shimbun-rss-node-text (lambda (namespace local-name element) (if (eq local-name 'author) "罕域腓丞ぞ筝 鐚居自" (funcall fn namespace local-name element)))) (unwind-protect (setq headers (shimbun-rss-get-headers shimbun range t)) (fset 'shimbun-rss-node-text fn)) (dolist (header headers (shimbun-sort-headers headers)) (when (and (zerop (length (shimbun-header-date header))) (setq xref (shimbun-header-xref header)) (string-match "\ /\\(20[1-9][0-9]\\)\\([01][0-9]\\)\\([0-3][0-9]\\)[0-9][0-9]\\.html\\'" xref)) (shimbun-header-set-date header (shimbun-make-date-string (string-to-number (match-string 1 xref)) (string-to-number (match-string 2 xref)) (string-to-number (match-string 3 xref)))))))) (luna-define-method shimbun-clear-contents :around ((shimbun shimbun-kyoko-np) header) (when (and (search-forward "
    " nil t) (shimbun-end-of-tag "article" t)) (delete-region (match-end 3) (goto-char (point-max))) (insert "\n") (delete-region (goto-char (point-min)) (match-beginning 3)) (when (and (re-search-forward "]+[\t\n ]+\\)*\ class=\"app[\t\n ]+text-center\"" nil t) (shimbun-end-of-tag "div" t) (progn (narrow-to-region (match-beginning 0) (match-end 0)) (goto-char (match-beginning 3)) (search-forward "href=\"https://itunes.apple.com/jp/app/" nil t))) (delete-region (point-min) (point-max)) (insert "\n")) (widen) (unless (memq (shimbun-japanese-hankaku shimbun) '(header subject nil)) (shimbun-japanese-hankaku-buffer t)) t)) (luna-define-method shimbun-footer :around ((shimbun shimbun-kyoko-np) header &optional html) (concat "
    \n-- 
    \n\ 荐篋茫御┤罕域腓障絽医障у障\n
    \n")) (provide 'sb-kyoko-np) ;;; sb-kyoko-np.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-laut-de.el000066400000000000000000000044721434375002100213070ustar00rootroot00000000000000;;; sb-laut-de.el --- shimbun backend for ;; Copyright (C) 2004, 2005, 2006, 2010 ;; Andreas Seltenreich ;; Author: Andreas Seltenreich ;; Keywords: news ;; Created: May 23, 2004 ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-laut-de (shimbun-rss) ()) (defvar shimbun-laut-de-groups '("news" "platten" "platten_alternative" "platten_dance" "platten_hiphop" "platten_jazz" "platten_metal" "platten_pop" "platten_rnb" "platten_rock")) (defvar shimbun-laut-de-content-start (concat "\\|" "]*>\\|" "")) (defvar shimbun-laut-de-content-end (concat "\\|" "\\|" "")) (defvar shimbun-laut-de-from-address "redaktion@laut.de") (luna-define-method shimbun-groups ((shimbun shimbun-laut-de)) shimbun-laut-de-groups) (luna-define-method shimbun-index-url ((shimbun shimbun-laut-de)) (concat "http://www.laut.de/partner/allgemein/" (shimbun-current-group-internal shimbun) ".rdf")) (luna-define-method shimbun-clear-contents :after ((shimbun shimbun-laut-de) header) (shimbun-remove-tags "script" t) (shimbun-remove-tags "") (shimbun-remove-tags "]+\\(?:width=\"1\"\\|height=\"1\"\\)[^>]*>") (shimbun-remove-tags "\\(a\\) href=\"[^\"]+lautshop_preisvergleich_detail.php" t)) (provide 'sb-laut-de) ;;; sb-laut-de.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-linuxce-jp.el000066400000000000000000000024331434375002100220250ustar00rootroot00000000000000;;; sb-linuxce-jp.el --- shimbun backend for linuxce-jp ML ;; Copyright (C) 2001 TSUCHIYA Masatoshi ;; Author: TSUCHIYA Masatoshi ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; This is shimbun backend for linuxce-jp ML. ;;; Code: (require 'shimbun) (require 'sb-fml) (luna-define-class shimbun-linuxce-jp (shimbun-fml) ()) (defvar shimbun-linuxce-jp-url "http://www.peanuts.gr.jp/~kei/ml-archive/") (defvar shimbun-linuxce-jp-groups '("users")) (provide 'sb-linuxce-jp) ;;; sb-linuxce-jp.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-lotusex.el000066400000000000000000000171001434375002100214470ustar00rootroot00000000000000;;; sb-lotusex.el --- shimbun backend for http://tsuruo.dominohosting.biz ;; Copyright (C) 2003, 2004, 2019 NAKAJIMA Mikio ;; Author: NAKAJIMA Mikio ;; Keywords: news ;; Created: May. 22, 2003 ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (luna-define-class shimbun-lotusex (shimbun) ()) (defconst shimbun-lotusex-url "http://tsuruo.dominohosting.biz/members/tsuruo/") (defvar shimbun-lotusex-groups-alist '( ("news" . "notes/nhome.nsf/PlainAllPage!OpenPage") ;;若若帥若拷喝絎 ("library" . "notes/nhome.nsf/LiblaryPage!OpenPage") ;; 若篏絎 ("operation" . "notes/nhome.nsf/OperatePage!OpenPage") ;; 若若帥若剛莇ラ茗綺 ("primer" . "notes/nhome.nsf/PrimerPage!OpenPage") ;; 若茵絎 ("tips" . "notes/nhome.nsf/TipsPage!OpenPage") ;; 若羇紫腥九 ("practical" . "notes/nhome.nsf/PracticalPage!OpenPage") ;; 若喝蕕莖鎘 ("qanda" . "notes/nhome.nsf/QuestionPage!OpenPage") ;; 若喝蕕篌絎 ("lounge" . "notes/nhome.nsf/RestPage!OpenPage") ;; 若喝蕕紊紕鐚WEB鐚 ("bbs") )) (defvar shimbun-lotusex-groups (mapcar 'car shimbun-lotusex-groups-alist)) (defvar shimbun-lotusex-from-address "webmaster@tsuruo.dominohosting.biz") (defvar shimbun-lotusex-coding-system 'iso-2022-jp) (defvar shimbun-lotusex-content-start "]+>") (defvar shimbun-lotusex-content-end "
    ]+>") (defun shimbun-lotusex-make-date-string (date-string &optional time) (when (string-match "\\([0-9]+\\)/\\([0-9]+\\)/\\([0-9]+\\)" date-string) (shimbun-make-date-string (string-to-number (match-string-no-properties 1 date-string)) (string-to-number (match-string-no-properties 2 date-string)) (string-to-number (match-string-no-properties 3 date-string)) time))) ;;(luna-define-method shimbun-reply-to ((shimbun shimbun-lotusex)) ;; (shimbun-from-address-internal shimbun)) (luna-define-method shimbun-index-url ((shimbun shimbun-lotusex)) (let ((group (shimbun-current-group-internal shimbun))) (if (not (string= group "bbs")) (concat shimbun-lotusex-url (cdr (assoc group shimbun-lotusex-groups-alist))) "http://d.dominodeveloper.net/members/tsuruo/bbs/NotesBBS.nsf/wMainViewPage!OpenPage"))) (luna-define-method shimbun-get-headers ((shimbun shimbun-lotusex) &optional outbuf) (let ((group (shimbun-current-group-internal shimbun))) (if (string= group "bbs") (shimbun-lotusex-bbs-headers shimbun) (shimbun-lotusex-headers shimbun group)))) (defun shimbun-lotusex-bbs-headers (shimbun) (let (url from date subject end time ampm id headers case-fold-search) (subst-char-in-region (point-min) (point-max) ?\t ? t) (goto-char (point-min)) (catch 'exit (while (re-search-forward "\\([0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]\\)(\\(\\|\\|羂\\|\\|\\|\\|\\))" nil t nil) (setq date (match-string-no-properties 1)) (save-excursion (setq end (or (re-search-forward "\\([0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]\\)(\\(\\|\\|羂\\|\\|\\|\\|\\))" nil t nil) (point-max)))) (while (re-search-forward " *\\[[0-9]+\\]\\(.+\\)\\[ +\\(.+\\) +,\\([0-9][0-9]:[0-9][0-9]\\) \\(AM\\|PM\\) ]" end t nil) (setq url (concat "http://d.dominodeveloper.net" (match-string-no-properties 1)) subject (match-string-no-properties 2) from (match-string-no-properties 3) time (match-string-no-properties 4) ampm (match-string-no-properties 5) id (format "<%s%%%s%%%s@lotusex>" date (when (string-match "\\/\\([a-zA-Z0-9]+\\)\\!OpenDocument" url) (match-string 1 url)) "bbs")) (when (shimbun-search-id shimbun id) (throw 'exit nil)) (when (and (string= ampm "PM") (string-match ":" time)) (setq time (format "%2d:%s" (+ (string-to-number (substring time 0 (match-beginning 0))) 12) (substring time (match-end 0))))) (when (string-match "\\` +\\(.+\\)" subject) (setq subject (match-string 1 subject))) (when (string-match "\\`\\(.+\\) +\\'" subject) (setq subject (match-string 1 subject))) (when (string-match "\\` +\\(.+\\)" from) (setq from (match-string 1 from))) (when (string-match "\\`\\(.+\\) +\\'" from) (setq from (match-string 1 from))) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) (shimbun-mime-encode-string from) (shimbun-lotusex-make-date-string date time) id "" 0 0 url) headers)))) headers)) (defun shimbun-lotusex-headers (shimbun group) (let (url from date subject id headers case-fold-search) (subst-char-in-region (point-min) (point-max) ?\t ? t) (goto-char (point-min)) (catch 'exit (while (re-search-forward "[0-9A-Z]+\\(.+\\)(\\([0-9]+/[0-9]+/[0-9]+\\)) *\\(- .+\\)?" nil t nil) (setq url (match-string-no-properties 1) subject (match-string-no-properties 2) from shimbun-lotusex-from-address date (match-string-no-properties 3) subject (concat subject (match-string-no-properties 4)) id (format "<%s%%%s%%%s@lotusex>" date (when (string-match "\\/\\([a-zA-Z0-9]+\\)\\!OpenDocument" url) (match-string 1 url)) group)) (when (shimbun-search-id shimbun id) (throw 'exit nil)) (setq date (shimbun-lotusex-make-date-string date) url (concat shimbun-lotusex-url url)) (when (string-match "\\` +\\(.+\\)" subject) (setq subject (match-string 1 subject))) (when (string-match "\\`\\(.+\\) +\\'" subject) (setq subject (match-string 1 subject))) (when (string-match "\\` +\\(.+\\)" from) (setq from (match-string 1 from))) (when (string-match "\\`\\(.+\\) +\\'" from) (setq from (match-string 1 from))) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) (shimbun-mime-encode-string from) date id "" 0 0 url) headers))) headers)) (luna-define-method shimbun-make-contents :before ((shimbun shimbun-lotusex) header) (shimbun-lotusex-make-contents shimbun header)) (defun shimbun-lotusex-make-contents (shimbun header) (let ((group (shimbun-current-group-internal shimbun)) start) (when (string= group "bbs") (save-excursion (goto-char (point-min)) (when (and (re-search-forward "^" nil t) (setq start (point)) (re-search-forward "^$" nil t)) (delete-region (match-beginning 0) (point-max)) (delete-region (point-min) start)))))) (provide 'sb-lotusex) ;;; sb-lotusex.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-lump.el000066400000000000000000000052401434375002100207230ustar00rootroot00000000000000;;; sb-lump.el --- shimbun backend class to check all groups at once ;; Copyright (C) 2001, 2002, 2022 Yuuichi Teranishi ;; Author: TSUCHIYA Masatoshi , ;; Yuuichi Teranishi ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was nnshimbun.el written by ;; TSUCHIYA Masatoshi . ;;; Code: (require 'shimbun) (defvar shimbun-lump-check-interval 300) (eval-and-compile (luna-define-class shimbun-lump (shimbun) (group-header-alist last-check check-interval)) (luna-define-internal-accessors 'shimbun-lump)) (defsubst shimbun-lump-check-interval (shimbun) (or (shimbun-lump-check-interval-internal shimbun) shimbun-lump-check-interval)) (defun shimbun-lump-lapse-seconds (time) (time-to-seconds (time-since time))) (defun shimbun-lump-check-p (shimbun) (or (null (shimbun-lump-last-check-internal shimbun)) (and (shimbun-lump-last-check-internal shimbun) (> (shimbun-lump-lapse-seconds (shimbun-lump-last-check-internal shimbun)) (shimbun-lump-check-interval shimbun))))) (defun shimbun-lump-checked (shimbun) (shimbun-lump-set-last-check-internal shimbun (current-time))) (luna-define-generic shimbun-get-group-header-alist (shimbun &optional range) "Return an alist of group and header list.") (luna-define-method shimbun-headers ((shimbun shimbun-lump) &optional range) (when (shimbun-lump-check-p shimbun) (shimbun-lump-set-group-header-alist-internal shimbun (shimbun-get-group-header-alist shimbun range)) (shimbun-lump-checked shimbun)) (cdr (assoc (shimbun-current-group-internal shimbun) (shimbun-lump-group-header-alist-internal shimbun)))) (luna-define-method shimbun-close :after ((shimbun shimbun-lump)) (shimbun-lump-set-group-header-alist-internal shimbun nil) (shimbun-lump-set-last-check-internal shimbun nil)) (provide 'sb-lump) ;;; sb-lump.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-m17n.el000066400000000000000000000066501434375002100205360ustar00rootroot00000000000000;;; sb-m17n.el --- shimbun backend for m17n.org ;; Copyright (C) 2001-2003, 2006, 2009, 2019 ;; Akihiro Arisawa ;; Author: Akihiro Arisawa ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-incf (require 'shimbun) (require 'sb-mhonarc) (luna-define-class shimbun-m17n (shimbun-mhonarc) ()) (defvar shimbun-m17n-url "http://www.m17n.org/mlarchive/") (defconst shimbun-m17n-group-path-alist '(("mule-ja" "mule-ja/" "mule-ja@m17n.org") ("mule" "mule/" "mule@m17n.org"))) (defvar shimbun-m17n-groups (mapcar 'car shimbun-m17n-group-path-alist)) (defvar shimbun-m17n-x-face-alist '(("default" . "X-Face: '>=krMO{M-21~VC2Y-{q4s}ckFG89D`j^w\ :FI[z%_o+'mV,NKiQlN5v9i+<6EuQs\\I!3UB_\n ZY>/Nhd6A?6:B'+zCXV\ tcW.jD{Y&/'K6$ls7r8!M%HnBCV[j;?Vr!3l|dWt%.%Wx8nvzk1+w5Uw6Zb\n\ |?bUC;wOQxjd46p\\MP[x{+0i|lA\\fZ)@4_|!uG;=M\\Y}I&D3dP00O"))) (luna-define-method shimbun-index-url ((shimbun shimbun-m17n)) (shimbun-expand-url (nth 1 (assoc (shimbun-current-group-internal shimbun) shimbun-m17n-group-path-alist)) (shimbun-url-internal shimbun))) (luna-define-method shimbun-reply-to ((shimbun shimbun-m17n)) (nth 2 (assoc (shimbun-current-group-internal shimbun) shimbun-m17n-group-path-alist))) (luna-define-method shimbun-get-headers ((shimbun shimbun-m17n) &optional range) (let ((case-fold-search t) (pages (shimbun-header-index-pages range)) (count 0) headers months) (goto-char (point-min)) (catch 'stop (while (and (if pages (<= (cl-incf count) pages) t) (re-search-forward "" nil t) (push (match-string 1) months))) (setq months (nreverse months)) (dolist (month months) (let ((url (shimbun-expand-url (concat month "/maillist.html") (shimbun-index-url shimbun)))) (erase-buffer) (shimbun-retrieve-url url t) (goto-char (point-max)) (while (re-search-backward "\ \ \\([^<]+\\)\n\
    • From: \\([^<]+\\)" nil t) (let ((id (format "<%s%s%%%s>" month (match-string 1) (shimbun-current-group-internal shimbun))) (xref (shimbun-expand-url (match-string 2) url)) (subject (shimbun-mhonarc-replace-newline-to-space (match-string 3))) (from (shimbun-mhonarc-replace-newline-to-space (match-string 4)))) (if (shimbun-search-id shimbun id) (throw 'stop headers) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) (shimbun-mime-encode-string from) nil id "" 0 0 xref) headers))))))) headers)) (provide 'sb-m17n) ;;; sb-m17n.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-macosx-jp.el000066400000000000000000000030631434375002100216500ustar00rootroot00000000000000;;; sb-macosx-jp.el --- shimbun backend for macosx-jp ;; Copyright (C) 2002 OHASHI Akira ;; Author: OHASHI Akira ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-fml) (luna-define-class shimbun-macosx-jp (shimbun-fml) ()) (defvar shimbun-macosx-jp-url "http://www.tech-arts.co.jp/macosx/") (defvar shimbun-macosx-jp-groups '("macosx-jp" "macosx-dev-jp" "macosx-ws-jp" "webobjects-jp")) (luna-define-method shimbun-index-url ((shimbun shimbun-macosx-jp)) (concat (shimbun-url-internal shimbun) (shimbun-current-group-internal shimbun) "/htdocs/")) (luna-define-method shimbun-reply-to ((shimbun shimbun-macosx-jp)) (concat (shimbun-current-group-internal shimbun) "@ml.tech-arts.co.jp")) (provide 'sb-macosx-jp) ;;; sb-macosx-jp.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-mailarc.el000066400000000000000000000061141434375002100213570ustar00rootroot00000000000000;;; sb-mailarc.el --- shimbun backend class for mailarc ;; Copyright (C) 2002, 2003 Free Software Foundation, Inc. ;; Author: ARISAWA Akihiro ;; Keywords: news ;; This file is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This file is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (luna-define-class shimbun-mailarc (shimbun)) (luna-define-method shimbun-get-headers ((shimbun shimbun-mailarc) &optional range) (let (headers) (catch 'stop (goto-char (point-min)) (while (re-search-forward "
    • \\([0-9]+\\) \\([^<]*\\)\n\n\\([^<]*\\)\n
    • \n" nil t) (let ((id (format "<%s%%%s>" (match-string 1) (shimbun-current-group-internal shimbun))) (url (match-string 2)) (subject (match-string 3)) (from (match-string 4))) (when (shimbun-search-id shimbun id) (throw 'stop headers)) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) (shimbun-mime-encode-string from) "" id "" 0 0 url) headers)))) headers)) (luna-define-method shimbun-make-contents ((shimbun shimbun-mailarc) header) (let (body-end header-start body-start) (goto-char (point-min)) (when (and (setq header-start (search-forward "
      \n" nil t)) (setq body-start (search-forward "
      \n" nil t)) (search-forward "
      \n" nil t)) (set-marker (setq body-end (make-marker)) (match-beginning 0)) ;; parse headers (save-restriction (narrow-to-region header-start body-start) (goto-char (point-min)) (while (re-search-forward "
    • \\([^:]+\\):\n\\([^<]*\\)
    • \n" body-start t) (let ((field (match-string 1)) (value (shimbun-mime-encode-string (match-string 2)))) (cond ((string= field "Subject") (shimbun-header-set-subject header value)) ((string= field "Date") (shimbun-header-set-date header value)) ((string= field "From") (shimbun-header-set-from header value)))))) (delete-region (point-min) body-start) (delete-region (marker-position body-end) (point-max)) (set-marker body-end nil) (goto-char (point-min)) (insert "\n\n\n\n\n") (goto-char (point-max)) (insert "\n\n")) (shimbun-make-mime-article shimbun header) (buffer-string))) (provide 'sb-mailarc) ;;; sb-mailarc.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-mailman.el000066400000000000000000000177621434375002100214000ustar00rootroot00000000000000;;; sb-mailman.el --- shimbun backend class for mailman archiver ;; Copyright (C) 2002, 2003, 2019 NAKAJIMA Mikio ;; Copyright (C) 2002, 2008, 2019 Katsumi Yamaoka ;; Copyright (C) 2005, 2019 Tsuyoshi CHO ;; Authors: NAKAJIMA Mikio , ;; Katsumi Yamaoka , ;; Tsuyoshi CHO ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Mailman is the GNU Mailing List Manager. ;; See http://www.gnu.org/software/mailman/index.html for its detail. ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-incf (require 'shimbun) (luna-define-class shimbun-mailman (shimbun) ()) (defun shimbun-mailman-make-contents (shimbun header) (subst-char-in-region (point-min) (point-max) ?\t ? t) (goto-char (point-min)) (let ((end (search-forward "")) name address) (goto-char (point-min)) (search-forward "") (when (re-search-forward "

      \\([^\n]+\\)\\(\n +\\)?

      " end t nil) (shimbun-header-set-subject header (shimbun-mime-encode-string (match-string 1)))) (when (re-search-forward "\\([^\n]+\\)\\(\n +\\)? *\n +\ \\([^\n]+\\)" end t nil) (setq name (match-string 1) address (match-string 3)) (when (string-match " at " name) (setq name (concat (substring name 0 (match-beginning 0)) "@" (substring name (match-end 0))))) (when (string-match " at " address) (setq address (concat (substring address 0 (match-beginning 0)) "@" (substring address (match-end 0))))) (shimbun-header-set-from header (shimbun-mime-encode-string (concat name " <" address ">"))) (when (re-search-forward "\ \\(?:\\(Sun\\|Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\) \\)?\ \\([^\n]+\\)" end t nil) (if (match-beginning 1) (shimbun-header-set-date header (concat (match-string 1) ", " (match-string 2))) (shimbun-header-set-date header (match-string 2)))) (delete-region (point-min) end) (delete-region (search-forward "") (point-max)) ;; Remove useless hrefs being added to things looking like mail ;; addresses, and restore them to the original. (let ((case-fold-search t)) (goto-char (point-min)) (while (re-search-forward "]+>\\([^<]+\\) at \\([^<]+\\)" nil t) (replace-match "\\1@\\2"))) (shimbun-header-insert-and-buffer-string shimbun header nil t)))) (luna-define-method shimbun-make-contents ((shimbun shimbun-mailman) header) (shimbun-mailman-make-contents shimbun header)) (defun shimbun-mailman-headers (shimbun range) (with-temp-buffer (let* ((index-url (shimbun-index-url shimbun)) (group (shimbun-current-group-internal shimbun)) (suffix (if (string-match "\\`http://\\([^/]+\\)/" index-url) (match-string 1 index-url) index-url)) auxs aux id url subject from headers) (shimbun-retrieve-url (shimbun-expand-url "index.html" index-url) 'reload) (setq case-fold-search t) (let ((pages (shimbun-header-index-pages range)) (count 0)) (while (and (if pages (<= (cl-incf count) pages) t) (re-search-forward "\ " nil t)) (push (match-string 1) auxs))) (setq auxs (nreverse auxs)) (catch 'stop (while auxs (erase-buffer) (shimbun-retrieve-url (shimbun-expand-url (concat (setq aux (car auxs)) "/date.html") index-url) 'reload) (subst-char-in-region (point-min) (point-max) ?\t ? t) (goto-char (point-max)) (while (re-search-backward "
    • \\([^\n]+\\)\n \n *\\([^\n]+\\)\n" nil t) (setq id (format "<%06d.%s@%s>" (string-to-number (match-string 2)) group suffix)) (when (shimbun-search-id shimbun id) (throw 'stop nil)) (setq url (shimbun-expand-url (concat aux "/" (match-string 1)) index-url) subject (match-string 3) from (match-string 4)) (setq subject (with-temp-buffer (insert subject) (shimbun-remove-markup) (shimbun-decode-entities) (buffer-string))) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) (shimbun-mime-encode-string from) "" id "" 0 0 url) headers)) (setq auxs (cdr auxs)))) headers))) (luna-define-method shimbun-headers ((shimbun shimbun-mailman) &optional range) (shimbun-mailman-headers shimbun range)) ;;; Derived class for mailing list archives written in Japanese (luna-define-class shimbun-mailman-ja (shimbun-mailman) ()) (defun shimbun-mailman-ja-make-contents (shimbun header) (subst-char-in-region (point-min) (point-max) ?\t ? t) (goto-char (point-min)) (let ((end (search-forward "")) name address date) (goto-char (point-min)) (search-forward "") (when (re-search-forward "

      \\([^\n]+\\)\\(\n +\\)?

      " end t nil) (shimbun-header-set-subject header (shimbun-mime-encode-string (match-string 1)))) (when (re-search-forward "\\([^\n]+\\)\\(\n +\\)? *\n +\ \\([^\n]+\\)" end t nil) (setq name (match-string 1) address (match-string 3)) ;; Yoshiki.Ohshima 鐚 acm.org (when (string-match " \\(鐚\\|at\\) " name) (setq name (concat (substring name 0 (match-beginning 0)) "@" (substring name (match-end 0))))) (when (string-match " \\(鐚\\|at\\) " address) (setq address (concat (substring address 0 (match-beginning 0)) "@" (substring address (match-end 0))))) (shimbun-header-set-from header (shimbun-mime-encode-string (concat name " <" address ">"))) (when (re-search-forward "\\([0-9][0-9][0-9][0-9]\\)綛\ *\\([0-9][0-9]*\\)\ *\\([0-9][0-9]*\\)\ (\\(\\|\\|羂\\|\\|\\|\\|\\))\ \\([:0-9]+\\)\ \\([A-Z]+\\)" end t nil) ;; Sat, 12 Apr 2003 17:29:51 +0900 (JST) ;; mailman original ;; 2003綛 4 11 () 02:43:25 CEST ;; squeak-ja (setq date (shimbun-make-date-string (string-to-number (match-string-no-properties 1)) (string-to-number (match-string-no-properties 2)) (string-to-number (match-string-no-properties 3)) (match-string-no-properties 5) (match-string-no-properties 6))) (shimbun-header-set-date header date)) (delete-region (point-min) end) (delete-region (search-forward "") (point-max)) ;; Remove useless hrefs being added to things looking like mail ;; addresses, and restore them to the original. (let ((case-fold-search t)) (goto-char (point-min)) (while (re-search-forward "\ ]+>\\([^<]+\\) \\(?:鐚\\|at\\) \\([^<]+\\)" nil t) (replace-match "\\1@\\2"))) (shimbun-header-insert-and-buffer-string shimbun header nil t)))) (luna-define-method shimbun-make-contents ((shimbun shimbun-mailman-ja) header) (shimbun-mailman-ja-make-contents shimbun header)) (provide 'sb-mailman) ;;; sb-mailman.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-mainichi.el000066400000000000000000000545441434375002100215420ustar00rootroot00000000000000;;; sb-mainichi.el --- shimbun backend for Mainichi jp ;; Copyright (C) 2001-2009, 2011-2013, 2015-2019, 2021 ;; Koichiro Ohba ;; Author: Koichiro Ohba ;; Katsumi Yamaoka ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was sb-yomiuri.el which is written by ;; TSUCHIYA Masatoshi and ;; Yuuichi Teranishi ;;; Code: (require 'sb-rss) (require 'sb-multi) (luna-define-class shimbun-mainichi (shimbun-japanese-newspaper shimbun-multi shimbun-rss) ()) (defvar shimbun-mainichi-url "https://mainichi.jp/") (defvar shimbun-mainichi-top-level-domain "mainichi.jp") (defvar shimbun-mainichi-server-name "罸ユ域") (defvar shimbun-mainichi-prefer-text-plain nil "*Non-nil means prefer text/plain articles rather than html articles.") (defvar shimbun-mainichi-ignored-subject "\\`PR: ") (luna-define-method initialize-instance :after ((shimbun shimbun-mainichi) &rest init-args) (shimbun-rss-initialize-ignored-subject shimbun)) (defvar shimbun-mainichi-group-table '(("flash" "ャ若拷(膩)" "https://mainichi.jp/rss/etc/mainichi-flash.rss") ("sports" "鴻若" "https://mainichi.jp/rss/etc/mainichi-sports.rss") ("entertainment" "潟帥" "https://mainichi.jp/rss/etc/mainichi-enta.rss") ("opinion" "腓乗肢В茯祉潟" "https://mainichi.jp/rss/etc/opinion.rss") ;; Non-RSS groups. ("opinion.editorial" "腓乗" "https://mainichi.jp/editorial/") ("opinion.yoroku" "篏" "https://mainichi.jp/yoroku/") ("opinion.hasshinbako" "坂拭膊" "https://mainichi.jp/hasshinbako/") ("opinion.eye" "荐" "https://mainichi.jp/kishanome/") ("opinion.hito" "蚊" "https://mainichi.jp/hito/") ("opinion.kinji" "菴篋" "https://mainichi.jp/kinji/") ("opinion.yuraku" "罐遵験" "https://mainichi.jp/yurakucho/") ("opinion.jidainokaze" "篁c蘂" "https://mainichi.jp/jidainokaze/") ("entertainment.art" "梧紙" "https://mainichi.jp/art/") ("fuchisou" "蘂ヨ" "http://mainichi.jp/fuchisou/"))) (defvar shimbun-mainichi-x-face-alist '(("default" . "\ Face: iVBORw0KGgoAAAANSUhEUgAAABwAAAAcBAMAAACAI8KnAAAABGdBTUEAALGPC/xhBQAAABh QTFRFC2zfDGzfEnDgJn3iU5fnj7vvzuH4+vz++nlsOQAAAC90RVh0U29mdHdhcmUAWFYgVmVyc2l vbiAzLjEwYStGTG1hc2sgIFJldjogMTIvMjkvOTQbx6p8AAABA0lEQVR4nGWRPW+DMBiED5vuqK0 60yppVwQ0rFTYZo348poSA3uDzd/vCxNNT14en1/5zgZYEoCF69rk2zhWPR6GADwCl864tsaHFUJ dweTJuMcQZZ0kRQxkqnaHik2DbBwdVuPgtPG7WTcuhPdshdM5f7lp4SpyXUPoazu1i6HZpbY6R3a ZhAW8ztmZsDxPqf0Cb6zsVzQjJQA/2GNE2OWHbqaQvEggI7wFfOmxk1esLUL2GrJg2yBkrTSDqvB eJKmhqtNpttk3sllICskmdbXlGdkPNcd/TIuuvOxcM65IsxvSa2Q79w7V8AfL2u1nY9ZquuiWfK7 1BSVNQzxF9B+40y/ui1KdNxt0ugAAAAd0SU1FB9QEDQAjJMA7GTQAAAAASUVORK5CYII="))) (defvar shimbun-mainichi-expiration-days 7) ;; The login stuff no longer works; it now requires to run java-script. ;;(defvar shimbun-mainichi-login-url "https://mainichi.jp/auth/login.php" ;; "*Url base to login to mainichi.jp.") ;;(defvar shimbun-mainichi-logout-url "https://mainichi.jp/auth/logout.php" ;; "*Url base to logout from mainichi.jp.") ;;(defcustom shimbun-mainichi-login-name nil ;; "Login name used to login to mainichi.jp. ;;To use this, set both `w3m-use-cookies' and `w3m-use-form' to t." ;; :group 'shimbun ;; :type '(choice (const :tag "None" nil) (string :tag "User name"))) ;;(defcustom shimbun-mainichi-login-password nil ;; "Password used to login to mainichi.jp. ;;To use this, set both `w3m-use-cookies' and `w3m-use-form' to t." ;; :group 'shimbun ;; :type '(choice (const :tag "None" nil) (string :tag "Password"))) (luna-define-method shimbun-groups ((shimbun shimbun-mainichi)) (mapcar 'car shimbun-mainichi-group-table)) (luna-define-method shimbun-current-group-name ((shimbun shimbun-mainichi)) (nth 1 (assoc (shimbun-current-group-internal shimbun) shimbun-mainichi-group-table))) (luna-define-method shimbun-index-url ((shimbun shimbun-mainichi)) (nth 2 (assoc (shimbun-current-group-internal shimbun) shimbun-mainichi-group-table))) (luna-define-method shimbun-headers :around ((shimbun shimbun-mainichi) &optional range) (if (string-match "\\.rss\\'" (shimbun-index-url shimbun)) ;; Use the function defined in sb-rss.el. (luna-call-next-method) ;; Use the default function defined in shimbun.el. (funcall (intern "shimbun-headers" (luna-class-obarray (luna-find-class 'shimbun))) shimbun range))) (luna-define-method shimbun-get-headers :around ((shimbun shimbun-mainichi) &optional range) (let ((from (concat shimbun-mainichi-server-name " (" (shimbun-current-group-name shimbun) ")")) (group (shimbun-current-group-internal shimbun)) headers) (cond ((string-match "\\.rss\\'" (shimbun-index-url shimbun)) (shimbun-strip-cr) (goto-char (point-min)) (while (and (search-forward "<![CDATA[AD:" nil t) (re-search-backward "<item[\t\n ]*" nil t) (shimbun-end-of-tag "item" t)) (replace-match "\n")) (dolist (header (setq headers (luna-call-next-method)) headers) (shimbun-header-set-from header from))) ((string-equal group "fuchisou") (shimbun-mainichi-get-headers-fuchisou shimbun range from)) (t (shimbun-mainichi-get-headers shimbun range from))))) (luna-define-method shimbun-rss-build-message-id :around ((shimbun shimbun-mainichi) url &optional date) ;; Don't strip string following "?" or "#" in url. See sb-rss.el. (concat "<" (md5 url) "%" (shimbun-current-group shimbun) "@" (shimbun-server shimbun) ".shimbun.namazu.org>")) (defun shimbun-mainichi-get-headers-fuchisou (shimbun range from) "Get headers for the fuchisou groups." (let ((rgrp (mapconcat 'identity (nreverse (split-string (shimbun-current-group-internal shimbun) "\\.")) ".")) (count 0) (index (shimbun-index-url shimbun)) (pages (shimbun-header-index-pages range)) end id headers indices idx) (catch 'stop (while t (shimbun-strip-cr) (goto-char (point-min)) (when (and (or (search-forward "<!--<h2>違荐篋</h2>-->" nil t) (search-forward "<!--| main-box BGN |-->" nil t)) (re-search-forward "\ <ul[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*class=\"list-typeD\"" nil t) (shimbun-end-of-tag "ul")) (goto-char (match-beginning 0)) (setq end (match-end 0)) (while (re-search-forward (eval-when-compile (concat "<a[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*href=\"" ;; 1. url "\\(\\(?://?[^\"/>]+\\)*/articles/" ;; 2. serial number "\\(" ;; 3. year "m?\\(20[0-9][0-9]\\)" ;; 4. month "\\([01][0-9]\\)" ;; 5. day "\\([0-3][0-9]\\)" "[^\".]+\\)\\)\"" "[^>]*>\\(?:[\t\n ]*<[^>]+>\\)*[\t\n ]*" ;; 6. subject "\\([^<]+\\)")) end t) (setq id (concat "<" (mapconcat 'identity (save-match-data (nreverse (split-string (match-string 2) "/"))) ".") "." rgrp "%" shimbun-mainichi-top-level-domain ">")) (if (shimbun-search-id shimbun id) (unless (zerop count) (throw 'stop nil)) (push (shimbun-create-header 0 (match-string 6) from (shimbun-make-date-string (string-to-number (match-string 3)) (string-to-number (match-string 4)) (string-to-number (match-string 5))) id "" 0 0 (shimbun-expand-url (match-string 1) index)) headers)))) (push index indices) (if (and (or (not pages) (< (setq count (1+ count)) pages)) (progn (goto-char (point-min)) (re-search-forward "\ <div[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*class=\"pager\"" nil t)) (shimbun-end-of-tag "div") (progn (setq end (match-beginning 0) idx nil) (while (and (not idx) (re-search-backward "\ <a[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*href=\"\\([^\"]+/[0-9]+\\)\"" end t)) (when (member (setq idx (shimbun-expand-url (match-string 1) index)) indices) (setq idx nil))) idx)) (progn (setq index idx) (erase-buffer) (shimbun-fetch-url shimbun index t) (goto-char (point-min))) (throw 'stop nil)))) headers)) (defun shimbun-mainichi-get-headers (shimbun range from) "Get headers for non-RSS groups." (let ((rgrp (mapconcat 'identity (nreverse (split-string (shimbun-current-group-internal shimbun) "\\.")) ".")) (count 0) (index (shimbun-index-url shimbun)) (pages (shimbun-header-index-pages range)) end id headers indices idx) (catch 'stop (while t (shimbun-strip-cr) (goto-char (point-min)) (when (and (re-search-forward "\ <section[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*class=\"newslist\"" nil t) (shimbun-end-of-tag "section")) (goto-char (match-beginning 0)) (setq end (match-end 0)) (while (re-search-forward (eval-when-compile (concat "<a[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*href=\"" ;; 1. url "\\([^\"]+/" ;; 2. serial number "\\(" ;; 3. year "m?\\(20[0-9][0-9]\\)" ;; 4. month "\\([01][0-9]\\)" ;; 5. day "\\([0-3][0-9]\\)" "[^\".]+\\)\\)\"" "\\(?:[\t\n ]+[^\t\n >]+\\)*[\t\n ]*>[\t\n ]*" "\\(?:<[^>]+>[\t\n ]*\\)*" ;; 6. subject "\\([^<]+\\)")) end t) (setq id (concat "<" (subst-char-in-string ?/ ?. (match-string 2)) "." rgrp "%" shimbun-mainichi-top-level-domain ">")) (if (shimbun-search-id shimbun id) (unless (zerop count) (throw 'stop nil)) (push (shimbun-create-header 0 (match-string 6) from (shimbun-make-date-string (string-to-number (match-string 3)) (string-to-number (match-string 4)) (string-to-number (match-string 5))) id "" 0 0 (shimbun-expand-url (match-string 1) index)) headers)))) (push index indices) (if (and (or (not pages) (< (setq count (1+ count)) pages)) (progn (goto-char (point-min)) (re-search-forward "\ <div[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*class=\"CalendarBar\"" nil t)) (shimbun-end-of-tag "div") (progn (setq end (match-beginning 0) idx nil) (while (and (not idx) (re-search-backward "\ <a[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*href=\"\\([^\"]+\\)\"" end t)) (when (member (setq idx (shimbun-expand-url (match-string 1) index)) indices) (setq idx nil))) idx)) (progn (setq index idx) (erase-buffer) (shimbun-fetch-url shimbun index t) (goto-char (point-min))) (throw 'stop nil)))) headers)) (luna-define-method shimbun-multi-next-url ((shimbun shimbun-mainichi) header url) (shimbun-mainichi-multi-next-url shimbun header url)) (defun shimbun-mainichi-multi-next-url (shimbun header url) (goto-char (point-min)) ;; Replace this article with the full one. (when (re-search-forward "\ <span[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*class=\"More\"[^<]+\ <a[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*href=\"\\([^\"]+\\)\"[^>]*>\ [\t\n ]*膓茯[\t\n ]*</a>[\t\n ]*</span>" nil t) (let ((orig (buffer-string))) (unless (shimbun-fetch-url shimbun (prog1 (match-string 1) (erase-buffer))) (erase-buffer) (insert orig))) (goto-char (point-min))) (let (end) (when (and (or (and (re-search-forward "\ <nav[\t\n ]\\(?:[^\t\n >]+[\t\n ]+\\)*id=\"SearchPageAutoWrap\"" nil t) (shimbun-end-of-tag "nav")) (progn (goto-char (point-min)) (and (re-search-forward "\ <ul[\t\n ]\\(?:[^\t\n >]+[\t\n ]+\\)*class=\"SearchPageWrap clr\"" nil t) (shimbun-end-of-tag "ul")))) (progn (goto-char (match-beginning 0)) (setq end (match-end 0)) (re-search-forward "\ <li[\t\n ]\\(?:[^\t\n >]+[\t\n ]+\\)*class=\"PageSelect\"" end t)) (re-search-forward "\ <a[\t\n ]\\(?:[^\t\n >]+[\t\n ]+\\)*href=\"\\([^\"]+\\)" end t)) (shimbun-expand-url (match-string 1) url)))) (luna-define-method shimbun-clear-contents :around ((shimbun shimbun-mainichi) header) (shimbun-mainichi-clear-contents shimbun header)) (defun shimbun-mainichi-clear-contents (shimbun header) (shimbun-strip-cr) (goto-char (point-min)) (if (and (re-search-forward "<section[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*\ class=\"articledetail-body\\(?: is-mustpay\\)?\"" nil t) (shimbun-end-of-tag "section")) (let ((group (shimbun-current-group-internal shimbun)) (hankaku (shimbun-japanese-hankaku shimbun)) regexp) (delete-region (match-end 2) (point-max)) (delete-region (point-min) (goto-char (match-beginning 2))) (while (and (re-search-forward "<img[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*\ class=\"lazyload\"" nil t) (shimbun-end-of-tag)) (save-restriction (narrow-to-region (goto-char (match-beginning 0)) (match-end 0)) (when (re-search-forward "[\t\n ]+\\(data-\\)src=\"[^\">]+\"" nil t) (goto-char (point-min)) (save-match-data (when (re-search-forward "[\t\n ]+src=\"[^\">]+\"" nil t) (delete-region (match-beginning 0) (match-end 0)))) (delete-region (match-beginning 1) (match-end 1))))) (goto-char (point-min)) (while (and (re-search-forward "<div[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*\ class=\"articledetail-video\"" nil t) (shimbun-end-of-tag "div")) (delete-region (match-beginning 0) (match-end 0))) (goto-char (point-min)) (while (and (search-forward "<figcaption>" nil t) (shimbun-end-of-tag "figcaption")) (delete-region (match-beginning 0) (match-end 0))) (goto-char (point-min)) (while (and (re-search-forward "<a[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*\ class=\"articledetail-image-scale\"" nil t) (shimbun-end-of-tag "a")) (delete-region (match-beginning 0) (match-end 0))) (when (string-equal group "opinion.yoroku") (goto-char (point-min)) (while (search-forward "" nil t) (replace-match "</p><p>"))) ;; Convert Japanese zenkaku ASCII chars into hankaku. (when (and hankaku (not (memq hankaku '(header subject)))) (shimbun-japanese-hankaku-buffer t)) (if (shimbun-prefer-text-plain-internal shimbun) (progn ;; Replace image tags with text. (goto-char (point-min)) (while (and (re-search-forward "\\(<img[\t\n ]+\ \\(?:[^\t\n >]+[\t\n ]+\\)*alt=\"\\)[^\"]+" nil t) (shimbun-end-of-tag nil t)) (replace-match "\n<>\n")))) t) ;; (erase-buffer) ;; (insert "<html><body>\ ;;荐篋障<br>\n\ ;;(育絽吾違綵√篏帥c<br>\n\ ;; 障緇紊掩障)</body></html>\n") nil)) (luna-define-method shimbun-multi-clear-contents :around ((shimbun shimbun-mainichi) header has-previous-page has-next-page) (shimbun-mainichi-multi-clear-contents shimbun header has-previous-page has-next-page)) (defun shimbun-mainichi-multi-clear-contents (shimbun header has-previous-page has-next-page) (when (luna-call-next-method) (when has-previous-page (goto-char (point-min)) (insert " \n")) t)) (eval-when-compile (require 'w3m-cookie) (require 'w3m-form)) ;;(autoload 'password-cache-add "password-cache") ;;(autoload 'password-read-from-cache "password-cache") ;;(defun shimbun-mainichi-login (&optional name password interactive-p) ;; "Login to mainichi.jp with NAME and PASSWORD. ;;NAME and PASSWORD default to `shimbun-mainichi-login-name' and ;;`shimbun-mainichi-login-password' respectively. `password-data', if ;;cached, overrides `shimbun-mainichi-login-password'. If the prefix ;;argument is given, you will be prompted for new NAME and PASSWORD." ;; (interactive (let ((pass (copy-sequence shimbun-mainichi-login-password)) ;; name default password) ;; (unless (and w3m-use-cookies w3m-use-form) ;; (error "\ ;;You should set `w3m-use-cookies' and `w3m-use-form' to non-nil")) ;; (setq name (if current-prefix-arg ;; (completing-read ;; "Login name: " ;; (cons shimbun-mainichi-login-name nil) ;; nil nil shimbun-mainichi-login-name) ;; shimbun-mainichi-login-name)) ;; (when (and name (string-match "\\`[\t ]*\\'" name)) ;; (setq name nil)) ;; (setq default (and name ;; (or (password-read-from-cache name) ;; ;; `password-cache' will expire ;; ;; the password by filling it with ;; ;; C-@'s, so we use a copy of ;; ;; the original. ;; (copy-sequence ;; shimbun-mainichi-login-password))) ;; password (and name ;; (if current-prefix-arg ;; (read-passwd ;; (concat "Password" ;; (when default ;; (concat " (default " ;; (make-string ;; (length default) ;; ?*) ;; ")")) ;; ": ") ;; nil default) ;; default))) ;; (when (and password (string-match "\\`[\t ]*\\'" password)) ;; (setq name nil ;; password nil)) ;; (list name password t))) ;; (unless interactive-p ;; (if (or name (setq name shimbun-mainichi-login-name)) ;; (or password ;; (setq password ;; (or (password-read-from-cache name) ;; (copy-sequence shimbun-mainichi-login-password))) ;; (setq name nil)) ;; (setq password nil))) ;; (if (not (and w3m-use-cookies w3m-use-form name password)) ;; (when interactive-p (message "Quit")) ;; (require 'w3m-cookie) ;; (require 'w3m-form) ;; (let ((cache (buffer-live-p w3m-cache-buffer)) ;; (num 0) ;; temp form plist val uid pass handler) ;; (condition-case err ;; (w3m-process-do-with-temp-buffer ;; (type (progn ;; (setq temp (current-buffer)) ;; (w3m-retrieve shimbun-mainichi-url nil t))) ;; (if (not type) ;; (when interactive-p (message "Failed to login")) ;; (goto-char (point-min)) ;; (if (not (re-search-forward ;; "<a[\t\n ]+href=\"/auth/login\\.php\\?url=" ;; nil t)) ;; (when interactive-p (message "Already logged in")) ;; (erase-buffer) ;; (set-buffer-multibyte t) ;; (w3m-process-with-wait-handler ;; (w3m-retrieve-and-render ;; (concat shimbun-mainichi-login-url "?url=" ;; (shimbun-url-encode-string shimbun-mainichi-url)) ;; t nil nil shimbun-mainichi-url handler)) ;; (setq form (car w3m-current-forms)) ;; (if (not (string-match "/auth\\.mainichi\\.co\\.jp/" ;; (w3m-form-action form))) ;; (when interactive-p ;; (message "Already logged in")) ;; (setq plist (w3m-form-plist form)) ;; (while (and (not (and uid pass)) (setq val (pop plist))) ;; (if (numberp val) ;; (setq num (max num val)) ;; (when (eq (car val) :value) ;; (setq val (cadr val)) ;; (cond ((string-equal "uidemail" (car val)) ;; (setcdr val name) ;; (setq uid t)) ;; ((string-equal "password" (car val)) ;; (setcdr val password) ;; (setq pass t)))))) ;; (unless uid ;; (nconc (setq plist (w3m-form-plist form)) ;; (list (setq num (1+ num)) ;; (list :value (cons "uidemail" name))))) ;; (unless pass ;; (nconc (or plist (w3m-form-plist form)) ;; (list (setq num (1+ num)) ;; (list :value (cons "password" password))))) ;; (erase-buffer) ;; (w3m-process-with-wait-handler ;; (w3m-retrieve-and-render ;; (w3m-form-action form) t nil ;; (w3m-form-make-form-data form) ;; shimbun-mainichi-login-url handler)) ;; (if (not (string-equal w3m-current-url shimbun-mainichi-url)) ;; (when interactive-p (message "Failed to login")) ;; (when interactive-p (message "Logged in")) ;; (password-cache-add name password) ;; (when w3m-cookie-save-cookies (w3m-cookie-save)))))) ;; (when (get-buffer " *w3m-cookie-parse-temp*") ;; (kill-buffer (get-buffer " *w3m-cookie-parse-temp*"))) ;; (unless cache (w3m-cache-shutdown))) ;; (error (if (or interactive-p debug-on-error) ;; (signal (car err) (cdr err)) ;; (message "Error while logging in to mainichi.jp:\n %s" ;; (error-message-string err)) ;; (when (buffer-live-p temp) (kill-buffer temp)))))))) ;;(defun shimbun-mainichi-logout (&optional interactive-p) ;; "Logout from mainichi.jp." ;; (interactive (list t)) ;; (require 'w3m-cookie) ;; (require 'w3m-form) ;; (let ((cache (buffer-live-p w3m-cache-buffer)) ;; temp handler) ;; (condition-case err ;; (w3m-process-do-with-temp-buffer ;; (type (progn ;; (setq temp (current-buffer)) ;; (w3m-retrieve shimbun-mainichi-url nil t))) ;; (if (not type) ;; (when interactive-p (message "Failed to logout")) ;; (goto-char (point-min)) ;; (if (not (re-search-forward ;; "<a[\t\n ]+href=\"/auth/logout\\.php\\?url=" ;; nil t)) ;; (when interactive-p (message "Already logged out")) ;; (erase-buffer) ;; (set-buffer-multibyte t) ;; (w3m-process-with-wait-handler ;; (w3m-retrieve-and-render ;; (concat shimbun-mainichi-logout-url "?url=" ;; (shimbun-url-encode-string shimbun-mainichi-url)) ;; t nil nil shimbun-mainichi-url handler)) ;; (if (not (string-equal w3m-current-url shimbun-mainichi-url)) ;; (when interactive-p (message "Failed to logout")) ;; (when interactive-p (message "Logged out")) ;; (when w3m-cookie-save-cookies (w3m-cookie-save))))) ;; (when (get-buffer " *w3m-cookie-parse-temp*") ;; (kill-buffer (get-buffer " *w3m-cookie-parse-temp*"))) ;; (unless cache (w3m-cache-shutdown))) ;; (error (if (or interactive-p debug-on-error) ;; (signal (car err) (cdr err)) ;; (message "Error while logging out from mainichi.jp:\n %s" ;; (error-message-string err)) ;; (when (buffer-live-p temp) (kill-buffer temp))))))) ;;(shimbun-mainichi-login) (provide 'sb-mainichi) ;;; sb-mainichi.el ends here ������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-makanai.el���������������������������������������������������0000664�0000000�0000000�00000006064�14343750021�0021354�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-makanai.el --- shimbun backend for www.makanai.com -*- coding: utf-8 -*- ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 ;; MIYOSHI Masanori <miyoshi@meadowy.org> ;; Author: MIYOSHI Masanori <miyoshi@meadowy.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was nnshimbun.el written by ;; TSUCHIYA Masatoshi <tsuchiya@pine.kuee.kyoto-u.ac.jp>. ;;; Code: (require 'shimbun) (require 'sb-text) ;; For `shimbun-shallow-rendering'. (luna-define-class shimbun-makanai (shimbun) ()) (defvar shimbun-makanai-url "http://www.makanai.com/") (defvar shimbun-makanai-server-name "makanai") (defvar shimbun-makanai-groups '("f1news")) (defvar shimbun-makanai-group-alist '(("f1news" . "http://www1.wisnet.ne.jp/~matunaga/news/"))) (defvar shimbun-makanai-from-address "matunaga@mail1.wisnet.ne.jp") (defvar shimbun-makanai-content-start "</font></h3><blockquote>") (defvar shimbun-makanai-content-end "</blockquote><br><br>") (defsubst shimbun-makanai-base-url (shimbun) (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-makanai-group-alist))) (luna-define-method shimbun-index-url ((shimbun shimbun-makanai)) (concat (shimbun-makanai-base-url shimbun) "000.html")) (luna-define-method shimbun-get-headers ((shimbun shimbun-makanai) &optional range) (let ((case-fold-search t) headers) (when (re-search-forward "<title>F1gpnews" nil t) (while (re-search-forward "\\([^<]+\\)
      " nil t) (let ((url (match-string 1)) (id (match-string 2)) (subject (match-string 3))) (save-excursion (when (re-search-backward "
      \\([0-9]+\\)綛\\([0-9]+\\)\\([0-9]+\\)(.*)
      " nil t) (let ((year (match-string 1)) (month (match-string 2)) (day (match-string 3)) date) (setq date (shimbun-make-date-string (string-to-number year) (string-to-number month) (string-to-number day))) (setq id (format "<%s.%s.%s.%s.%s@www.makanai.com>" year month day id (shimbun-current-group-internal shimbun))) (push (shimbun-create-header 0 subject (shimbun-from-address shimbun) date id "" 0 0 (concat (shimbun-makanai-base-url shimbun) url)) headers))))))) headers)) (provide 'sb-makanai) ;;; sb-makanai.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-marc-aims.el000066400000000000000000000114361434375002100216230ustar00rootroot00000000000000;;; sb-marc-aims.el --- shimbun backend for marc.theaimsgroup.com. ;; Copyright (C) 2002, 2003, 2005, 2017, 2019 ;; NOKUBI Takatsugu ;; Author: NOKUBI Takatsugu ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (luna-define-class shimbun-marc-aims (shimbun) ()) (defvar shimbun-marc-aims-url "http://marc.theaimsgroup.com") (defcustom shimbun-marc-aims-group-alist '(("fop-dev" "fop-dev" nil nil)) "Table of mailing lists archives kept at http://marc.theaimsgroup.com/." :group 'shimbun :type '(repeat (group :indent 0 (string :format "Group Name: %v") (string :format " List Name: %v") (radio :format " Reply-To: %v" (const :format "None " nil) (string :format "Address: %v")) (radio :format " X-Face: %v" (const :format "None " nil) (string :format "%t: %v"))))) (defvar shimbun-marc-aims-content-start "RAW\\]") (defvar shimbun-marc-aims-content-end "

      \\[]+>1\\|[0-9]+\\)\\] \\([^<]+\\) + \\(.*\\)" nil t) ; YYYY-MM-DD nil thread-id thread-wence message-id subject from (push (shimbun-make-header 0 (match-string 6) (match-string 7) (match-string 1) (concat "<" (match-string 5) "@marc.theaimsgroup.com>") nil nil nil (concat shimbun-marc-aims-url "/?m=" (match-string 5)) ) headers) (if (not (eq (match-string 3) nil)) (let ((tid (match-string 3)) (tw (match-string 4)) (id (match-string 5))) (with-temp-buffer (shimbun-retrieve-url (concat shimbun-marc-aims-url "/?t=" tid "&w=" tw)) (while (re-search-forward "^ *[0-9]+\\. \\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\\) +\\([^<]+\\) + \\(.*\\)" nil t) ; YYYY-MM-DD message-id subject from (push (shimbun-make-header 0 (match-string 3) (match-string 4) (match-string 1) (concat "<" (match-string 2) "@marc.theaimsgroup.com>") (concat "<" id "@marc.theaimsgroup.com>") nil nil (concat shimbun-marc-aims-url "/?m=" (match-string 2)) ) headers)))))) (if (re-search-forward "Next" nil t) (setq surl (concat url "&r=" (match-string 1) "&b=" ym "&w=4")) (setq surl nil))))))) headers)) (provide 'sb-marc-aims) ;;; sb-marc-aims.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-meadow.el000066400000000000000000000067021434375002100212260ustar00rootroot00000000000000;;; sb-meadow.el --- shimbun backend for meadow-ml ;; Copyright (C) 2001-2004, 2019 Akihiro Arisawa ;; Copyright (C) 2001-2004, 2019 Yuuichi Teranishi ;; Author: Akihiro Arisawa , ;; Yuuichi Teranishi , ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was sb-mew.el written by ;; TSUCHIYA Masatoshi and ;; Yuuichi Teranishi . ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-incf (require 'shimbun) (require 'sb-mhonarc) (luna-define-class shimbun-meadow (shimbun-mhonarc) ()) (defvar shimbun-meadow-url "http://www.ysnb.net/meadow/") (defvar shimbun-meadow-groups '("meadow-develop" "meadow-users-jp")) (defvar shimbun-meadow-reverse-flag nil) (defvar shimbun-meadow-litemplate-regexp "\\([^<]+\\) \\([^<]+\\)") (luna-define-method shimbun-headers ((shimbun shimbun-meadow) &optional range) (with-temp-buffer (shimbun-retrieve-url shimbun-meadow-url) (let* ((group (shimbun-current-group-internal shimbun)) (regexp (format "]*HREF=\"mail\\([0-9]+\\)\\.html\">\\[?Last Page\\]?" nil t) (let ((aux (string-to-number (match-string 1))) url) (while (> aux 0) (setq url (if (= aux 1) (cdr elem) (shimbun-expand-url (format "mail%d.html" aux) (cdr elem)))) (delete-region (point-min) (point-max)) (shimbun-retrieve-url url) (unless (if pages (<= (cl-incf count) pages) t) (throw 'stop headers)) (shimbun-mhonarc-get-headers shimbun url headers (car elem)) (setq aux (1- aux)))) (shimbun-mhonarc-get-headers shimbun (cdr elem) headers (car elem)))) headers)))) (luna-define-method shimbun-mhonarc-get-subject-value ((shimbun shimbun-meadow)) (shimbun-decode-entities-string (shimbun-mhonarc-header-value))) (luna-define-method shimbun-mhonarc-get-from-r13-value ((shimbun shimbun-meadow)) (shimbun-mhonarc-rot13-decode (shimbun-decode-entities-string (shimbun-mhonarc-header-value)))) (provide 'sb-meadow) ;;; sb-meadow.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-mew.el000066400000000000000000000065251434375002100205450ustar00rootroot00000000000000;;; sb-mew.el --- shimbun backend for mew.org ;; Copyright (C) 2001, 2002, 2005, 2019 Yuuichi Teranishi ;; Copyright (C) 2001, 2002, 2005, 2019 Akihiro Arisawa ;; Author: TSUCHIYA Masatoshi , ;; Akihiro Arisawa , ;; Yuuichi Teranishi ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was nnshimbun.el written by ;; TSUCHIYA Masatoshi . ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-incf (require 'shimbun) (require 'sb-mhonarc) (luna-define-class shimbun-mew (shimbun-mhonarc) ()) (defvar shimbun-mew-url "http://www.mew.org/ml/") (defconst shimbun-mew-group-url-alist '(("mew-dist" . "mew-dist-3.1") ("mew-dist-3.1" . "mew-dist-3.1") ("mew-dist-2.0" . "mew-dist-2.0") ("mew-dist-1.94" . "mew-dist-1.94") ("mew-dist-old" . "mew-dist-1.94") ("mew-win32" . "mew-win32-3.1") ("mew-win32-3.1" . "mew-win32-3.1") ("mew-win32-2.0" . "mew-win32-2.0") ("mew-win32-0" . "mew-win32-0") ("mew-win32-old" . "mew-win32-0") ("mew-int" . "mew-int-3.1") ("mew-int-3.1" . "mew-int-3.1") ("mew-int-2.0" . "mew-int-2.0") ("mew-int-0" . "mew-int-0") ("mew-int-old" . "mew-int-0") ("mgp-users" . "mgp-users") ("mgp-users-jp" . "mgp-users-jp"))) (defvar shimbun-mew-groups (mapcar 'car shimbun-mew-group-url-alist)) (defvar shimbun-mew-reverse-flag t) (defvar shimbun-mew-litemplate-regexp "\\([^<]+\\) \\([^<]+\\)

    • ") (luna-define-method shimbun-index-url ((shimbun shimbun-mew)) (concat (shimbun-url-internal shimbun) "/" (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-mew-group-url-alist)) "/")) (luna-define-method shimbun-reply-to ((shimbun shimbun-mew)) (concat (shimbun-current-group-internal shimbun) "@mew.org")) (luna-define-method shimbun-get-headers ((shimbun shimbun-mew) &optional range) (let ((url (shimbun-index-url shimbun)) (pages (shimbun-header-index-pages range)) (count 0) headers aux) (catch 'stop (shimbun-mhonarc-get-headers shimbun url headers) (while (and (if pages (< (cl-incf count) pages) t) (re-search-forward "Prev Page" nil t) (not (string-equal (match-string 1) aux))) (setq aux (match-string 1) url (shimbun-expand-url aux url)) (erase-buffer) (shimbun-retrieve-url url) (shimbun-mhonarc-get-headers shimbun url headers)) headers))) (provide 'sb-mew) ;;; sb-mew.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-mhonarc.el000066400000000000000000000232521434375002100214000ustar00rootroot00000000000000;;; sb-mhonarc.el --- shimbun backend class for mhonarc ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2022 ;; Yuuichi Teranishi ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2022 ;; Akihiro Arisawa ;; Author: TSUCHIYA Masatoshi , ;; Akihiro Arisawa , ;; Yuuichi Teranishi ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was nnshimbun.el written by ;; TSUCHIYA Masatoshi . ;;; Code: (require 'shimbun) (eval-and-compile (luna-define-class shimbun-mhonarc (shimbun) (reverse-flag litemplate-regexp)) (luna-define-internal-accessors 'shimbun-mhonarc)) (defvar shimbun-mhonarc-litemplate-regexp "\\([^<]+\\)\n
      • From: \\([^<]+\\)
      ") (luna-define-method initialize-instance :after ((shimbun shimbun-mhonarc) &rest init-args) (shimbun-mhonarc-set-reverse-flag-internal shimbun (symbol-value (intern-soft (concat "shimbun-" (shimbun-server-internal shimbun) "-reverse-flag")))) (shimbun-mhonarc-set-litemplate-regexp-internal shimbun (symbol-value (intern-soft (concat "shimbun-" (shimbun-server-internal shimbun) "-litemplate-regexp")))) shimbun) (defun shimbun-mhonarc-replace-newline-to-space (string) (let ((i (length string))) (while (> i 0) (setq i (1- i)) (when (eq (aref string i) ?\n) (aset string i ? ))) string)) (defmacro shimbun-mhonarc-extract-header-values (shimbun url headers aux) `(let ((id (format "<%s%s%%%s>" (or ,aux "") (match-string 1) (shimbun-current-group-internal ,shimbun))) (url (shimbun-expand-url (match-string 2) ,url)) (subject (shimbun-mhonarc-replace-newline-to-space (match-string 3))) (from (shimbun-mhonarc-replace-newline-to-space (match-string 4)))) (if (shimbun-search-id ,shimbun id) (throw 'stop ,headers) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) (shimbun-mime-encode-string from) "" id "" 0 0 url) ,headers)))) (defmacro shimbun-mhonarc-get-headers (shimbun url headers &optional aux) `(save-excursion (let ((case-fold-search t) (regexp (or (shimbun-mhonarc-litemplate-regexp-internal ,shimbun) shimbun-mhonarc-litemplate-regexp))) (if (shimbun-mhonarc-reverse-flag-internal ,shimbun) (progn (goto-char (point-min)) (while (re-search-forward regexp nil t) (shimbun-mhonarc-extract-header-values ,shimbun ,url ,headers ,aux) (forward-line 1))) (goto-char (point-max)) (while (re-search-backward regexp nil t) (shimbun-mhonarc-extract-header-values ,shimbun ,url ,headers ,aux) (forward-line 0))) ,headers))) (luna-define-method shimbun-get-headers ((shimbun shimbun-mhonarc) &optional range) (let (headers) (catch 'stop (shimbun-mhonarc-get-headers shimbun (shimbun-index-url shimbun) headers)))) (defvar shimbun-mhonarc-optional-headers '("x-ml-count" "x-mail-count" "x-ml-name" "user-agent")) (defconst shimbun-mhonarc-rot13-table (let ((table (make-vector 128 nil)) (i 0)) (while (< i 28) (aset table (+ (% (+ i 14) 28) ?@) (make-string 1 (+ i ?@))) (setq i (1+ i))) (setq i 0) (while (< i 26) (aset table (+ (% (+ i 13) 26) ?a) (make-string 1 (+ i ?a))) (setq i (1+ i))) table)) (defun shimbun-mhonarc-rot13-decode (str) "Decode STR encoded by mrot13() defined in mhonarc/ewhutil.pl." (with-temp-buffer (insert str) (goto-char (point-min)) (while (and (skip-chars-forward "^a-zA-Z@\\[") (not (eobp))) (insert (aref shimbun-mhonarc-rot13-table (char-after))) (delete-char 1)) (buffer-string))) (defun shimbun-mhonarc-header-value () (let ((pt (point))) (prog1 (buffer-substring (match-end 0) (std11-field-end)) (goto-char pt)))) (luna-define-generic shimbun-mhonarc-get-subject-value (shimbun-mhonarc) "Get encoded Subject field value.") (luna-define-method shimbun-mhonarc-get-subject-value ((shimbun shimbun-mhonarc)) (shimbun-mime-encode-string (shimbun-mhonarc-header-value))) (luna-define-generic shimbun-mhonarc-get-from-r13-value (shimbun-mhonarc) "Get encoded From field value.") (luna-define-method shimbun-mhonarc-get-from-r13-value ((shimbun shimbun-mhonarc)) (shimbun-mime-encode-string (shimbun-mhonarc-rot13-decode (shimbun-mhonarc-header-value)))) (luna-define-method shimbun-make-contents ((shimbun shimbun-mhonarc) header) (if (search-forward "" nil t) (progn (forward-line 0) ;; Processing headers. (save-restriction (narrow-to-region (point-min) (point)) (shimbun-decode-entities) (goto-char (point-min)) (while (search-forward "\n\n" nil t) (replace-match "\n")) (goto-char (point-min)) (while (search-forward "\t" nil t) (replace-match " ")) (goto-char (point-min)) (let (refs) (while (not (eobp)) (cond ((looking-at "" nil t)) (end (and (search-forward "" nil t) (match-beginning 0)))) (when (and start end) (save-restriction (narrow-to-region start end) (goto-char (point-min)) (while (re-search-forward (regexp-opt '("" "" "" "" "")) nil t) (delete-region (match-beginning 0) (match-end 0)) (goto-char (match-beginning 0))) (shimbun-decode-entities) (goto-char (point-min)) (while (not (eobp)) (when (looking-at "
    • \\([^:]+\\): +") (when (member (downcase (match-string 1)) shimbun-mhonarc-optional-headers) (push (cons (match-string 1) (shimbun-mime-encode-string (buffer-substring (match-end 0) (line-end-position)))) alist))) (forward-line 1)) (delete-region (point-min) (point-max))) (save-restriction (narrow-to-region (point-min) cur-point) (goto-char (point-min)) (when (search-forward "\nMime-Version:" nil t) (forward-line 0) (dolist (p alist) (insert (car p) ": " (cdr p) "\n"))) (goto-char (point-max))))) ;; Processing body. (save-restriction (narrow-to-region (point) (point-max)) (delete-region (point) (progn (search-forward "\n\n" nil t) (point))) (when (search-forward "\n\n" nil t) (forward-line -1) (delete-region (point) (point-max))) (goto-char (point-min)) (insert "\n\n\n\n\n") (goto-char (point-max)) (insert "\n\n"))) (goto-char (point-min)) (shimbun-header-insert shimbun header) (insert "Content-Type: text/html; charset=ISO-2022-JP\nMIME-Version: 1.0\n\n")) (encode-coding-string (buffer-string) (mime-charset-to-coding-system "ISO-2022-JP"))) (provide 'sb-mhonarc) ;;; sb-mhonarc.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-mozilla-jp.el000066400000000000000000000027711434375002100220320ustar00rootroot00000000000000;;; sb-moz-users.el --- shimbun backend for moz-users ;; Copyright (C) 2003 NAKAJIMA Mikio ;; Author: NAKAJIMA Mikio ;; Keywords: news ;; Created: Jun 7, 2003 ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; You have to put the four lines below to ~/.w3m/passwd; ;; ;; machine www.mozilla.gr.jp ;; path /ml/logs/moz-users/ ;; login mozilla ;; passwd mozilla ;; ;; Note that modes of ~/.w3m/passwd should be 0600 (or 0400) otherwise ;; w3m ignores it. ;; ;;; Code: (require 'shimbun) (require 'sb-fml) (luna-define-class shimbun-mozilla-jp (shimbun-fml) ()) (defvar shimbun-mozilla-jp-url "http://www.mozilla.gr.jp/ml/logs/moz-users/") (defvar shimbun-mozilla-jp-groups '("users")) (provide 'sb-mozilla-jp) ;;; sb-mozilla-jp.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-msdn.el000066400000000000000000000073211434375002100207110ustar00rootroot00000000000000;;; sb-msdn.el --- shimbun backend for MSDN ;; Copyright (C) 2004, 2005, 2006 Yoichi NAKAYAMA ;; Author: Yoichi NAKAYAMA ;; Keywords: news ;; Created: Sep 14, 2004 ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-msdn (shimbun-rss) ()) (defvar shimbun-msdn-group-alist '(("all" "http://msdn.microsoft.com/rss.xml") ("netframework" "http://msdn.microsoft.com/netframework/rss.xml") ("architecture" "http://msdn.microsoft.com/architecture/rss.xml") ("asp.net" "http://msdn.microsoft.com/asp.net/rss.xml") ("data" "http://msdn.microsoft.com/data/rss.xml") ("longhorn" "http://msdn.microsoft.com/longhorn/rss.xml") ("mobility" "http://msdn.microsoft.com/mobility/rss.xml") ("subscriptions" "http://msdn.microsoft.com/subscriptions/rss.xml") ("msdntv" "http://msdn.microsoft.com/msdntv/rss.xml") ("office" "http://msdn.microsoft.com/office/rss.xml") ("security" "http://msdn.microsoft.com/security/rss.xml") ("sql" "http://msdn.microsoft.com/sql/rss.xml") ("theshow" "http://msdn.microsoft.com/theshow/rss.xml") ("vbasic" "http://msdn.microsoft.com/vbasic/rss.xml") ("vcsharp" "http://msdn.microsoft.com/vcsharp/rss.xml") ("visualc" "http://msdn.microsoft.com/visualc/rss.xml") ("vfoxpro" "http://msdn.microsoft.com/vfoxpro/rss.xml") ("vjsharp" "http://msdn.microsoft.com/vjsharp/rss.xml") ("vstudio" "http://msdn.microsoft.com/vstudio/rss.xml") ("vs2005" "http://msdn.microsoft.com/vs2005/rss.xml") ("webservices" "http://msdn.microsoft.com/webservices/rss.xml") ("embedded" "http://msdn.microsoft.com/embedded/rss.xml") ("xml" "http://msdn.microsoft.com/xml/rss.xml") ("japan.msdn" "http://www.microsoft.com/japan/msdn/rss.xml") ("japan.msdn-us" "http://www.microsoft.com/japan/msdn/aboutmsdn/us/rss.xml")) "Alist of readable groups and URLs of their RSSs. List is available at: http://msdn.microsoft.com/aboutmsdn/rss/ http://www.microsoft.com/japan/msdn/aboutmsdn/rss/") (defvar shimbun-msdn-from-address "nobody@microsoft.com") (defvar shimbun-msdn-content-start "\\(\\|
    \\)") (defvar shimbun-msdn-content-end "\\(\\|\\)") (luna-define-method shimbun-groups ((shimbun shimbun-msdn)) (mapcar 'car shimbun-msdn-group-alist)) (luna-define-method shimbun-index-url ((shimbun shimbun-msdn)) (nth 1 (assoc (shimbun-current-group shimbun) shimbun-msdn-group-alist))) (luna-define-method shimbun-rss-process-date ((shimbun shimbun-msdn) date) date) (luna-define-method shimbun-article-url ((shimbun shimbun-msdn) header) (let ((url (shimbun-article-base-url shimbun header))) (if (string-match "\\`http://msdn\\.microsoft\\.com/\ library/default\\.asp\\?url=\\(.+\\.asp\\)\\'" url) (concat "http://msdn.microsoft.com" (match-string 1 url)) url))) (provide 'sb-msdn) ;;; sb-msdn.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-msports-nifty.el000066400000000000000000000070631434375002100226110ustar00rootroot00000000000000;;; sb-msports-nifty.el --- shimbun backend for motorsports.nifty.com ;; Copyright (C) 2004, 2005, 2006 MIYOSHI Masanori ;; Author: MIYOSHI Masanori ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; This back end generates text/plain articles unless failing to ;; extract contents. ;; Original code was nnshimbun.el written by ;; TSUCHIYA Masatoshi . ;;; Code: (require 'shimbun) (require 'sb-text) ;; For `shimbun-shallow-rendering'. (luna-define-class shimbun-msports-nifty (shimbun) ()) (defvar shimbun-msports-nifty-url "http://forum.nifty.com/fmotor/") (defvar shimbun-msports-nifty-server-name "@nifty:≪若帥若鴻若") (defvar shimbun-msports-nifty-group-alist '(("F1" . "f1") ("IRL" . "cart") ("WRC" . "wrc") ("Europe" . "europe") ("USA" . "usa"))) (defvar shimbun-msports-nifty-from-address "motorsports_post@nifty.com") (defvar shimbun-msports-nifty-content-start "
    ") (defvar shimbun-msports-nifty-content-end "") (luna-define-method shimbun-groups ((shimbun shimbun-msports-nifty)) (mapcar 'car shimbun-msports-nifty-group-alist)) (luna-define-method shimbun-index-url ((shimbun shimbun-msports-nifty)) (concat (shimbun-url-internal shimbun) (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-msports-nifty-group-alist)) "/main.htm")) (luna-define-method shimbun-get-headers ((shimbun shimbun-msports-nifty) &optional range) (let ((case-fold-search t) headers) (goto-char (point-min)) (while (re-search-forward "]*>\\([^<]+\\)<" nil t) (let ((url (match-string 1)) (year (match-string 2)) (month (match-string 3)) (day (match-string 4)) (id (match-string 5)) (subject (match-string 6)) date) (setq id (format "<%s%s%s%s%%%s%%msports@nifty.com>" year month day id (shimbun-current-group-internal shimbun))) (setq date (shimbun-make-date-string (string-to-number year) (string-to-number month) (string-to-number day))) (push (shimbun-create-header 0 subject (shimbun-from-address shimbun) date id "" 0 0 url) headers))) headers)) (luna-define-method shimbun-make-contents ((shimbun shimbun-msports-nifty) header) (let ((id (shimbun-header-id header))) (setq id (substring id 9 20)) ; extract anchor (re-search-forward (format "" id) nil t) (delete-region (point-min) (point)) (shimbun-header-insert-and-buffer-string shimbun header "UTF-8" (if (shimbun-clear-contents shimbun header) (progn (shimbun-shallow-rendering) nil) t)))) (provide 'sb-msports-nifty) ;;; sb-msportsn-nifty.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-multi.el000066400000000000000000000107101434375002100210760ustar00rootroot00000000000000;;; sb-multi.el --- Virtual shimbun class to retrieve multiple pages. ;; Copyright (C) 2006-2009, 2011, 2019 TSUCHIYA Masatoshi ;; Author: TSUCHIYA Masatoshi ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'cl-lib) ;; cl-incf, cl-multiple-value-bind, cl-values-list (require 'shimbun) (autoload 'shimbun-shallow-rendering "sb-text") (luna-define-class shimbun-multi () ()) (luna-define-generic shimbun-multi-next-url (shimbun header url) "Return a URL of the next page if it exists in this current buffer.") (luna-define-generic shimbun-multi-clear-contents (shimbun header has-previous-page has-next-page) "Clear a content in this current buffer for an article of SHIMBUN. Return nil, unless a content is cleared successfully.") (luna-define-method shimbun-multi-clear-contents ((shimbun shimbun-multi) header has-previous-page has-next-page) (shimbun-clear-contents shimbun header)) (defun shimbun-multi-retrieve-next-pages (shimbun header base-cid url &optional images cont) (let ((prefer-text-plain (shimbun-prefer-text-plain-internal shimbun)) (case-fold-search t) base-url next-url) (setq base-url (or (shimbun-current-base-url) (file-name-directory url)) next-url (shimbun-multi-next-url shimbun header base-url)) (when (shimbun-multi-clear-contents shimbun header cont next-url) (goto-char (point-min)) (insert "\n\n\n\n\n") (goto-char (point-max)) (if next-url (insert "\n\n\n") (if prefer-text-plain (shimbun-insert-footer shimbun header) (shimbun-insert-footer shimbun header t "\n\n")))) (if prefer-text-plain (shimbun-shallow-rendering) (when shimbun-encapsulate-images (setq images (shimbun-mime-replace-image-tags shimbun base-cid base-url images)))) (let ((body (shimbun-make-text-entity (if prefer-text-plain "text/plain" "text/html") (buffer-string))) (result (when next-url (with-temp-buffer (shimbun-fetch-url shimbun next-url nil nil url) (shimbun-multi-retrieve-next-pages shimbun header base-cid next-url images t))))) (list (cons body (car result)) (or (nth 1 result) images))))) (defun shimbun-multi-make-contents (shimbun header) (let ((base-cid (shimbun-header-id header)) (body)) (if (string-match "\\`<\\([^>]+\\)>\\'" base-cid) (setq base-cid (match-string 1 base-cid)) (error "Cannot extract base CID from %s for %s" base-cid (shimbun-article-url shimbun header))) (cl-multiple-value-bind (texts images) (cl-values-list (shimbun-multi-retrieve-next-pages shimbun header base-cid (shimbun-article-url shimbun header))) (if (= (length texts) 1) (setq body (car texts)) (setq body (shimbun-make-multipart-entity)) (let ((i 0)) (dolist (text texts) (setf (shimbun-entity-cid text) (format "shimbun.%d.%s" (cl-incf i) base-cid)))) (apply 'shimbun-entity-add-child body texts)) (when images (setf (shimbun-entity-cid body) (concat "shimbun.0." base-cid)) (let ((new (shimbun-make-multipart-entity))) (shimbun-entity-add-child new body) (apply 'shimbun-entity-add-child new (mapcar 'cdr (nreverse images))) (setq body new)))) (erase-buffer) (shimbun-header-insert shimbun header) (insert "MIME-Version: 1.0\n") (shimbun-entity-insert body)) (buffer-string)) (luna-define-method shimbun-make-contents ((shimbun shimbun-multi) header) (shimbun-multi-make-contents shimbun header)) (provide 'sb-multi) ;;; sb-multi.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-n24-de.el000066400000000000000000000050111434375002100207330ustar00rootroot00000000000000;;; sb-n24-de.el --- shimbun backend for ;; Copyright (C) 2004 Andreas Seltenreich ;; Author: Andreas Seltenreich ;; Keywords: news ;; Created: May 23, 2004 ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-n24-de (shimbun-rss) ()) (defvar shimbun-n24-de-groups '("wirtschaft" "nachrichten" "boulevard" "sport" "netnews" "politik" "boerse")) (defvar shimbun-n24-de-content-start "") (defvar shimbun-n24-de-content-end "\n
    \n
    \n") (defvar shimbun-n24-de-from-address "redaktion@n24.de") (luna-define-method shimbun-headers :before ((shimbun shimbun-n24-de) &rest range) shimbun) (luna-define-method shimbun-groups ((shimbun shimbun-n24-de)) shimbun-n24-de-groups) (luna-define-method shimbun-rss-build-message-id ((shimbun shimbun-n24-de) url date) (let (page host datedesc) (unless (string-match "http:\\/\\/\\([^\/]+\\)\\/.+\\?\\(.+\\)" url) (error "Cannot find message-id base")) (setq host (match-string-no-properties 1 url) page (match-string-no-properties 2 url)) (unless (string-match "\\([0-9][0-9][0-9][0-9]\\)-\\([0-9][0-9]\\)-\\([0-9][0-9]\\)T\\([0-9][0-9]\\):\\([0-9][0-9]\\):\\([0-9][0-9]\\)" date) (error "Cannot find message-id base")) (setq datedesc (concat (match-string-no-properties 1 date) (match-string-no-properties 2 date) (match-string-no-properties 3 date) (match-string-no-properties 4 date) (match-string-no-properties 5 date))) (format "<%s%%%s@%s>" datedesc page host))) (luna-define-method shimbun-index-url ((shimbun shimbun-n24-de)) (concat "http://www.n24.de/rss/?rubrik=" (shimbun-current-group-internal shimbun))) (provide 'sb-n24-de) ;;; sb-n24-de.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-namazu.el000066400000000000000000000032321434375002100212400ustar00rootroot00000000000000;;; sb-namazu.el --- shimbun backend for namazu.org ;; Copyright (C) 2001, 2002, 2003, 2004 Akihiro Arisawa ;; Author: Akihiro Arisawa ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (require 'shimbun) (require 'sb-mailman) (luna-define-class shimbun-namazu (shimbun-mailman-ja) ()) (defvar shimbun-namazu-url "http://www.namazu.org/pipermail/") (defvar shimbun-namazu-groups '("kakasi-commits" "kakasi-dev" "migemo" "namazu-devel-en" "namazu-devel-ja" "namazu-users-en" "namazu-users-ja" "namazu-win32-users-ja" "sary")) (luna-define-method shimbun-index-url ((shimbun shimbun-namazu)) (shimbun-expand-url (concat (shimbun-current-group-internal shimbun) "/") (shimbun-url-internal shimbun))) (luna-define-method shimbun-reply-to ((shimbun shimbun-namazu)) (concat (shimbun-current-group-internal shimbun) "@namazu.org")) (provide 'sb-namazu) ;;; sb-namazu.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-netbsd.el000066400000000000000000000063661434375002100212370ustar00rootroot00000000000000;;; sb-netbsd.el --- shimbun backend for netbsd.org ;; Copyright (C) 2001-2003, 2019 Yuuichi Teranishi ;; Author: TSUCHIYA Masatoshi , ;; Yuuichi Teranishi ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was nnshimbun.el written by ;; TSUCHIYA Masatoshi . ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-incf (require 'shimbun) (require 'sb-mhonarc) (luna-define-class shimbun-netbsd (shimbun-mhonarc) ()) (defvar shimbun-netbsd-url "http://www.jp.netbsd.org/ja/JP/ml/") (defvar shimbun-netbsd-groups '("announce-ja" "junk-ja" "tech-misc-ja" "tech-pkg-ja" "port-arm32-ja" "port-hpcmips-ja" "port-mac68k-ja" "port-mips-ja" "port-powerpc-ja" "hpcmips-changes-ja" "members-ja" "admin-ja" "www-changes-ja")) (luna-define-method shimbun-index-url ((shimbun shimbun-netbsd)) (format "%s%s/index.html" (shimbun-url-internal shimbun) (shimbun-current-group-internal shimbun))) (luna-define-method shimbun-get-headers ((shimbun shimbun-netbsd) &optional range) (let ((case-fold-search t) (pages (shimbun-header-index-pages range)) (count 0) headers months) (goto-char (point-min)) (while (re-search-forward "" nil t) (push (match-string 1) months)) (setq months (nreverse months)) (nreverse (catch 'stop (dolist (month months) (unless (if pages (<= (cl-incf count) pages) t) (throw 'stop headers)) (erase-buffer) (shimbun-retrieve-url (format "%s%s/%s/maillist.html" (shimbun-url-internal shimbun) (shimbun-current-group-internal shimbun) month) t) (let (id url subject) (while (re-search-forward "]*HREF=\"\\(msg\\([0-9]+\\)\\.html\\)\">\\([^<]+\\)" nil t) (setq url (format "%s%s/%s/%s" (shimbun-url-internal shimbun) (shimbun-current-group-internal shimbun) month (match-string 1)) id (format "<%s%05d%%%s>" month (string-to-number (match-string 2)) (shimbun-current-group-internal shimbun)) subject (match-string 3)) (when (shimbun-search-id shimbun id) (throw 'stop headers)) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) (if (looking-at " *\\([^<]+\\)<") (shimbun-mime-encode-string (match-string 1)) "") "" id "" 0 0 url) headers)))) headers)))) (provide 'sb-netbsd) ;;; sb-netbsd.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-nikkangendai.el000066400000000000000000000276261434375002100224050ustar00rootroot00000000000000;;; sb-nikkangendai.el --- shimbun backend for Nikkan Gendai ;; Copyright (C) 2015, 2016 Katsumi Yamaoka ;; Author: Katsumi Yamaoka ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Nikkan Gendai is an evening paper in Japan. ;;; Code: (require 'shimbun) (require 'sb-multi) (luna-define-class shimbun-nikkangendai (shimbun-japanese-newspaper shimbun-multi shimbun) ()) (defvar shimbun-nikkangendai-top-level-domain "www.nikkan-gendai.com" "Name of the top level domain for Nikkan Gendai.") (defvar shimbun-nikkangendai-url (concat "http://" shimbun-nikkangendai-top-level-domain "/") "Name of the root url.") (defvar shimbun-nikkangendai-server-name "ュ蚊潟") (defvar shimbun-nikkangendai-group-table '(("top" "TOP") ("news" "ャ若") ("geino" "梧") ("sports" "鴻若") ("life" "ゃ") ("book" "BOOKS") ("gourmet" "違"))) (defvar shimbun-nikkangendai-x-face-alist '(("default" . "\ Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAADFBMVEX////yo4H40cPrYQC 60gGqAAABU0lEQVQoz5XSP07DMBQG8OdUKCodurBWniqiLjlCow4sLHAC2BjY2dCL4BCwQRkQt0i 5QYREy9ZMzBmsNEJ1Pp7dqumEhKf89EXvj2XC3qF/wLZYIdf49LCjF9T98/IYYGp0yXXvzSjYzAG lOlkTGp8gD5eWYASjZxS65gA5qBmeYUakr/EO/1tK1Ac6HlZdHj6hCT3WYRkCeR+uQK3lA4n2ScF 5jIpYxmFcYaZRBJupGcn4m3oOq0pyTigW/EwfuVHSl+EKRDI1CoUtCo0y9hhEt13AjB3mKrphlms w0nQ+jNjEOIWR2exAoOwUtRLoI14HixBl4GAkmSxRdB2+2Mimfmqrc9QHqSyTyWzsbjTVjVvBXWu RUVb7RE5iiYttYtUr4S7ZwMSJqh5mG3xwLmtuE2nYAkg7LRpSLWp13yKJFztUAWOHyQWwV82dfB/ 2r7fzC4CxojZUJhCfAAAAAElFTkSuQmCC"))) (defvar shimbun-nikkangendai-expiration-days nil) (defvar shimbun-nikkangendai-japanese-hankaku t) (luna-define-method shimbun-groups ((shimbun shimbun-nikkangendai)) (mapcar 'car shimbun-nikkangendai-group-table)) (luna-define-method shimbun-current-group-name ((shimbun shimbun-nikkangendai)) (nth 1 (assoc (shimbun-current-group-internal shimbun) shimbun-nikkangendai-group-table))) (luna-define-method shimbun-index-url ((shimbun shimbun-nikkangendai)) (let ((group (shimbun-current-group-internal shimbun)) (base (shimbun-url-internal shimbun))) (if (string-equal group "top") base (shimbun-expand-url (concat "articles/index/" group) base)))) (luna-define-method shimbun-get-headers ((shimbun shimbun-nikkangendai) &optional range) (if (string-equal (shimbun-current-group-internal shimbun) "top") (shimbun-nikkangendai-get-headers-top shimbun range) (shimbun-nikkangendai-get-headers shimbun range))) (defun shimbun-nikkangendai-get-headers-top (shimbun range) (let ((base (shimbun-url-internal shimbun)) year month day url group id subject from headers) (goto-char (point-min)) (when (and (re-search-forward "\ ]+[\t\n\r ]+\\)*class=\"article-wrap\"" nil t) (shimbun-end-of-tag "div") (progn (narrow-to-region (goto-char (match-beginning 2)) (match-end 2)) (re-search-forward "]+[\t\n\r ]+\\)*\ datetime=\"\\(20[1-9][0-9]\\)-\\([01]?[0-9]\\)-\\([0-3]?[0-9]\\)\"" nil t))) (setq year (string-to-number (match-string 1)) month (string-to-number (match-string 2)) day (string-to-number (match-string 3))) ;; Main topic (when (and (re-search-forward "\ ]+[\t\n\r ]+\\)*\ class=\"main-topics[\t\n\r ]+clearfix\"" nil t) (shimbun-end-of-tag "div")) (save-restriction (narrow-to-region (goto-char (match-beginning 2)) (match-end 2)) (when (and (re-search-forward "\ ]+[\t\n\r ]+\\)*\ href=\"\\(/articles/view/\\([^\t\n\r \"/>]+\\)/\\([0-9]+\\)\\)\"[^>]*>\ [\t\n\r ]*\\([^<]+\\)" nil t) (progn (setq url (shimbun-expand-url (match-string 1) base) group (match-string 2) id (concat "<" (match-string 3) ;; serial "." group "%" shimbun-nikkangendai-top-level-domain ">") subject (match-string 4)) (not (shimbun-search-id shimbun id)))) (setq from (concat shimbun-nikkangendai-server-name " (" (or (cadr (assoc group shimbun-nikkangendai-group-table)) (cadr (assoc (substring group 0 -1) shimbun-nikkangendai-group-table)) group) ")")) (push (shimbun-create-header 0 subject from (shimbun-make-date-string year month day) id "" 0 0 url) headers)) (goto-char (point-max)))) ;; Topics (while (and (re-search-forward "\ ]+[\t\n\r ]+\\)*class=\"article-box\"" nil t) (shimbun-end-of-tag "li")) (save-restriction (narrow-to-region (goto-char (match-beginning 2)) (match-end 2)) (when (and (re-search-forward "\ ]+[\t\n\r ]+\\)*\ href=\"\\(/articles/view/\\([^\t\n\r \"/>]+\\)/\\([0-9]+\\)\\)\"[^>]*>" nil t) (progn (setq url (shimbun-expand-url (match-string 1) base) group (match-string 2) id (concat "<" (match-string 3) ;; serial "." group "%" shimbun-nikkangendai-top-level-domain ">")) (not (shimbun-search-id shimbun id))) (search-forward "

    " nil t) (shimbun-end-of-tag "p")) (setq subject (match-string 2) from (concat shimbun-nikkangendai-server-name " (" (or (cadr (assoc group shimbun-nikkangendai-group-table)) (cadr (assoc (substring group 0 -1) shimbun-nikkangendai-group-table)) group) ")")) (push (shimbun-create-header 0 subject from (shimbun-make-date-string year month day) id "" 0 0 url) headers)) (goto-char (point-max)))) (widen) headers))) (defun shimbun-nikkangendai-get-headers (shimbun range) (let ((base (shimbun-url-internal shimbun)) url group id year month day subject from headers) (when (and (re-search-forward "\ ]+[\t\n\r ]+\\)*\ class=\"contents-wrapper[\t\n\r ]+clearfix\"" nil t) (shimbun-end-of-tag "div")) (narrow-to-region (goto-char (match-beginning 2)) (match-end 2)) (while (re-search-forward "\ ]+[\t\n\r ]+\\)*class=\"category-title\"\ [^>]*>[\t\n\r ]*]+[\t\n\r ]+\\)*\ href=\"\\([^\"]+\\)" nil t) (setq url (shimbun-expand-url (match-string 1) base)) (with-temp-buffer (shimbun-retrieve-url url) (goto-char (point-min)) (while (and (re-search-forward "\ ]+[\t\n\r ]+\\)*class=\"article-box\"" nil t) (shimbun-end-of-tag "li")) (save-restriction (narrow-to-region (goto-char (match-beginning 2)) (match-end 2)) (when (and (re-search-forward "\ ]+[\t\n\r ]+\\)*\ href=\"\\(/articles/view/\\([^\t\n\r \"/>]+\\)/\\([0-9]+\\)\\)\"[^>]*>" nil t) (progn (setq url (shimbun-expand-url (match-string 1) base) group (match-string 2) id (concat "<" (match-string 3) ;; serial "." group "%" shimbun-nikkangendai-top-level-domain ">")) (not (shimbun-search-id shimbun id))) (progn (goto-char (point-min)) (re-search-forward "\ ]+[\t\n\r ]+\\)*\ datetime=\"\\(20[1-9][0-9]\\)-\\([01]?[0-9]\\)-\\([0-3]?[0-9]\\)\"" nil t)) (progn (setq year (string-to-number (match-string 1)) month (string-to-number (match-string 2)) day (string-to-number (match-string 3))) (goto-char (point-min)) (re-search-forward "\ ]+[\t\n\r ]+\\)*class=\"entry-ttl\"" nil t)) (shimbun-end-of-tag "span")) (setq subject (match-string 2) from (concat shimbun-nikkangendai-server-name " (" (or (cadr (assoc group shimbun-nikkangendai-group-table)) (cadr (assoc (substring group 0 -1) shimbun-nikkangendai-group-table)) group) ")")) (push (shimbun-create-header 0 subject from (shimbun-make-date-string year month day) id "" 0 0 url) headers)) (goto-char (point-max)))))) (goto-char (point-max))) headers)) (luna-define-method shimbun-multi-next-url ((shimbun shimbun-nikkangendai) header url) ;; (shimbun-nikkangendai-multi-next-url shimbun header url)) ;;(defun shimbun-nikkangendai-multi-next-url (shimbun header url) (goto-char (point-min)) (when (re-search-forward "]+[\t\n\r ]+\\)*\ href=\"\\([^\"]+\\)\"[^>]*>[\t\n\r ]*罨<[\t\n\r ]*\ \\(?:<[^>]+>[\t\n\r ]*\\)?>>" nil t) (shimbun-expand-url (match-string 1) url))) (luna-define-method shimbun-multi-clear-contents ((shimbun shimbun-nikkangendai) header has-previous-page has-next-page) ;; (shimbun-nikkangendai-multi-clear-contents shimbun header ;; has-previous-page)) ;;(defun shimbun-nikkangendai-multi-clear-contents (shimbun header ;; has-previous-page) (let (authinfo subttl) (unless has-previous-page (goto-char (point-min)) (when (and (re-search-forward "\ ]+[\t\n\r ]+\\)*\ class=\"author-info-box[\t\n\r ]+clearfix" nil t) (shimbun-end-of-tag "div")) (setq authinfo (match-string 0))) (goto-char (point-min)) (when (and (re-search-forward "\ ]+[\t\n\r ]+\\)*class=\"column-name\"" nil t) (shimbun-end-of-tag "div") (progn (goto-char (match-beginning 2)) (re-search-forward "\ ]+[\t\n\r ]+\\)*href=" (match-end 2) t)) (shimbun-end-of-tag "a")) (setq subttl (match-string 0)))) (goto-char (point-min)) (when (and (re-search-forward "\ ]+[\t\n\r ]+\\)*\ class=\"article-detail-box[\t\n\r ]+clearfix\"" nil t) (shimbun-end-of-tag "div")) (delete-region (match-end 2) (point-max)) (delete-region (goto-char (point-min)) (match-beginning 2)) (when (and (re-search-forward "\ ]+[\t\n\r ]+\\)*\ class=\"full-text\"" nil t) (shimbun-end-of-tag "p" t)) (delete-region (match-end 3) (match-end 0)) (insert "\n") (delete-region (goto-char (match-beginning 0)) (match-beginning 3)) (insert "
    \n")) (if has-previous-page (progn (goto-char (point-min)) (insert " \n")) (when subttl (goto-char (point-min)) (insert subttl "

    \n")) (when authinfo (goto-char (point-min)) (insert authinfo "\n"))) (goto-char (point-min)) (while (re-search-forward "]*\\)>" nil t) (insert "
    \n") (goto-char (match-beginning 1)) (if (re-search-forward "alt=\"\\([^\"]*\\)\"" (match-end 1) t) (replace-match "alt=\"[]\"") (goto-char (match-end 1)) (insert " alt=\"[]\""))) (unless (memq (shimbun-japanese-hankaku shimbun) '(header subject nil)) (shimbun-japanese-hankaku-buffer t)) t))) (luna-define-method shimbun-footer :around ((shimbun shimbun-nikkangendai) header &optional html) ;; (shimbun-nikkangendai-footer shimbun header)) ;;(defun shimbun-nikkangendai-footer (shimbun header) (concat "

    \n-- 
    \n\ 荐篋篏罔綣鋍腓障紙ュ憘撮絽医障
    \n у障\n
    \n")) (provide 'sb-nikkangendai) ;;; sb-nikkangendai.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-nikkansports.el000066400000000000000000000137171434375002100225040ustar00rootroot00000000000000;;; sb-nikkansports.el --- shimbun backend for www.nikkansports.com ;; Copyright (C) 2001-2005, 2007, 2008, 2017, 2019 ;; MIYOSHI Masanori ;; Author: MIYOSHI Masanori ;; Katsumi Yamaoka ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was nnshimbun.el written by ;; TSUCHIYA Masatoshi . ;;; Code: (require 'shimbun) (luna-define-class shimbun-nikkansports (shimbun-japanese-newspaper shimbun) ()) (defvar shimbun-nikkansports-url "http://www.nikkansports.com/") (defvar shimbun-nikkansports-server-name "ュ鴻若") (defvar shimbun-nikkansports-group-table '(("flash" "違ャ若" "flash/flash-news.html") ("baseball" "" "baseball/news/backnumber-baseball.html") ("baseball.highschool" "蕭♂" "baseball/highschool/news/backnumber-highschool.html") ("baseball.amateur" "紊у紫ぞ篌篋咲" "baseball/amateur/news/backnumber-amateur.html") ("baseball.mlb" "鐚鐚鐚" "baseball/mlb/news/backnumber-mlb.html") ("soccer" "泣" "soccer/news/backnumber-soccer.html") ("soccer.japan" "泣惹ユ篁h;" "soccer/japan/news/backnumber-japan.html") ("soccer.world" "羌桁泣" "soccer/world/news/backnumber-world.html") ("sports" "鴻若" "sports/news/backnumber-sports.html") ("sumo" "紊х御" "sports/sumo/news/backnumber-sumo.html") ("nba" "鐚鐚鐚" "sports/nba/news/backnumber-nba.html") ("nfl" "鐚鐚鐚" "sports/nfl/news/backnumber-nfl.html") ("nhl" "鐚鐚鐚" "sports/nhl/news/backnumber-nhl.html") ("rugby" "違" "sports/rugby/news/backnumber-rugby.html") ("golf" "眼" "sports/golf/news/backnumber-golf.html") ("motor" "≪若帥若鴻若" "sports/motor/news/backnumber-motor.html") ("battle" "守" "battle/news/backnumber-battle.html") ("race" "腴狗Μ" "race/news/backnumber-race.html") ("race.kka" "腴区耳紫区祉若" "race/kka/news/backnumber-kka.html") ("entertainment" "梧" "entertainment/news/backnumber-entertainment.html") ("cinema" "激" "entertainment/cinema/news/backnumber-cinema.html") ("general" "腓鞘" "general/news/backnumber-general.html"))) (defvar shimbun-nikkansports-content-start "<[\t\n ]*![\t\n ]*-+[\t\n ]*\\++[\t\n ]*\ ャ若号[\t\n ]*\\++[\t\n ]*-+[\t\n ]*>[\t\n ]*\ \\(?:\\(?:<[\t\n ]*/?[\t\n ]*[ads][^>]+>\ \\|<[\t\n ]*h[0-9]+[\t\n ]*>[^<]+<[\t\n ]*/[\t\n ]*h[0-9]+[\t\n ]*>\\)\ [\t\n ]*\\)*") (defvar shimbun-nikkansports-content-end "\\(?:[\t\n ]*<[^>]+>\\)*[\t\n ]*\ <[\t\n ]*![\t\n ]*-+[\t\n ]*/[\t\n ]*\\++[\t\n ]*\ ャ若号[\t\n ]*\\++[\t\n ]*-+[\t\n ]*>") (defvar shimbun-nikkansports-expiration-days 17) (defvar shimbun-nikkansports-x-face-alist '(("default" . "\ Face: iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUDKpy11PIeeNv///+ PA1z5AAAAP0lEQVQI12NgAAMOJgYG/n/2Fxj4a+0+MPDH2i4AEvYPgAQ3iLvvB5DYCyL0LzCsAgI kYm3u+yqGte9Td4G5AJiKHahMk6/LAAAAAElFTkSuQmCC"))) (luna-define-method shimbun-groups ((shimbun shimbun-nikkansports)) (mapcar 'car shimbun-nikkansports-group-table)) (luna-define-method shimbun-current-group-name ((shimbun shimbun-nikkansports)) (nth 1 (assoc (shimbun-current-group-internal shimbun) shimbun-nikkansports-group-table))) (luna-define-method shimbun-index-url ((shimbun shimbun-nikkansports)) (shimbun-expand-url (nth 2 (assoc (shimbun-current-group-internal shimbun) shimbun-nikkansports-group-table)) shimbun-nikkansports-url)) (luna-define-method shimbun-get-headers ((shimbun shimbun-nikkansports) &optional range) (shimbun-nikkansports-get-headers shimbun range)) (defun shimbun-nikkansports-get-headers (shimbun range) (let ((regexp (eval-when-compile (concat "[\t ]*" ;; 6. subject "\\([^<]+\\)" "[\t ]*[^\n]+\\[[\t ]*[0-9]+[\t ]*" ;; 7. time "\\([012][0-9]:[0-5][0-9]\\)" "[\t ]*\\]"))) (group (shimbun-current-group-internal shimbun)) (from (concat shimbun-nikkansports-server-name " (" (shimbun-current-group-name shimbun) ")")) (case-fold-search t) headers) (setq group (mapconcat 'identity (nreverse (split-string group "\\.")) ".")) (while (re-search-forward regexp nil t) (push (shimbun-create-header 0 (match-string 6) from (shimbun-make-date-string (string-to-number (match-string 3)) (string-to-number (match-string 4)) (string-to-number (match-string 5)) (match-string 7)) (concat "<" (mapconcat 'identity (save-match-data (split-string (match-string 2) "-")) ".") "%" group ".nikkansports.com>") "" 0 0 (match-string 1)) headers)) (shimbun-sort-headers headers))) (luna-define-method shimbun-clear-contents :around ((shimbun shimbun-nikkansports) header) (shimbun-strip-cr) (goto-char (point-min)) (when (luna-call-next-method) t)) (provide 'sb-nikkansports) ;;; sb-nikkansports.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-nikkei.el000066400000000000000000002110641434375002100212230ustar00rootroot00000000000000;;; sb-nikkei.el --- shimbun backend for nikkei.co.jp ;; Copyright (C) 2001-2007, 2009-2011, 2017, 2019, 2022 ;; Kazuyoshi KOREEDA ;; Author: Kazuyoshi KOREEDA , ;; Katsumi Yamaoka , ;; NOMIYA Masaru ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it a>nd/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was sb-asahi.el which is written by ;; TSUCHIYA Masatoshi and ;; Yuuichi Teranishi . ;;; Code: (require 'shimbun) (luna-define-class shimbun-nikkei (shimbun-japanese-newspaper shimbun) ()) (defvar shimbun-nikkei-top-level-domain "nikkei.co.jp" "Name of the top level domain for the Nikkei Net.") (defvar shimbun-nikkei-url (concat "http://www." shimbun-nikkei-top-level-domain "/") "Name of the parent url.") (defvar shimbun-nikkei-group-table `(("top" "" ,shimbun-nikkei-url shimbun-nikkei-get-headers-top shimbun-nikkei-prepare-article-default) ("main" "筝肢" ,(concat shimbun-nikkei-url "news/main/") shimbun-nikkei-get-headers-default shimbun-nikkei-prepare-article-default) ("keizai" "腟羝" ,(concat shimbun-nikkei-url "news/keizai/") shimbun-nikkei-get-headers-default shimbun-nikkei-prepare-article-default) ("sangyo" "篌罐" ,(concat shimbun-nikkei-url "news/sangyo/") shimbun-nikkei-get-headers-default shimbun-nikkei-prepare-article-default) ("tento" "潟c" ,(concat shimbun-nikkei-url "news/tento/") shimbun-nikkei-get-headers-default2 shimbun-nikkei-prepare-article-default2) ("kansai" "∵タ" ,(concat shimbun-nikkei-url "kansai/") shimbun-nikkei-get-headers-kansai shimbun-nikkei-prepare-article-kansai) ("it.business" "IT吾" "http://it.nikkei.co.jp/business/news/index.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.busi_gyoukai" "罐(IT吾)" "http://it.nikkei.co.jp/business/news/busi_gyoukai.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.biz-system" "篌罐宴激鴻" "http://it.nikkei.co.jp/business/news/busi_system.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.sox" "筝鐚鰹鹿鐚御吾" "http://it.nikkei.co.jp/business/special/sox.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.data" "若帥ц鐚鐚翫" "http://it.nikkei.co.jp/business/column/data.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.taidan" "絲乗" "http://it.nikkei.co.jp/business/column/taidan.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.internet" "ゃ潟帥若" "http://it.nikkei.co.jp/internet/news/index.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.broad" "若潟" "http://it.nikkei.co.jp/internet/news/broadband.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.net_gyoukai" "罐(ゃ潟帥若)" "http://it.nikkei.co.jp/internet/news/net_gyoukai.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.iptel" "紊罘遵鐚鐚育肢" "http://it.nikkei.co.jp/internet/special/iptel.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.tele" "冗祉" "http://it.nikkei.co.jp/internet/special/tele.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.broadcast" "遺吾帥冗" "http://it.nikkei.co.jp/internet/special/d_broadcast.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.internet-column" "ゃ潟帥若:潟" "http://it.nikkei.co.jp/internet/column/koike.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.contents" "潟潟潟吾" "http://it.nikkei.co.jp/internet/column/contents.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.ec" "EC" "http://it.nikkei.co.jp/internet/news/ec.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.policy" "睡紫輝荐" "http://it.nikkei.co.jp/internet/news/seisaku.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.e-gov" "茵帥鐚鐚翫" "http://it.nikkei.co.jp/business/special/e-gov.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.mobile" "≪ゃ" "http://it.nikkei.co.jp/mobile/news/index.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.mob_gyoukai" "罐(≪ゃ)" "http://it.nikkei.co.jp/mobile/news/gyoukai.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.mobsoft" "泣若" "http://it.nikkei.co.jp/mobile/news/soft.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.mobcon" "潟潟潟" "http://it.nikkei.co.jp/mobile/news/contents.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.money" "阪遣c≪吾" "http://it.nikkei.co.jp/mobile/special/money.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.one" "潟祉違紊" "http://it.nikkei.co.jp/mobile/special/one.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.security" "祉ャ" "http://it.nikkei.co.jp/security/news/index.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.net_crime" "臀" "http://it.nikkei.co.jp/security/news/net_crime.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.digital" "吾帥絎狗誌潟帥" "http://it.nikkei.co.jp/digital/news/index.aspx" shimbun-nikkei-get-headers-it-default shimbun-nikkei-prepare-article-default) ("it.pc" "PC鐚吾帥<" "http://it.nikkei.co.jp/pc/news/index.aspx" shimbun-nikkei-get-headers-it-pc shimbun-nikkei-prepare-article-default2) ("kokunai" "絽贋羈" "http://markets.nikkei.co.jp/kokunai/summary.aspx" shimbun-nikkei-get-headers-stock shimbun-nikkei-prepare-article-default4) ("markets" "羌桁网羈" "http://markets.nikkei.co.jp/kaigai/summary.aspx" shimbun-nikkei-get-headers-stock shimbun-nikkei-prepare-article-default4) ("kawase" "堺炊羈" "http://markets.nikkei.co.jp/kawase/summary.aspx" shimbun-nikkei-get-headers-stock shimbun-nikkei-prepare-article-default4) ("kinri" "糸究┤誌治鐚∽羈" "http://markets.nikkei.co.jp/kawase/kinri.aspx" shimbun-nikkei-get-headers-stock shimbun-nikkei-prepare-article-default4) ("ft" "宴c潟激c祉帥ゃ" "http://markets.nikkei.co.jp/kaigai/ft.aspx" shimbun-nikkei-get-headers-ft shimbun-nikkei-prepare-article-default4) ("dj" "膠潟祉吾с若潟" "http://markets.nikkei.co.jp/kaigai/dj.aspx" shimbun-nikkei-get-headers-dj shimbun-nikkei-prepare-article-default4) ("ngyoseki" "篌罐罐膰障ャ若" "http://markets.nikkei.co.jp/kokunai/gyoseki.aspx" shimbun-nikkei-get-headers-stock shimbun-nikkei-prepare-article-default4) ("gyosuuchi" "罐膰丈医" "http://markets.nikkei.co.jp/kokunai/bunkatsu2.aspx?genre=m4" shimbun-nikkei-get-headers-gyosuuchi shimbun-nikkei-prepare-article-default4) ("gyoseki" "羌桁篌罐罐膰" "http://markets.nikkei.co.jp/kaigai/gyoseki.aspx" shimbun-nikkei-get-headers-stock shimbun-nikkei-prepare-article-default4) ("china" "筝純吾剛" ,(concat shimbun-nikkei-url "china/news/") shimbun-nikkei-get-headers-china shimbun-nikkei-prepare-article-default4) ("market" "紫堺" ,(concat shimbun-nikkei-url "news/market/") shimbun-nikkei-get-headers-market shimbun-nikkei-prepare-article-market) ("kaigai" "初" ,(concat shimbun-nikkei-url "news/kaigai/") shimbun-nikkei-get-headers-default shimbun-nikkei-prepare-article-default) ("seiji" "炊音" ,(concat shimbun-nikkei-url "news/seiji/") shimbun-nikkei-get-headers-default shimbun-nikkei-prepare-article-default) ("shakai" "腓鞘" ,(concat shimbun-nikkei-url "news/shakai/") shimbun-nikkei-get-headers-default shimbun-nikkei-prepare-article-default) ("retto" "医腟羝" ,(concat shimbun-nikkei-url "news/retto/") shimbun-nikkei-get-headers-retto shimbun-nikkei-prepare-article-default4) ("sports" "鴻若" "http://sports.nikkei.co.jp/" shimbun-nikkei-get-headers-sports shimbun-nikkei-prepare-article-sports) ("newpro" "域遵" ,(concat shimbun-nikkei-url "newpro/news/") shimbun-nikkei-get-headers-newpro shimbun-nikkei-prepare-article-newpro) ("release" "鴻若" "http://release.nikkei.co.jp/" shimbun-nikkei-get-headers-release shimbun-nikkei-prepare-article-release) ("release.it.comp" "鴻若(鐚鐚器潟潟ャ若帥)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=1&sindID=1" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.it.peri" "鴻若(鐚鐚器莨堺)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=1&sindID=2" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.it.sys" "鴻若(鐚鐚器激鴻祉純)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=1&sindID=3" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.it.cont" "鴻若(鐚鐚器宴祉潟潟潟)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=1&sindID=4" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.it.net" "鴻若(鐚鐚器篆<祉ゃ潟帥若)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=1&sindID=5" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.it.lsi" "鴻若(鐚鐚器絨篏)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=1&sindID=6" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.it.game" "鴻若(鐚鐚器蚊若糸┓罐)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=1&sindID=7" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.it.etc" "鴻若(鐚鐚器篁鐚鐚顔∫)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=1&sindID=8" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.dist.depart" "鴻若(羌鐚乗襖綺祉鴻若)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=2&sindID=9" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.dist.ryohan" "鴻若(羌鐚顙綺)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=2&sindID=10" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.dist.zakka" "鴻若(羌鐚羇脂莢)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=2&sindID=11" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.dist.cosme" "鴻若(羌鐚肢糸膕у)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=2&sindID=12" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.dist.car" "鴻若(羌鐚荵)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=2&sindID=13" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.dist.book" "鴻若(羌鐚悟)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=2&sindID=14" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.dist.record" "鴻若(羌鐚潟若祉蚊若)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=2&sindID=15" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.dist.food" "鴻若(羌鐚蕋脂2)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=2&sindID=16" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.dist.mercha" "鴻若(羌鐚腓障糸後2罐)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=2&sindID=17" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.dist.mail" "鴻若(羌鐚篆<肢┴顙紕)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=2&sindID=18" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.dist.netshop" "鴻若(羌鐚激с潟)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=2&sindID=19" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.dist.etc" "鴻若(羌鐚篁罐)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=2&sindID=20" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.money.bank" "鴻若(鐚茵私拭)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=3&sindID=57" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.money.sec" "鴻若(鐚荐弱娯腓)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=3&sindID=58" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.money.am" "鴻若(鐚莖篆∴篌腓)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=3&sindID=59" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.money.insu" "鴻若(鐚篆坂腓)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=3&sindID=60" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.money.etc" "鴻若(鐚篁)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=3&sindID=61" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.maker.chemi" "鴻若(<若種絖糸肢)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=4&sindID=31" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.maker.mecha" "鴻若(<若種罘罌違脂絮)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=4&sindID=32" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.maker.car" "鴻若(<若種荵肢荵)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=4&sindID=33" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.maker.elec" "鴻若(<若種絎狗祉脂紙)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=4&sindID=34" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.maker.food" "鴻若(<若種蕋脂2)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=4&sindID=35" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.maker.sports" "鴻若(<若種鴻若糸┓罐順)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=4&sindID=36" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.maker.apparel" "鴻若(<若種≪紫羇紫)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=4&sindID=37" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.maker.commu" "鴻若(<若種篆≧紫仮絲罘罌)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=4&sindID=38" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.maker.etc" "鴻若(<若種篁<若)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=4&sindID=39" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.service.medic" "鴻若(泣若刻紫紫霛)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=5&sindID=40" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.service.rest" "鴻若(泣若刻蕋臥)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=5&sindID=41" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.service.trans" "鴻若(泣若刻莠吾脂)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=5&sindID=42" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.service.energy" "鴻若(泣若刻)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=5&sindID=43" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.service.enter" "鴻若(泣若刻潟帥若ゃ潟<潟)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=5&sindID=44" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.service.env" "鴻若(泣若刻医)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=5&sindID=45" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.service.consul" "鴻若(泣若刻潟潟泣c潟)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=5&sindID=46" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.service.edu" "鴻若(泣若刻蚊紫篆)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=5&sindID=47" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.service.haken" "鴻若(泣若刻篋堺羇冗)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=5&sindID=48" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.service.life" "鴻若(泣若刻羇脂∫)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=5&sindID=49" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.service.media" "鴻若(泣若刻<c)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=5&sindID=50" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.service.lease" "鴻若(泣若刻若)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=5&sindID=51" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.service.travel" "鴻若(泣若刻茵祉)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=5&sindID=52" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.service.etc" "鴻若(泣若刻篁泣若号キ)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=5&sindID=53" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.const.const" "鴻若(泣若刻綮肴┃糸)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=6&sindID=54" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.const.house" "鴻若(泣若刻篏鎘)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=6&sindID=56" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("release.const.etc" "鴻若(泣若刻篁綮肴┃∫)" "http://release.nikkei.co.jp/isclassList.cfm?lindID=5&sindID=53" shimbun-nikkei-get-headers-release2 shimbun-nikkei-prepare-article-release2) ("shasetsu" "腓乗紙ョ" "http://www.nikkei.co.jp/news/shasetsu/childKijiIchiran.js" ;; The contents of IndexKijiIchiran.js will be appended afterward. shimbun-nikkei-get-headers-shasetsu shimbun-nikkei-prepare-article-default)) "Alist of group names and parameters. Each parameters include a Japanese group name, an index page, a function used to get headers and a function used to prepare an article.") (defvar shimbun-nikkei-server-name "ユ腟羝域") (defvar shimbun-nikkei-from-address "nobody@example.com") (defvar shimbun-nikkei-content-start "") (defvar shimbun-nikkei-content-end "") (defvar shimbun-nikkei-x-face-alist '(("default" . "\ Face: iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAABGdBTUEAALGPC/xhBQAAAA9 QTFRF////AY8ACZYCg8p7////e1VqQQAAAAlwSFlzAAAOnAAADsQBdfaEgQAAACh0RVh0U29mdHd hcmUAWFYgVmVyc2lvbiAzLjEwYSAgUmV2OiAxMi8yOS85NFhtieMAAADcSURBVCjPXZHhkcUgCIS 9vAouaUDRAqKPCnT7r+lYTGLm+LffsLADIXh9RM7wKvH6p/MiG3XSdhNqExi7xMcw5ADuMfSjFqC KxstR0BXoB87LUTAIFH2CZIoABNsCXwNxhrCJDcg3SL+2s6rNRIvBIuVv08GkjBIYgoZU6oHmwLR tHWptOwEbfAOjEhQHTMoGCVUn2IHkV/qZYKTS2RAfIKWLg+2yJL1AmENb0jkzhLlW5AHuMWFjZB4 1q+24bhrXl7IHXW8RP3Jcj+HRurxfycnn67m+/PX+j976D3rKSsvKwOwqAAAAB3RJTUUH1wgDChM rIe5fHAAAAABJRU5ErkJggg==") ("\\`release" . "\ Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAWAgMAAAD7mfc/AAAABGdBTUEAALGPC/xhBQAAAAx QTFRFBjKeZ4rcxdHp+/z7lhoK9wAAAC90RVh0U29mdHdhcmUAWFYgVmVyc2lvbiAzLjEwYStGTG1 hc2sgIFJldjogMTIvMjkvOTQbx6p8AAABBUlEQVR4nD3MIU/DQBwF8D8d62W9wGqalYRSREUV9xX aC0snKzgQC8GgmUFg2Lh+AhD11dUYEsj2Ea6i/swEbqKiTZYeHIJnXn7iPehwXRUfs7tpbL5Biyo uZOiZYHJoUMb5y3twhhSFnZHR2NjZz7hHIGkyiJFMP8FCILhpIiqKp+EthkqMLMQ3TUD2Y8jEyQi LuLFJ6wMVrjsWRgvOPYFEBqEvjSuAcwJK55uVuv7Qs7n6xzYlSWrYoNHn6YV1cJ06Gh2LvCOs5Eo jZ9Gph5VYg57fTN0Q/I1Gx+bDw9BZcP22ZQ8WPBKVadTs6xiKlaIaOdv70SssB7/oy7JbxPXlcqJ +AFOYhEr5ENrbAAAAB3RJTUUH1AQGFzot7I86fAAAAABJRU5ErkJggg=="))) (defvar shimbun-nikkei-expiration-days 7) (luna-define-method shimbun-groups ((shimbun shimbun-nikkei)) (mapcar 'car shimbun-nikkei-group-table)) (luna-define-method shimbun-current-group-name ((shimbun shimbun-nikkei)) (nth 1 (assoc (shimbun-current-group-internal shimbun) shimbun-nikkei-group-table))) (luna-define-method shimbun-index-url ((shimbun shimbun-nikkei)) (nth 2 (assoc (shimbun-current-group-internal shimbun) shimbun-nikkei-group-table))) (luna-define-method shimbun-get-headers ((shimbun shimbun-nikkei) &optional range) (let* ((case-fold-search t) (group (shimbun-current-group-internal shimbun)) (fn (nth 3 (assoc group shimbun-nikkei-group-table))) (shimbun-nikkei-from-address (concat (shimbun-server-name shimbun) " (" (shimbun-current-group-name shimbun) ")")) (folder (nth 2 (assoc group shimbun-nikkei-group-table)))) (when (and (not (string-match "\\`http://markets\\.nikkei\\.co\\.jp/" folder)) (or (member group '("kaigai" "seiji")) (not (eq (aref folder (1- (length folder))) ?/))) (string-match "[^/]/[^/]\\|[^/]/\\'" folder)) (setq folder (substring folder 0 (+ (match-beginning 0) 2)))) (while (search-forward "\r" nil t) (delete-char -1)) (goto-char (point-min)) (when (fboundp fn) (shimbun-sort-headers (funcall fn group folder shimbun range))))) (defun shimbun-nikkei-expand-url (url folder) "Make a fullname of URL relative to FOLDER. If URL begins with `http://', FOLDER is ignored." (save-match-data (cond ((string-match "=http://" url) (substring url (1+ (match-beginning 0)))) ((string-match "\\`http://" url) url) ((string-match "\\`/" url) (shimbun-expand-url url shimbun-nikkei-url)) (t (concat folder url))))) (defun shimbun-nikkei-make-date-string (year month day &optional time timezone adj) "Run `shimbun-make-date-string' and fix a day if needed. Optional ADJ is the number of days that adjust the day of month." (save-match-data (let ((ctime (time-convert nil 'list)) (date (shimbun-make-date-string year month day time timezone)) (system-time-locale "C") ms ls) (setq time (shimbun-time-parse-string date) ms (car time) ls (cadr time)) (when adj (setq ls (+ ls (* adj (eval-when-compile (* 60 60 24)))) ms (+ (/ ls 65536) ms) ls (mod ls 65536))) (cond ((or (> ms (car ctime)) (and (= ms (car ctime)) (> ls (cadr ctime)))) ;; It should be the same time yesterday. (setq ms (1- ms)) (when (< (setq ls (- ls (eval-when-compile (- (* 60 60 24) 65536)))) 0) (setq ms (1- ms) ls (+ ls 65536))) (format-time-string "%a, %d %b %Y %R +0900" (list ms ls))) (adj (format-time-string "%a, %d %b %Y %R +0900" (list ms ls))) (t date))))) (defvar shimbun-nikkei-tmp-ids nil) (defvar shimbun-nikkei-tmp-subjects nil) (defun shimbun-nikkei-get-headers-default (group folder shimbun range &optional headers) "Default function used to fetch headers. GROUP is a group name. FOLDER is a parent url. If HEADERS is non-nil, it is appended to newly fetched headers." (unless headers (setq shimbun-nikkei-tmp-ids nil shimbun-nikkei-tmp-subjects nil)) (let (next time url subject serial day month year category id) (goto-char (point-min)) (while (re-search-forward "]+\\)?>\ [\t\n ]*(\\([012][0-9]:[0-5][0-9]\\))[\t\n ]*" nil t) (setq next (match-end 0) time (match-string 1)) (when (and (re-search-backward "]*>\ [\t\n ]*\\(?:]+>[\t\n ]*\\)*\\([^\n<]+\\)\\(?:[\t\n ]*]+>\\)*\ [\t\n ]*" nil t) (progn (setq url (match-string 1) subject (match-string 2)) (when (string-match "[\t\n ]+\\'" url) (setq url (substring url 0 (match-beginning 0)))) (or (and (string-match "\ \\(?:/20[0-9][0-9][01][0-9][0-3][0-9]\\|/index\\.aspx\\?n=\\)\ \\(.+\\)\\([0-3][0-9]\\)\\([01][0-9]\\)\\(20[0-9][0-9]\\)" url) (prog1 t (setq serial (downcase (match-string 1 url)) day (match-string 2 url) month (match-string 3 url) year (match-string 4 url)))) (and (string-match "\ \\(20[0-9][0-9]\\)\\([01][0-9]\\)\\([0-3][0-9]\\)\\([^\n\t ./=]+\\)" url) (prog1 t (setq year (match-string 1 url) month (match-string 2 url) day (match-string 3 url) serial (downcase (match-string 4 url))))))) (and (string-match "\ \\`http://\\([^\t\n ./]+\\)\\.nikkei\\.co\\.jp/\\(?:\\([^\t\n /]+\\)/news/\\)?\ \\|\\`/news/\\([^\t\n /]+\\)/" url) (prog1 t (setq category (if (match-beginning 2) (concat (match-string 2 url) "." (match-string 1 url)) (or (match-string 1 url) (match-string 3 url)))))) (progn (setq id (concat "<" year month day "." (subst-char-in-string ? ?_ serial) "%" category "." group "." shimbun-nikkei-top-level-domain ">")) (not (or (member id shimbun-nikkei-tmp-ids) (and (>= (length subject) 16) (member subject shimbun-nikkei-tmp-subjects)))))) (push id shimbun-nikkei-tmp-ids) (push subject shimbun-nikkei-tmp-subjects) (push (shimbun-create-header 0 subject shimbun-nikkei-from-address (shimbun-nikkei-make-date-string (string-to-number year) (string-to-number month) (string-to-number day) time) id "" 0 0 (shimbun-nikkei-expand-url url folder)) headers)) (goto-char next)) headers)) (defun shimbun-nikkei-get-headers-top (group folder shimbun range) "Function used to fetch headers for the `top' group." (setq shimbun-nikkei-tmp-ids nil) (setq shimbun-nikkei-tmp-subjects nil) (let (headers) ;; Get headers for the retto group. (while (re-search-forward "[\t\n ]*\\([^<]+\\):[\n\t ]*\\([^<]+\\)" nil t) (push (shimbun-create-header 0 (concat "[" (match-string 7) "] " (match-string 8)) ;; subject shimbun-nikkei-from-address (shimbun-nikkei-make-date-string (string-to-number (match-string 3)) (string-to-number (match-string 4)) (string-to-number (match-string 5))) (concat "<" (match-string 2) "." (downcase (match-string 6)) "%retto.top." shimbun-nikkei-top-level-domain ">") "" 0 0 (shimbun-nikkei-expand-url (match-string 1) folder)) headers)) (shimbun-nikkei-get-headers-default group folder shimbun range headers))) (defun shimbun-nikkei-get-headers-default2 (group folder shimbun range) "Function used to fetch headers for the tento and the zinzi groups." (let (headers) (while (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "]+/\\)?" ;; 2. serial number "\\(" ;; 3. year "\\(20[0-9][0-9]\\)" ;; 4. month "\\([01][0-9]\\)" ;; 5. day "\\([0-3][0-9]\\)" "[0-9a-z]+\\)" "\\.html\\)" s0 "\"" s0 ">" s0 ;; 6. subject "\\([^<>]+\\)"))) nil t) (push (shimbun-create-header 0 (match-string 6) shimbun-nikkei-from-address (shimbun-nikkei-make-date-string (string-to-number (match-string 3)) (string-to-number (match-string 4)) (string-to-number (match-string 5))) (concat "<" (downcase (match-string 2)) "%" group "." shimbun-nikkei-top-level-domain ">") "" 0 0 (shimbun-nikkei-expand-url (match-string 1) folder)) headers)) headers)) (defun shimbun-nikkei-get-headers-kansai (group folder shimbun range) "Function used to fetch headers for the kansai group." (let ((date (if (re-search-forward "\ ]+[\t\n ]+\\)*class=\"topicpath[\t\n ]+updatetime\"\ [^>]*>[\t\n ]*\\(20[0-9][0-9]\\)/\\([01]?[0-9]\\)/\\([0-3]?[0-9]\\)\ [\t\n ]+贋[\t\n ]*
    " nil t) (prog1 (shimbun-make-date-string (string-to-number (match-string 1)) (string-to-number (match-string 2)) (string-to-number (match-string 3))) (goto-char (point-min))) (let ((cts (current-time-string))) (format "%s, %02d %s %s 00:00 +0900" (substring cts 0 3) (string-to-number (substring cts 8 10)) (substring cts 4 7) (substring cts 20))))) headers) (while (re-search-forward "[\t\n ]*\\([^<]+\\)[\t\n ]*" nil t) (push (shimbun-create-header 0 (match-string 3) shimbun-nikkei-from-address date (concat "<" (subst-char-in-string ?/ ?. (downcase (match-string 2))) "%" group "." shimbun-nikkei-top-level-domain ">") "" 0 0 (shimbun-nikkei-expand-url (match-string 1) folder)) headers)) headers)) (defun shimbun-nikkei-get-headers-it-default (group folder shimbun range) "Function used to fetch headers for the it groups." (let ((pages (shimbun-header-index-pages range)) (count 0) sub-end id headers) (catch 'stop (while t (while (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "" "\\(?:" s0 "([01]?[0-9]/[0-3]?[0-9])\\)?" s0 ;; 7. subject "\\([^<]+\\)" s0 ""))) nil t) (setq sub-end (point) id (concat "<" (subst-char-in-string ? ?_ (downcase (match-string 2))) "%" group "." shimbun-nikkei-top-level-domain ">")) (if (shimbun-search-id shimbun id) (unless (zerop count) (throw 'stop nil)) (push (shimbun-create-header 0 (match-string 7) shimbun-nikkei-from-address (shimbun-nikkei-make-date-string (string-to-number (match-string 5)) (string-to-number (match-string 4)) (string-to-number (match-string 3))) id "" 0 0 (shimbun-nikkei-expand-url (match-string 1) folder)) headers)) (goto-char sub-end)) (if (and (or (not pages) (< (setq count (1+ count)) pages)) (re-search-forward "\ >> サ荐篋筝荀\ \\|罨<>" nil t)) (progn (shimbun-retrieve-url (prog1 (concat "\ http://it.nikkei.co.jp/" (or (match-string 1) (match-string 2))) (erase-buffer)) t) (goto-char (point-min))) (throw 'stop nil)))) headers)) (defun shimbun-nikkei-get-headers-it-pc (group folder shimbun range) "Function used to fetch headers for the it.pc group." (let (headers) (while (and (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "" s0 ;; 6. subject "\\([^<]+\\)" s0 ""))) nil t) (not (string-match "\\`[\t\n ]*\\'" (match-string 6)))) (push (shimbun-create-header 0 (match-string 6) shimbun-nikkei-from-address (shimbun-nikkei-make-date-string (string-to-number (match-string 5)) (string-to-number (match-string 4)) (string-to-number (match-string 3))) (concat "<" (subst-char-in-string ? ?_ (downcase (match-string 2))) "%" group "." shimbun-nikkei-top-level-domain ">") "" 0 0 (shimbun-nikkei-expand-url (concat "http://it.nikkei.co.jp/" (match-string 1)) folder)) headers)) headers)) (defun shimbun-nikkei-get-headers-stock (group folder shimbun range) "Function used to fetch headers for stock groups." (let (headers) (while (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "" s0 ;; 5. subject "\\([^<]+\\)" "" "\\(?:\n\\)?" "\\(?:\n\\)?" "[\t\n ]+(" ;; 6. month "\\([01]?[0-9]\\)" "/" ;; 7. day "\\([0-3]?[0-9]\\)" s1 ;; 8. hour "\\([0-2]?[0-9]\\)" ":" ;; 9. minute "\\([0-5]?[0-9]\\)" ")" s0 "\\(?:[\t\n ]+\\)?" ""))) nil t) (push (shimbun-create-header 0 (match-string 5) shimbun-nikkei-from-address (shimbun-nikkei-make-date-string (string-to-number (match-string 4)) (string-to-number (match-string 6)) (string-to-number (match-string 7)) (format "%02d:%02d" (string-to-number (match-string 8)) (string-to-number (match-string 9)))) (concat "<" (downcase (match-string 2)) "." (downcase (save-match-data (replace-regexp-in-string "[\t\n ]+" "." (match-string 3)))) "%" group "." shimbun-nikkei-top-level-domain ">") "" 0 0 (shimbun-nikkei-expand-url (match-string 1) folder)) headers)) (shimbun-sort-headers headers))) (defun shimbun-nikkei-get-headers-ft (group folder shimbun range) "Function used to fetch headers for the ft group." (let (headers) (while (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "" s0 ;; 4. subject "\\([^<]+\\)" s0 "[(鐚]" ;; 5. month "\\([01]?[0-9]\\)" "/" ;; 6. day "\\([0-3]?[0-9]\\)" "[)鐚]"))) nil t) (push (shimbun-create-header 0 (match-string 4) shimbun-nikkei-from-address (shimbun-nikkei-make-date-string (string-to-number (match-string 3)) (string-to-number (match-string 5)) (string-to-number (match-string 6)) nil nil 1) (concat "") "" 0 0 (shimbun-nikkei-expand-url (match-string 1) folder)) headers)) headers)) (defun shimbun-nikkei-get-headers-dj (group folder shimbun range) "Function used to fetch headers for the dj group." (let (headers) (while (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "\\(?:\\)?" s0 ;; 4. subject "\\([^<]+\\)" s0 "[(鐚]" ;; 5. month "\\([01]?[0-9]\\)" "/" ;; 6. day "\\([0-3]?[0-9]\\)" "[)鐚]" s0 ""))) nil t) (push (shimbun-create-header 0 (match-string 4) shimbun-nikkei-from-address (shimbun-nikkei-make-date-string (string-to-number (match-string 3)) (string-to-number (match-string 5)) (string-to-number (match-string 6))) (concat "") "" 0 0 (shimbun-nikkei-expand-url (match-string 1) folder)) headers)) (shimbun-sort-headers headers))) (defun shimbun-nikkei-get-headers-gyosuuchi (group folder shimbun range) "Function used to fetch headers for the gyosuuchi group." (let (headers) (while (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "" s0 ;; 5. subject "\\([^<]+\\)" "" "\\(?:\n\\)?" "\\(?:\n\\)?" "[\t\n ]+(" ;; 6. month "\\([01]?[0-9]\\)" "/" ;; 7. day "\\([0-3]?[0-9]\\)" s1 ;; 8. hour "\\([0-2]?[0-9]\\)" ":" ;; 9. minute "\\([0-5]?[0-9]\\)" ")" s0 "\\(?:[\t\n ]+\\)?" ""))) nil t) (push (shimbun-create-header 0 (match-string 5) shimbun-nikkei-from-address (shimbun-nikkei-make-date-string (string-to-number (match-string 4)) (string-to-number (match-string 6)) (string-to-number (match-string 7)) (format "%02d:%02d" (string-to-number (match-string 8)) (string-to-number (match-string 9)))) (concat "<" (downcase (match-string 2)) "." (downcase (save-match-data (replace-regexp-in-string "[\t\n ]+" "." (match-string 3)))) "%" group "." shimbun-nikkei-top-level-domain ">") "" 0 0 (shimbun-nikkei-expand-url (concat "\ http://markets.nikkei.co.jp/kokunai/bunkatsu3.aspx" (match-string 1)) folder)) headers)) (shimbun-sort-headers headers))) (defun shimbun-nikkei-get-headers-market (group folder shimbun range) "Function used to fetch headers for the market group." (let ((subregexp (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "class=\"sub_bar\"" s0 ">" s0 ;; 1. subtitle "\\([^\t\n <]+\\)" ".+class=\"sub_bar_time\"" s0 ">" s0 "贋" s0 "鐚" s0 ;; 2. month "\\([01]?[0-9]\\)" "" ;; 3. day "\\([0-3]?[0-9]\\)" "\\(?:" s1 ;; 4. hour:minute "\\([012]?[0-9]:[0-5]?[0-9]\\)" "\\)?")))) subdata start end subtitle month day time from year headers) (when (re-search-forward subregexp nil t) (setq subdata (copy-sequence (match-data)) start (point)) (while start (if (re-search-forward subregexp nil t) (progn (setq subdata (prog1 (copy-sequence (match-data)) (set-match-data subdata)) end (point)) (goto-char start)) (set-match-data subdata) (setq end nil)) (setq subtitle (match-string 1) month (string-to-number (match-string 2)) day (string-to-number (match-string 3)) time (match-string 4)) (setq from (replace-regexp-in-string ")" (concat "/" (replace-regexp-in-string "\\( \\)+" "" subtitle) ")") shimbun-nikkei-from-address)) (while (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "]+/" ;; 2. id "\\(" ;; 3. year "\\(20[0-9][0-9]\\)" "[^.]+" "\\)" "\\.html\\)" s0 "\"" s0 ">\\(?:" s0 "<[^>]+>\\)*" s0 ;; 4. subject "\\([^<]+\\)" s0))) end t) (setq year (string-to-number (match-string 3))) (push (shimbun-create-header 0 (match-string 4) from (shimbun-nikkei-make-date-string year month day time) (format "<%s%%%s.%s>" (downcase (match-string 2)) group shimbun-nikkei-top-level-domain) "" 0 0 (shimbun-nikkei-expand-url (match-string 1) shimbun-nikkei-url)) headers)) (setq start end)) headers))) (defun shimbun-nikkei-get-headers-china (group folder shimbun range) "Function used to fetch headers for the china group." (let (headers) (while (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "" s0 "\\(?:([01]?[0-9]/[0-3]?[0-9])\\)?" s0 ;; 7. subject "\\([^<]+\\)" ""))) nil t) (push (shimbun-create-header 0 (match-string 6) shimbun-nikkei-from-address (shimbun-nikkei-make-date-string (string-to-number (match-string 3)) (string-to-number (match-string 4)) (string-to-number (match-string 5))) (concat "<" (downcase (match-string 2)) "%" group "." shimbun-nikkei-top-level-domain ">") "" 0 0 (shimbun-nikkei-expand-url (match-string 1) folder)) headers)) headers)) (defun shimbun-nikkei-get-headers-retto (group folder shimbun range) "Function used to fetch headers for the retto group." (when (re-search-forward "\ ]+>\\([^\t\n ]+\\)" nil t) (let ((start (match-end 0)) (region (match-string 1)) end next subject url serial year month day time headers) (while start (if (re-search-forward "\ ]+>\\([^\t\n ]+\\)" nil t) (setq end (match-end 0) next (match-string 1)) (setq end nil)) (while (progn (goto-char start) (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "" s0 "" s0 "" s0))) (regexp-quote subject)) end t) (setq url (match-string 1))) (push (shimbun-create-header 0 (concat "[" region "] " subject) shimbun-nikkei-from-address (shimbun-nikkei-make-date-string year month day time) (concat "<" serial "%" group "." shimbun-nikkei-top-level-domain ">") "" 0 0 (shimbun-nikkei-expand-url url folder)) headers)) (setq start end region next)) headers))) (defun shimbun-nikkei-get-headers-sports (group folder shimbun range) "Function used to fetch headers for the sports group." ;; Skip headlinenews. (re-search-forward "\ [\t\n ]*贋逸[01]?[0-9][0-3]?[0-9]" nil t) (let (category headers) (while (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "" s0 "(" ;; 5. month "\\([01]?[0-9]\\)" "/" ;; 6. day "\\([0-3]?[0-9]\\)" ")" s0 ;; 7. subject "\\([^<]+\\)"))) nil t) (setq category (match-string 4)) (push (shimbun-create-header 0 (concat "[" category "] " (match-string 7)) shimbun-nikkei-from-address (shimbun-nikkei-make-date-string (string-to-number (match-string 3)) (string-to-number (match-string 5)) (string-to-number (match-string 6))) (concat "<" (downcase (match-string 2)) "%" category "." group "." shimbun-nikkei-top-level-domain ">") "" 0 0 (match-string 1)) headers)) headers)) (defun shimbun-nikkei-get-headers-newpro (group folder shimbun range) "Function used to fetch headers for the newpro group." (when (re-search-forward ">[\t\n ]*井域遵ャ若[\t\n ]*<" nil t) (narrow-to-region (point) (or (search-forward "" nil t) (point-max))) (goto-char (point-min)) (let (headers) (while (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "" s0 ;; 6. subject "\\([^<]+\\)"))) nil t) (push (shimbun-create-header 0 (match-string 6) shimbun-nikkei-from-address (shimbun-nikkei-make-date-string (string-to-number (match-string 3)) (string-to-number (match-string 4)) (string-to-number (match-string 5))) (concat "<" (downcase (match-string 2)) "%" group "." shimbun-nikkei-top-level-domain ">") "" 0 0 (shimbun-nikkei-expand-url (match-string 1) folder)) headers)) (widen) headers))) (defun shimbun-nikkei-get-headers-release (group folder shimbun range) "Function used to fetch headers for the release group." (let (url id subject sub-end year month day headers) (while (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "" s0 ;; 3. subject "\\([^<]+\\)"))) nil t) (setq url (match-string 1) id (downcase (match-string 2)) subject (match-string 3) sub-end (point)) (when (re-search-backward "\ >[\t\n ]*\\(20[0-9][0-9]\\)/\\([01][0-9]\\)/\\([0-3][0-9]\\)[^0-9]" nil t) (push (shimbun-create-header 0 subject shimbun-nikkei-from-address (shimbun-nikkei-make-date-string (setq year (string-to-number (match-string 1))) (setq month (string-to-number (match-string 2))) (setq day (string-to-number (match-string 3)))) (format "<%d%02d%02d.%s%%%s.%s>" year month day id group shimbun-nikkei-top-level-domain) "" 0 0 (shimbun-nikkei-expand-url url folder)) headers) (goto-char sub-end))) headers)) (defun shimbun-nikkei-get-headers-release2 (group folder shimbun range) "Function used to fetch headers for the release-in-detail groups." (let ((pages (shimbun-header-index-pages range)) (count 0) url id subject sub-end year month day headers) (catch 'stop (while t (while (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "" s0 ;; 3. subject "\\([^<]+\\)"))) nil t) (setq url (match-string 1) id (downcase (match-string 2)) subject (match-string 3) sub-end (point)) (when (re-search-backward "\ >[\t\n ]*\\(20[0-9][0-9]\\)/\\([01][0-9]\\)/\\([0-3][0-9]\\)[^0-9]" nil t) (setq year (string-to-number (match-string 1)) month (string-to-number (match-string 2)) day (string-to-number (match-string 3)) id (format "<%d%02d%02d.%s%%%s.%s>" year month day id group shimbun-nikkei-top-level-domain)) (if (shimbun-search-id shimbun id) (unless (zerop count) (throw 'stop nil)) (push (shimbun-create-header 0 subject shimbun-nikkei-from-address (shimbun-nikkei-make-date-string year month day) id "" 0 0 (shimbun-nikkei-expand-url (concat "http://release.nikkei.co.jp/" url) folder)) headers)) (goto-char sub-end))) (if (and (or (not pages) (< (setq count (1+ count)) pages)) (progn (goto-char (point-min)) (re-search-forward "[\t\n ]*罨<[\t\n ]*>[\t\n ]*" nil t))) (progn (shimbun-retrieve-url (prog1 (concat "http://release.nikkei.co.jp/" (match-string 1)) (erase-buffer)) t) (goto-char (point-min))) (throw 'stop nil)))) headers)) (defun shimbun-nikkei-get-headers-shasetsu (group folder shimbun range) "Function used to fetch headers for the shasetsu group." (goto-char (point-max)) (insert (with-temp-buffer (shimbun-retrieve-url "http://www.nikkei.co.jp/news/shasetsu/IndexKijiIchiran.js" t) (buffer-string))) (goto-char (point-min)) (let (headers) (while (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "]*>" s0 ;; 4. subject "\\(\\(?:腓乗\\|ョ\\)[^<]*[(鐚]" s0 ;; 5. month "\\([01]?[0-9]\\)" s0 "/" s0 ;; 6. day "\\([0-3]?[0-9]\\)" s0 "[)鐚]\\)" s0 ""))) nil t) (push (shimbun-create-header 0 (subst-char-in-string ?鐚 ?\) (subst-char-in-string ?鐚 ?\( (match-string 4))) shimbun-nikkei-from-address (shimbun-nikkei-make-date-string (string-to-number (match-string 3)) (string-to-number (match-string 5)) (string-to-number (match-string 6))) (concat "<" (downcase (match-string 2)) "%" group "." shimbun-nikkei-top-level-domain ">") "" 0 0 (shimbun-nikkei-expand-url (match-string 1) folder)) headers)) (nreverse headers))) (luna-define-method shimbun-make-contents :before ((shimbun shimbun-nikkei) header) (let ((fn (nth 4 (assoc (shimbun-current-group-internal shimbun) shimbun-nikkei-group-table))) (case-fold-search t)) (while (search-forward "\r" nil t) (delete-char -1)) (goto-char (point-min)) (while (re-search-forward "[\t\n ]*\\(?:\ ]+\\)?>\ \\|\ \\|]+>[\t\n ]*鐚≦ぇ\\(?:糸\\)?鐚[\t\n ]*\ \\|\\(?:]+>[\t\n ]*\\)?]+>\\(?:[\t\n ]*\\)?\ \\)[\t\n ]*" nil t) (delete-region (match-beginning 0) (match-end 0))) (goto-char (point-min)) (if (and (fboundp fn) (funcall fn header)) (shimbun-with-narrowed-article shimbun ;; Remove
    tags surrounding images. (while (and (search-forward "
    " nil t) (progn (backward-char 1) (shimbun-end-of-tag "center" t)) (save-match-data (re-search-backward "]+\\)\ \\|![^>]+\\)>[\t\n ]*\\)+\ \\(]+>\\)[\t\n ]*\ \\(?:<\\(?:\\(?:/?div\\|/?p\\|/?td\\|/?tr\\)\\(?:[\t\n ]*\\|[\t\n ]+[^>]+\\)\ \\|![^>]+\\)>[\t\n ]*\\)+" nil t) (replace-match "\n\\1
    \n")) ;; Remove trailing garbage. (goto-char (point-min)) (when (re-search-forward "[\t\n ]*\ \\(?:<\\(?:\\(?:/?div\\|/?p\\)\\(?:[\t\n ]*\\|[\t\n ]+[^>]+\\)\\|![^>]+\\)>\ [\t\n ]*\\)+\\'" nil t) (replace-match "\n"))) (erase-buffer) (insert "\ Couldn't extract the body for this article.
    \ Please visit the original page.\ \n")) (goto-char (point-min)))) (defun shimbun-nikkei-prepare-article-default-0 (&rest args) "Default function used to prepare contents of an article." (let (photo-end body) (when (re-search-forward "" nil t) (setq photo-end (point)))) (when (or (and (re-search-forward "\ [\t\n ]*" nil t) (progn (setq body (point)) (re-search-forward "\ \\(?:[\t\n ]*<\\(?:p\\|p[\t\n ]+[^>]+\\|/p\\|/p[\t\n ]+[^>]+\\)>\\)*\ [\t\n ]*" nil t) (progn (setq body (match-beginning 0)) (re-search-forward "]\\|\n\n+" nil t)))) (goto-char (match-beginning 0)) (insert shimbun-nikkei-content-end) (if photo-end (progn (delete-region photo-end body) ;; Replace with . (goto-char (point-min)) (while (re-search-forward "]+[\t\n ]+\\)*\ \\(?:class=\"photo\\|summary=\"\\)" nil t) (shimbun-end-of-tag "table" t)) (progn (delete-region (match-end 3) body) (insert "\n") (goto-char (match-beginning 3))) (goto-char body)) (insert shimbun-nikkei-content-start) t))) (defun shimbun-nikkei-prepare-article-default (header) "Default function used to prepare contents of an article." (let (start end) (if (or (when (re-search-forward "[\t\n ]*" nil t) (setq start (match-end 0)) (or (re-search-forward "\\(?:[\t\n ]*<[^>]+>\\)*[\t\n ]*\ [\t\n ]*" nil t) (prog1 nil (goto-char (point-min))))) (when (re-search-forward "[\t\n ]*" nil t) (setq start (match-end 0)) (or (re-search-forward "\\(?:[\t\n ]*<[^>]+>\\)*[\t\n ]*\ [\t\n ]*" nil t) (prog1 nil (goto-char (point-min))))) (when (re-search-forward "[\t\n ]*" nil t) (setq start (match-end 0)) (or (re-search-forward "\ \\(?:[\t\n ]*<[^>]+>\\)*[\t\n ]*\\[[01]?[0-9][0-3]?[0-9][/鐚][^]]+\\]" nil t) (prog1 nil (goto-char (point-min))))) (when (re-search-forward "\ \\([\t\n ]*\\)\ \\|<\\([^\t\n >]+\\)[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*\ \\(?:class=\"photo\"\\|summary=\"ャ若\"\\)[^>]*>[\t\n ]*\ \\|[\t\n ]*" nil t) (let (st nd) (if (and (or (and (match-beginning 1) (progn (setq st (match-end 1)) (re-search-forward "\ [\t\n ]*" nil t) (setq nd (match-beginning 0)))) (and (match-beginning 2) (shimbun-end-of-tag (match-string 2) t) (setq st (match-beginning 3) nd (match-end 3)))) (re-search-forward "\ [\t\n ]*" nil t)) (progn (setq start st) (delete-region nd (match-end 0)) (insert "\n")) (setq start (match-end 0)))) (or (re-search-forward "\\(?:[\t\n ]*<[^/][^>]*>\\)*[\t\n ]*\ " nil t) (prog1 nil (goto-char (point-min))))) (when (or (re-search-forward "[\t\n ]*" nil t) (re-search-forward "[\t\n ]*" nil t)) (setq start (match-end 0)) (or (re-search-forward "\\(?:[\t\n ]*<[^>]+>\\)*[\t\n ]*\ " nil t) (prog1 nil (goto-char (point-min))))) (setq end (shimbun-nikkei-prepare-article-default-0 header)) (prog1 nil (goto-char (point-min))) ;; Filters having a potential to mistakenly extract the body follow. (when (or (re-search-forward "\ [\t\n ]*[\t\n ]*[\t\n ]*" nil t) (re-search-forward "\ \\(?:[\t\n ]*<[^>]+>\\)*[\t\n ]*" nil t) (re-search-forward "\ \\(?:[\t\n ]*<[^>]+>\\)*[\t\n ]*\ \\(?:[\t\n ]*<[^>]+>\\)*[\t\n ]*" nil t)) (setq start (match-end 0)) (or (re-search-forward "\ [\t\n ]*\\(?:<[^>]+>[\t\n ]*\\)*]+\\)*[\t\n ]align=" nil t) (prog1 nil (goto-char (point-min))))) (when (or (re-search-forward "\ \\(?:[\t\n ]*<[^i][^>]*>\\)*[\t\n ]*" nil t) (re-search-forward "" nil t) (re-search-forward "]+>[\t\n ]*" nil t)) (setq start (match-end 0)) (set-match-data nil) (while (re-search-forward "[\t\n ]*\\(?:<[^>]+>[\t\n ]*\\)*\ " nil t)) (or (match-beginning 0) (prog1 nil (goto-char (point-min)))))) (progn (unless end (goto-char (match-beginning 0)) (insert shimbun-nikkei-content-end) (goto-char start) (insert shimbun-nikkei-content-start)) t) (when (and (re-search-forward "\ ]+>[\t\n ]*鐚鐚荐篋茯[\t\n ]*" nil t) (re-search-backward "href=\"\\([^\"]+\\)" (match-beginning 0) t)) (let ((new (match-string 1)) (old (shimbun-header-xref header))) (when (string-match "[^/]/[^/]" old) (setq new (shimbun-nikkei-expand-url new (substring old 0 (1- (match-end 0))))) (shimbun-header-set-xref header new) (erase-buffer) (shimbun-retrieve-url new t) (goto-char (point-min)) (shimbun-nikkei-prepare-article-default header))))))) (defun shimbun-nikkei-prepare-article-default2 (&rest args) "Function used to prepare contents of an article for some groups." ;; Remove unwanted images. (let (start end) (while (re-search-forward "[\t\n ]*]+>[\t\n ]*]+>[\t\n ]*[\t\n ]*" nil t) (setq start (match-beginning 0) end (match-end 0)) (goto-char start) (if (re-search-forward "src=\"http://parts\\.nikkei\\.co\\.jp/parts/s\\.gif\"" end t) (delete-region start end) (goto-char end)))) (goto-char (point-min)) (when (re-search-forward "\ " nil t) (insert shimbun-nikkei-content-start) (when (re-search-forward "\ \\(?:[\t\n ]*<\\(?:p\\|p[\t\n ]+[^>]+\\|/p\\|/p[\t\n ]+[^>]+\\)>\\)*\ [\t\n ]*\ \\|\n" nil t) (goto-char (match-beginning 0)) (insert shimbun-nikkei-content-end) t))) (defun shimbun-nikkei-prepare-article-kansai (header) "Function used to prepare contents of an article for the kansai group." (let ((date (when (re-search-forward "[\t\n ]*\ \\(20[0-9][0-9]\\)/\\([01]?[0-9]\\)/\\([0-3][0-9]\\)[\t\n ]*篆[\t\n ]*<" nil t) (prog1 (shimbun-nikkei-make-date-string (string-to-number (match-string 1)) (string-to-number (match-string 2)) (string-to-number (match-string 3))) (goto-char (point-min)))))) (when (and (re-search-forward "\ ]+[\t\n ]+\\)*class=\"detailframe\\(?: clearfix\"\\)?" nil t) (shimbun-end-of-tag "div" t)) (goto-char (match-end 3)) (insert "\n" shimbun-nikkei-content-end) (goto-char (match-beginning 3)) (insert shimbun-nikkei-content-start) (when date (shimbun-header-set-date header date)) t))) (defun shimbun-nikkei-prepare-article-sports (&rest args) "Function used to prepare contents of an article for the sports group." (when (re-search-forward "\ <\\([^\t\n >]+\\)[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*\ \\(?:class=\"photo\"\\|summary=\"ャ若\"\\)[^>]*>[\t\n ]*\ \\|[\t\n ]*" nil t) (let ((start (match-end 0)) st nd) (if (and (match-beginning 1) (progn (goto-char (match-beginning 1)) (shimbun-end-of-tag (match-string 1) t)) (progn (setq st (match-beginning 3) nd (match-end 3)) (re-search-forward "\ [\t\n ]*" nil t))) (progn (delete-region nd (match-end 0)) (insert "\n") (goto-char st)) (goto-char start))) (insert shimbun-nikkei-content-start) (when (re-search-forward "\ " nil t) (goto-char (match-beginning 0)) (insert shimbun-nikkei-content-end) t))) (defun shimbun-nikkei-prepare-article-newpro (&rest args) "Function used to prepare contents of an article for the newpro group." (let (photo-end body) (when (re-search-forward "" nil t) (setq photo-end (point)))) (when (and (re-search-forward "\ [\t\n ]*" nil t) (setq body (point)) (re-search-forward "\ [\t\n ]*" nil t) (insert shimbun-nikkei-content-start) (when (re-search-forward "[\t\n ]*" nil t) (goto-char (match-beginning 0)) (insert shimbun-nikkei-content-end) t))) (defun shimbun-nikkei-prepare-article-release2 (&rest args) "Function used to prepare contents of an article for the release groups." (when (re-search-forward ">[\t\n ]*若吾潟[\t\n ]*\ \\(?:\\(?:<[^>]+>*[\t\n ]*\\)*]+\\)*\ [\t\n ]+[^\t\n >]+[\t\n ]*=[\t\n ]*\"[\t\n ]*heading[\t\n ]*\"[^>]*>\ [^<]+\\(?:[\t\n ]*<[^>]+>\\)*[\t\n ]*\\)?" nil t) (insert shimbun-nikkei-content-start) (and (re-search-forward "[\t\n ]*\\(?:<[^>]+>[\t\n ]*\\)*\ ]+\\)*[\t\n ]+class[\t\n ]*=[\t\n ]*\"[\t\n ]*\ tokushu[\t\n ]*\"" nil t) (goto-char (match-beginning 0))) (insert shimbun-nikkei-content-end) t)) (defun shimbun-nikkei-prepare-article-market (header) "Function used to prepare contents of an article for the market group." (when (re-search-forward "\ " nil t) (insert shimbun-nikkei-content-start) (when (re-search-forward "\\(?:(\\([012]?[0-9]:[0-5]?[0-9]\\))[\t\n ]*\\)?\ " nil t) (if (match-beginning 1) (progn (goto-char (1+ (match-end 1))) (let ((new (match-string 1)) (date (shimbun-header-date header))) (when (string-match "[012]?[0-9]:[0-5]?[0-9]" date) (shimbun-header-set-date header (replace-match new nil nil date))))) (goto-char (match-beginning 0))) (insert shimbun-nikkei-content-end) t))) (defun shimbun-nikkei-prepare-article-default4 (&rest args) "Function used to prepare contents of an article for some groups." (when (re-search-forward "\ \ \\|\n[\t\n ]+

    " nil t) (insert shimbun-nikkei-content-start) (when (re-search-forward "\ \ \\|" nil t) (goto-char (match-beginning 0)) (insert shimbun-nikkei-content-end) t))) (provide 'sb-nikkei) ;;; sb-nikkei.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-nytimes.el000066400000000000000000000410611434375002100214370ustar00rootroot00000000000000;;; sb-nytimes.el --- shimbun backend for The New York Times ;; Copyright (C) 2007-2010, 2019 Katsumi Yamaoka ;; Author: Katsumi Yamaoka ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-rss) (require 'sb-multi) (luna-define-class shimbun-nytimes (shimbun-newspaper shimbun-multi shimbun-rss) ()) (defvar shimbun-nytimes-url "http://www.nytimes.com/" "Name of the parent url.") (defvar shimbun-nytimes-server-name "The New York Times") (defvar shimbun-nytimes-group-table '(("homepage" "NYTIMES.COM HOMEPAGE" "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml") ("news.business" "BUSINESS" "http://www.nytimes.com/services/xml/rss/nyt/Business.xml") ("news.business.media&advertising" "Media & Advertising" "http://www.nytimes.com/services/xml/rss/nyt/MediaandAdvertising.xml") ("news.business.worldbusiness" "World Business" "http://www.nytimes.com/services/xml/rss/nyt/WorldBusiness.xml") ("news.business.smallbusiness" "Small Business" "http://www.nytimes.com/services/xml/rss/nyt/SmallBusiness.xml") ("news.business.yourmoney" "Your Money" "http://www.nytimes.com/services/xml/rss/nyt/YourMoney.xml") ("news.business.dealbook" "DealBook" "http://dealbook.blogs.nytimes.com/rss2.xml") ("news.education" "EDUCATION" "http://www.nytimes.com/services/xml/rss/nyt/Education.xml") ("news.health" "HEALTH" "http://www.nytimes.com/services/xml/rss/nyt/Health.xml") ("news.health.policy" "Health Policy" "http://www.nytimes.com/services/xml/rss/nyt/HealthCarePolicy.xml") ("news.health.psychology" "Mental Health & Behavior" "http://www.nytimes.com/services/xml/rss/nyt/Psychology.xml") ("news.world" "WORLD" "http://www.nytimes.com/services/xml/rss/nyt/International.xml") ("news.world.africa" "Africa News" "http://www.nytimes.com/services/xml/rss/nyt/Africa.xml") ("news.world.americas" "Americas News" "http://www.nytimes.com/services/xml/rss/nyt/Americas.xml") ("news.world.asia" "Asia News" "http://www.nytimes.com/services/xml/rss/nyt/AsiaPacific.xml") ("news.world.europe" "Europe News" "http://www.nytimes.com/services/xml/rss/nyt/Europe.xml") ("news.world.middleeast" "Middle East News" "http://www.nytimes.com/services/xml/rss/nyt/MiddleEast.xml") ("news.us" "U.S." "http://www.nytimes.com/services/xml/rss/nyt/National.xml") ("news.newyork" "NEW YORK / REGION" "http://www.nytimes.com/services/xml/rss/nyt/NYRegion.xml") ("news.newyork.thecity" "The City" "http://www.nytimes.com/services/xml/rss/nyt/TheCity.xml") ("news.newyork.metro" "Metro Campaigns" "http://www.nytimes.com/services/xml/rss/nyt/MetroCampaigns.xml") ("news.obituaries" "OBITUARIES" "http://www.nytimes.com/services/xml/rss/nyt/Obituaries.xml") ("news.science" "SCIENCE" "http://www.nytimes.com/services/xml/rss/nyt/Science.xml") ("news.science.earth" "Earth" "http://www.nytimes.com/services/xml/rss/nyt/Environment.xml") ("news.science.nutrition" "Nutrition" "http://www.nytimes.com/services/xml/rss/nyt/Nutrition.xml") ("news.science.space" "Space" "http://www.nytimes.com/services/xml/rss/nyt/Space.xml") ("news.sports" "SPORTS" "http://www.nytimes.com/services/xml/rss/nyt/Sports.xml") ("news.sports.basketball.college" "College Basketball" "http://www.nytimes.com/services/xml/rss/nyt/CollegeBasketball.xml") ("news.sports.football.college" "College Football" "http://www.nytimes.com/services/xml/rss/nyt/CollegeFootball.xml") ("news.sports.golf" "Golf" "http://www.nytimes.com/services/xml/rss/nyt/Golf.xml") ("news.sports.hockey" "Hockey" "http://www.nytimes.com/services/xml/rss/nyt/Hockey.xml") ("news.sports.other" "Other Sports" "http://www.nytimes.com/services/xml/rss/nyt/OtherSports.xml") ("news.sports.baseball.pro" "Pro Baseball" "http://www.nytimes.com/services/xml/rss/nyt/Baseball.xml") ("news.sports.basketball.pro" "Pro Basketball" "http://www.nytimes.com/services/xml/rss/nyt/ProBasketball.xml") ("news.sports.football.pro" "Pro Football" "http://www.nytimes.com/services/xml/rss/nyt/ProFootball.xml") ("news.sports.soccer" "Soccer" "http://www.nytimes.com/services/xml/rss/nyt/Soccer.xml") ("news.technology" "TECHNOLOGY" "http://www.nytimes.com/services/xml/rss/nyt/Technology.xml") ("news.technology.bits" "Bits" "http://bits.blogs.nytimes.com/rss2.xml") ("news.technology.circuits" "Circuits" "http://www.nytimes.com/services/xml/rss/nyt/Circuits.xml") ("news.technology.pogue" "Pogue's Posts" "http://pogue.blogs.nytimes.com/?feed=rss2") ("news.washington" "WASHINGTON" "http://www.nytimes.com/services/xml/rss/nyt/Washington.xml") ("features.arts" "ARTS" "http://www.nytimes.com/services/xml/rss/nyt/Arts.xml") ("features.arts.design" "Design" "http://www.nytimes.com/services/xml/rss/nyt/ArtandDesign.xml") ("features.arts.music" "Music" "http://www.nytimes.com/services/xml/rss/nyt/Music.xml") ("features.arts.television" "Television News" "http://www.nytimes.com/services/xml/rss/nyt/Television.xml") ("features.automobiles" "AUTOMOBILES" "http://www.nytimes.com/services/xml/rss/nyt/Automobiles.xml") ("features.books" "BOOKS" "http://www.nytimes.com/services/xml/rss/nyt/Books.xml") ("features.books.review" "Book Review" "http://www.nytimes.com/services/xml/rss/nyt/SundayBookReview.xml") ("features.dining&wine" "DINING & WINE" "http://www.nytimes.com/services/xml/rss/nyt/DiningandWine.xml") ("features.fashion" "FASHION & STYLE" "http://www.nytimes.com/services/xml/rss/nyt/FashionandStyle.xml") ("features.fashion.thursdaystyles" "Thursday Styles" "http://www.nytimes.com/services/xml/rss/nyt/ThursdayStyles.xml") ("features.fashion.weddings" "Weddings" "http://www.nytimes.com/services/xml/rss/nyt/Weddings.xml") ("features.home&garden" "HOME & GARDEN" "http://www.nytimes.com/services/xml/rss/nyt/HomeandGarden.xml") ("features.jobs" "JOBS" "http://www.nytimes.com/services/xml/rss/nyt/JobMarket.xml") ("features.magazine" "MAGAZINE" "http://www.nytimes.com/services/xml/rss/nyt/Magazine.xml") ("features.movie.news" "MOVIE NEWS" "http://www.nytimes.com/services/xml/rss/nyt/MovieNews.xml") ("features.movie.reviews" "MOVIE REVIEWS" "http://www.nytimes.com/services/xml/rss/nyt/Movies.xml") ("features.realestate" "REAL ESTATE" "http://www.nytimes.com/services/xml/rss/nyt/RealEstate.xml") ("features.theater" "THEATER" "http://www.nytimes.com/services/xml/rss/nyt/Theater.xml") ("features.travel" "TRAVEL" "http://www.nytimes.com/services/xml/rss/nyt/Travel.xml") ("features.travel.escapes" "Escapes" "http://www.nytimes.com/services/xml/rss/nyt/Escapes.xml") ("features.week_in_review" "WEEK IN REVIEW" "http://www.nytimes.com/services/xml/rss/nyt/WeekinReview.xml") ("additional.pop_top" "MOST E-MAILED ARTICLES" "http://www.nytimes.com/services/xml/rss/nyt/pop_top.xml") ;;("additional.multimedia" "MULTIMEDIA" ;; "http://www.nytimes.com/services/xml/rss/nyt/Multimedia.xml") ("opinion.editorial" "EDITORIALS / OP-ED" "http://www.nytimes.com/services/xml/rss/nyt/Opinion.xml"))) (defvar shimbun-nytimes-x-face-alist '(("default" . "\ Face: iVBORw0KGgoAAAANSUhEUgAAAHYAAAAQAgMAAAC+ZGPFAAAADFBMVEVLS0u8vLz///8ICAg XQ6oSAAABe0lEQVQY02OYkJm5atWqZavAwA1Er1i1yjETwl/AUP/5CZDuX/0LSK60qwGS81et+v8 /CirNah8DpCer3wJx98YDifWrVor8KYJKp06dA6SX38paApLOB0uvCgvrgkq3XJsza8Wqpb+ylDV TgNIrtWbmL8xyT5u1Kitr6coABo9rcwwna036lHL8+v1M2/gJX43f96x8HmZYeOSWz+QPDCfuzNl b8qqoNtbyevKKv/F9ZaXro1Y89+vrNT153SmB4cS1OX2lWdN6YiOvJ6/0ze8rK1v/a8XztL65ZSd vNh5g+KEW01e2atn62JXXk1f1gqWNVlxJBUmfmmvAYLsUJL1wOZL03pXfloCl0wwY9gvP96vNqte Ojzx+ESjd72Y4Pz7Lxre31/Cr4f4DDJP/Tuibu4o5Mz3LS2pVqO/yrKYFS1f1f5s7t4yrzTmBYWX UqqZVq6TAobBSMxQS1kuzwNSsBQxAkgvIgEj//78KBYClEcBGGK/0qqVo0gCtEBjnqbJU8gAAAAB JRU5ErkJggg=="))) (defvar shimbun-nytimes-expiration-days 7) (luna-define-method shimbun-groups ((shimbun shimbun-nytimes)) (mapcar 'car shimbun-nytimes-group-table)) (luna-define-method shimbun-index-url ((shimbun shimbun-nytimes)) (nth 2 (assoc (shimbun-current-group-internal shimbun) shimbun-nytimes-group-table))) (defvar shimbun-nytimes-retry-fetching 1) (defvar shimbun-nytimes-japanese-hankaku 'never) (luna-define-method shimbun-multi-next-url ((shimbun shimbun-nytimes) header url) (goto-char (point-min)) (when (re-search-forward "]+\\)>[\t\n ]*next[\t\n ]+page[^<]*" nil t) (let ((start (match-beginning 1)) (end (match-end 1))) (goto-char start) (when (and (re-search-forward "class=\"next\"\\|title=\"next[\t\n ]+page\"" end t) (progn (goto-char start) (re-search-forward "href=\"\\([^\"]+\\)\"" end t))) (shimbun-expand-url (match-string 1) url))))) (luna-define-method shimbun-clear-contents :around ((shimbun shimbun-nytimes) header) (or (shimbun-nytimes-clear-contents shimbun header) (progn (erase-buffer) (insert "This article may have been expired,\ use the format different from the ordinary style that NYTimes uses,\ or have not been successful to fetch. Sorry.\n") nil))) (defun shimbun-nytimes-clear-contents (shimbun header) (shimbun-strip-cr) (let ((start "\ \\(?:\ \\(?:]+[\t\n ]+\\)*class=\"post-author\"\ \\|\\(]+[\t\n ]+\\)*class=\ \"\\(?:entry\\|post\\)-content\"\\)\\)\ \\(?:[\t\n ]+[^\t\n >]+\\)*[\t\n ]*>\ \\|\ ]+\\)>\ \\)[\t\n ]*") (end "[\t\n ]*\\(\\(<[^>]+>[\t\n ]*\\)*\ \\(?:\ \ \\|\ <\\(?:/?NYT_UPDATE_BOTTOM\\|/NYT_TEXT\\)\\(?:[\t\n ]+[^>]+\\)?>\ \\)\\)") (case-fold-search t) pcont name) (goto-char (point-min)) (when (or (and (re-search-forward start nil t) (progn (save-restriction (setq pcont ;; The marker version of (match-beginning 1). (nth 2 (match-data))) (narrow-to-region (point-min) (match-end 0)) (if (and (search-backward "" nil t) (re-search-forward "\ [\t\n ]*") (delete-region (point-min) (match-end 0))) (or (when (re-search-forward end nil t) (delete-region (if (and (match-beginning 2) (progn (goto-char (match-beginning 1)) (re-search-forward "\ \\(?:<[^>]+>\\)*\\(\\|\\|\\)[\t\n ]*" (match-end 2) t))) (match-end 1) (match-beginning 0)) (point-max)) t) (when (and pcont (progn (goto-char pcont) (insert "

    ") (goto-char pcont) (shimbun-end-of-tag "div" t))) (delete-region (match-end 3) (point-max)) (delete-region (point-min) (match-beginning 3)) t)))) (progn ;; Extract blog listing. (goto-char (point-min)) (when (and (re-search-forward "\ ]+[\t\n ]+\\)*id=\"blog_comments\"" nil t) (shimbun-end-of-tag "div" t)) (delete-region (match-end 3) (point-max)) (delete-region (point-min) (match-beginning 3)) ;; Remove
      . (goto-char (point-min)) (when (re-search-forward "\ ]+[\t\n ]+\\)*class=\"commentlist\"" nil t) (cond ((shimbun-end-of-tag "ul" t) (delete-region (goto-char (match-end 3)) (match-end 0)) (insert "\n") (delete-region (goto-char (match-beginning 0)) (match-beginning 3)) (insert "\n")) ((shimbun-end-of-tag nil t) (replace-match "\n")))) ;; Remove useless links. (goto-char (point-min)) (while (and (re-search-forward "\ ]+[\t\n ]+\\)*href=\"#" nil t) (shimbun-end-of-tag "a")) (replace-match "\\2
      ")) t))) ;; Insert a new line after every image. (goto-char (point-min)) (while (re-search-forward "\\(]+>\\)[\t\n ]*" nil t) (replace-match "\\1
      ")) ;; Remove the `Skip to next paragraph' buttons. (goto-char (point-min)) (while (re-search-forward "[\t\n ]*\ \\(?:]+>[\t\n ]*\\)*\ ]*>[\t\n ]*\ Skip[\t\n ]+to[\t\n ]+next[\t\n ]+paragraph[\t\n ]*[\t\n ]*" nil t) (setq start (match-beginning 0) end (match-end 0) name (match-string 1)) (when (re-search-forward (concat "[\t\n ]*]*>[\t\n ]*[\t\n ]*") nil t) ;;(delete-region (match-beginning 0) (match-end 0)) ;; NYTimes is apt to forget to put this. (replace-match "
    ") (delete-region (goto-char start) end) (insert "\n"))) ;; Remove Next/Previous buttons. (shimbun-remove-tags "\\(div\\)[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*id=\"pageLinks\"" t) ;; Remove `Enlarge This Image', `Multimedia', and `Video'. (shimbun-remove-tags "\\(div\\)[\t\n ]+\ \\(?:class=\"enlargeThis\\|id=\"inlineMultimedia\ \\|class=\"inlineVideo\\(?:[\t\n ]+[^\"]+\\)?\\)\"" t) ;; Remove javascripts. (goto-char (point-min)) (while (and (re-search-forward "[\t\n ]*\ ]+>[\t\n ]*" nil t) (progn (setq start (match-beginning 0) end (match-end 0)) (re-search-forward "[\t\n ]*[\t\n ]*" nil t))) (replace-match "\n") (delete-region (goto-char start) end) (insert "\n")) ;; Remove useless timesselect stuff. (goto-char (point-min)) (while (re-search-forward "[\t\n ]*]+\\)*\ [\t\n ]+src=\"[^\"]*/ts_icon\\.gif\"\\(?:[\t\n ]+[^\t\n >]+\\)*[\t\n ]*>\ [\t\n ]*" nil t) (delete-region (match-beginning 0) (match-end 0))) ;; Replace wide apostrophe with the normal one. (goto-char (point-min)) (while (re-search-forward "’\\|’" nil t) (replace-match "'")) ;; Add page delimiters. (goto-char (point-min)) (while (re-search-forward "[\t\n ]*\\(?:

    [\t\n ]*\\)+\ \\(]+>[\t\n ]*(Page[\t\n ]+[0-9]+[\t\n ]+of[\t\n ]+[0-9]+)\ [\t\n ]*\\)\\(?:[\t\n ]*

    \\)+[\t\n ]*" nil t) (replace-match "\n \\1\n

    ")) ;; Add last newline. (goto-char (point-max)) (unless (bolp) (insert "\n")) t))) (luna-define-method shimbun-rss-build-message-id :around ((shimbun shimbun-nytimes) url &optional date) ;; Don't strip string following "?" or "#" in url. See sb-rss.el. (concat "<" (md5 url) "%" (shimbun-current-group shimbun) "@" (shimbun-server shimbun) ".shimbun.namazu.org>")) (luna-define-method shimbun-get-headers :around ((shimbun shimbun-nytimes) &optional range) (let ((name (cadr (assoc (shimbun-current-group-internal shimbun) shimbun-nytimes-group-table))) (apostrophe (condition-case nil (make-char 'japanese-jisx0208 33 71) (error nil))) (headers (luna-call-next-method)) from) (dolist (header headers headers) ;; Show the group name in the From header. (when (and (setq from (shimbun-header-from header)) (string-match "\\`By [A-Z][A-Z]+" from)) (setq from (substring from 3))) (shimbun-header-set-from header (concat from " <" name ">")) ;; Replace wide apostrophe with the normal one in the subject. (when apostrophe (shimbun-header-set-subject header (subst-char-in-string apostrophe ?' (shimbun-header-subject header t))))))) (provide 'sb-nytimes) ;;; sb-nytimes.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-opentechpress-jp.el000066400000000000000000000077321434375002100232470ustar00rootroot00000000000000;;; sb-opentechpress-jp.el --- shimbun backend for japan.linux.com -*- coding: utf-8 -*- ;; Copyright (C) 2006, 2007, 2009, 2010, 2019 ;; TSUCHIYA Masatoshi ;; Author: TSUCHIYA Masatoshi ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-multi) (require 'sb-rss) (luna-define-class shimbun-opentechpress-jp (shimbun-multi shimbun-rss) ()) (defvar shimbun-opentechpress-jp-table '(("general" . "http://opentechpress.jp/index.rss") ("enterprise" . "http://opentechpress.jp/enterprise.rss") ("opensource" . "http://opentechpress.jp/opensource.rss") ("developer" . "http://opentechpress.jp/developer.rss") ("security" . "http://opentechpress.jp/security.rss") ("news" . "http://opentechpress.jp/news.rss") ("pr" . "http://opentechpress.jp/pr.rss"))) (defvar shimbun-opentechpress-jp-content-start "

    ") (defvar shimbun-opentechpress-jp-content-end "
    ") (defvar shimbun-opentechpress-jp-ignored-subject "\\`PR:") (luna-define-method initialize-instance :after ((shimbun shimbun-opentechpress-jp) &rest init-args) (shimbun-rss-initialize-ignored-subject shimbun)) (luna-define-method shimbun-groups ((shimbun shimbun-opentechpress-jp)) (mapcar 'car shimbun-opentechpress-jp-table)) (luna-define-method shimbun-index-url ((shimbun shimbun-opentechpress-jp)) (cdr (assoc (shimbun-current-group shimbun) shimbun-opentechpress-jp-table))) (luna-define-method shimbun-rss-build-message-id ((shimbun shimbun-opentechpress-jp) url &optional date) (concat "<" (md5 (if (string-match "[?#]" url) (substring url 0 (match-beginning 0)) url)) "+" (when (string-match "[?&]sid=\\([^&]+\\)\\(&\\|\\'\\)" url) (match-string 1 url)) "%" (shimbun-current-group shimbun) "@" (shimbun-server shimbun) ".shimbun.namazu.org>")) (luna-define-method shimbun-multi-next-url ((shimbun shimbun-opentechpress-jp) header url) (goto-char (point-min)) (when (re-search-forward "" nil t) (delete-region (point-min) (match-beginning 0)))) (when has-next-page (goto-char (point-max)) (when (search-backward "
    " nil t) (delete-region (match-end 0) (point-max)))) (shimbun-remove-tags "\\(div\\) class=\"pagemenu\">" t) (shimbun-remove-tags "\\(span\\) class=\"pagemenu\">" t) (shimbun-remove-tags "") t)) (luna-define-method shimbun-clear-contents :before ((shimbun shimbun-opentechpress-jp) header) (shimbun-remove-tags "SCRIPT\\|NOSCRIPT" t) (shimbun-remove-tags "\\(div\\) id=\"story-action\">" t) (shimbun-remove-tags "")) (provide 'sb-opentechpress-jp) ;;; sb-opentechpress-jp.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-orca.el000066400000000000000000000046531434375002100207010ustar00rootroot00000000000000;;; sb-orca.el --- shimbun backend for www.orca.med.or.jp ML archive ;; Copyright (C) 2002, 2003, 2005, 2019 ;; Masamichi Goudge M.D. ;; Author: Masamichi Goudge M.D. ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-incf (require 'shimbun) (require 'sb-mhonarc) (luna-define-class shimbun-orca (shimbun-mhonarc) ()) (defvar shimbun-orca-url "http://ml.orca.med.or.jp/") (defvar shimbun-orca-groups '("orca-users" "orca-dev" "orca-tech" "orca-announce")) (defvar shimbun-orca-reverse-flag nil) (defvar shimbun-orca-litemplate-regexp "
  • [^<]*\ \\([^<]+\\) \\([^<]+\\)\n?
  • ") (luna-define-method shimbun-index-url ((shimbun shimbun-orca)) (concat (shimbun-url-internal shimbun) (shimbun-current-group-internal shimbun) "/index.html")) (luna-define-method shimbun-reply-to ((shimbun shimbun-orca)) (concat (shimbun-current-group-internal shimbun) "@orca")) (luna-define-method shimbun-get-headers ((shimbun shimbun-orca) &optional range) (let ((url (shimbun-index-url shimbun)) (pages (shimbun-header-index-pages range)) (count 0) headers) (catch 'stop (shimbun-mhonarc-get-headers shimbun url headers) (goto-char (point-min)) (while (and (if pages (< (cl-incf count) pages) t) (re-search-forward "Prev Page" nil t)) (setq url (shimbun-expand-url (match-string 1) url)) (erase-buffer) (shimbun-retrieve-url url) (shimbun-mhonarc-get-headers shimbun url headers) (goto-char (point-min))) headers))) (provide 'sb-orca) ;;; sb-orca.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-palmfan.el000066400000000000000000000345311434375002100213710ustar00rootroot00000000000000;;; sb-palmfan.el --- shimbun backend class for palmfan web site. ;; Copyright (C) 2002, 2003, 2005, 2019 NAKAJIMA Mikio ;; Author: NAKAJIMA Mikio ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (require 'shimbun) (eval-and-compile (luna-define-class shimbun-palmfan (shimbun) (content-hash)) (luna-define-internal-accessors 'shimbun-palmfan)) (defvar shimbun-palmfan-content-hash-length 31) (defvar shimbun-palmfan-url "http://www.palmfan.com") (defvar shimbun-palmfan-coding-system 'japanese-shift-jis-mac) (defconst shimbun-palmfan-group-path-alist '(("news" . "") ;; Revival day? ;; ("palmwarefan" . "PWF/") ;; not yet ;;("nm502i" . "cgi/tnote.cgi?book=book2") ;;("hotsync" . "cgi/tnote.cgi?book=book3") )) (defvar shimbun-palmfan-groups (mapcar 'car shimbun-palmfan-group-path-alist)) (defconst shimbun-palmfan-palmwarefan-date-regexp "$") (defconst shimbun-palmfan-month-alist '(("January" . 1) ("February" . 2) ("March" . 3) ("April" . 4) ("May" . 5) ("June" . 6) ("July" . 7) ("August" . 8) ("September" . 9) ("October" . 10) ("November" . 11) ("December" . 12) ("Jan" . 1) ("Feb" . 2) ("Mar" . 3) ("Apr" . 4) ("May" . 5) ("Jun" . 6) ("Jul" . 7) ("Aug" . 8) ("Sep" . 9) ("Oct" . 10) ("Nov" . 11) ("Dec" . 12))) (defvar shimbun-palmfan-expiration-days 6) (defvar shimbun-palmfan-x-face-alist '(("default" . "X-Face: \"dU62umIQL4j!$\ eGluPC0(*l4^GB8v\n diqCIs\\6@p\\TN#{@;s*NMI'@\\[8Z8M*:5g}\ `c9yC}F6e\\}DqeZo!LB>(hEF|P+U.b|#\n >$@]5@PdGIwuU4=`imfei\ i$PdWyuHC8!1=KH'r,R=fV])N6uQS"))) (luna-define-method initialize-instance :after ((shimbun shimbun-palmfan) &rest init-args) (shimbun-palmfan-set-content-hash-internal shimbun (make-vector shimbun-palmfan-content-hash-length 0)) shimbun) (luna-define-method shimbun-reply-to ((shimbun shimbun-palmfan)) (let ((group (shimbun-current-group-internal shimbun))) (cond ((string= group "palmwarefan") "brian@palmfan.com") (t "hirose@palmfan.com")))) (luna-define-method shimbun-index-url ((shimbun shimbun-palmfan)) (concat (shimbun-url-internal shimbun) "/" (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-palmfan-group-path-alist)))) (luna-define-method shimbun-headers ((shimbun shimbun-palmfan) &optional range) (let ((group (shimbun-current-group-internal shimbun))) (cond ((string= group "news") (shimbun-palmfan-news-headers shimbun range)) ((string= group "palmwarefan") (shimbun-palmfan-palmwarefan-headers shimbun range)) (t (shimbun-palmfan-bbs-headers shimbun range))))) (defun shimbun-palmfan-palmwarefan-headers (shimbun &optional range) (let* ((case-fold-search t) (url (shimbun-index-url shimbun)) (idbase (concat "palmwarefan." (if (string-match "\\`http://\\([^/]+\\)/" url) (match-string 1 url) url))) headers) (with-temp-buffer (shimbun-retrieve-url url 'no-cache 'no-decode) (decode-coding-region (point-min) (point-max) (shimbun-coding-system-internal shimbun)) (set-buffer-multibyte t) (subst-char-in-region (point-min) (point-max) ?\t ? t) (goto-char (point-min)) (when (and (re-search-forward "^$" nil t nil) (re-search-forward shimbun-palmfan-palmwarefan-date-regexp nil t nil)) (beginning-of-line 1) (delete-region (point-min) (point))) (when (re-search-forward "^
    $" nil t nil) (beginning-of-line 1) (delete-region (point) (point-max))) (goto-char (point-max)) (catch 'stop (let ((count 0) lastdate) (while (search-backward "
    " nil t nil) (let ((start (point)) end year month day date) (re-search-backward shimbun-palmfan-palmwarefan-date-regexp) (setq year (string-to-number (match-string 1)) month (string-to-number (match-string 2)) day (string-to-number (match-string 3)) date (shimbun-make-date-string year month day) end (progn (search-forward "SilverScreen 2.7ユ茯若ゃ吟65K蚊弱上CLIE 吾с違ゃ≪絲上CLIE ゃ上上CLIE NR ゃ上上VFS絲上 ;;PtFtp 0.1.0ユ茯<ャ256蚊弱上 "]+>\\(]+\\)\">\\)*\\(\\)*\\([^<]+\\)\\(\\)*\\(\\)*\\(\\)*" end) (let (subject addition id body) (setq id (format "<%02d%04d%02d%02d@%s>" count year month day idbase)) (when (shimbun-search-id shimbun id) (throw 'stop nil)) (setq subject (match-string 4) addition (match-string 7) body (buffer-substring-no-properties start end)) ;; move file size to SUBJECT ;;8KB (when (string-match "]+>\\([0-9]+KB*\\)" body) (setq subject (concat subject "/" (match-string 2 body)) ; move to subject body (concat (substring body 0 (match-beginning 0)) (substring body (match-end 0))))) ;; move price to SUBJECT ;;Freeware (when (string-match "]+>\\([^<]+\\)" body) (setq subject (concat subject "/" (match-string 2 body)) ; move to subject body (concat (substring body 0 (match-beginning 0)) (substring body (match-end 0))))) ;; remove duplicated information ;;05/16/02 (when (string-match "]+>[0-9][0-9]/[0-9][0-9]/[0-9][0-9]" body) (setq body (concat (substring body 0 (match-beginning 0)) "

    " ; insert return (substring body (match-end 0))))) ;; expand relative path ;; ;;(while (string-match "]*>" body) (setq body (concat (substring body 0 (match-beginning 0)) (substring body (match-end 0))))) (set (intern id (shimbun-palmfan-content-hash-internal shimbun)) body) (when addition (while (string-match "alt=\"\\([^\"]+\\)\"" addition) (setq subject (concat subject "/" (match-string 1 addition)) addition (substring addition (match-end 0))))) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) (shimbun-from-address shimbun) date id "" 0 0 url) headers)))))) (nreverse headers)))) (defun shimbun-palmfan-bbs-headers (shimbun &optional range) ;; not yet ) (defun shimbun-palmfan-news-headers (shimbun &optional range) (let* ((case-fold-search t) (url (shimbun-index-url shimbun)) (idbase (if (string-match "\\`http://\\([^/]+\\)/" url) (match-string 1 url) url)) (from "hirose@palmfan.com") (first-article t) headers) (with-temp-buffer (shimbun-retrieve-url url 'no-cache 'no-decode) (decode-coding-region (point-min) (point-max) (shimbun-coding-system-internal shimbun)) (set-buffer-multibyte t) (subst-char-in-region (point-min) (point-max) ?\t ? t) (goto-char (point-min)) (when (re-search-forward "^$" nil t nil) (forward-line 1) (beginning-of-line 1) (delete-region (point-min) (point))) (when (re-search-forward "サ荐篋筝荀р
    $" nil t nil) (beginning-of-line 1) (delete-region (point) (point-max))) (goto-char (point-min)) (catch 'stop (let (end) (while (or first-article (re-search-forward "" nil t nil)) (let ((start (point)) (count -1) month day year date) (if first-article (setq date (shimbun-palmfan-get-first-article-date) start (point) first-article nil) (setq date (shimbun-palmfan-pickup-date))) (setq year (car date) month (car (cdr date)) day (car (cdr (cdr date)))) (setq end (if (re-search-forward "" nil t nil) (progn (goto-char (match-beginning 0)) (forward-char -1) (point)) (point-max))) (setq date (format "%02d %s %04d 00:00 +0900" day month year)) (goto-char start) (while (or (re-search-forward "^$" end t nil) ;; ;; DCFExifJPEGゃ (re-search-forward "^\\(.+\\)" end t nil)) (let (subject id others body) (if (not (member (match-string 1) '("" "純"))) (progn (setq subject (match-string 1)) (unless (string= others "蚊") ;;DCFExifJPEGゃ (setq others t))) (setq subject (buffer-substring-no-properties (progn (forward-char 1) (point)) (progn (re-search-forward "

    " end t nil) (beginning-of-line 1) (point))))) (when (or others (re-search-forward "^$" end t nil)) (setq body (buffer-substring-no-properties (point) (search-forward "
    " end)) count (1+ count) id (format "<%02d%04d%02d%02d@%s>" count year (cdr (assoc month shimbun-palmfan-month-alist)) day idbase)) (if (shimbun-search-id shimbun id) (throw 'stop nil)) (when (string-match "\\`[\n\t ]*\\(.*\\)[\n\t ]*\\'" subject) (setq subject (match-string 1 subject))) (let ((case-fold-search t)) (when (string-match "" subject) (setq body (concat "

    " subject "

    " body)))) (with-temp-buffer (insert subject) (shimbun-remove-markup) (setq subject (buffer-string))) (set (intern id (shimbun-palmfan-content-hash-internal shimbun)) body) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) from date id "" 0 0 url) headers)))))))) headers))) (defun shimbun-palmfan-get-first-article-date () (let (first-date first-article date) (setq first-date (re-search-forward "" nil t nil)) (goto-char (point-min)) (setq first-article (re-search-forward "^$" nil t nil)) (goto-char first-date) (setq date (shimbun-palmfan-pickup-date)) (goto-char first-article) (beginning-of-line) (forward-char -1) (if (and first-date first-article (> first-date first-article)) ;; XXX it cannot understand non-exsistent day... (setcar (cdr (cdr date)) (1+ (car (cdr (cdr date)))))) date)) (defun shimbun-palmfan-pickup-date () (let ((start (point)) date-end year month day) (setq date-end (re-search-forward "^" nil t nil)) (goto-char start) (catch 'stop ;;2003綛 3 5ユ梓 (if (re-search-forward "[0-9][0-9][0-9][0-9]" date-end t) (setq year (string-to-number (match-string 0))) (throw 'stop nil)) (goto-char start) (if (or (re-search-forward "\\([0-9][0-9]*\\) *" date-end t) (re-search-forward " \\([0-9][0-9]?\\)[,.]*" date-end t)) (setq day (string-to-number (match-string 1))) (throw 'stop nil)) (goto-char start) (if (re-search-forward "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\|[0-9]+ *\\)" date-end t) (setq month (match-string 1)) (throw 'stop nil)) (when (string-match "\\([0-9]+\\) *" month) (setq month (car (rassoc (string-to-number (match-string 1 month)) (reverse shimbun-palmfan-month-alist))))) (list year month day)))) (luna-define-method shimbun-article ((shimbun shimbun-palmfan) header &optional outbuf) (let (string) (with-current-buffer (or outbuf (current-buffer)) (with-temp-buffer (let ((sym (intern-soft (shimbun-header-id header) (shimbun-palmfan-content-hash-internal shimbun)))) (when (and (boundp sym) (symbol-value sym)) (insert (symbol-value sym)) (goto-char (point-min)) (insert "\n\n\n\n\n") (goto-char (point-max)) (insert "\n\n\n") (encode-coding-string (buffer-string) (mime-charset-to-coding-system "ISO-2022-JP")) (shimbun-make-mime-article shimbun header) (setq string (buffer-string))))) (when string (w3m-insert-string string))))) (provide 'sb-palmfan) ;;; sb-palmfan.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-pcweb-column.el000066400000000000000000000101671434375002100223450ustar00rootroot00000000000000;;; sb-pcweb-column.el --- shimbun backend for PC WEB COLUMN Square ;; Copyright (C) 2002-2007, 2019 OHASHI Akira ;; Author: OHASHI Akira ;; Tsuyoshi CHO ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (luna-define-class shimbun-pcweb-column (shimbun) ()) (defvar shimbun-pcweb-column-url "http://journal.mycom.co.jp/column/") (defvar shimbun-pcweb-column-groups '(;; Under a series "jsr" "yume" "hreceipe" "kita" "shonanlife" "kaden" "nemurenai" "komono" "js" "en" "motherboard" "svalley" "architecture" "motorlife" "nihongoprog" "objc" "ide" "music" "itsecurity" "soundvisual" "osx" "sopinion" "ebook" "orerobo" "zsh" "rikei" "lifehack" "world" "guutara" "volt" "textclean" "person" "web20" "system" ;; Series end "itshihonron" "yetanother" "asia" "benri" "bytes" "game" "hitech" "java" "jisakuparts" "scramble" "toolexp" "winvista" "winxp" "interview" "ityougo" "kimeuchi" "stratesys" "toyagain")) (defvar shimbun-pcweb-column-from-address "pcmail@pc.mycom.co.jp") (defvar shimbun-pcweb-column-content-start "") (defvar shimbun-pcweb-column-content-end "") (defvar shimbun-pcweb-column-coding-system 'shift_jis) (luna-define-method shimbun-index-url ((shimbun shimbun-pcweb-column)) (concat (shimbun-url-internal shimbun) (shimbun-current-group-internal shimbun) "/")) (luna-define-method shimbun-get-headers ((shimbun shimbun-pcweb-column) &optional range) (let ((case-fold-search t) (headers) (pattern (format "
    \\([^<]+\\)" (regexp-quote (shimbun-current-group shimbun))))) (goto-char (point-min)) (while (re-search-forward pattern nil t) (let ((url (match-string 1)) (num (match-string 2)) (subject (match-string 4)) id) ;; do not modify for compatibility. (setq id (format "<%s.%s.column@pcweb.mycom.co.jp>" num (shimbun-current-group-internal shimbun))) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) (shimbun-from-address shimbun) "" id "" 0 0 (shimbun-expand-url url (shimbun-url-internal shimbun))) headers))) headers)) (luna-define-method shimbun-article :before ((shimbun shimbun-pcweb-column) header &optional outbuf) (shimbun-header-set-xref header (replace-regexp-in-string (format "/%s\\([0-9]+\\)\\.html\\'" (regexp-quote (shimbun-current-group shimbun))) "/\\1/" (shimbun-header-xref header)))) (luna-define-method shimbun-make-contents :before ((shimbun shimbun-pcweb-column) header) (let (case-fold-search) (goto-char (point-min)) (when (re-search-forward "\ \\(]*>\\)?\\([^<]+\\)\\(

    \\)?" nil t) (shimbun-header-set-from header (match-string 2))) (goto-char (point-min)) (when (re-search-forward "\ \\(]*>\\)?\\([0-9]+\\)/\\([0-9]+\\)/\\([0-9]+\\)\\(

    \\)?\ " nil t) (shimbun-header-set-date header (shimbun-make-date-string (string-to-number (match-string 2)) (string-to-number (match-string 3)) (string-to-number (match-string 4))))))) (provide 'sb-pcweb-column) ;;; sb-pcweb-column.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-perlentaucher-de.el000066400000000000000000000047341434375002100232040ustar00rootroot00000000000000;;; sb-perlentaucher-de.el --- perlentaucher.de shimbun backend ;; Copyright (C) 2008, 2009, 2010 David Engster ;; Author: David Engster ;; Keywords: news ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-perlentaucher-de (shimbun-rss) ()) (defvar shimbun-perlentaucher-de-url "http://rss.perlentaucher.de") (defvar shimbun-perlentaucher-de-groups '("aktuell")) (defvar shimbun-perlentaucher-de-from-address "invalid@perlentaucher.de") (defvar shimbun-perlentaucher-de-content-start "
    ") (defvar shimbun-perlentaucher-de-content-end "
    ") (defvar shimbun-perlentaucher-de-url-regexp "rss.feedsportal.com/.*/\\([^/]+\\)/story.*\\.htm") (defvar shimbun-perlentaucher-de-x-face-alist '(("default" . "\ Face: iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPAgMAAABGuH3ZAAAADFBMVEUAern/+/D///8aGhp 47OwqAAAALklEQVQI12P4////H4aroaExDBcYGGSgBKsDkJCaACSylqAQYDGwLFwxWC/IFAD6jBr V/YdWgAAAAABJRU5ErkJggg=="))) (luna-define-method shimbun-index-url ((shimbun shimbun-perlentaucher-de)) shimbun-perlentaucher-de-url) (luna-define-method shimbun-clear-contents :before ((shimbun shimbun-perlentaucher-de) header) (shimbun-remove-tags "
    " "Merkzettel") (shimbun-remove-tags "\\(div\\) class=\"box2 jumper\">" t) (shimbun-remove-tags "\\(a\\) href=\"#top\">" t)) (luna-define-method shimbun-rss-build-message-id ((shimbun shimbun-perlentaucher-de) url date) (unless (string-match shimbun-perlentaucher-de-url-regexp url) (error "Cannot find message-id base")) (concat "<" (match-string 1 url) "." (shimbun-current-group-internal shimbun) "@perlentaucher.de>")) (provide 'sb-perlentaucher-de) ;;; sb-perlentaucher-de.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-pilot-link.el000066400000000000000000000044631434375002100220360ustar00rootroot00000000000000;;; sb-pilot-link.el --- shimbun backend for pilot-link ;; Copyright (C) 2002, 2003, 2005 NAKAJIMA Mikio ;; Author: NAKAJIMA Mikio ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-mailman) (require 'sendmail) (luna-define-class shimbun-pilot-link (shimbun-mailman) ()) (defvar shimbun-pilot-link-url "http://www.pilot-link.org/pipermail") (defconst shimbun-pilot-link-group-path-alist '(("announce" . "pilot-link-announce") ("devel" . "pilot-link-devel") ("general" . "pilot-link-general") ("unix-ng" . "pilot-unix-ng"))) (defvar shimbun-pilot-link-groups (mapcar 'car shimbun-pilot-link-group-path-alist)) (luna-define-method shimbun-index-url ((shimbun shimbun-pilot-link)) (concat (shimbun-url-internal shimbun) "/" (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-pilot-link-group-path-alist)) "/")) ;;(luna-define-method shimbun-reply-to ((shimbun shimbun-pilot-link)) ;; "") (luna-define-method shimbun-make-contents :after ((shimbun shimbun-pilot-link) header) (save-excursion (let ((end (and (mail-position-on-field "From") (point))) (begin (progn (beginning-of-line) (point))) (marker (make-marker))) (when end (narrow-to-region begin end) (goto-char (point-min)) (when (re-search-forward " at " nil t nil) (set-marker marker (match-beginning 0)) (delete-region (match-beginning 0) (match-end 0)) (goto-char marker) (insert "@")) (widen)))) (buffer-string)) (provide 'sb-pilot-link) ;;; sb-pilot-link.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-pilot-mailsync.el000066400000000000000000000027461434375002100227220ustar00rootroot00000000000000;;; sb-pilot-mailsync.el --- shimbun backend for http://lists.gnu-designs.com/pipermail/pilot-mailsync/ ;; Copyright (C) 2003, 2004, 2005 NAKAJIMA Mikio ;; Author: NAKAJIMA Mikio ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-mailman) (luna-define-class shimbun-pilot-mailsync (shimbun-mailman) ()) (defvar shimbun-pilot-mailsync-url "http://lists.gnu-designs.com/pipermail/pilot-mailsync/") (defvar shimbun-pilot-mailsync-groups '("main")) (luna-define-method shimbun-reply-to ((shimbun shimbun-pilot-mailsync)) "Return the mailing list address." "pilot-mailsync@pilot-mailsync.sourcefubar.net") (provide 'sb-pilot-mailsync) ;;; sb-pilot-mailsync.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-plucker.el000066400000000000000000000071131434375002100214140ustar00rootroot00000000000000;;; sb-plucker.el --- shimbun backend for Plucker mailing lists. ;; Copyright (C) 2003, 2005 NAKAJIMA Mikio ;; Author: NAKAJIMA Mikio ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-mhonarc) (luna-define-class shimbun-plucker (shimbun-mhonarc) ()) (defconst shimbun-plucker-group-path-alist '(("announce" . "/plucker-announce@rubberchicken.org/maillist.html") ("list" . "/plucker-list@rubberchicken.org/maillist.html") ("dev" . "/plucker-dev@rubberchicken.org/maillist.html"))) (defvar shimbun-plucker-url "http://www.mail-archive.com") (defvar shimbun-plucker-groups (mapcar 'car shimbun-plucker-group-path-alist)) (defvar shimbun-plucker-reverse-flag t) (defvar shimbun-plucker-litemplate-regexp "
  • [\t\r\n ]*]*>\\([0-9][0-9][0-9][0-9]/[0-9]?[0-9]/[0-9]?[0-9]\\)[\t\r\n ]*\ ]*>\\([^<]+\\)[\t\r\n ]*\ ]*>\\([^<]+\\)") (defun shimbun-plucker-extract-header-values (shimbun url headers aux) (let ((id (format "<%s%s%%%s>" (or aux "") (match-string 2) (shimbun-current-group-internal shimbun))) (url (shimbun-expand-url (match-string 3) url)) (subject (shimbun-mhonarc-replace-newline-to-space (match-string 4))) (from (shimbun-mhonarc-replace-newline-to-space (match-string 5))) (date (match-string 1))) (if (shimbun-search-id shimbun id) (throw 'stop headers) (setq date (shimbun-make-date-string (string-to-number (substring date 0 4)) (string-to-number (substring date 5 8)) (string-to-number (substring date 8 10)) nil "-0700")) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) (shimbun-mime-encode-string from) date id "" 0 0 url) headers) headers))) (defun shimbun-plucker-get-headers (shimbun url &optional aux) (let (headers case-fold-search) (if (shimbun-mhonarc-reverse-flag-internal shimbun) (progn (goto-char (point-min)) (while (re-search-forward shimbun-plucker-litemplate-regexp nil t) (setq headers (shimbun-plucker-extract-header-values shimbun url headers aux)) (forward-line 1))) (goto-char (point-max)) (while (re-search-backward shimbun-plucker-litemplate-regexp nil t) (setq headers (shimbun-plucker-extract-header-values shimbun url headers aux)) (forward-line 0))) headers)) (luna-define-method shimbun-get-headers ((shimbun shimbun-mhonarc) &optional range) (catch 'stop (shimbun-plucker-get-headers shimbun (shimbun-index-url shimbun)))) (luna-define-method shimbun-index-url ((shimbun shimbun-plucker)) (concat (shimbun-url-internal shimbun) (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-plucker-group-path-alist)))) (provide 'sb-plucker) ;;; sb-plucker.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-pocketgames.el000066400000000000000000000073671434375002100222640ustar00rootroot00000000000000;;; sb-pocketgames.el --- shimbun backend class for www.pocketgames.jp. ;; Copyright (C) 2003-2005, 2008, 2019 NAKAJIMA Mikio ;; Author: NAKAJIMA Mikio ;; Keywords: news ;; Version: $Id: sb-pocketgames.el,v 1.18 2008/01/17 23:38:36 yamaoka Exp $ ;; Last Modified: $Date: 2008/01/17 23:38:36 $ ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (require 'shimbun) (eval-and-compile (luna-define-class shimbun-pocketgames (shimbun) (content-hash)) (luna-define-internal-accessors 'shimbun-pocketgames)) (defvar shimbun-pocketgames-url "http://www.pocketgames.jp") (defvar shimbun-pocketgames-groups '("news")) (defvar shimbun-pocketgames-coding-system 'shift_jis) (defvar shimbun-pocketgames-content-start "[^<]+") (defvar shimbun-pocketgames-content-end "") (luna-define-method shimbun-reply-to ((shimbun shimbun-pocketgames)) "Return the mailing list address." "info@pocketgames.jp") (defvar shimbun-pocketgames-expiration-days 14) (luna-define-method shimbun-get-headers ((shimbun shimbun-pocketgames) &optional range) (let ((regexp "\\([^<]+\\)
    ") url from year month day time date subject id start end headers) (catch 'quit (while (re-search-forward regexp nil t nil) (setq url (match-string-no-properties 1) subject (match-string-no-properties 2) start (point) end (set-marker (make-marker) (or (and (re-search-forward regexp nil t nil) (match-beginning 0)) (point-max)))) (goto-char start) (unless (re-search-forward "Posted by: \\(.+\\) on \\([0-9]+\\)/\\([0-9]+\\)/\\([0-9]+\\) (\\(\\|\\|羂\\|\\|\\|\\|\\)) - \\([0-9][0-9]:[0-9][0-9]\\) JST <\/font>" end t nil) (throw 'quit nil)) (setq from (shimbun-mime-encode-string (match-string 1)) year (string-to-number (match-string 2)) month (string-to-number (match-string 3)) day (string-to-number (match-string 4)) time (match-string 6) date (shimbun-make-date-string year month day time) id (format "<%04d%02d%02d%s%%news@pocketgames>" year month day (apply (lambda (x y) (format "%02d%02d" x y)) (mapcar 'string-to-number (split-string time ":"))))) (when (shimbun-search-id shimbun id) (throw 'quit nil)) (with-temp-buffer (insert subject) (shimbun-remove-markup) (setq subject (buffer-string))) (setq url (shimbun-expand-url (shimbun-decode-anchor-string url) (concat (shimbun-index-url shimbun) "/"))) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) from date id "" 0 0 url) headers))) headers)) (provide 'sb-pocketgames) ;;; sb-pocketgames.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-rakuten.el000066400000000000000000000057301434375002100214230ustar00rootroot00000000000000;;; sb-rakuten.el --- shimbun backend for rakuten diary ;; Copyright (C) 2003, 2004, 2006, 2019 NAKAJIMA Mikio ;; Author: NAKAJIMA Mikio ;; Keywords: news ;; Created: Nov 1, 2003 ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-rakuten (shimbun-rss) ()) (defcustom shimbun-rakuten-group-alist nil ;; '((rakuten-id . email-address)) "List of subscribing diaries served by Rakuten." :group 'shimbun :type '(repeat (cons :format "%v" :indent 2 (string :tag "Rakuten ID") (string :tag "Mail address")))) (defvar shimbun-rakuten-coding-system 'euc-japan) (defvar shimbun-rakuten-content-start ;;"^" "^\n+
    ") (defvar shimbun-rakuten-content-end "^<\\/body>") (luna-define-method shimbun-reply-to ((shimbun shimbun-rakuten)) (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-rakuten-group-alist))) (luna-define-method shimbun-groups ((shimbun shimbun-rakuten)) (mapcar 'car shimbun-rakuten-group-alist)) (luna-define-method shimbun-index-url ((shimbun shimbun-rakuten)) (format "http://api.plaza.rakuten.ne.jp/%s/rss/" (shimbun-current-group-internal shimbun))) (luna-define-method shimbun-rss-get-date ((shimbun shimbun-rakuten) url) (unless (string-match "http://[^\/]+/[^\/]+/[^\/]+/\\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\)" url) (error "Cannot find a date base")) (shimbun-make-date-string (string-to-number (match-string-no-properties 1 url)) (string-to-number (match-string-no-properties 2 url)) (string-to-number (match-string-no-properties 3 url)))) (luna-define-method shimbun-rss-process-date ((shimbun shimbun-rakuten) date) date) (luna-define-method shimbun-make-contents :before ((shimbun shimbun-rakuten) header) (save-excursion (let ((string (format ">潟吾\ イ腓堺帥" (shimbun-current-group-internal shimbun)))) (subst-char-in-region (point-min) (point-max) ?\t ? t) (while (re-search-forward ">潟吾<\\/a>" nil t nil) (replace-match string))))) (provide 'sb-rakuten) ;;; sb-rakuten.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-redhat.el000066400000000000000000000101021434375002100212060ustar00rootroot00000000000000;;; sb-redhat.el --- shimbun backend for sources.redhat.com mailing lists ;; Copyright (C) 2002, 2003, 2019 OHASHI Akira ;; Author: OHASHI Akira ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-incf (require 'shimbun) (require 'sb-mhonarc) (luna-define-class shimbun-redhat (shimbun-mhonarc) ()) (defvar shimbun-redhat-url "http://sources.redhat.com/ml/") (defvar shimbun-redhat-groups '("automake" "bug-automake" "automake-prs" "automake-cvs" "binutils" "binutils-cvs" "c++-embedded" "crossgcc" "cgen" "cgen-prs" "cgen-cvs" "cygwin" "cygwin-xfree" "cygwin-announce" "cygwin-xfree-announce" "cygwin-apps" "cygwin-patches" "cygwin-developers" "cygwin-cvs" "cygwin-apps-cvs" "docbook-tools-discuss" "docbook-tools-announce" "docbook-tools-cvs" "docbook" "dssslist" "sgml-tools" "docbook-apps" "ecos-announce" "ecos-devel" "ecos-discuss" "ecos-maintainers" "ecos-patches" "elix" "elix-announce" "gdb" "gdb-announce" "gdb-testers" "gdb-testresults" "gdb-patches" "gdb-cvs" "bug-gdb" "gdb-prs" "libc-alpha" "libc-hacker" "bug-glibc" "glibc-cvs" "glibc-linux" "bug-gnats" "gnats-devel" "gnats-announce" "gnats-cvs" "gsl-discuss" "gsl-announce" "gsl-cvs" "guile" "guile-emacs" "guile-prs" "guile-gtk" "bug-guile" "guile-cvs" "guile-emacs-cvs" "insight" "insight-announce" "insight-prs" "installshell" "inti" "kawa" "libffi-discuss" "libffi-announce" "libstdc++" "libstdc++-cvs" "libstdc++-prs" "mauve-discuss" "mauve-announce" "newlib" "pthreads-win32" "rhdb" "rhdb-announce" "rhug-rhats" "rpm2html-cvs" "rpm2html-prs" "rpm2html" "sid" "sid-announce" "sid-cvs" "sourcenav" "sourcenav-announce" "sourcenav-prs" "win32-x11" "xconq7" "xconq-announce" "xconq-cvs")) (defvar shimbun-redhat-coding-system 'iso-8859-1) (defvar shimbun-redhat-reverse-flag t) (defvar shimbun-redhat-litemplate-regexp "\\([^<]+\\)\n\\([^<]+\\)") (defvar shimbun-redhat-litemplate-regexp-old " \\([^<]+\\) \\(.+\\)") (luna-define-method shimbun-index-url ((shimbun shimbun-redhat)) (concat (shimbun-url-internal shimbun) (shimbun-current-group-internal shimbun) "/")) (luna-define-method shimbun-reply-to ((shimbun shimbun-redhat)) (concat (shimbun-current-group-internal shimbun) "@redhat.com")) (luna-define-method shimbun-get-headers ((shimbun shimbun-redhat) &optional range) (let ((case-fold-search t) (pages (shimbun-header-index-pages range)) (count 0) headers months) (goto-char (point-min)) (catch 'stop (while (and (if pages (<= (cl-incf count) pages) t) (re-search-forward "
  • " nil t) (push (match-string 1) months))) (setq months (nreverse months)) (dolist (month months) (let ((url (concat (shimbun-index-url shimbun) month "/"))) (when (= (string-match "[0-9]+\\(-q[0-9]\\)?\\'" month) 0) (shimbun-mhonarc-set-litemplate-regexp-internal shimbun shimbun-redhat-litemplate-regexp-old)) (shimbun-retrieve-url url t) (shimbun-mhonarc-get-headers shimbun url headers month)))) headers)) (provide 'sb-redhat) ;;; sb-redhat.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-rediff.el000066400000000000000000000071501434375002100212070ustar00rootroot00000000000000;;; sb-rediff.el --- shimbun backend for rediff.com ;; Copyright (C) 2004, 2005, 2006, 2010 S V N Vishwanathan ;; Author: S V N Vishwanathan ;; Keywords: news ;; Created: Nov 22, 2004 ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-rediff (shimbun-rss) ()) (defvar shimbun-rediff-url "http://www.rediff.com/rss/newsrss.xml") (defvar shimbun-rediff-groups '("news")) (defvar shimbun-rediff-from-address "news@rediff.com") (defvar shimbun-rediff-content-start "
    ") (defvar shimbun-rediff-content-end "\\(

    \\)?\\(\\)?") (defconst shimbun-rediff-month-alist '(("January" . 1) ("February" . 2) ("March" . 3) ("April" . 4) ("May" . 5) ("June" . 6) ("July" . 7) ("August" . 8) ("September" . 9) ("October" . 10) ("November" . 11) ("December" . 12))) ;; Print version has less ads (luna-define-method shimbun-article :before ((shimbun shimbun-rediff) header &optional outbuf) (let ((url (shimbun-article-url shimbun header))) (unless (string-match "http://www.rediff.com/rss/redirect.php\\?url=\ http://www.rediff.com/\\(.+\\.htm\\)" url) (error "Malformed URL? %s" url)) (shimbun-header-set-xref header (concat "http://in.rediff.com/cms/print.jsp?docpath=" (match-string-no-properties 1 url))))) ;; Tags to strip from the print version (luna-define-method shimbun-clear-contents :before ((shimbun shimbun-rediff) header) (when (luna-call-next-method) (shimbun-remove-tags "\\(A\\) \\(?:class=\"\"\\|target=new\\)" t) (shimbun-remove-tags "

    " "") (shimbun-remove-tags "

    Also read:" "\\(

    \\)?") (shimbun-remove-tags "]*>]*>" "
  • ") (shimbun-remove-tags "" "
    "))) ;; The default header has no date string ;; We need to parse it from the contents and set the header (luna-define-method shimbun-make-contents :before ((shimbun shimbun-rediff) header) ;;; ;; (shimbun-rediff-make-contents shimbun header)) ;; ;;(defun shimbun-rediff-make-contents (shimbun header) ;;; (setq case-fold-search nil) (when (re-search-forward "\\(January\\|February\\|March\\|April\\|May\\|June\ \\|July\\|August\\|September\\|October\\|November\\|December\\)[ ]+\ \\([0-3][0-9]\\),[ ]+\\(20[0-9][0-9]\\) | \\([0-2][0-9]:[0-6][0-9]\\) IST" nil t) (shimbun-header-set-date header (shimbun-make-date-string (string-to-number (match-string-no-properties 3)) (cdr (assoc (match-string-no-properties 1) shimbun-rediff-month-alist)) (string-to-number (match-string-no-properties 2)) (match-string-no-properties 4) "+05:30")) (goto-char (point-min)))) (provide 'sb-rediff) ;;; sb-rediff.el ends here emacs-w3m-emacs-w3m-4f27810/shimbun/sb-rss-blogs.el000066400000000000000000000144711434375002100216670ustar00rootroot00000000000000;;; sb-rss-blogs.el --- Back end for RSS feeds with unpublished content ;; Copyright (C) 2008, 2010 David Engster ;; Author: David Engster ;; Keywords: news ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-rss-blogs (shimbun-rss) ()) (defvar shimbun-rss-blogs-group-url-regexp '(("Example: Wordpress" "http://emacs.wordpress.com/feed/") ("Example: w3m" "http://sourceforge.net/export/rss2_projnews.php?group_id=39518" "" "

    ") ("Example: w3m without removal" "http://sourceforge.net/export/rss2_projnews.php?group_id=39518" 'none)) "Names and corresponding URLs of RSS feeds. This is an alist containing the names and corresponding URLs for each RSS feed. Additionally, you can specify two regular expressions for the beginning and end of the actual content. If you just use the symbol `none' here, no HTML filtering will be done whatsoever. On the other hand, if you don't give any further parameters besides the URL, the shimbun will automatically try to deal with the following blog engines: Google Blogger/Blogspot (including comment feeds), WordPress, and TypePad.") ;; Content start/end regular expressions for different blog engines (defconst shimbun-rss-blogs-blogger-content-start-regexp "
    ") (defconst shimbun-rss-blogs-blogger-content-end-regexp "") (defconst shimbun-rss-blogs-wordpress-content-start-regexp "\\(
    \\|]*content.*>\\)") (defconst shimbun-rss-blogs-wordpress-content-end-regexp "\\(\\|\ \\|<[^>]*?id=[^>]*comment.*?>\\)") (defconst shimbun-rss-blogs-typepad-content-start-regexp "
    ") (defconst shimbun-rss-blogs-typepad-content-end-regexp "\\(\\|\ \\|\\|\\)") (luna-define-method shimbun-groups ((shimbun shimbun-rss-blogs)) (mapcar 'car shimbun-rss-blogs-group-url-regexp)) (defvar shimbun-rss-blogs-from-address "invalid@nomail.invalid") (luna-define-method shimbun-index-url ((shimbun shimbun-rss-blogs)) (let ((group (shimbun-current-group-internal shimbun))) (cadr (assoc group shimbun-rss-blogs-group-url-regexp)))) (luna-define-method shimbun-rss-build-message-id ((shimbun shimbun-rss-blogs) url date) (let* ((group (shimbun-current-group-internal shimbun))) (concat "<" (md5 (concat url)) "." group "@rss-blogs>"))) (luna-define-method shimbun-get-headers :around ((shimbun shimbun-rss-blogs) &optional range) (let ((group (shimbun-current-group-internal shimbun)) (headers (luna-call-next-method)) (type (sb-rss-blogs-guess-type-from-rss)) from) (cond ((eq type 'blogger) (dolist (header headers headers) (setq from (shimbun-header-from header)) (setq from (progn (string-match "(\\(.+\\))" from) (match-string 1 from))) (shimbun-header-set-from header from))) (t headers)))) (defun sb-rss-blogs-guess-type-from-rss () "Analyze `generator' tag in RSS feed for known CMS." (save-excursion (goto-char (point-min)) (when (or (re-search-forward "<[ ]*generator[ ]*>\\(.+\\)<[ ]*/generator[ ]*>" nil t) (re-search-forward "generator=[\"']\\(.+?\\)[\"']" nil t)) (let ((type (match-string 1))) (cond ((string-match "blogger" type) 'blogger) ((string-match "WordPress" type) 'wordpress) ((string-match "TypePad" type) 'typepad) (t nil)))))) (defun shimbun-rss-blogs-guess-type-from-html () "Analyze `generator' tag in HTML page for known CMS." (save-excursion (goto-char (point-min)) (if (re-search-forward "<[ \t]*meta.*name=[\"']generator[\"'].*$" nil t) (let ((type (match-string 0))) (cond ((string-match "WordPress" type) 'wordpress) ((string-match "blogger" type) 'blogger) ((string-match "typepad" type) 'typepad) (t nil))) nil))) (luna-define-method shimbun-clear-contents :before ((shimbun shimbun-rss-blogs) header) (let ((type (shimbun-rss-blogs-guess-type-from-html)) (url (shimbun-header-xref header)) (startend (cdr-safe (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-rss-blogs-group-url-regexp)))) content-start content-end) (unless (eq (car-safe startend) 'none) (cond ;; manual tags ((and (= (length startend) 2) (stringp (car startend)) (stringp (cadr startend))) (setq content-start (car startend) content-end (cadr startend))) ;; blogger ((eq type 'blogger) (if (string-match "showComment=[0-9]+" url) (save-excursion ;; this is a comment (search-forward (match-string 0 url)) (re-search-backward "") (setq content-start (match-string 0) content-end "")) ;; this is a normal posting (setq content-start shimbun-rss-blogs-blogger-content-start-regexp content-end shimbun-rss-blogs-blogger-content-end-regexp))) ;; wordpress ((eq type 'wordpress) (setq content-start shimbun-rss-blogs-wordpress-content-start-regexp content-end shimbun-rss-blogs-wordpress-content-end-regexp)) ;; typepad ((eq type 'typepad) (setq content-start shimbun-rss-blogs-typepad-content-start-regexp content-end shimbun-rss-blogs-typepad-content-end-regexp))) (when content-start (shimbun-remove-tags "" content-start)) (when content-end (shimbun-remove-tags content-end "</html>"))))) (provide 'sb-rss-blogs) ;;; sb-rss-blogs.el ends here �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-rss-hash.el��������������������������������������������������0000664�0000000�0000000�00000013334�14343750021�0021501�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-rss-hash.el --- shimbun backend for rss description -*- coding: utf-8 -*- ;; Copyright (C) 2006, 2009, 2011 Tsuyoshi CHO <Tsuyoshi.CHO@Gmail.com> ;; Author: Tsuyoshi CHO <Tsuyoshi.CHO@Gmail.com> ;; Keywords: shimbun ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'sb-rss) (require 'sb-hash) (eval-and-compile (luna-define-class rss-content-hash (content-hash) ()) (luna-define-class shimbun-rss-hash (shimbun-rss) (content))) (defvar shimbun-rss-hash-group-path-alist '(;; name rss-url type(opt:html is t) content-start(opt) content-end(opt) )) (luna-define-method content-hash-update-items ((content-hash rss-content-hash) shimbun) (with-temp-buffer (let ((case-fold-search t)) (shimbun-retrieve-url (content-hash-contents-url content-hash shimbun) 'no-cache 'no-decode) ;; In some rss feeds, LFs might be used mixed with CRLFs. (shimbun-strip-cr) (insert (prog1 (decode-coding-string (buffer-string) (shimbun-rss-get-encoding)) (erase-buffer) (set-buffer-multibyte t))) (content-hash-update-items-impl content-hash shimbun)))) (luna-define-method content-hash-update-items-impl ((content-hash rss-content-hash) shimbun) (let (xml dc-ns rss-ns content-ns (buf-str (buffer-string))) (with-temp-buffer (erase-buffer) (set-buffer-multibyte t) (insert buf-str) ;; parse xml : check url and desc (setq xml (condition-case err (shimbun-xml-parse-buffer) (error (message "Error while parsing %s: %s" (content-hash-contents-url content-hash shimbun) (error-message-string err)) nil))) (when xml (setq dc-ns (shimbun-rss-get-namespace-prefix xml "http://purl.org/dc/elements/1.1/") content-ns (shimbun-rss-get-namespace-prefix xml "http://purl.org/rss/1.0/modules/content/") rss-ns (shimbun-rss-get-namespace-prefix xml "http://purl.org/rss/1.0/")) (dolist (item (shimbun-rss-find-el (intern (concat rss-ns "item")) xml)) (let ((url (and (listp item) (eq (intern (concat rss-ns "item")) (car item)) (shimbun-rss-node-text rss-ns 'link (cddr item))))) (when url (let* ((date (or (shimbun-rss-get-date shimbun url) (shimbun-rss-node-text dc-ns 'date item) (shimbun-rss-node-text rss-ns 'pubDate item))) (id (shimbun-rss-build-message-id shimbun url date)) (content (shimbun-rss-node-text content-ns 'encoded item)) (description (shimbun-rss-node-text rss-ns 'description item))) (when content (when (string-match (concat (regexp-quote "<![CDATA[") "\\(.*\\)" (regexp-quote "]]>")) content) (setq content (match-string 1 content)))) ;; save contents (when (and id (or content description)) (content-hash-set-item content-hash id (or content description))))))))))) (luna-define-method initialize-instance :after ((shimbun shimbun-rss-hash) &rest init-args) (luna-set-slot-value shimbun 'content (luna-make-entity 'rss-content-hash)) shimbun) (luna-define-method shimbun-groups ((shimbun shimbun-rss-hash)) (mapcar 'car shimbun-rss-hash-group-path-alist)) (luna-define-method shimbun-index-url ((shimbun shimbun-rss-hash)) (nth 1 (assoc (shimbun-current-group-internal shimbun) shimbun-rss-hash-group-path-alist))) (luna-define-method shimbun-get-headers :before ((shimbun shimbun-rss-hash) &optional range) (content-hash-update-items-impl (luna-slot-value shimbun 'content) shimbun)) (luna-define-method shimbun-make-contents ((shimbun shimbun-rss-hash) header) (if (nth 2 (assoc (shimbun-current-group-internal shimbun) shimbun-rss-hash-group-path-alist)) (shimbun-make-html-contents shimbun header) (shimbun-make-text-contents shimbun header))) (luna-define-method shimbun-clear-contents ((shimbun shimbun-rss-hash) header) (let ((start (nth 3 (assoc (shimbun-current-group-internal shimbun) shimbun-rss-hash-group-path-alist))) (end (nth 4 (assoc (shimbun-current-group-internal shimbun) shimbun-rss-hash-group-path-alist))) (case-fold-search t)) (goto-char (point-min)) (when (and (stringp start) (re-search-forward start nil t) (progn (setq start (point)) (stringp end)) (re-search-forward end nil t)) (delete-region (match-beginning 0) (point-max)) (delete-region (point-min) start) t))) (luna-define-method shimbun-article ((shimbun shimbun-rss-hash) header &optional outbuf) (content-hash-shimbun-article (luna-slot-value shimbun 'content) shimbun header outbuf)) (luna-define-method shimbun-rss-build-message-id ((shimbun shimbun-rss-hash) url &optional date) (let* ((group (shimbun-current-group-internal shimbun))) (when (string-match "#" url) (setq url (substring url 0 (match-beginning 0)))) (when (stringp date) (setq url (concat url date))) (concat "<" (md5 (concat url)) "." group "@rss-hash>"))) (provide 'sb-rss-hash) ;;; sb-rss-hash.el ends here ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-rss.el�������������������������������������������������������0000664�0000000�0000000�00000033315�14343750021�0020561�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-rss.el --- shimbun backend for RSS (Rich Site Summary). ;; Copyright (C) 2003-2011, 2013, 2019, 2020 ;; Koichiro Ohba <koichiro@meadowy.org> ;; Copyright (C) 2003-2011, 2013, 2019, 2020 ;; NAKAJIMA Mikio <minakaji@osaka.email.ne.jp> ;; Author: Koichiro Ohba <koichiro@meadowy.org> ;; NAKAJIMA Mikio <minakaji@osaka.email.ne.jp> ;; Keywords: news ;; Created: Jun 14, 2003 ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (eval-when-compile (ignore-errors (require 'xml))) (eval '(require 'xml)) (eval-and-compile (luna-define-class shimbun-rss (shimbun) (ignored-subject))) (luna-define-method initialize-instance :after ((shimbun shimbun-rss) &rest init-args) (shimbun-rss-initialize-ignored-subject shimbun)) (defun shimbun-rss-initialize-ignored-subject (shimbun) (luna-set-slot-value shimbun 'ignored-subject (symbol-value (intern-soft (format "shimbun-%s-ignored-subject" (shimbun-server shimbun))))) shimbun) (luna-define-generic shimbun-rss-process-date (shimbun-rss date) "Process DATE string and return proper Date string to show it in MUA.") (autoload 'timezone-parse-date "timezone") (luna-define-method shimbun-rss-process-date ((shimbun shimbun-rss) date) ;; make Date string from ISO 8601 date format. See ;; http://www.w3.org/TR/NOTE-datetime. ;; Year: ;; YYYY (eg 1997) ;; Year and month: ;; YYYY-MM (eg 1997-07) ;; Complete date: ;; YYYY-MM-DD (eg 1997-07-16) ;; Complete date plus hours and minutes: ;; YYYY-MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00) ;; Complete date plus hours, minutes and seconds: ;; YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00) ;; Complete date plus hours, minutes, seconds and a decimal fraction of a ;; second ;; YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00) ;; where: ;; YYYY = four-digit year ;; MM = two-digit month (01=January, etc.) ;; DD = two-digit day of month (01 through 31) ;; hh = two digits of hour (00 through 23) (am/pm NOT allowed) ;; mm = two digits of minute (00 through 59) ;; ss = two digits of second (00 through 59) ;; s = one or more digits representing a decimal fraction of a second ;; TZD = time zone designator (Z or +hh:mm or -hh:mm) ;; ;; YYYY = four-digit year ;; MM = two-digit month (01=January, etc.) ;; DD = two-digit day of month (01 through 31) ;; hh = two digits of hour (00 through 23) (am/pm NOT allowed) ;; In addition to the above, it also supports the date format in the ;; RFC822 style which RSS 2.0 allows. ;;;<DEBUG> ;; (shimbun-rss-process-date-1 date)) ;; ;;(defun shimbun-rss-process-date-1 (date) ;;;</DEBUG> (let (vector year month day time zone) (cond ((null date)) ((string-match " [0-9]+ " date) (setq vector (timezone-parse-date date) year (string-to-number (aref vector 0))) (when (>= year 1970) (setq month (string-to-number (aref vector 1)) day (string-to-number (aref vector 2)) time (aref vector 3)) (when (setq zone (aref vector 4)) (unless (string-match "\\`[A-Z+-]" zone) (setq zone nil))))) ((string-match "\\([0-9][0-9][0-9][0-9]\\)\\(-[0-9][0-9]\\)?\\(-[0-9][0-9]\\)?T?\\([0-9][0-9]:[0-9][0-9]\\(:[.0-9]+\\)?\\)?\\([-+][0-9][0-9]:?[0-9][0-9]\\|Z\\)?" date) (setq year (string-to-number (match-string 1 date)) month (if (match-beginning 2) (string-to-number (substring (match-string 2 date) 1)) 1) day (if (match-beginning 3) (string-to-number (substring (match-string 3 date) 1)) 1) time (or (match-string-no-properties 4 date) "00:00") zone (match-string-no-properties 6 date)) (when zone (cond ((null zone)) ((string-equal zone "Z") (setq zone "+0000")) ((string-match ":" zone) (setq zone (concat (substring zone 0 (match-beginning 0)) (substring zone (match-end 0))))))))) (if month (shimbun-make-date-string year month day time zone) ""))) (luna-define-generic shimbun-rss-get-date (shimbun-rss url) "Process URL and return a Date string for an article of the URL. When a RSS file does not contain any date information for each article, but you can identify it from the URL, define this method in a backend.") (luna-define-method shimbun-rss-get-date ((shimbun shimbun-rss) url) nil) (luna-define-generic shimbun-rss-build-message-id (shimbun-rss url &optional date) "Build unique message-id from URL and (optionally) DATE, and return it.") (luna-define-method shimbun-rss-build-message-id ((shimbun shimbun-rss) url &optional date) (when (string-match "[?#]" url) (setq url (substring url 0 (match-beginning 0)))) (concat "<" (md5 url) "%" (shimbun-current-group shimbun) "@" (shimbun-server shimbun) ".shimbun.namazu.org>")) (luna-define-method shimbun-headers ((shimbun shimbun-rss) &optional range) (with-temp-buffer (let ((case-fold-search t)) (shimbun-retrieve-url (shimbun-index-url shimbun) 'no-cache 'no-decode) ;; In some rss feeds, LFs might be used mixed with CRLFs. (shimbun-strip-cr) (insert (prog1 (decode-coding-string (buffer-string) (shimbun-rss-get-encoding)) (erase-buffer) (set-buffer-multibyte t))) (shimbun-get-headers shimbun range)))) (luna-define-method shimbun-get-headers ((shimbun shimbun-rss) &optional range) (shimbun-rss-get-headers shimbun range t)) (defun shimbun-rss-get-headers (shimbun &optional range need-descriptions need-all-items) "Get headers from rss feed described by SHIMBUN. RANGE is currently ignored. If NEED-DESCRIPTIONS, include node text as description. By default, only existing and new items from the feed are returned, i.e., those items which are newer than the oldest one in the shimbun. If NEED-ALL-ITEMS is non-nil, all items from the feed are returned. If the entries from the feed have date information, the result is sorted by ascending date." (let* ((xml (if (or debug-on-error debug-on-quit) (shimbun-xml-parse-buffer) (condition-case err (shimbun-xml-parse-buffer) (error (message "Error while parsing %s: %s" (shimbun-index-url shimbun) (error-message-string err)) nil)))) header headers oldheaders newheaders oldest) (dolist (tmp (shimbun-rss-get-headers-1 xml shimbun need-descriptions)) (let* ((date (shimbun-header-date tmp)) (ftime (when (and (stringp date) (> (length date) 1)) (float-time (date-to-time date))))) (push (list tmp ftime) headers))) (when headers (if (or need-all-items ;; If there's a header without date information, we ;; return everything, just to be safe. (memq nil (mapcar 'cadr headers))) (mapcar 'car headers) ;; Otherwise, sort according to date. (setq headers (sort headers (lambda (a b) (> (cadr a) (cadr b))))) (while headers (setq header (pop headers)) (if (shimbun-search-id shimbun (shimbun-header-id (car header))) (push header oldheaders) (push header newheaders))) (if (null oldheaders) ;; All items are new (mapcar 'car newheaders) ;; Delete all items which are older than the ones we already ;; have (setq oldest (cadr (car oldheaders))) (while (and newheaders (> oldest (cadr (car newheaders)))) (setq newheaders (cdr newheaders))) (append (mapcar 'car newheaders) (mapcar 'car oldheaders))))))) (defun shimbun-rss-get-headers-1 (xml shimbun need-descriptions) "Retrieve all items found in XML for SHIMBUN and return headers. If NEED-DESCRIPTIONS, include node text as description." (when xml (let ((dc-ns (shimbun-rss-get-namespace-prefix xml "http://purl.org/dc/elements/1.1/")) (rss-ns (shimbun-rss-get-namespace-prefix xml "http://purl.org/rss/1.0/")) (ignored-subject (luna-slot-value shimbun 'ignored-subject)) author hankaku headers) (setq author (catch 'found-author (dolist (channel (shimbun-rss-find-el (intern (concat rss-ns "channel")) xml)) (throw 'found-author (or (shimbun-rss-node-text rss-ns 'author channel) (shimbun-rss-node-text dc-ns 'creator channel) (shimbun-rss-node-text dc-ns 'contributor channel))))) hankaku (unless (memq (shimbun-japanese-hankaku shimbun) '(body nil)) (generate-new-buffer " *temp*"))) (unwind-protect (dolist (item (shimbun-rss-find-el (intern (concat rss-ns "item")) xml) headers) (let ((url (and (listp item) (eq (intern (concat rss-ns "item")) (car item)) (shimbun-rss-node-text rss-ns 'link (cddr item))))) (when url (let* ((date (or (shimbun-rss-get-date shimbun url) (shimbun-rss-node-text dc-ns 'date item) (shimbun-rss-node-text rss-ns 'pubDate item))) (id (shimbun-rss-build-message-id shimbun url date)) (subject (shimbun-rss-node-text rss-ns 'title item))) (when id (unless (and ignored-subject subject (string-match ignored-subject subject)) (push (shimbun-create-header 0 (if hankaku (with-current-buffer hankaku (insert (or subject "")) (shimbun-japanese-hankaku-region (point-min) (point-max)) (prog1 (buffer-string) (erase-buffer))) subject) (or (shimbun-rss-node-text rss-ns 'author item) (shimbun-rss-node-text dc-ns 'creator item) (shimbun-rss-node-text dc-ns 'contributor item) author (shimbun-from-address shimbun)) (shimbun-rss-process-date shimbun date) id "" 0 0 url (when need-descriptions (let ((description (shimbun-rss-node-text rss-ns 'description item))) (when description (list (cons 'description description)))))) headers))))))) (when (buffer-live-p hankaku) (kill-buffer hankaku)))))) ;;; Internal functions ;;; XML functions (defvar shimbun-rss-compatible-encoding-alist '((iso-8859-1 . windows-1252) (iso-8859-8 . windows-1255) (iso-8859-9 . windows-1254)) "Alist of encodings and those supersets. The cdr of each element is used to decode data if it is available when the car is what the data specify as the encoding. Or, the car is used for decoding when the cdr that the data specify is not available.") (defun shimbun-rss-get-encoding () "Return an encoding attribute specified in the current xml contents. If `shimbun-rss-compatible-encoding-alist' specifies the compatible encoding, it is used instead. If the xml contents doesn't specify the encoding, return `utf-8' which is the default encoding for xml if it is available, otherwise return nil." (goto-char (point-min)) (if (re-search-forward "<\\?[^>]*encoding=\\(\"\\([^\">]+\\)\"\\|'\\([^'>]+\\)'\\)" nil t) (let ((encoding (intern (downcase (or (match-string 2) (match-string 3)))))) (or (shimbun-find-coding-system (cdr (assq encoding shimbun-rss-compatible-encoding-alist))) (shimbun-find-coding-system encoding) (shimbun-find-coding-system (car (rassq encoding shimbun-rss-compatible-encoding-alist))))) (shimbun-find-coding-system 'utf-8))) (defun shimbun-rss-node-text (namespace local-name element) (let* ((node (assq (intern (concat namespace (symbol-name local-name))) element)) (text (if (and node (listp node)) (shimbun-rss-node-just-text node) node)) (cleaned-text (if text (replace-regexp-in-string "\\`[ \000-\037\177]+\\|[ \000-\037\177]+\\'" "" text)))) (if (string-equal "" cleaned-text) nil cleaned-text))) (defun shimbun-rss-node-just-text (node) (if (and node (listp node)) (mapconcat 'shimbun-rss-node-just-text (cddr node) " ") node)) (defun shimbun-rss-find-el (tag data &optional found-list) "Find the all matching elements in the data. Careful with this on large documents!" (when (consp data) (dolist (bit data) (when (car-safe bit) (when (equal tag (car bit)) ;; Old xml.el may return a list of string. (when (and (consp (caddr bit)) (stringp (caaddr bit))) (setcar (cddr bit) (caaddr bit))) (setq found-list (append found-list (list bit)))) (if (and (consp (car-safe (caddr bit))) (not (stringp (caddr bit)))) (setq found-list (append found-list (shimbun-rss-find-el tag (caddr bit)))) (setq found-list (append found-list (shimbun-rss-find-el tag (cddr bit)))))))) found-list) (defun shimbun-rss-get-namespace-prefix (el uri) "Given EL (containing a parsed element) and URI (containing a string that gives the URI for which you want to retrieve the namespace prefix), return the prefix. See http://feeds.archive.org/validator/docs/howto/declare_namespaces.html for more RSS namespaces." (let* ((prefix (car (rassoc uri (cadar el)))) (nslist (if prefix (split-string (symbol-name prefix) ":"))) (ns (cond ((eq (length nslist) 1) ; no prefix given "") ((eq (length nslist) 2) ; extract prefix (cadr nslist))))) (if (and ns (not (equal ns ""))) (concat ns ":") ns))) (provide 'sb-rss) ;; end of sb-rss.el �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-ruby.el������������������������������������������������������0000664�0000000�0000000�00000013341�14343750021�0020730�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-ruby.el --- shimbun backend class for ruby ML archiver. ;; Copyright (C) 2001-2003, 2005, 2009, 2019 ;; NAKAJIMA Mikio <minakaji@osaka.email.ne.jp> ;; Author: NAKAJIMA Mikio <minakaji@osaka.email.ne.jp> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-incf (require 'shimbun) (luna-define-class shimbun-ruby (shimbun) ()) (defvar shimbun-ruby-url "http://www.ruby-talk.org/") (defconst shimbun-ruby-group-path-alist '(("comp.lang.ruby" . "ruby/comp.lang.ruby") ("fj.comp.lang.ruby" . "ruby/fj.comp.lang.ruby") ("ruby-dev" . "ruby/ruby-dev") ("ruby-ext" . "ruby/ruby-ext") ("ruby-list" . "ruby/ruby-list") ("ruby-math" . "ruby/ruby-math") ("ruby-talk" . "ruby/ruby-talk"))) (defvar shimbun-ruby-groups (mapcar 'car shimbun-ruby-group-path-alist)) ;;(luna-define-method shimbun-reply-to ((shimbun shimbun-ruby)) ;; ;;) (defun shimbun-ruby-parse-time (str) (save-match-data (if (string-match "\\([0-9]+\\)/\\([0-9]+\\)/\\([0-9]+\\) \\([0-9]+:[0-9]+:[0-9]+\\)" str) (shimbun-make-date-string (string-to-number (match-string 1 str)) (string-to-number (match-string 2 str)) (string-to-number (match-string 3 str)) (match-string 4 str)) str))) (luna-define-method shimbun-index-url ((shimbun shimbun-ruby)) (shimbun-expand-url "index.shtml" (concat (shimbun-url-internal shimbun) (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-ruby-group-path-alist)) "/"))) (luna-define-method shimbun-get-headers ((shimbun shimbun-ruby) &optional range) (let ((case-fold-search t) (pages (shimbun-header-index-pages range)) (count 0) headers auxs aux) ;; Use entire archive. (while (and (if pages (<= (cl-incf count) pages) t) (re-search-forward "<a href=\"\\([0-9]+-[0-9]+.shtml\\)\">" nil t)) (setq auxs (append auxs (list (match-string 1))))) (setq auxs (nreverse auxs)) (catch 'stop (while auxs (with-temp-buffer (shimbun-retrieve-url (shimbun-expand-url (setq aux (car auxs)) (shimbun-index-url shimbun))) (subst-char-in-region (point-min) (point-max) ?\t ? t) (let ((case-fold-search t) id url date subject from) (goto-char (point-max)) (while (re-search-backward "^<DT><A NAME=\"[0-9]+\">\\(</A>\\)?\ <A HREF=\"\\([^>]+\\)\">\\([0-9]+\\)</A> \\([ /:0-9]+\\) \\[\\([^[]+\\)\\][ !]\\(.+\\)$" nil t) (setq url (concat shimbun-ruby-url (match-string 2)) id (format "<%s%05d%%%s>" aux (string-to-number (match-string 3)) (shimbun-current-group-internal shimbun)) date (shimbun-ruby-parse-time (match-string 4)) from (match-string 5) subject (match-string 6)) (if (shimbun-search-id shimbun id) (throw 'stop nil)) (push (shimbun-create-header 0 subject from date id "" 0 0 url) headers))) (setq auxs (cdr auxs))))) headers)) (luna-define-method shimbun-make-contents ((shimbun shimbun-ruby) header) (let ((headers '(("^Subject: \\(.+\\)$" . shimbun-header-set-subject) ("^From:\\(.+\\)$" . shimbun-header-set-from) ("^Date: \\(.+\\)$" . shimbun-header-set-date))) ;; any other headers to be included? ;;<A NAME=head></A><pre><A HREF="/cgi-bin/scat.rb/ruby/ruby-list/29726">...<a href="/ruby/ruby-list/29727">o</a> <a href="/cgi-bin/scat.rb/ruby/ruby-list/29727?help">HELP</a> ;;Subject: [ruby-list:<FONT COLOR="#{CLR_NUM}">29727</FONT>] <b><FONT COLOR="#{CLR_SUB}">Re: rand(1<<32)</FONT></b> ;;From: <strong>Takahiro Kambe </strong><taca@sky.yamashina.kyoto.jp> ;;Date: Mon, 21 May 2001 12:23:06 +0900 ;;In-reply-to: <a href="/cgi-bin/scat.rb/ruby/ruby-list/29724">29724</a> ;;References: <a href="/cgi-bin/scat.rb/ruby/ruby-list/29720">29720</a> <a href="/cgi-bin/scat.rb/ruby/ruby-list/29724">29724</a> ;;<hr> headerstart value) (if (not (re-search-forward "^Subject:" nil t nil)) nil (setq headerstart (progn (beginning-of-line) (point-marker))) (delete-region headerstart (point-min))) (if (re-search-forward "^<hr><a name=tail>" nil t nil) (delete-region (progn (beginning-of-line) (point)) (point-max))) (while headers (goto-char (point-min)) (if (re-search-forward (car (car headers)) nil t nil) (and (setq value (match-string-no-properties 1)) (setq value (with-temp-buffer (insert value) (shimbun-remove-markup) (shimbun-decode-entities) (buffer-string))) (funcall (cdr (car headers)) header value))) (setq headers (cdr headers))) (search-forward "<hr>" nil t nil) (delete-region (point) headerstart) (shimbun-header-insert shimbun header) (insert "Content-Type: text/html; charset=ISO-2022-JP\nMIME-Version: 1.0\n") (insert "\n<html><head><base href=\"" (shimbun-header-xref header) "\"</head><body><pre>") (goto-char (point-max)) (insert "</pre></body></html>") (encode-coding-string (buffer-string) (mime-charset-to-coding-system "ISO-2022-JP")))) (provide 'sb-ruby) ;;; sb-ruby.el ends here �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-sankei.el����������������������������������������������������0000664�0000000�0000000�00000071317�14343750021�0021230�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-sankei.el --- shimbun backend for the Sankei News ;; Copyright (C) 2003-2011, 2013-2019, 2021, 2022 Katsumi Yamaoka ;; Author: Katsumi Yamaoka <yamaoka@jpl.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-multi) (luna-define-class shimbun-sankei (shimbun-japanese-newspaper shimbun-multi shimbun) ()) (defvar shimbun-sankei-url "https://www.sankei.com/") (defvar shimbun-sankei-top-level-domain "www.sankei.com") (defvar shimbun-sankei-server-name "gャ若") (defvar shimbun-sankei-group-table '(("top" "ャ若" "https://www.sankei.com/") ("flash" "" "https://www.sankei.com/flash/") ("affairs" "腓鞘" "https://www.sankei.com/affairs/") ("politics" "炊音" "https://www.sankei.com/politics/") ("world" "初" "https://www.sankei.com/world/") ("economy" "腟羝" "https://www.sankei.com/economy/") ("sports" "鴻若" "https://www.sankei.com/sports/") ("entertainments" "潟帥" "https://www.sankei.com/entertainments/") ("life" "ゃ" "https://www.sankei.com/life/") ("column" "潟" "https://www.sankei.com/column/") ("column.editorial" "筝糸宍" "https://www.sankei.com/column/editorial/") ("column.seiron" "罩h" "https://www.sankei.com/column/seiron/") ("column.sankeisyo" "g" "https://www.sankei.com/column/sankeisyo/") ("column.naniwa" "羌蘂" "https://www.sankei.com/column/naniwa/") ("west" "gWEST" "https://www.sankei.com/west/") ("west.essay" "眼祉" "https://www.sankei.com/tag/series/etc_21/"))) (defvar shimbun-sankei-x-face-alist ;; Faces used for the light background display. '(("default" . "\ Face: iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAD1BMVEX8/PwAAAD///+G d3j/AADv136FAAAAAXRSTlMAQObYZgAAAKtJREFUGNNNkN0VAiAIhfW4QMgEXhpAtA1y/5kS0 IoHD59w+UvJLD/StdlT0n4p834o/NJTMeRA6hHhXwXTBbrEsmnOcOyzKBFxP92UWIcon26Z0S qgtzxBBtCiea4KMyVP1uEEEi9F232tIQwXMyBrvWVCfQoLrmVqwxpotfsvetC0zz/UwKP1vh4 ExVTNh4ScBVvM1e6C1UjO/fZKxnpvXYjnJP5efucf+gA+DB8q52OUwwAAAABJRU5ErkJggg==")) ;; ;; Faces used for the dark background display. ;; '(("default" . "\ ;;Face: iVBORw0KGgoAAAANSUhEUgAAABsAAAAbAgMAAADwuhzGAAAADFBMVEUAAAD///95 ;; iIf/AACrdmo+AAAAAXRSTlMAQObYZgAAAJ9JREFUCNcdjzEOwjAMRb8jJZJhYEGcoKoQC ;; 0cgjGyASNWxI9zC4g5FnKGX4FqdgO9ESp4s5/9vA5AMnoWpOTeIfLdokcieVapf1Ei2wh ;; AnNoHrWO5rcnw8X28XStaBLMHkTMkJ0J6XrrFx6XJuaZGw/+4UtPj8QDakidXamXCoVNL ;; 7aqvZc+UYrOZeaFhzMwJzEG9Q3yB0U+cLQAvH+AOYXSEFLdF2GAAAAABJRU5ErkJggg==")) ) (defvar shimbun-sankei-expiration-days 7) (defvar shimbun-sankei-login-url "https://special.sankei.com/login" "*Url to login to special.sankei.com.") (defvar shimbun-sankei-logout-url "https://special.sankei.com/logout" "*Url to logout from special.sankei.com.") (defcustom shimbun-sankei-login-name nil "Login name used to login to special.sankei.com. To use this, set both `w3m-use-cookies' and `w3m-use-form' to t." :group 'shimbun :type '(choice (const :tag "None" nil) (string :tag "User name"))) (defcustom shimbun-sankei-login-password nil "Password used to login to special.sankei.com. To use this, set both `w3m-use-cookies' and `w3m-use-form' to t." :group 'shimbun :type '(choice (const :tag "None" nil) (string :tag "Password"))) (luna-define-method shimbun-groups ((shimbun shimbun-sankei)) (mapcar 'car shimbun-sankei-group-table)) (luna-define-method shimbun-current-group-name ((shimbun shimbun-sankei)) (nth 1 (assoc (shimbun-current-group-internal shimbun) shimbun-sankei-group-table))) (luna-define-method shimbun-index-url ((shimbun shimbun-sankei)) (nth 2 (assoc (shimbun-current-group-internal shimbun) shimbun-sankei-group-table))) (defvar shimbun-sankei-retry-fetching 1) (luna-define-method shimbun-get-headers :around ((shimbun shimbun-sankei) &optional range) (shimbun-sankei-get-headers shimbun range)) (defun shimbun-sankei-get-headers (shimbun range) "Get headers for the group that SHIMBUN specifies in RANGE." (let ((group (shimbun-current-group-internal shimbun))) (if (string-equal "top" group) (shimbun-sankei-get-headers-top shimbun range group) (let (nd url id st ids date tem subject names headers) (goto-char (point-min)) (while (re-search-forward "\"website_url\":\"\\([^\"]+-\\([0-9A-Z]\\{26\\}\\)[^\"]*\\)" nil t) (setq nd (match-end 0) url (match-string 1) id (match-string 2)) (when (and (search-backward (concat "{\"_id\":\"" id "\"") nil t) (progn (setq st (match-beginning 0)) (or (ignore-errors (setq nd (scan-sexps st 1))) (progn (goto-char nd) nil)))) (setq id (concat "<" id "." (mapconcat #'identity (nreverse (split-string group "\\.")) ".") "%" shimbun-sankei-top-level-domain ">")) (if (or (member id ids) (progn (push id ids) (shimbun-search-id shimbun id))) (goto-char nd) (save-restriction (narrow-to-region (goto-char st) nd) (setq date (decode-time ;; Default to the current time. (and (re-search-forward "\"display_date\":\"\ \\(20[2-9][0-9]-[01][0-9]-[0-3][0-9]T[0-5][0-9]:[0-5][0-9]:[^\"]+\\)" nil t) (ignore-errors (date-to-time (match-string 1)))))) (goto-char st) (when (re-search-forward "\"headlines\":{\"basic\":\\(\"\\)" nil t) (setq subject (condition-case nil (replace-regexp-in-string "\\`[\t ]+\\|[\t ]+\\'" "" (read (nth 2 (match-data)))) (error "(failed to fetch subject)"))) (goto-char st) (setq names nil) (when (and (re-search-forward "\"taxonomy\":\\({\\)" nil t) (setq tem (ignore-errors (scan-sexps (match-beginning 1) 1)))) (save-restriction (narrow-to-region (match-beginning 1) tem) (while (re-search-forward "\"name\":\"\\([^\"]+\\)\"" nil t) (push (match-string 1) names)))) (when (or (not names) (not (setq tem (cdr (assoc group '(("column.editorial" . "筝糸宍") ("column.seiron" . "罩h") ("column.sankeisyo" . "g") ("column.naniwa" . "羌蘂") ("west.essay" . "眼祉")))))) (member tem names)) (push (shimbun-create-header 0 subject (concat shimbun-sankei-server-name (if names (concat " (" (mapconcat #'identity (last names 2) " ") ")") "")) (shimbun-make-date-string (nth 5 date) (nth 4 date) (nth 3 date) (format "%02d:%02d:%02d" (nth 2 date) (nth 1 date) (nth 0 date))) id "" 0 0 (shimbun-expand-url url shimbun-sankei-url)) headers))) (goto-char nd))))) (shimbun-sort-headers headers))))) (defun shimbun-sankei-get-headers-top (shimbun range group) "Get headers for the \"top\" group of SHIMBUN in RANGE." (let ((name (cdr (assoc group '(("top" . ""))))) url id ids nd subject date headers) (goto-char (point-min)) (while (re-search-forward "<div[^>]* class=[^>]*[ \"]order-1[ \"]" nil t) (when (shimbun-end-of-tag "div") (narrow-to-region (goto-char (match-beginning 2)) (match-end 2)) (when (re-search-forward "<a[^>]* href=\"\\(/article/[0-9]\\{8\\}-\ \\([0-9A-Z]\\{26\\}\\)/\\)" nil t) (setq url (match-string 1) id (concat "<" (match-string 2) "." (mapconcat #'identity (nreverse (split-string group "\\.")) ".") "%" shimbun-sankei-top-level-domain ">")) (unless (or (member id ids) (progn (push id ids) (shimbun-search-id shimbun id))) (when (shimbun-end-of-tag "a") (goto-char (match-beginning 2)) (setq nd (match-end 2)) (when (re-search-forward "\\(?:[^>]*<[^>]*>\\)*[\t\n ]*\\([^<]+\\)" nd t) (setq subject (replace-regexp-in-string "[\t\n ]+\\'" "" (match-string 1))) (goto-char (point-min)) (when (and (re-search-forward "<time[^>]* dateTime=\"\ \\(20[2-9][0-9]-[01][0-9]-[0-3][0-9]T\ [012][0-9]:[0-5][0-9]:[0-5][0-9]\\(?:\\.[0-9]+\\)Z\\)" nil t) (ignore-errors (setq date (decode-time (date-to-time (match-string 1)))))) (push (shimbun-create-header 0 subject (if name (concat shimbun-sankei-server-name " (" name ")") shimbun-sankei-server-name) (shimbun-make-date-string (nth 5 date) (nth 4 date) (nth 3 date) (apply #'format "%02d:%02d:%02d" (last (nreverse date) 3))) id "" 0 0 (shimbun-expand-url url shimbun-sankei-url)) headers))))))) (goto-char (point-max)) (widen)) (shimbun-sort-headers headers))) (luna-define-method shimbun-clear-contents :around ((shimbun shimbun-sankei) header) (shimbun-sankei-clear-contents shimbun header)) (defun shimbun-sankei-clear-contents (shimbun header) "Collect contents and create an html page in the current buffer." (if (zerop (buffer-size)) (insert "「若吾荀ゃ障с<br>\n" "若吾ゃ腱糸醇с障\n") (let (author restrictions st nd tem headline ids simgs id caption img contents eimgs maxwidth fn) (goto-char (point-min)) (when (or (and (re-search-forward "<a[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*\ \\(?:class=\"gtm-click author-name\"\\|href=\"/author/\ \\|data-gtm-action=\"move to author page\"\ \\|data-gtm-label=\"article header author link\\)" nil t) (shimbun-end-of-tag "a") (setq author (match-string 2))) (and (progn (goto-char (point-min)) (re-search-forward "\ {[^{}]*\"original\":{[^{}]*\"byline\":\"\\([^\"}]+\\)\"" nil t)) (setq author (match-string 1)))) (setq author (replace-regexp-in-string "\\`[\t ]+\\|\\(\\cj\\)[\t ]+\\(\\cj\\)\\|[\t ]+\\'" "\\1\\2" author))) (goto-char (point-min)) (when (and (re-search-forward "<span[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*\ class=\"restrictions\"" nil t) (shimbun-end-of-tag "span") (progn (goto-char (match-beginning 1)) (re-search-forward "<span[\t\n >]" (match-end 1) t) (shimbun-end-of-tag "span"))) (setq restrictions (match-string 2))) (goto-char (point-min)) (when (and (re-search-forward ";Fusion.globalContent=\\({\\)" nil t) (setq st (match-beginning 1) nd (ignore-errors (copy-marker (scan-sexps st 1))))) (when (re-search-forward ",\"promo_items\":\\({\\)" nd t) (ignore-errors ;; The other headlines are there. (delete-region (match-beginning 0) (scan-sexps (match-beginning 1) 1)))) (setq nd (prog1 (marker-position nd) (set-marker nd nil))) (goto-char nd) (when (and (re-search-backward ",\"headlines\":{\"basic\":\\(\"\\)" st t) (progn (setq tem (ignore-errors (replace-regexp-in-string "\\`[\t ]+\\|[\t ]+\\'" "" (read (nth 2 (match-data)))))) (not (zerop (length tem))))) (setq headline tem)) (goto-char st) (when (re-search-forward ",\"content_elements\":\\(\\[\\)" nd t) (ignore-errors (setq st (match-end 0)) (setq nd (1- (scan-sexps (match-beginning 1) 1))))) (goto-char (point-min)) (setq ids (shimbun-sankei-extract-images st nil) simgs (car ids) ids (cadr ids)) (save-restriction (narrow-to-region (goto-char st) nd) (while (re-search-forward "{\"_id\":\"\\([^\"]\\{26\\}\\)\"" nil t) (setq st (goto-char (match-beginning 0)) nd (match-end 0) id (match-string 1)) (if (ignore-errors (setq nd (scan-sexps st 1))) (cond ((search-forward "\"type\":\"image\"" nd t) (goto-char st) (setq caption (and (re-search-forward "\"caption\":\\(\"\\)" nd t) (setq tem (ignore-errors (replace-regexp-in-string "\\`[\t ]+\\|[\t ]+\\'" "" (read (nth 2 (match-data)))))) (not (zerop (length tem))) tem)) (if (member id ids) (goto-char nd) (goto-char st) (setq img (and (re-search-forward "\"type\":\"image\",\"url\":\\(\"\\)" nd t) (ignore-errors (read (nth 2 (match-data)))))) (goto-char st) (and (or (re-search-forward "\"articleLarge\":\\(\"\\)" nd t) (re-search-forward "\"articleSmall\":\\(\"\\)" nd t) ;; very large (and (not img) (re-search-forward "\"type\":\"image\",\"url\":\\(\"\\)" nd t)) ;; portrait is trimmed? (re-search-forward "\"articleSnsShareImage\":\\(\"\\)" nd t)) (setq tem (ignore-errors (read (nth 2 (match-data))))) (progn (push id ids) (push (concat (if img (concat "<a href=\"" img "\">") "") "<img src=\"" tem "\" alt=\"[]\">" (if img "</a>" "") (if caption (concat "<br>\n" caption) "")) contents))))) ((search-forward "\"type\":\"raw_html\"" nd t) (goto-char st) (if (and (re-search-forward "\"content\":\\(\"\\)" nd t) (setq tem (ignore-errors (read (nth 2 (match-data)))))) (with-temp-buffer (insert tem) (shimbun-strip-cr) (goto-char (point-min)) (while (and (re-search-forward "\ <div[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*class=\"sankei_netshop\"" nil t) (shimbun-end-of-tag "div" t)) (delete-region (match-beginning 0) (match-end 0)) (insert "\n")) (goto-char (point-min)) (while (re-search-forward "\ [\t\n ]*\\(?:<\\(?:br\\|/?p\\)>[\t\n ]*\\)+" nil t) (replace-match "\n\n")) (goto-char (point-min)) (while (re-search-forward "^[\t ]+\\|[\t ]+$" nil t) (delete-region (match-beginning 0) (match-end 0))) (goto-char (point-min)) (while (and (re-search-forward "<img[\t ]" nil t) (shimbun-end-of-tag)) (goto-char (match-beginning 0)) (unless (save-match-data (re-search-forward "[\t ]alt=\"" (match-end 0) 'move)) (forward-char -1) (insert " alt=\"[]\""))) (goto-char (point-min)) (while (re-search-forward ">$" nil t) (or (looking-at "\n\n") (looking-back "<br>" nil) (insert "<br>"))) (when (setq tem (split-string (buffer-string) "\n\n+" t)) (setq contents (nconc (nreverse tem) contents))))) (goto-char nd)) ((search-forward "\"type\":\"interstitial_link\"" nd t) (goto-char st) (and (setq caption (and (re-search-forward "\"content\":\\(\"\\)" nd t) (ignore-errors (replace-regexp-in-string "\\`[\t ]+\\|[\t ]+\\'" "" (read (nth 2 (match-data))))))) (not (zerop (length caption))) (progn (goto-char st) (setq tem (and (re-search-forward "\"url\":\\(\"\\)" nd t) (ignore-errors (read (nth 2 (match-data))))))) (push (concat "<a href=\"" tem "\">" caption "</a>") contents))) ((re-search-forward "\"raw_oembed\":{\"html\":\\(\"<iframe[\t\n ]+\\)" nd t) (when (setq tem (ignore-errors (read (nth 2 (match-data))))) (setq tem (replace-regexp-in-string ">[^<]*</iframe" ">[]</iframe" tem)) (push (if (string-match "[\t\n ]src=\"\\([^ \">?]+\\)" tem) (concat "<a href=\"" (match-string 1 tem) "\">" tem "</a>") tem) contents))) (t (if (and (re-search-forward "\"content\":\\(\"\\)" nd t) (setq tem (ignore-errors (read (nth 2 (match-data)))))) (progn (setq tem (replace-regexp-in-string "\\`[\t ]+\\|[\t ]+\\'" "" tem)) (unless (or (zerop (length tem)) ;; <br/> only case (string-match "\\`<[^>]*>\\'" tem)) (push tem contents))) (goto-char nd)))) (goto-char nd)))) (goto-char nd) (setq eimgs (car (shimbun-sankei-extract-images nil ids))) (erase-buffer) (when (and author headline (string-match (regexp-quote author) headline)) (setq author nil)) (if headline (insert "<p>" headline (if restrictions (concat "<br>\n--- " restrictions " ---" (if author (concat " (" author ")") "")) (if author (concat "<br>\n(" author ")") "")) "</p>\n") (if restrictions (insert "<p>--- " restrictions " ---" (if author (concat " (" author ")") "") "</p>\n") (when author (insert "<p>(" author ")</p>\n")))) (when simgs (insert "<p>" (mapconcat #'identity (nreverse simgs) "</p>\n<p>") "</p>\n")) (when contents (setq maxwidth (max (- (window-width) 10) 10)) (if (string-match "g\\|羌蘂" (shimbun-header-from-internal header)) (setq fn (lambda (str &optional last) (when (eq (aref str 0) ?) (setq str (substring str 1))) (if (or (not (eq (char-syntax (aref str 0)) ?w)) (eq (aref str (1- (length str))) ?>)) (concat str "<br>" (if last "" "<br>")) (concat (if last "" "<p>") (if (and (string-match "[,.]" str) (>= (string-width str) maxwidth)) "" "") str (if last "" "</p>"))))) (setq fn (lambda (str &optional last) (if (or (not (eq (char-syntax (aref str 0)) ?w)) (eq (aref str (1- (length str))) ?>)) (concat str "<br>" (if last "" "<br>")) (concat (if last "" "<p>") (if (and (string-match "[,.]" str) (>= (string-width str) maxwidth)) "" "") str (if last "" "</p>")))))) (if eimgs (insert (mapconcat fn (nreverse contents) "\n") "\n") (when (cdr contents) (insert (mapconcat fn (reverse (cdr contents)) "\n") "\n")) (insert (funcall fn (car contents) t) "\n"))) (when eimgs (when (cdr eimgs) (insert "<p>" (mapconcat #'identity (reverse (cdr eimgs)) "</p>\n<p>") "</p>\n")) (insert (car eimgs) "\n")) (unless (memq (shimbun-japanese-hankaku shimbun) '(header subject nil)) (shimbun-japanese-hankaku-buffer t)) t)))) (defun shimbun-sankei-extract-images (end ids) "Extract images existing in the area from the current position to END. END defaults to (point-max). Image of which ID is in IDS is ignored. Return a list of images and IDS." (let (img nd id to images) (while (and (re-search-forward "<figure[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*\ class=\"\\(?:[^\t\n \"]+[\t\n ]+\\)*article-image[\t\n >]+" end t) (shimbun-end-of-tag "figure")) (setq img (match-string 0) nd (match-end 0)) (goto-char (match-beginning 0)) (when (or (re-search-forward "<a[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*\ href=\"[^\"]+/photo/\\([0-9A-Z]\\{26\\}\\)/" nd t) (re-search-forward "<img[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*\ src=\"[^\"]+/\\([0-9A-Z]\\{26\\}\\)\\.[^\"]+\"" nd t)) (unless (member (setq id (match-string 1)) ids) (push id ids) (with-temp-buffer (insert img) (goto-char (point-min)) (when (and (re-search-forward "<img[\t\n ]+" nil t) (shimbun-end-of-tag)) (setq to (match-end 0)) (goto-char (match-beginning 0)) (if (re-search-forward "alt=\"\\([^\">]*\\)\"" to t) (replace-match "[]" nil nil nil 1) (goto-char (1- to)) (insert " alt=\"[]\"")) (push (buffer-string) images))))) (goto-char nd)) (list images ids))) (luna-define-method shimbun-footer :around ((shimbun shimbun-sankei) header &optional html) (concat "<div align=\"left\">\n-- <br>\n\ 荐篋篏罔g域腓障絽医障吾<鐚<br>\n\ <a href=\"" (shimbun-article-base-url shimbun header) "\"><" (shimbun-article-base-url shimbun header) "></a>\n</div>\n")) (luna-define-method shimbun-multi-next-url ((shimbun shimbun-sankei) header url) (shimbun-sankei-multi-next-url shimbun header url)) (defun shimbun-sankei-multi-next-url (shimbun header url) (goto-char (point-min)) (when (and (re-search-forward "<a\\(?:[\t\n ]+[^\t\n >]+\\)*\ \\(?:[\t\n ]+data-gtm-action=\"move to next article page\"\ \\|>[\t\n ]*膓荀[\t\n ]*<\\)" nil t) (progn (goto-char (match-beginning 0)) (re-search-forward "href=\"\\([^\"]+\\)" nil t))) (shimbun-expand-url (match-string 1) url))) (luna-define-method shimbun-multi-clear-contents :around ((shimbun shimbun-sankei) header has-previous-page has-next-page) (shimbun-sankei-multi-clear-contents shimbun header has-previous-page has-next-page)) (defun shimbun-sankei-multi-clear-contents (shimbun header has-previous-page has-next-page) (when (luna-call-next-method) (when has-previous-page (goto-char (point-min)) (insert " \n")) t)) (eval-when-compile (require 'w3m-cookie) (require 'w3m-form)) (declare-function w3m-cookie-save "w3m-cookie" (&optional domain)) (autoload 'w3m-cookie-setup "w3m-cookie") (autoload 'password-cache-add "password-cache") (autoload 'password-read-from-cache "password-cache") (defun shimbun-sankei-login (&optional name password interactive-p) "Login to special.sankei.com with NAME and PASSWORD. NAME and PASSWORD default to `shimbun-sankei-login-name' and `shimbun-sankei-login-password' respectively. `password-data', if cached, overrides `shimbun-sankei-login-password'. If the prefix argument is given, you will be prompted for new NAME and PASSWORD." (interactive (let ((pass shimbun-sankei-login-password) name default password) (unless (and w3m-use-cookies w3m-use-form) (error "\ You should set `w3m-use-cookies' and `w3m-use-form' to non-nil")) (setq name (if current-prefix-arg (completing-read "Login name: " (cons shimbun-sankei-login-name nil) nil nil shimbun-sankei-login-name) shimbun-sankei-login-name)) (when (and name (string-match "\\`[\t ]*\\'" name)) (setq name nil)) (setq default (and name (or (password-read-from-cache name) shimbun-sankei-login-password)) password (and name (if current-prefix-arg (read-passwd (concat "Password" (when default (concat " (default " (make-string (length default) ?*) ")")) ": ") nil default) default))) (when (and password (string-match "\\`[\t ]*\\'" password)) (setq name nil password nil)) (list name password t))) (unless interactive-p (if (or name (setq name shimbun-sankei-login-name)) (or password (setq password (or (password-read-from-cache name) shimbun-sankei-login-password)) (setq name nil)) (setq password nil))) (if (not (and w3m-use-cookies w3m-use-form name password)) (when interactive-p (message "Quit")) (when interactive-p (message "Logging in to special.sankei.com...")) (require 'w3m-cookie) ;; Delete old login/out cookies. (w3m-cookie-setup) (let ((case-fold-search t)) (dolist (cookie w3m-cookies) (when (or (string-match "\\.sankei\\..+log\\(?:in\\|out\\)" (w3m-cookie-url cookie)) (and (equal "AKA_A2" (w3m-cookie-name cookie)) (equal "sankei.com" (w3m-cookie-domain cookie)))) (setq w3m-cookies (delq cookie w3m-cookies))))) (require 'w3m-form) (w3m-arrived-setup) (let ((cache (buffer-live-p w3m-cache-buffer)) (w3m-message-silent t) w3m-clear-display-while-reading next form action handler) (condition-case err (with-temp-buffer (w3m-process-with-wait-handler (w3m-retrieve-and-render shimbun-sankei-login-url t nil nil nil handler)) (goto-char (point-min)) (when (re-search-forward "^Location:[\t\n\r ]+\\(http[^\n]+\\)" nil t) (setq next (match-string-no-properties 1)) (w3m-process-with-wait-handler (w3m-retrieve-and-render next t nil nil nil handler)) (goto-char (point-min)) (when (re-search-forward "^You were redirected to:[\t\n\r ]+\\(http[^\n]+\\)" nil t) (setq next (match-string-no-properties 1)) (w3m-process-with-wait-handler (w3m-retrieve-and-render next t nil nil nil handler)))) (setq form (car w3m-current-forms)) (if (not (string-match "login\\.php\\'" (setq action (w3m-form-action form)))) (when interactive-p (message "Failed to login")) (setq form (w3m-form-make-form-data form)) (while (string-match "\ &\\(?:LOGIN_ID\\|LOGIN_PASSWORD\\|STAY_LOGGED_IN\\)=[^&]*" form) (setq form (replace-match "" nil nil form))) (setq form (concat form "&LOGIN=&LOGIN_ID=" (shimbun-url-encode-string name) "&LOGIN_PASSWORD=" (shimbun-url-encode-string password) "&STAY_LOGGED_IN=1")) (w3m-process-with-wait-handler (w3m-retrieve-and-render action t nil form nil handler)) (setq form (car w3m-current-forms)) (if (not (string-match "login\\'" (setq action (w3m-form-action form)))) (when interactive-p (message "Failed to login")) (setq form (w3m-form-make-form-data form)) (w3m-process-with-wait-handler (w3m-retrieve-and-render action t nil form nil handler))) (if (not (and w3m-current-url (string-match "\\`https://www.sankei.com/\\?[0-9]+\\'" w3m-current-url))) (when interactive-p (message "Failed to login")) (when interactive-p (message "Logged in")) ;; Use a copy of the password so not to be expired by C-@s. (password-cache-add name (copy-sequence password)) (when w3m-cookie-save-cookies (w3m-cookie-save)))) (when (get-buffer " *w3m-cookie-parse-temp*") (kill-buffer (get-buffer " *w3m-cookie-parse-temp*"))) (unless cache (w3m-cache-shutdown))) (error (if (or interactive-p debug-on-error) (signal (car err) (cdr err)) (message "Error while logging in to special.sankei.com:\n %s" (error-message-string err)))))))) (defun shimbun-sankei-logout (&optional interactive-p) "Logout from special.sankei.com." (interactive (list t)) (require 'w3m-cookie) ;; Delete old login/out cookies. (w3m-cookie-setup) (let ((case-fold-search t)) (dolist (cookie w3m-cookies) (when (or (string-match "\\.sankei\\..+log\\(?:in\\|out\\)" (w3m-cookie-url cookie)) (and (equal "AKA_A2" (w3m-cookie-name cookie)) (equal "sankei.com" (w3m-cookie-domain cookie)))) (setq w3m-cookies (delq cookie w3m-cookies))))) (require 'w3m-form) (w3m-arrived-setup) (let ((cache (buffer-live-p w3m-cache-buffer)) (w3m-message-silent t) (next shimbun-sankei-logout-url) w3m-clear-display-while-reading done handler) (when interactive-p (message "Logging out from special.sankei.com...")) (condition-case err (with-temp-buffer (while (not done) (w3m-process-with-wait-handler (w3m-retrieve-and-render next t nil nil nil handler)) (goto-char (point-min)) (if (re-search-forward "\ ^\\(?:Location\\|You were redirected to\\):[\t\n\r ]+\\(http[^\n]+\\)" nil t) (setq next (match-string-no-properties 1)) (w3m-process-with-wait-handler (w3m-retrieve-and-render next t nil nil nil handler)) (when w3m-cookie-save-cookies (w3m-cookie-save)) (when interactive-p (message "Logged out")) (setq done t))) (when (get-buffer " *w3m-cookie-parse-temp*") (kill-buffer (get-buffer " *w3m-cookie-parse-temp*"))) (unless cache (w3m-cache-shutdown))) (error (if (or interactive-p debug-on-error) (signal (car err) (cdr err)) (message "Error while logging out from special.sankei.com:\n %s" (error-message-string err))))))) (defun shimbun-sankei-keep-login (&optional force) "Keep logging in in Sankei." (interactive (list t)) (when (and w3m-use-cookies (progn (w3m-cookie-setup) t) w3m-use-form shimbun-sankei-login-name shimbun-sankei-login-password (or force (let ((cookies w3m-cookies) cookie expiry) (while cookies (setq cookie (pop cookies)) (and (equal "AKA_A2" (w3m-cookie-name cookie)) (equal "sankei.com" (w3m-cookie-domain cookie)) (setq cookies nil expiry (w3m-cookie-expires cookie)))) (or (not expiry) (not (setq expiry (ignore-errors (date-to-time expiry)))) (> (time-to-seconds (time-since expiry)) -60))))) (shimbun-sankei-login shimbun-sankei-login-name shimbun-sankei-login-password t))) (luna-define-method shimbun-headers :before ((shimbun shimbun-sankei) &optional range) (shimbun-sankei-keep-login)) (luna-define-method shimbun-article :before ((shimbun shimbun-sankei) header &optional outbuf) (shimbun-sankei-keep-login)) (provide 'sb-sankei) ;;; sb-sankei.el ends here �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-savannah.el��������������������������������������������������0000664�0000000�0000000�00000007151�14343750021�0021550�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-savannah.el --- shimbun backend for gnu list archives on savannah ;; Copyright (C) 2002, 2003, 2005, 2019 Yoichi NAKAYAMA <yoichi@FreeBSD.org> ;; Author: Yoichi NAKAYAMA <yoichi@FreeBSD.org> ;; Katsumi Yamaoka <yamaoka@jpl.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; First of all, if you have NNTP access to news.gmane.org, you can ;; read (and post) all those savannah groups. It is far useful rather ;; than using this module. :-p ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-decf (require 'shimbun) (require 'sb-mhonarc) (luna-define-class shimbun-savannah (shimbun-mhonarc) ()) (defvar shimbun-savannah-url "http://lists.gnu.org/archive/html/") (defvar shimbun-savannah-group-path-alist '(("bug-gnu-emacs" . "bug-gnu-emacs") ("emacs-bidi" . "emacs-bidi") ("emacs-commit" . "emacs-commit") ("emacs-devel" . "emacs-devel") ("emacs-diffs" . "emacs-diffs") ("emacs-pretest-bug" . "emacs-pretest-bug") ("gnu-emacs-sources" . "gnu-emacs-sources") ("help-emacs-windows" . "help-emacs-windows") ("help-gnu-emacs" . "help-gnu-emacs") ("info-gnu-emacs" . "info-gnu-emacs") ("tramp-devel" . "tramp-devel") ("vms-gnu-emacs" . "vms-gnu-emacs"))) (defvar shimbun-savannah-groups (mapcar 'car shimbun-savannah-group-path-alist)) (defvar shimbun-savannah-reverse-flag t) (defvar shimbun-savannah-litemplate-regexp "<li><a name=\"\\([0-9]+\\)\" href=\"\\(msg[0-9]+\\.html\\)\">\ \\([^<]+\\)</a>, <i>\\([^<]+\\)</i>") (defvar shimbun-savannah-x-face-alist '(("default" . "X-Face: =R@<a%O\"k\\jy?{Bk~[*wi<LU(\\;&[*N1\"5X4/^\ @oCB)?b0%$gKcCNJ)o'4GZ$?X$=E}Bj[k\n @#KE2J*~^\\[r_IQJ.m6`>L:wwfLNRT(\ ej<20'LI/le]z)n!%Bb(KI(@c&\"<`Ah~3&6Yn%+>-K>`@13\n T?OXgWz^><'44jgi;\ 3T1{Sb~c|]lJ3WIZXP-tu8S4@.C=,:q#nF5qV$xkaQmSC5LZbF=U(AS_51T|K\n W7G"))) (defun shimbun-savannah-index-url (entity) (concat (shimbun-url-internal entity) (cdr (assoc (shimbun-current-group-internal entity) shimbun-savannah-group-path-alist)) "/")) (luna-define-method shimbun-index-url ((shimbun shimbun-savannah)) (shimbun-savannah-index-url shimbun)) (defun shimbun-savannah-get-headers (entity range) (let ((case-fold-search t) (pages (shimbun-header-index-pages range)) (parent (shimbun-savannah-index-url entity)) headers months url) (goto-char (point-min)) (catch 'stop (while (and (or (not pages) (>= (cl-decf pages) 0)) (re-search-forward "<a href=\"\\(20[0-9][0-9]-[01][0-9]/\\)index\\.html\">" nil t)) (push (match-string 1) months)) (dolist (month (nreverse months)) (setq url (concat parent month "index.html")) (shimbun-retrieve-url url t) (shimbun-mhonarc-get-headers entity url headers month))) headers)) (luna-define-method shimbun-get-headers ((shimbun shimbun-savannah) &optional range) (shimbun-savannah-get-headers shimbun range)) (provide 'sb-savannah) ;;; sb-savannah.el ends here �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-scipy.el�����������������������������������������������������0000664�0000000�0000000�00000003257�14343750021�0021103�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-scipy.el --- shimbun backend for scipy mailing lists ;; Copyright (C) 2005, 2006 S V N Vishwanathan <vishketan@yahoo.com> ;; Author: S V N Vishwanathan <vishketan@yahoo.com> ;; Tsuyoshi CHO <Tsuyoshi.CHO@Gmail.com> ;; Keywords: news, scipy ;; This file is not a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (require 'shimbun) (require 'sb-mailman) (luna-define-class shimbun-scipy (shimbun-mailman) ()) (defvar shimbun-scipy-url "http://www.scipy.net/pipermail/") (defvar shimbun-scipy-groups '("astropy" "ipython-user" "ipython-dev" "scipy-user" "scipy-dev" "scipy-testlog" "scipy-chaco" "scipy-cvs")) (luna-define-method shimbun-index-url ((shimbun shimbun-scipy)) (shimbun-expand-url (concat (shimbun-current-group-internal shimbun) "/") (shimbun-url-internal shimbun))) (luna-define-method shimbun-reply-to ((shimbun shimbun-scipy)) (concat (shimbun-current-group-internal shimbun) "@scipy.net")) (provide 'sb-scipy) ;;; sb-scipy.el ends here �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-security-memo.el���������������������������������������������0000664�0000000�0000000�00000003567�14343750021�0022562�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-security-memo.el --- shimbun backend for security-memo ML. ;; Copyright (C) 2001, 2003, 2004 TSUCHIYA Masatoshi <tsuchiya@namazu.org> ;; Author: TSUCHIYA Masatoshi <tsuchiya@namazu.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-fml) (luna-define-class shimbun-security-memo (shimbun-fml) ()) (defvar shimbun-security-memo-url "http://memo.st.ryukoku.ac.jp/") (defvar shimbun-security-memo-group-alist '(("memo" . "archive") ("free-memo" . "free-memo/archive") ("social-memo" . "social-memo/archive"))) (defvar shimbun-security-memo-groups (mapcar 'car shimbun-security-memo-group-alist)) (luna-define-method shimbun-index-url ((shimbun shimbun-security-memo)) (concat (shimbun-expand-url (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-security-memo-group-alist)) (shimbun-url-internal shimbun)) "/")) (luna-define-method shimbun-reply-to ((shimbun shimbun-security-memo)) "Return the mailing list address." (concat (shimbun-current-group-internal shimbun) "@memo.st.ryukoku.ac.jp")) (provide 'sb-security-memo) ;;; sb-security-memo.el ends here �����������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-slashdot-jp.el�����������������������������������������������0000664�0000000�0000000�00000016553�14343750021�0022207�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-slashdot-jp.el --- shimbun backend for slashdot.jp ;; Copyright (C) 2003-2007, 2010, 2017, 2019 ;; NAKAJIMA Mikio <minakaji@namazu.org> ;; Author: NAKAJIMA Mikio <minakaji@namazu.org> ;; Keywords: news ;; Created: Jun 14, 2003 ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; History: ;; This backend was created by Yuuichi Teranishi <teranisi@gohome.org> ;; at July 5th, 2001. ;; Because the site desgin had been changed, this backend was ;; completly rewritten by TSUCHIYA Masatoshi <tsuchiya@namazu.org> at ;; February 28th, 2002. ;; NAKAJIMA Mikio <minakaji@namazu.org> created a new backend, ;; sb-slashdot-jp-rss.el, at July 15th, 2003. It was an alternative ;; backend of slashdot.jp based on RSS. ;; In order to reduce the cost to maintain both backends, the backend ;; based on the traditional approach was succeeded by the backend ;; based on RSS at January 18th, 2004. ;;; Code: (require 'shimbun) (require 'sb-rss) (defcustom shimbun-slashdot-jp-comment-arguments '((threshold . 1) (mode . nested) (commentsort . 0)) "Arguments to view comment pages." :group 'shimbun :type '(list (cons :tag "Score threshold" :format "%t: %v" (const :tag "" threshold) integer) (cons :tag "Threading mode" :format "%t: %v" (const :tag "" mode) (choice (const flat) (const nested) (const nocomment) (const thread))) (cons :tag "Sorting order" :format "%t: %v" (const :tag "" commentsort) (choice (const :tag "Oldest first" 0) (const :tag "Newest first" 1) (const :tag "Highest scores first" 3) (const :tag "Oldest first (Ignore threads)" 4) (const :tag "Newest first (Ignore threads)" 5))))) (defcustom shimbun-slashdot-jp-group-alist '(("story" . "http://slashdot.jp/index.rss") ("askslashdot" . "http://slashdot.jp/askslashdot.rss") ("bookreview" . "http://slashdot.jp/books.rss") ("bsd" . "http://slashdot.jp/bsd.rss") ("developers" . "http://slashdot.jp/developers.rss") ("interview" . "http://slashdot.jp/interview.rss") ("linux" . "http://slashdot.jp/linux.rss") ("mac" . "http://slashdot.jp/mac.rss") ("mobile" . "http://slashdot.jp/mobile.rss") ("science" . "http://slashdot.jp/science.rss") ("security" . "http://slashdot.jp/security.rss") ("slash" . "http://slashdot.jp/slash.rss") ("it" . "http://slashdot.jp/it.rss") ("hardware" . "http://slashdot.jp/hardware.rss") ("diary.oliver" . "http://slashdot.jp/~Oliver/journal/rss")) "Alist of slashdot groups and their RSS feeds." :group 'shimbun :type '(repeat (cons :format "%v" :indent 4 (string :format "Group name: %v") (string :format " RSS URL: %v")))) (luna-define-class shimbun-slashdot-jp (shimbun-rss) ()) (defvar shimbun-slashdot-jp-from-address "slashmaster@slashdot.jp") ;;(defvar shimbun-slashdot-jp-coding-system 'euc-japan) (defvar shimbun-slashdot-jp-content-start "<!-- start template: ID [0-9]+, \ \\(dispStory;[^;]+\\|\\(bluebox\\|generic\\|greypage\\|liquid\\|slashdotjp\ \\|yellowpage\\);journal\\);default -->\n") (defvar shimbun-slashdot-jp-content-end "<!-- end template: ID [0-9]+, \ \\(dispStory;[^;]+\\|\\(bluebox\\|generic\\|greypage\\|liquid\\|slashdotjp\ \\|yellowpage\\);journal\\);default -->\n") (luna-define-method shimbun-groups ((shimbun shimbun-slashdot-jp)) (mapcar 'car shimbun-slashdot-jp-group-alist)) (luna-define-method shimbun-index-url ((shimbun shimbun-slashdot-jp)) (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-slashdot-jp-group-alist))) (luna-define-method shimbun-rss-build-message-id ((shimbun shimbun-slashdot-jp) url date) (cond ((string-match "\\`http://slashdot\\.jp/\\([a-zA-Z0-9]+\\)?/?article\\.pl\\?sid=\\([/0-9]+\\)\\(&\\|\\'\\)" url) (if (match-string-no-properties 1 url) (concat "<" (match-string-no-properties 1 url) "%" (match-string-no-properties 2 url) "@slashdot.jp>") (concat "<" (match-string-no-properties 2 url) "@slashdot.jp>"))) ((or (string-match "\\`http://slashdot\\.jp/journal\\.pl\\?op=display&uid=\\([0-9]+\\)&id=\\([0-9]+\\)" url) (string-match "\\`http://slashdot\\.jp/~\\([^/]+\\)/journal/\\([0-9]+\\)\\(\\?from=rss\\)?" url)) (concat "<" (match-string-no-properties 2 url) "%" (match-string-no-properties 1 url) "@slashdot.jp>")) (t (error "Cannot find message-id base")))) (luna-define-method shimbun-get-headers :around ((shimbun shimbun-slashdot-jp) &optional range) (let ((headers (luna-call-next-method))) (dolist (head headers) (let ((xref (shimbun-header-xref head))) (if (not (string-match "journal" xref)) ;; article (shimbun-header-set-xref head (concat xref "&mode=nocomment")) (if (string-match "\\`http://slashdot\\.jp/~\\([^/]+\\)/journal/\\([0-9]+\\)\\(\\?from=rss\\)?" xref) (shimbun-header-set-xref head (concat "http://slashdot.jp/~" (match-string 1 xref) "/journal/" (match-string 2 xref) "?theme=generic&mode=nocomment")) (shimbun-header-set-xref head (concat xref "&theme=generic&mode=nocomment")))))) headers)) (defun shimbun-slashdot-jp-comment-url (url) (when (string-match "\\`http://slashdot\\.jp/\\([a-zA-Z0-9]+\\)?/?article\\.pl" url) (mapconcat 'identity (cons (if (string-match "&mode=nocomment\\'" url) (substring url 0 (match-beginning 0)) url) (mapcar (lambda (x) (format "%s=%s" (car x) (cdr x))) shimbun-slashdot-jp-comment-arguments)) "&"))) (luna-define-method shimbun-make-contents :before ((shimbun shimbun-slashdot-jp) header) (goto-char (point-min)) (if (string-match "\\`http://slashdot\\.jp/\\([a-zA-Z0-9]+\\)?/?article\\.pl" (shimbun-header-xref header)) ;; article (when (re-search-forward "<table[^>]*class=\"titlebar\"[^>]*>[ \t\n]*\ <tr[^>]*>[ \t\n]*<td[^>]*>[ \t\n]*<font[^>]*>\\([^<]+\\)</font>" nil t) (shimbun-header-set-subject header (match-string-no-properties 1))) ;; journal (when (re-search-forward "<a +href=\"?/?[^/]*/journal/[0-9]+\"?>\\([^<]+\\)</a>" nil t) (shimbun-header-set-subject header (match-string-no-properties 1)))) (goto-char (point-min))) (luna-define-method shimbun-clear-contents :around ((shimbun shimbun-slashdot-jp) header) (when (luna-call-next-method) (shimbun-remove-tags "<!-- begin ad code -->" "<!-- end ad code -->") (shimbun-remove-tags "script\\|noscript" t) (let ((url (shimbun-slashdot-jp-comment-url (shimbun-header-xref header)))) (when url (goto-char (point-max)) (insert "\n<p align=left>[<a href=\"" url "\">c茯</a>]</p>"))) t)) (provide 'sb-slashdot-jp) ;;; sb-slashdot-jp.el ends here �����������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-slashdot.el��������������������������������������������������0000664�0000000�0000000�00000014674�14343750021�0021602�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-slashdot.el --- slashdot.org shimbun backend ;; Copyright (C) 2008, 2009 David Engster ;; Author: David Engster <dengste@eml.cc> ;; Keywords: news ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (require 'shimbun) (luna-define-class shimbun-slashdot (shimbun) ()) (defvar shimbun-slashdot-group-url '(("frontpage" "http://slashdot.org") ("apple" "http://apple.slashdot.org") ("askslashdot" "http://ask.slashdot.org") ("books" "http://books.slashdot.org") ("developers" "http://developers.slashdot.org") ("games" "http://games.slashdot.org") ("hardware" "http://hardware.slashdot.org") ("interviews" "http://interviews.slashdot.org") ("IT" "http://it.slashdot.org") ("linux" "http://linux.slashdot.org") ("mobile" "http://mobile.slashdot.org") ("politics" "http://politics.slashdot.org") ("science" "http://science.slashdot.org") ("YRO" "http://yro.slashdot.org"))) (defvar shimbun-slashdot-url "http://www.slashdot.org") (defvar shimbun-slashdot-get-comments t "Flag if comments should be retrieved.") (defvar shimbun-slashdot-comment-threshold 3 "Threshold for displayed comments.") (defvar shimbun-slashdot-comment-display "flat" "Display type of comments. Can be \"flat\", \"thread\", or \"nested\".") (defvar shimbun-slashdot-regexp-section-id-subject "<\\s-*h3\\s-+class=\"story\"[^\0]*?<a [^>]*?href=\"\ /*\\([a-zA-Z]+\\)?\\.?slashdot.org/\\([a-z]+?\\)/\\(.+\\)/\\(.+?\\)\ \"[^>]*class=.datitle.[^>]*>\\(.*?\\)</a>") (defvar shimbun-slashdot-regexp-author-time "Posted[\t \n]+by[^a-zA-Z]*\\(.*\\)[^\0]*?on\\s-+[a-zA-Z]+\\s-+\ \\([a-zA-Z]+\\)\\s-+\\([0-9]+\\).+@\\([0-9]+\\):\\([0-9]+\\)\\(AM\\|PM\\)") (defvar shimbun-slashdot-groups (mapcar 'car shimbun-slashdot-group-url)) (defvar shimbun-slashdot-x-face-alist '(("default" . "\ Face: iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAgID////5Zpl0AAA AKElEQVQI12P4/58BiP7Zg9CfehD68R+EPgLRcYbHzSB0HIiOM4BVAgB9+xqjH78TVQAAAABJRU5 ErkJggg=="))) (defvar shimbun-slashdot-retry-fetching 1) (luna-define-method shimbun-index-url ((shimbun shimbun-slashdot)) (let ((group (shimbun-current-group-internal shimbun))) (cadr (assoc group shimbun-slashdot-group-url)))) (luna-define-method shimbun-get-headers ((shimbun shimbun-slashdot) &optional range) (shimbun-slashdot-get-headers shimbun)) (defun shimbun-slashdot-get-headers (shimbun) (let ((from "Slashdot <invalid@slashdot.org>") (allmonths '("january" "february" "march" "april" "may" "june" "july" "august" "september" "october" "november" "december")) month day hour minute date ampm id url subject headers section) ;; Make article URL (while (re-search-forward shimbun-slashdot-regexp-section-id-subject nil t) (setq section (match-string 1) id (match-string 3) url (concat "http://" (if section (concat section ".") "") "slashdot.org/article.pl?sid=" id "&simpledesign=1&lowbandwidth=1") subject (match-string 5)) (if (null shimbun-slashdot-get-comments) (setq url (concat url "&no_d2=1&threshold=5")) (setq url (concat url "&no_d2=1&threshold=" (number-to-string shimbun-slashdot-comment-threshold) "&mode=" shimbun-slashdot-comment-display "&commentsort=0&pid=0"))) ;; Make section prettier (when section (when (string= section "ask") (setq section "askslashdot")) (setq subject (concat (if (< (length section) 4) (upcase section) (capitalize section)) ": " subject))) (while (string-match "</?[a-zA-Z]+?>" subject) (setq subject (replace-match "\"" t t subject))) (when (re-search-forward shimbun-slashdot-regexp-author-time nil t) (setq from (match-string 1) month (match-string 2) day (match-string 3) hour (match-string 4) minute (match-string 5) ampm (match-string 6)) (setq month (- 13 (length (member (downcase month) allmonths)))) ;; US->European time conversion (cond ((and (string= ampm "PM") (not (string= hour "12"))) (setq hour (number-to-string (+ (string-to-number hour) 12)))) ((and (string= ampm "AM") (string= hour "12")) (setq hour "00"))) ;; remove link from author name if necessary (when (string-match ">\\(.*\\)</a>" from) (setq from (match-string 1 from))) (while (string-match "/" id) (setq id (replace-match "" t t id))) (setq date (shimbun-make-date-string ;; Hey, my first year 2100 bug! (string-to-number (concat "20" (substring id 0 2))) month (string-to-number day) (format "%s:%s" hour minute) ;; Maybe we should derive this from current-time-zone? "+0000")) (setq id (concat "<" section id "@slashdot.org>")) (unless (shimbun-search-id shimbun id) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) (shimbun-mime-encode-string from) date id "" 0 0 url) headers)))) headers)) (luna-define-method shimbun-clear-contents :around ((shimbun shimbun-slashdot) header) (goto-char (point-min)) (shimbun-remove-tags "<html>" "<div class=\"intro\".*?>") (if (null shimbun-slashdot-get-comments) (shimbun-remove-tags "<div class=\"commentBox\".*?>" "</html>") (re-search-forward "<a name=\"topcomment\">" nil t) (insert "\n<br><br> \n") (shimbun-remove-tags "<div id=\"footer\">" "</html>") (shimbun-remove-tags "<div class=\"commentwrap\"" "<a name=\"topcomment\">") ;; convert quote tags to italics (goto-char (point-min)) (while (re-search-forward "\ \\(<[ ]*div[ ]+class=[\"']quote[\"'][ ]*>\\|<[ ]*blockquote[ ]*>\\)" nil t) (let ((str (match-string 0))) (replace-match "<i>") (if (string-match "class" str) (re-search-forward "</div>") (re-search-forward "</blockquote>")) (replace-match "</i>"))))) (provide 'sb-slashdot) ;;; sb-slashdot.el ends here ��������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-sml.el�������������������������������������������������������0000664�0000000�0000000�00000004637�14343750021�0020552�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-sml.el --- shimbun backend for Smalltalkers' Salon Mailing List archive ;; Copyright (C) 2003-2005, 2019 NAKAJIMA Mikio <minakaji@namazu.org> ;; Author: NAKAJIMA Mikio <minakaji@namazu.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-mailman) (luna-define-class shimbun-sml (shimbun-mailman) ()) (defvar shimbun-sml-url "http://www.akademia.co.jp/Smalltalk/SML/archives/archive/") (defvar shimbun-sml-groups '("main")) ;;(luna-define-method shimbun-reply-to ((shimbun shimbun-sml)) ;; "sml@sra.co.jp") (luna-define-method shimbun-make-contents ((shimbun shimbun-sml) header) (shimbun-sml-make-contents shimbun header)) (defun shimbun-sml-make-contents (shimbun header) (subst-char-in-region (point-min) (point-max) ?\t ? t) (shimbun-decode-entities) (goto-char (point-min)) (let ((end (search-forward "<!--beginarticle-->"))) (goto-char (point-min)) (search-forward "</HEAD>") (when (re-search-forward "<H1>\\([^\n]+\\)\\(\n +\\)?</H1>" end t nil) (shimbun-header-set-subject header (shimbun-mime-encode-string (match-string 1)))) (when (re-search-forward "<B>\\([^\n]+\\)\\(\n +\\)?</B> *\n +\\([^\n]+\\)<BR>" end t nil) (shimbun-header-set-from header (shimbun-mime-encode-string (concat (match-string 1) " <" (match-string 3) ">"))) (when (re-search-forward "<I>\\([^\n]+\\)</I>" end t nil) (shimbun-header-set-date header (match-string 1))) (delete-region (point-min) end) (delete-region (search-forward "<!--endarticle-->") (point-max)) (shimbun-header-insert-and-buffer-string shimbun header nil t)))) (provide 'sb-sml) ;;; sb-sml.el ends here �������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-sourceforge-jp.el��������������������������������������������0000664�0000000�0000000�00000005062�14343750021�0022702�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-sourceforge-jp.el --- shimbun backend for lists.sourceforge.jp ;; Copyright (C) 2003, 2004, 2005, 2007, 2017, 2019 ;; TSUCHIYA Masatoshi <tsuchiya@namazu.org> ;; Author: TSUCHIYA Masatoshi <tsuchiya@namazu.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-mailman) (luna-define-class shimbun-sourceforge-jp (shimbun-mailman-ja) ()) (defcustom shimbun-sourceforge-jp-mailing-lists '(("aime-devel") ("anthy-dev") ("canna-dev") ("iiimf-skk-devel-ja" . "iiimf-skk-devel.ja") ("iiimf-skk-devel-en" . "iiimf-skk-devel.en") ("iiimf-skk-users-ja" . "iiimf-skk-users.ja") ("iiimf-skk-users-en" . "iiimf-skk-users.en") ("iiimf-skk-cvs-commit" . "iiimf-skk-cvs-commit") ("macemacsjp-users") ("macemacsjp-english") ("ntemacsjp-users")) "List of mailing lists serverd by SourceForge-JP." :group 'shimbun :type '(repeat (cons :format "%v" :indent 2 (string :format "Group Name: %v") (radio :format "Mailing List Name: %v" (const :format "Same as Group Name " nil) (string :format "%t: %v"))))) (defconst shimbun-sourceforge-jp-base-url "http://lists.sourceforge.jp/pipermail/" "Base URL of archives served by SourceForge-JP.") (defconst shimbun-sourceforge-jp-coding-system 'euc-japan "Coding system used for archives of SourceForge-JP.") (luna-define-method shimbun-groups ((shimbun shimbun-sourceforge-jp)) (mapcar 'car shimbun-sourceforge-jp-mailing-lists)) (luna-define-method shimbun-index-url ((shimbun shimbun-sourceforge-jp)) (let ((pair (assoc (shimbun-current-group-internal shimbun) shimbun-sourceforge-jp-mailing-lists))) (concat (shimbun-expand-url (or (cdr pair) (car pair)) shimbun-sourceforge-jp-base-url) "/") )) (provide 'sb-sourceforge-jp) ;;; sb-sourceforge-jp.el ends here ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-spiegel.el���������������������������������������������������0000664�0000000�0000000�00000004137�14343750021�0021402�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-spiegel.el --- spiegel online shimbun backend ;; Copyright (C) 2004, 2006, 2008 David Hansen ;; Author: David Hansen <david.hansen@physik.fu-berlin.de> ;; Keywords: news ;; This file is a part of shimbun. ;; This is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-spiegel (shimbun-rss) ()) (defvar shimbun-spiegel-url "http://www.spiegel.de/schlagzeilen/rss/0,5291,,00.xml") (defvar shimbun-spiegel-groups '("news")) (defvar shimbun-spiegel-from-address "spiegel_online@spiegel.de") (defvar shimbun-spiegel-content-start "<div id=\"spMainContent\">") (defvar shimbun-spiegel-content-end "<div class=\"spArticleCredit\">") (defvar shimbun-spiegel-x-face-alist '(("default" . "X-Face: \"F#SZ#pUmtu/<qtxz=G'w#244Hp7}y|vSO?j@i?6g-uGJ2&a/g#\ U96H{_VK#k&,3O\"L)6;Z823T4;}r1R,rLedLu2hQ%biKv(LR@VJXA6XRJ`0xk!I'k!c<uH6R!.+}S\ l1}uY-+WD)So~O]jsKT@}|?Z%!fVwHBde3rd5WLW^^I]UM*z>/K|u59;;-"))) (luna-define-method shimbun-index-url ((shimbun shimbun-spiegel)) shimbun-spiegel-url) (luna-define-method shimbun-get-headers :around ((shimbun shimbun-spiegel) &optional range) (mapcar (lambda (header) (let ((url (shimbun-header-xref header))) (when (string-match "\\([0-9]+\\),[0-9]+\\.html" url) (shimbun-header-set-xref header (replace-match "druck-\\1" t nil url 1)))) header) (luna-call-next-method))) (provide 'sb-spiegel) ;;; sb-spiegel.el ends here ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-sponichi.el��������������������������������������������������0000664�0000000�0000000�00000007641�14343750021�0021571�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-sponichi.el --- shimbun backend for www.sponichi.co.jp -*- coding: utf-8 -*- ;; Copyright (C) 2001, 2002, 2003 Tatsuya Ichikawa ;; Copyright (C) 2001, 2002, 2003 Yuuichi Teranishi <teranisi@gohome.org> ;; Author: Tatsuya Ichikawa <ichikawa@erc.epson.com>, ;; TSUCHIYA Masatoshi <tsuchiya@namazu.org>, ;; Yuuichi Teranishi <teranisi@gohome.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was posted in [semi-gnus-ja:5245] by ;; Tatsuya Ichikawa <ichikawa@erc.epson.com>. ;;; Code: (require 'shimbun) (luna-define-class shimbun-sponichi (shimbun-japanese-newspaper shimbun) ()) (defvar shimbun-sponichi-url "http://www.sponichi.co.jp/") (defvar shimbun-sponichi-server-name "鴻若恰域紊ч腓") (defvar shimbun-sponichi-group-table '(("baseball" . "") ("soccer" . "泣") ("usa" . "≪<") ("others" . "篁") ("society" . "腓鞘") ("entertainment" . "梧") ("horseracing" . "腴狗Μ") ("golf" . "眼") ("battle" . "守"))) (defvar shimbun-sponichi-from-address "webmaster@www.sponichi.co.jp") (defvar shimbun-sponichi-content-start "<!--ャ若壕篋 -->") (defvar shimbun-sponichi-content-end "<!--ャ若壕篋障 -->") (defvar shimbun-sponichi-expiration-days 7) (luna-define-method shimbun-groups ((shimbun shimbun-sponichi)) (mapcar 'car shimbun-sponichi-group-table)) (luna-define-method shimbun-current-group-name ((shimbun shimbun-sponichi)) (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-sponichi-group-table))) (luna-define-method shimbun-from-address ((shimbun shimbun-sponichi)) (shimbun-mime-encode-string (format "鴻 (%s) <%s>" (shimbun-current-group-name shimbun) (shimbun-from-address-internal shimbun)))) (luna-define-method shimbun-index-url ((shimbun shimbun-sponichi)) (format "%s%s/index.html" (shimbun-url-internal shimbun) (shimbun-current-group-internal shimbun))) (luna-define-method shimbun-get-headers ((shimbun shimbun-sponichi) &optional range) (let* ((case-fold-search t) (group (shimbun-current-group-internal shimbun)) (url-regexp (concat "^<a href=\"/\\(" group "/\\(kiji\\|flash\\)/\\([0-9][0-9][0-9][0-9]\\)/?\\([0-9][0-9]\\)/?\\([0-9][0-9]\\)/?\\([^\\.\">]+\\)\\.html\\)[^>]*>")) headers) (while (re-search-forward url-regexp nil t) (let ((url (match-string 1)) (id (format "<%s%s%s%s%s%%%s>" (match-string 2) (match-string 3) (match-string 4) (match-string 5) (match-string 6) group)) (date (shimbun-make-date-string (string-to-number (match-string 3)) (string-to-number (match-string 4)) (string-to-number (match-string 5))))) (push (shimbun-make-header 0 (shimbun-mime-encode-string (mapconcat 'identity (split-string (buffer-substring (match-end 0) (progn (search-forward "<br>" nil t) (point))) "<[^>]+>") "")) (shimbun-from-address shimbun) date id "" 0 0 (concat (shimbun-url-internal shimbun) url)) headers))) headers)) (provide 'sb-sponichi) ;;; sb-sponichi.el ends here �����������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-squeak-dev.el������������������������������������������������0000664�0000000�0000000�00000003461�14343750021�0022016�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-squeak-dev.el --- shimbun backend for Squeak-dev ML archive ;; Copyright (C) 2003, 2004, 2005 NAKAJIMA Mikio <minakaji@namazu.org> ;; Author: NAKAJIMA Mikio <minakaji@namazu.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-mailman) (require 'sendmail) (luna-define-class shimbun-squeak-dev (shimbun-mailman) ()) (defvar shimbun-squeak-dev-url "http://lists.squeakfoundation.org/pipermail/squeak-dev/") (defvar shimbun-squeak-dev-groups '("main")) (luna-define-method shimbun-make-contents :after ((shimbun shimbun-squeak-dev) header) (save-excursion (let ((end (and (mail-position-on-field "From") (point))) (begin (progn (beginning-of-line) (point))) (marker (make-marker))) (when end (narrow-to-region begin end) (goto-char (point-min)) (when (re-search-forward " at " nil t nil) (set-marker marker (match-beginning 0)) (delete-region (match-beginning 0) (match-end 0)) (goto-char marker) (insert "@")) (widen)))) (buffer-string)) (provide 'sb-squeak-dev) ;;; sb-squeak-dev.el ends here ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-squeak-ja.el�������������������������������������������������0000664�0000000�0000000�00000002403�14343750021�0021625�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-squeak-ja.el --- shimbun backend for Squeak-ja's ML archive ;; Copyright (C) 2003, 2004, 2005 NAKAJIMA Mikio <minakaji@namazu.org> ;; Author: NAKAJIMA Mikio <minakaji@namazu.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-mailman) (luna-define-class shimbun-squeak-ja (shimbun-mailman-ja) ()) (defvar shimbun-squeak-ja-url "http://www.smalltalk.jp/pipermail/squeak-ja/") (defvar shimbun-squeak-ja-groups '("main")) (provide 'sb-squeak-ja) ;;; sb-squeak-ja.el ends here �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-sueddeutsche-de.el�������������������������������������������0000664�0000000�0000000�00000011137�14343750021�0023023�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-sueddeutsche-de.el --- sueddeutsche.de shimbun backend ;; Copyright (C) 2008-2010, 2019 David Engster ;; Author: David Engster <dengste@eml.cc> ;; Keywords: news ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-sueddeutsche-de (shimbun-rss) ()) (defvar shimbun-sueddeutsche-de-group-url '(("alles" "http://www.sueddeutsche.de/app/service/rss/alles/rss.xml") ("topthemen" "http://www.sueddeutsche.de/app/service/rss/topthemen/topthemen.xml") ("politik" "http://rss.sueddeutsche.de/rss/Politik") ("wirtschaft" "http://rss.sueddeutsche.de/rss/Wirtschaft") ("finanzen" "http://rss.sueddeutsche.de/rss/Geld") ("kultur" "http://rss.sueddeutsche.de/rss/Kultur") ("sport" "http://rss.sueddeutsche.de/rss/Sport") ("bayern" "http://rss.sueddeutsche.de/rss/Bayern") ("muenchen" "http://rss.sueddeutsche.de/rss/M%C3%BCnchen") ("panorama" "http://rss.sueddeutsche.de/rss/Panorama") ("leben" "http://rss.sueddeutsche.de/rss/Leben%20&%20Stil") ("gesundheit" "http://rss.sueddeutsche.de/rss/Gesundheit") ("computer" "http://rss.sueddeutsche.de/rss/Computer") ("immobilien" "http://rss.sueddeutsche.de/rss/Immobilien") ("wissen" "http://rss.sueddeutsche.de/rss/Wissen") ("jobs" "http://rss.sueddeutsche.de/rss/Job%20&%20Karriere") ("reise" "http://rss.sueddeutsche.de/rss/Reise"))) (defvar shimbun-sueddeutsche-de-groups (mapcar 'car shimbun-sueddeutsche-de-group-url)) (defvar shimbun-sueddeutsche-de-from-address "invalid@sueddeutsche.de") (defvar shimbun-sueddeutsche-de-content-start "<!--.*?[Bb]egin.*?[cC]ontent.*?-->\\|class=\"artikelBox\"") (defvar shimbun-sueddeutsche-de-content-end "<!--.*?[eE]nde.*?[cC]ontent.*?-->") (defvar shimbun-sueddeutsche-de-x-face-alist '(("default" . "\ Face: iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEXLyspMSkr///9+fX1 CK4DEAAAARUlEQVQI12NYBQQMCKL/jv13hk1rX01hkFqxSo5BRGtVEMPWohVVDAvDV3oxrGp9+4q ha+VTLQaR1earGNb/2W7PgGoAAO3JJfDNz7QzAAAAAElFTkSuQmCC"))) (luna-define-method shimbun-index-url ((shimbun shimbun-sueddeutsche-de)) (let ((group (shimbun-current-group-internal shimbun))) (cadr (assoc group shimbun-sueddeutsche-de-group-url)))) (luna-define-method shimbun-rss-build-message-id ((shimbun shimbun-sueddeutsche-de) url date) (let ((group (shimbun-current-group-internal shimbun)) id) (cond ((string-match ".*sueddeutsche\\.de.*/\\(.+\\)/\\(.+\\)/?" url) (concat "<" (match-string 1 url) "." (match-string 2 url) "." group "@sueddeutsche.de>")) (t (error "Cannot find message-id base"))))) (luna-define-method shimbun-clear-contents :before ((shimbun shimbun-sueddeutsche-de) header) (shimbun-remove-tags "<!-- Stoerer //-->" "<!-- END Stoerer //-->") (shimbun-remove-tags "\\(span\\) class=\"hidePrint\">" t) (shimbun-remove-tags "\\(table\\)\\(?:[\t\n\r ]+[^\t\n\r >]+\\)[\t\n\r ]+class=\"stoerBS\"" t) (shimbun-remove-tags "\\(:a\\|span\\)[\t\n\r ][^>]*bildstrecke" t) (shimbun-remove-tags "<td class=\"artikelDruckenRight\" align=\"right\">" "class=\"artikelDachzeile\"") (shimbun-remove-tags "<div class=\"bannerOben\">" "<div class=\"bannerUnten\">")) (luna-define-method shimbun-article-url ((shimbun shimbun-sueddeutsche-de) header) ;; retrieve real URL and choose print-version (let ((url (shimbun-header-xref header))) (when (string-match "html?\\'" url) (setq url (car (last (w3m-process-with-wait-handler (w3m-w3m-attributes url nil handler)))))) (cond ((string-match "\\(.*jetzt.*sueddeutsche.*de.*\\)texte/anzeigen/\\(.+\\)" url) (setq url (concat (match-string 1 url) "drucken/text/" (match-string 2 url)))) ((string-match "text/\\'" url) (setq url (concat url "print.html")))) url)) (provide 'sb-sueddeutsche-de) ;;; sb-sueddeutsche-de.el ends here ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-tcup.el������������������������������������������������������0000664�0000000�0000000�00000022415�14343750021�0020724�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-tcup.el --- shimbun backend for www.tcup.com ;; Copyright (C) 2001, 2002, 2005, 2019, 2022 ;; Yuuichi Teranishi <teranisi@gohome.org> ;; Author: Yuuichi Teranishi <teranisi@gohome.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original was http://homepage2.nifty.com/strlcat/nnshimbun-tcup.el ;;; Code: (require 'shimbun) (eval-and-compile (luna-define-class shimbun-tcup (shimbun) (content-hash)) (luna-define-internal-accessors 'shimbun-tcup)) (defvar shimbun-tcup-group-alist '(("yutopia" "http://6116.teacup.com/yutopia/bbs2") ("meadow" "http://6629.teacup.com/yutopia/bbs2") ("skk" "http://6718.teacup.com/yutopia/bbs2")) "An alist of tcup bbs shimbun group definition. Each element looks like: (NAME URL SUBJECT-REGEXP FROM-START-REGEXP DATE-START-REGEXP BODY-START-REGEXP BODY-END-REGEXP). Each element have a following default value: SUBJECT-REGEXP: `shimbun-tcup-subject-regexp' FROM-START-REGEXP: `shimbun-tcup-from-start-regexp' DATE-START-REGEXP: `shimbun-tcup-date-start-regexp' BODY-START-REGEXP: `shimbun-tcup-body-start-regexp' BODY-END-REGEXP: `shimbun-tcup-body-end-regexp'") (defvar shimbun-tcup-subject-regexp (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "<font" s1 "size=\"?4\"?[^>]*>" s0 "<b>" s0 "\\([^<]+\\)" s0 "</b>" s0 "</font>")) "Default regexp for subject. This have a one parenthesized expression match for subject.") (defvar shimbun-tcup-from-start-regexp "腮粋鐚[\t\n ]*" "Default regexp for from start string.") (defvar shimbun-tcup-date-start-regexp "腮炊ワ[\t\n ]*" "Default regexp for date start string.") (defvar shimbun-tcup-body-start-regexp "<blockquote>\\([\t\n ]*<[^>]+>\\)*[\t\n ]*" "Default regexp for body start string.") (defvar shimbun-tcup-body-end-regexp "[\t\n ]*\\(<[^>]+>[\t\n ]*\\)*</blockquote>" "Default regexp for body end string.") (defvar shimbun-tcup-content-hash-length 31) (defvar shimbun-tcup-x-face-alist '(("yutopia" . "X-Face: ,Em61:vG$KP!G`Q]ZsO\\@&g`VXE-kicRnKs\"Wd'ZSF\ Q*O'i6OJ2(U$x6/gytz:<jCUn+&*e\n 8$BTg.~1,7OS%tjW#ty4Cp7x%6SD;aNfn(ugAN\ CC]q(-foA:@ULvLAJz_oeP1@a~C+Bxc3I\\+^W<%n\n y,z@:VoRoJXl'E`kX]3i1m;+I`") ("meadow" . "X-Face: xo];SyM=kg&iWSACakk9gGth>s`0KE!+n9}l[&W\ SG!QUj`15/+hzWfCvZ\\`R!i<c8{QI=hw\n Ez}CH&IOYewgffOCh5jTPWx/ehA\\\ :Qe[;P>8re^8`\\8omn]t;P~wC{X%Y$q/f!zC%IG1RVFj~Jf`c6\n t98[2O!+vg\ w!!gb8HQ,s0F*e6f*xs\"HR}{':>)Q_|+67gobo%?|n_SdjfzLI6kJ(T;q{+?p?"))) (luna-define-method initialize-instance :after ((shimbun shimbun-tcup) &rest init-args) (shimbun-tcup-set-content-hash-internal shimbun (make-vector shimbun-tcup-content-hash-length 0)) shimbun) (luna-define-method shimbun-groups ((shimbun shimbun-tcup)) (mapcar 'car shimbun-tcup-group-alist)) (luna-define-method shimbun-index-url ((shimbun shimbun-tcup)) (cadr (assoc (shimbun-current-group-internal shimbun) shimbun-tcup-group-alist))) (defun shimbun-tcup-get-group-key (group) "Returns (hostname . board-id)" (let ((url (cadr (assoc group shimbun-tcup-group-alist)))) (cond ((string-match "\\(\\`\\|://\\)\\([^:/]+\\)/\\([^/]+\\)/bbs" url) ; "http://6718.teacup.com/yutopia/bbs" (cons (match-string 2 url) ; "6718.teacup.com" (match-string 3 url))) ; "yutopia" ((string-match "\\(\\`\\|://\\)www[^/]+/\\([0-9]+\\)/\\([^/]+\\)\\.html" url) ; "http://www67.tcup.com/6718/yutopia.html" (cons (concat (match-string 2 url) ; "6718" ".teacup.com") (match-string 3 url))) ; "yutopia" (t nil)))) (defun shimbun-tcup-stime-to-time (stime) (let (a b c) (setq a (length stime)) (setq b (- (string-to-number (substring stime 0 (- a 4))) 9)) (setq c (+ (string-to-number (substring stime (- a 4) a)) (* (% b 4096) 10000) 90000)) (list (+ (* (/ b 4096) 625) (/ c 65536)) (% c 65536)))) (defun shimbun-tcup-make-time () (let (yr mon day hr min sec dow tm) (looking-at "\\([ 0-9]+\\)\\([ 0-9]+\\)(\\(.\\))\\([ 0-9]+\\)\\([ 0-9]+\\)\\([ 0-9]+\\)腱") (setq mon (string-to-number (match-string 1)) day (string-to-number (match-string 2)) dow (match-string 3) hr (string-to-number (match-string 4)) min (string-to-number (match-string 5)) sec (string-to-number (match-string 6))) (setq dow (string-match dow "ユ羂贋")) (setq yr (nth 5 (decode-time (current-time)))) (setq tm (encode-time sec min hr day mon yr)) (while (not (eq dow (nth 6 (decode-time tm)))) (setq yr (1- yr)) (setq tm (encode-time sec min hr day mon yr))) tm)) (defun shimbun-tcup-make-id (stime group) (let ((keys (shimbun-tcup-get-group-key group))) (format "<%s.%s@%s>" ; "<1576232885.yutopia@6718.teacup.com>" stime (cdr keys) (car keys)))) (luna-define-method shimbun-get-headers ((shimbun shimbun-tcup) &optional range) ;;;<DEBUG> ;; (shimbun-tcup-get-headers shimbun range)) ;; ;;(defun shimbun-tcup-get-headers (shimbun range) ;;;</DEBUG> (let* ((case-fold-search t) (group (shimbun-current-group-internal shimbun)) (param (assoc group shimbun-tcup-group-alist)) (subject-regexp (or (nth 2 param) shimbun-tcup-subject-regexp)) (from-regexp (or (nth 3 param) shimbun-tcup-from-start-regexp)) (date-regexp (or (nth 4 param) shimbun-tcup-date-start-regexp)) (body-st-regexp (or (nth 5 param) shimbun-tcup-body-start-regexp)) (body-end-regexp (or (nth 6 param) shimbun-tcup-body-end-regexp)) (index-url (shimbun-index-url shimbun)) headers from subject date id url stime st body) (catch 'stop (while t (while (re-search-forward subject-regexp nil t) (setq subject (match-string 1)) (re-search-forward from-regexp) (setq from (cond ((looking-at "<b><a href=\"mailto:\\([^\"]+\\)\">\\([^<]+\\)<") (concat (match-string 2) " <" (match-string 1) ">")) ((looking-at "\\(<[^>]+>[\t\n ]*\\)+\\([^<]+\\)[\t\n ]*<") (match-string 2)) (t "(none)"))) (re-search-forward date-regexp nil t) (cond ((looking-at "[^,]+, Time: \\([^ ]+\\) ") (setq stime (shimbun-tcup-stime-to-time (match-string 1))) ;; The clock has been advanced for nine hours in the ;; level-1 bulletin boards. (when (string-match "/bbs/?\\'\\|/bbs\\?" index-url) (let ((ms (car stime)) (ls (cadr stime))) (setq ls (- ls 32400)) (cond ((< ls 0) (setq stime (list (1- ms) (+ ls 65536)))) ((>= ls 65536) (setq stime (list (1+ ms) (- ls 65536)))) (t (setq stime (list ms ls))))))) ((looking-at "\\([^<]+\\)<") (setq stime (time-convert (shimbun-tcup-make-time) 'list))) (t (setq stime (time-convert nil 'list)))) (let ((system-time-locale "C")) (setq date (format-time-string "%d %b %Y %T %z" stime))) (setq stime (format "%05d%05d" (car stime) (cadr stime))) (setq id (shimbun-tcup-make-id stime group)) (when (shimbun-search-id shimbun id) (throw 'stop nil)) (re-search-forward body-st-regexp) (setq st (match-end 0)) (re-search-forward body-end-regexp) (setq body (concat (buffer-substring st (match-beginning 0)) "\n")) (forward-line 1) (setq url (if (looking-at "<a[^>]+>[^<]+</a>") (concat (match-string 0) "\n<p>\n") "")) (set (intern stime (shimbun-tcup-content-hash-internal shimbun)) (concat body "<p>\n" url)) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) (shimbun-mime-encode-string from) date id "" 0 0 stime) headers)) (goto-char (point-min)) (if (re-search-forward "<a[\t\n ]+href=\"\\([^\"]+\\)\"[^>]*>[\t\n ]*\ 罨<若[\t\n ]*</a>" nil t) (progn (shimbun-retrieve-url (prog1 (shimbun-expand-url (match-string 1) index-url) (erase-buffer)) t) (goto-char (point-min))) (throw 'stop nil)))) headers)) (luna-define-method shimbun-article ((shimbun shimbun-tcup) header &optional outbuf) ;;;<DEBUG> ;; (shimbun-tcup-article shimbun header outbuf)) ;; ;;(defun shimbun-tcup-article (shimbun header outbuf) ;;;</DEBUG> (when (shimbun-current-group-internal shimbun) (with-current-buffer (or outbuf (current-buffer)) (insert (with-temp-buffer (let ((sym (intern-soft (shimbun-header-xref header) (shimbun-tcup-content-hash-internal shimbun)))) (if (boundp sym) (insert (or (symbol-value sym) ""))) (goto-char (point-min)) (shimbun-header-insert shimbun header) (insert "Content-Type: " "text/html" "; charset=ISO-2022-JP\n" "MIME-Version: 1.0\n") (insert "\n") (encode-coding-string (buffer-string) (mime-charset-to-coding-system "ISO-2022-JP")))))))) (provide 'sb-tcup) ;;; sb-tcup.el ends here ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-tdiary-ml.el�������������������������������������������������0000664�0000000�0000000�00000004344�14343750021�0021654�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-tdiary-ml.el --- shimbun backend for www.tDiary.org ;; Copyright (C) 2003, 2007 Koichiro Ohba <koichiro@meadowy.org> ;; Author: Koichiro Ohba <koichiro@meadowy.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was sb-airs.el which is written by ;; Yuuichi Teranishi <teranisi@gohome.org> ;;; Code: (require 'shimbun) (require 'sb-mhonarc) (luna-define-class shimbun-tdiary-ml (shimbun-mhonarc) ()) (defconst shimbun-tdiary-ml-group-path-alist '(("devel" "archive/devel" "tDiary-devel@lists.sourceforge.net") ("theme" "archive/theme" "tDiary-theme@lists.sourceforge.net"))) (defvar shimbun-tdiary-ml-url "http://www.tdiary.org/") (defvar shimbun-tdiary-ml-groups (mapcar 'car shimbun-tdiary-ml-group-path-alist)) (defvar shimbun-tdiary-ml-reverse-flag nil) (defvar shimbun-tdiary-ml-litemplate-regexp "<strong><a name=\"\\([0-9]+\\)\" href=\"\\(msg[0-9]+.html\\)\">\\([^<]+\\)</a></strong>,\n <em>\\([^<]+\\)</em>") (defmacro shimbun-tdiary-ml-concat-url (shimbun url) `(concat (shimbun-url-internal ,shimbun) (nth 1 (assoc (shimbun-current-group-internal ,shimbun) shimbun-tdiary-ml-group-path-alist)) "/" ,url)) (luna-define-method shimbun-index-url ((shimbun shimbun-tdiary-ml)) (shimbun-tdiary-ml-concat-url shimbun "index.html")) (luna-define-method shimbun-reply-to ((shimbun shimbun-tdiary-ml)) (nth 2 (assoc (shimbun-current-group-internal shimbun) shimbun-tdiary-ml-group-path-alist))) (provide 'sb-tdiary-ml) ;;; sb-tdiary-ml.el ends here ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-tdiary.el����������������������������������������������������0000664�0000000�0000000�00000013525�14343750021�0021247�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-tdiary.el --- shimbun backend for tDiary ;; Copyright (C) 2003-2005, 2007, 2019 OHASHI Akira <bg66@koka-in.org> ;; Author: OHASHI Akira <bg66@koka-in.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-decf, cl-incf (require 'shimbun) (luna-define-class shimbun-tdiary (shimbun) ()) (defvar shimbun-tdiary-content-start "<h3") (defvar shimbun-tdiary-content-end "</div>") (defcustom shimbun-tdiary-group-alist nil "An alist of TDIARY shimbun group definition. Each element looks like (NAME URL). NAME is a shimbun group name. URL is the URL for TDIARY access point of the group." :group 'shimbun :type '(repeat (cons :format "%v" (string :tag "Group name") (string :tag "URL")))) (luna-define-method shimbun-groups ((shimbun shimbun-tdiary)) (mapcar 'car shimbun-tdiary-group-alist)) (luna-define-method shimbun-index-url ((shimbun shimbun-tdiary)) (cadr (assoc (shimbun-current-group-internal shimbun) shimbun-tdiary-group-alist))) (defmacro shimbun-tdiary-get-headers (shimbun url headers &optional aux) `(let ((case-fold-search t)) (goto-char (point-max)) (while (re-search-backward "<h3[^>]*><a href=\"\./\\(.*\\([0-9][0-9][0-9][0-9]\\)\\([0-9][0-9]\\)\\([0-9][0-9]\\).*#\\(p[0-9]+\\)\\)\"> *\\(<span class=\"[ps]anchor\">.+</span>\\)?[^<]*</a>\\(.+]\\|\\) *\\(.+\\)</h3>" nil t) (let ((url (match-string 1)) (year (match-string 2)) (month (match-string 3)) (day (match-string 4)) (topic (match-string 5)) (subject (match-string 8)) date id) (setq date (shimbun-make-date-string (string-to-number year) (string-to-number month) (string-to-number day))) (setq id (format "<%s.%s%s%s.%s@tdiary.org>" topic year month day (eword-encode-string (shimbun-current-group-internal ,shimbun)))) (push (shimbun-create-header 0 subject (or ,aux (shimbun-from-address ,shimbun)) date id "" 0 0 (concat (shimbun-index-url ,shimbun) url)) ,headers))) ,headers)) (defmacro shimbun-tdiary-make-date (count first) `(let* ((today (current-time)) (month (nth 4 (decode-time today))) (year (nth 5 (decode-time today))) (dow (nth 6 (decode-time today))) (dst (nth 7 (decode-time today))) (zone (nth 8 (decode-time today)))) (dotimes (i (1- ,count)) (cl-decf month) (when (<= month 0) (setq month 12) (cl-decf year))) (let ((date (format-time-string "%Y%m" (encode-time 0 0 0 1 month year dow dst zone)))) (if (string< date ,first) nil date)))) (luna-define-method shimbun-get-headers ((shimbun shimbun-tdiary) &optional range) (let ((case-fold-search t) (pages (shimbun-header-index-pages range)) (count 0) (first "") headers month months author) (goto-char (point-min)) (when (re-search-forward "<meta name=\"author\" content=\"\\(.*\\)\">" nil t) (setq author (match-string 1)) (when (re-search-forward "<link rev=\"made\" href=\"mailto:\\(.*\\)\">" nil t) (setq author (format "%s <%s>" author (match-string 1))))) (goto-char (point-min)) (when (re-search-forward "<link rel=\"first\" .* href=\"\./.*\\([0-9][0-9][0-9][0-9][0-9][0-9]\\)" nil t) (setq first (match-string 1))) (while (and (cl-incf count) (if pages (<= count pages) t) (setq month (shimbun-tdiary-make-date count first)) (push month months))) (setq months (nreverse months)) (dolist (month months) (let ((url (concat (shimbun-index-url shimbun) "?date=" month))) (erase-buffer) (shimbun-retrieve-url url t) (goto-char (point-min)) (while (search-forward "\r" nil t) (delete-char -1)) (shimbun-tdiary-get-headers shimbun url headers author))) headers)) (defvar shimbun-tdiary-footnote-regex (concat "<span class=\"footnote\">" "<a +name=\"\\([^\"]*\\)\" +" "href=\"\\([^#]*\\)#[^\"]+\" +" "title=\"\\([^\"]*\\)\">" "\\(\\*[0-9]+\\)</a></span>") "Regexp of footnote.") (luna-define-method shimbun-make-contents ((shimbun shimbun-tdiary) header) (let ((case-fold-search t) (id (shimbun-header-id header)) (start (shimbun-content-start shimbun)) footnotes) (when (string-match "\\(p[0-9]+\\)\." id) (setq id (substring id (match-beginning 1) (match-end 1))) (re-search-forward (concat "<a name=\"" id) nil t) (and (search-backward start nil t) (goto-char (match-beginning 0)))) (when (and (re-search-forward start nil t) (setq start (match-beginning 0)) (re-search-forward (shimbun-content-end shimbun) nil t)) (delete-region (match-beginning 0) (point-max)) (delete-region (point-min) start)) (goto-char (point-min)) (while (re-search-forward shimbun-tdiary-footnote-regex nil t) (setq footnotes (cons (format "<a href=\"%s#%s\">%s</a> %s<br>\n" (match-string 2) (match-string 1) (match-string 4) (match-string 3)) footnotes))) (when footnotes (goto-char (point-max)) (insert "<br><br>\n") (mapc 'insert (nreverse footnotes))) (shimbun-header-insert-and-buffer-string shimbun header nil t))) (provide 'sb-tdiary) ;;; sb-tdiary.el ends here ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-tech-on.el���������������������������������������������������0000664�0000000�0000000�00000021206�14343750021�0021303�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-tech-on.el --- shimbun backend for Tech-On! -*- coding: utf-8 -*- ;; Copyright (C) 2007-2011, 2019 Katsumi Yamaoka ;; Author: Katsumi Yamaoka <yamaoka@jpl.org> ;; Keywords: news ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'sb-rss) (require 'sb-multi) (luna-define-class shimbun-tech-on (shimbun-multi shimbun-rss) ()) (defvar shimbun-tech-on-user-name 'none "*User name to log in on Tech-On! with. If it is nil, you will be prompted for a user name when logging in on Tech-On! with. If it is a string, it will be used as a user name and you will never be prompted. If it is neither nil nor a string, you will never log in. See also `shimbun-tech-on-password'.") (defvar shimbun-tech-on-password 'none "*Password to use to log in on Tech-On! with. If it is nil, you will be prompted for a password when logging in on Tech-On! with. If it is a string, it will be used as a password and you will never be prompted. If it is neither nil nor a string, you will never log in. See also `shimbun-tech-on-user-name'.") (defvar shimbun-tech-on-url "http://techon.nikkeibp.co.jp/") (defvar shimbun-tech-on-group-table '(("latestnews" "Tech-On鐚" "/rss/index.rdf") ("mobile" "≪ゃ" "/mobile/index.rdf") ("bbint" "篆" "/bbint/index.rdf") ("d-ce" "吾帥絎狗" "/d-ce/index.rdf") ("AT" "Automotive Technology" "/AT/index.rdf") ("edaonline" "EDA Online" "/edaonline/index.rdf") ("device" "糸" "/device/index.rdf") ("lsi" "LSI怨" "/lsi/index.rdf") ("silicon" "Silicon Online" "/silicon/index.rdf") ("observer" "fキ吟若" "/observer/index.rdf") ("fpd" "FPD International" "/fpd/index.rdf") ("mono" "ャIT" "/mono/index.rdf") ("embedded" "腟粋昭翠" "/embedded/index.rdf") ("mecha" "罘罌違祉<" "/mecha/index.rdf") ("MEMS" "MEMS International" "/MEMS/index.rdf") ("nano" "鐔ユ亥" "/nano/index.rdf") ("carele" "若" "/carele/index.rdf") ("board" "ョ若" "/board/index.rdf") ("mcu" "ゃ潟" "/mcu/index.rdf") ("PLM" "PLM" "/PLM/index.rdf") ("memory" "<≪" "/memory/index.rdf") ("measurement" "荐羝" "/measurement/index.rdf") ("column.mot" "茵腟倶ヨ" "/column/mot/index.rdf"))) (defvar shimbun-tech-on-server-name "Tech-On!") (defvar shimbun-tech-on-x-face-alist '(("default" . "\ Face: iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAgMAAAAOFJJnAAAADFBMVEUAAAB/gP+ttr7///8 c6BRHAAAAnUlEQVQY02XNPQpCMQwA4NBs9jDvCJ5CXEVv4dJQLyKuHbyCl3i4Cl3EsSA8+l6NoU0 HMVk+8gsEa2b2DP94rs7DYyCExZIlJCMw6NF7AaI5VZgOQMOtEhQYTOjDXuH7FrU7ZG9W8LlOkuE FrPGD0TFnQdlsmSfB240KyYo7F9dxtIrdRbAAln1SHJK2GmQ9ptwOxsTtRawteTrn6QtRz6k/Cwl XeQAAAABJRU5ErkJggg=="))) (defvar shimbun-tech-on-expiration-days 7) (luna-define-method shimbun-groups ((shimbun shimbun-tech-on)) (mapcar 'car shimbun-tech-on-group-table)) (luna-define-method shimbun-current-group-name ((shimbun shimbun-tech-on)) (nth 1 (assoc (shimbun-current-group-internal shimbun) shimbun-tech-on-group-table))) (luna-define-method shimbun-from-address ((shimbun shimbun-tech-on)) (concat shimbun-tech-on-server-name " (" (shimbun-current-group-name shimbun) ")")) (luna-define-method shimbun-index-url ((shimbun shimbun-tech-on)) (shimbun-expand-url (nth 2 (assoc (shimbun-current-group-internal shimbun) shimbun-tech-on-group-table)) shimbun-tech-on-url)) (luna-define-method shimbun-rss-build-message-id ((shimbun shimbun-tech-on) url date) (let ((start 0) rest) (while (string-match "[0-9]+" url start) (push (match-string 0 url) rest) (setq start (match-end 0))) (if rest (concat "<" (mapconcat 'identity (nreverse rest) ".") "." (shimbun-current-group-internal shimbun) "%techon.nikkeibp.co.jp>") (error "Cannot find message-id base")))) (defvar shimbun-tech-on-logged-in nil) (defun shimbun-tech-on-login () "Log in on Tech-On! with." (interactive) (when (or (shimbun-interactive-p) (not shimbun-tech-on-logged-in)) (let ((user (cond ((stringp shimbun-tech-on-user-name) shimbun-tech-on-user-name) (shimbun-tech-on-user-name nil) (t (condition-case nil (let (inhibit-quit) (read-string "[Tech-On!] User name: ")) (quit nil))))) pass) (when (and user (not (string-match "\\`[\t ]*\\'" user)) (setq pass (cond ((stringp shimbun-tech-on-password) shimbun-tech-on-password) (shimbun-tech-on-password nil) (t (condition-case nil (let (inhibit-quit) (read-passwd "[Tech-On!] Password: ")) (quit nil))))) (not (string-match "\\`[\t ]*\\'" pass))) (with-temp-buffer (set-buffer-multibyte t) (shimbun-retrieve-url (concat "https://techon.nikkeibp.co.jp/login/login.jsp" "?MODE=LOGIN_EXEC" "&USERID=" user "&PASSWORD=" pass) t) (goto-char (point-min)) (setq shimbun-tech-on-logged-in (not (re-search-forward "\ \\(?:若吟弱\\|鴻若\\).*茯ゃ障\ \\|篌∞脂蚊茵障\ \\|ACTION=\"/login/login\\.jsp\\?MODE=LOGIN_EXEC\"" nil t)))) (if shimbun-tech-on-logged-in (when (shimbun-interactive-p) (message "[Tech-On!] Logged in")) (when (prog2 (message nil) (y-or-n-p "[Tech-On!] Login failed; retry? ") (message nil)) (setq shimbun-tech-on-user-name nil shimbun-tech-on-password nil) (shimbun-tech-on-login))))))) (luna-define-method shimbun-multi-next-url ((shimbun shimbun-tech-on) header url) (goto-char (point-min)) (when (re-search-forward "[\t\n ]*\\(?:鐚[\t\n ]*\\)*<a[\t\n ]+\ \\(?:[^\t\n >]+[\t\n ]+\\)*href=\"\\([^\"]+\\)\"\ \\(?:[\t\n ]+[^\t\n >]+\\)*[\t\n ]*>[\t\n ]*罨<?若吾[^<]*</a>" nil t) (shimbun-expand-url (match-string 1) url))) (luna-define-method shimbun-multi-clear-contents :around ((shimbun shimbun-tech-on) header has-previous-page has-next-page) (when (luna-call-next-method) ;; Insert page delimiter. (when has-previous-page (goto-char (point-min)) (insert " \n") ;; Remove tags that likely cause a newline preceding a page. (when (and (looking-at "[\t\n ]*<\\(h[0-9]+\\|p\\)[\t\n >]") (shimbun-end-of-tag (match-string 1) t)) (replace-match "\n\\3\n"))) t)) (luna-define-method shimbun-clear-contents :around ((shimbun shimbun-tech-on) header) (let ((author (when (and (re-search-forward "\ <div[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*class=\"author\"" nil t) (shimbun-end-of-tag "div" t)) (match-string 2)))) (goto-char (point-min)) (when (and (re-search-forward "\ <div[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*id=\"kiji\"" nil t) (shimbun-end-of-tag "div" t)) (delete-region (match-end 1) (point-max)) (insert "\n") (delete-region (point-min) (match-beginning 1)) ;; Remove repeated <p>s. (goto-char (point-min)) (while (re-search-forward "<p>\\([\t\n ]*<p>\\)+" nil t) (delete-region (match-beginning 1) (match-end 0))) ;; Remove useless tags. (shimbun-remove-tags "\\(div\\)[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*class=\"bpimage_click\"" t) (when author (goto-char (point-min)) (insert "<p>" author "</p>\n")) t))) (luna-define-method shimbun-footer :around ((shimbun shimbun-tech-on) header &optional html) (concat "<div align=\"left\">\n-- <br>\n\ 荐篋篏罔ョBP腓障障掩箴絽医障\ <a href=\"" (shimbun-article-base-url shimbun header) "\"><u></u></a>у障\n</div>\n")) (luna-define-method shimbun-article :before ((shimbun shimbun-tech-on) &rest args) (shimbun-tech-on-login)) (luna-define-method shimbun-close :after ((shimbun shimbun-tech-on)) (setq shimbun-tech-on-logged-in nil)) (provide 'sb-tech-on) ;;; sb-tech-on.el ends here ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-texfaq.el����������������������������������������������������0000664�0000000�0000000�00000005742�14343750021�0021245�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-texfaq.el --- shimbun backend for TeX Q&A Bullettein Board. ;; Copyright (C) 2002, 2004 Hidetaka Iwai <tyuyu@mb6.seikyou.ne.jp> ;; Author: Hidetaka Iwai <tyuyu@mb6.seikyou.ne.jp>, ;; TSUCHIYA Masatoshi <tsuchiya@namazu.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (require 'shimbun) (luna-define-class shimbun-texfaq (shimbun) ()) (defvar shimbun-texfaq-url "http://oku.edu.mie-u.ac.jp/~okumura/texfaq/qa/") (defvar shimbun-texfaq-groups '("qanda")) (defvar shimbun-texfaq-content-start "</h2>\n") (defvar shimbun-texfaq-content-end "\n<hr>\n<p>") (defun shimbun-texfaq-make-id (shimbun string) (concat "<" string "." (shimbun-current-group-internal shimbun) "@" (save-match-data (let ((url (shimbun-index-url shimbun))) (if (string-match "\\`[^:/]+://\\([^/]+\\)/" url) (match-string 1 url) (error "Cannot extract host name from %s" url)))) ">")) (luna-define-method shimbun-get-headers ((shimbun shimbun-texfaq) &optional range) (let ((case-fold-search t) headers) (catch 'found (goto-char (point-min)) (while (re-search-forward "[0-9]+: \ \\([0-9][0-9][0-9][0-9]\\)-\\([0-1][0-9]\\)-\\([0-3][0-9]\\) \ \\([0-2][0-9]:[0-5][0-9]:[0-5][0-9]\\) \ <a href=\"\\(\\([0-9]+\\)\\.html\\)\">\\([^<]+\\)</a>\\([^<]+\\)<br>" nil t) (let ((date (shimbun-make-date-string (string-to-number (match-string 1)) (string-to-number (match-string 2)) (string-to-number (match-string 3)) (match-string 4))) (subject (match-string 7)) (author (match-string 8)) (url (shimbun-expand-url (match-string 5) (shimbun-index-url shimbun))) (id (shimbun-texfaq-make-id shimbun (match-string 6)))) (when (shimbun-search-id shimbun id) (throw 'found headers)) (push (shimbun-create-header 0 subject author date id "" 0 0 url) headers))) headers))) (luna-define-method shimbun-make-contents :before ((shimbun shimbun-texfaq) header) (save-excursion (goto-char (point-min)) (when (re-search-forward "<hr>\n<a href=\"\\([0-9]+\\)\\.html\">>>[0-9]+</a>" nil t) (shimbun-header-set-references header (shimbun-texfaq-make-id shimbun (match-string 1)))))) (provide 'sb-texfaq) ;;; sb-texfaq.el ends here ������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-text.el������������������������������������������������������0000664�0000000�0000000�00000006777�14343750021�0020752�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-text.el -- shimbun backend class for text content ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 ;; Yuuichi Teranishi <teranisi@gohome.org> ;; Author: Yuuichi Teranishi <teranisi@gohome.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was nnshimbun.el written by ;; TSUCHIYA Masatoshi <tsuchiya@namazu.org>. ;;; Code: (require 'shimbun) (luna-define-class shimbun-text (shimbun) ()) ;; Fast fill-region function (defvar shimbun-fill-column (min 80 (- (frame-width) 4))) (defconst shimbun-kinsoku-bol-list (append "!)-_~}]:;',.?鐚鐚誌鐚鐚鐚卒鐔即鐚常殖鐚帥純障\ 篁錫鐚鐚若鐔モ鐚鐚緒属霞鰍\ c<cャсcャс泣" nil)) (defconst shimbun-kinsoku-eol-list (append "({[`鐚鐚誌属霞蛎" nil)) (defun shimbun-fill-line () (forward-line 0) (let ((top (point)) chr) (while (if (>= (move-to-column shimbun-fill-column) shimbun-fill-column) (if (memq (char-before) shimbun-kinsoku-eol-list) (prog1 t (backward-char) (while (memq (char-before) shimbun-kinsoku-eol-list) (backward-char)) (insert "\n")) (while (memq (setq chr (char-after)) shimbun-kinsoku-bol-list) (forward-char)) (if (looking-at "\\s-+") (or (eolp) (delete-region (point) (match-end 0))) (or (not chr) (> (char-width chr) 1) (re-search-backward "\\<" top t) (end-of-line))) (if (eolp) nil (insert "\n") t))) (setq top (point)))) (forward-line 1) (not (eobp))) (defun shimbun-shallow-rendering () (goto-char (point-min)) (while (search-forward "<p>" nil t) (insert "\n\n")) (goto-char (point-min)) (while (re-search-forward "<br\\(:? /\\)?>" nil t) (insert "\n")) (shimbun-remove-markup) (shimbun-decode-entities) (goto-char (point-min)) (while (shimbun-fill-line)) (goto-char (point-min)) (when (skip-chars-forward "\n") (delete-region (point-min) (point))) (while (re-search-forward "\n\n\n+" nil t) (replace-match "\n\n")) (goto-char (point-max)) (when (skip-chars-backward "\n") (delete-region (point) (point-max))) (insert "\n")) (defun shimbun-make-text-contents (shimbun header) (shimbun-header-insert-and-buffer-string shimbun header nil ;; When cleaning has been succeeded, this article is treated as a ;; text/plain message. Otherwise, it is treated as a text/html ;; message. (if (shimbun-clear-contents shimbun header) (shimbun-shallow-rendering) t))) (luna-define-method shimbun-make-contents ((shimbun shimbun-text) header) (shimbun-make-text-contents shimbun header)) (provide 'sb-text) ;;; sb-text.el ends here �emacs-w3m-emacs-w3m-4f27810/shimbun/sb-the-onion.el�������������������������������������������������0000664�0000000�0000000�00000003506�14343750021�0021651�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-the-onion.el --- The Onion shimbun backend ;; Copyright (C) 2006 David Hansen ;; Author: David Hansen <david.hansen@physik.fu-berlin.de> ;; Keywords: news ;; This file is a part of shimbun. ;; This is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-the-onion (shimbun-rss) ()) (defvar shimbun-the-onion-url "http://www.theonion.com/content/feeds/daily") (defvar shimbun-the-onion-groups '("news")) (defvar shimbun-the-onion-from-address "invalid@theonion.com") (defvar shimbun-the-onion-content-start "<!-- begin content -->") (defvar shimbun-the-onion-content-end "<!-- end content -->") (luna-define-method shimbun-index-url ((shimbun shimbun-the-onion)) shimbun-the-onion-url) (luna-define-method shimbun-get-headers :around ((shimbun shimbun-the-onion) &optional range) (mapcar (lambda (header) (let ((url (shimbun-header-xref header))) (when (string-match "[0-9]+\\(\\?.*=RSS\\)" url) (shimbun-header-set-xref header (concat (substring url 0 (match-beginning 1)) "/print/")))) header) (luna-call-next-method))) (provide 'sb-the-onion) ;;; sb-the-onion.el ends here ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-the-register.el����������������������������������������������0000664�0000000�0000000�00000006275�14343750021�0022361�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-the-register.el --- The Register shimbun backend ;; Copyright (C) 2004, 2005, 2006, 2007, 2008 David Hansen ;; Author: David Hansen <david.hansen@physik.fu-berlin.de> ;; Keywords: news ;; This file is a part of shimbun. ;; This is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-the-register (shimbun-rss) ()) (defvar shimbun-the-register-url "http://www.theregister.co.uk/") (defvar shimbun-the-register-from-address "invalid@theregister.co.uk") (defvar shimbun-the-register-content-start "<h2>") (defvar shimbun-the-register-content-end "<p class=\"Furniture\">\\|<p id=\"Copyright\">") (defvar shimbun-the-register-x-face-alist '(("default" . "X-Face: 'r-3ZQiX|_[TrM[|LF34{X#MX`MHFuL$_2w4Cs\"ET_jx9/JsL)k\ xvY~i(,cv8ho2=\\L!Tz# @=+.N^%}G<@JRS<ZeD90JN/,oDx.o:\\-kBeyKN%DzZ)s|Ck69P6WY6^\ IPf~GT+xfvp:1-BRTK7'f&\"\"mr'CflD?Q2R%IkV>"))) (defvar shimbun-the-register-path-alist '(("news" . "headlines.rss") ("enterprise" . "enterprise/headlines.rss") ("software" . "software/headlines.rss") ("personal" . "personal/headlines.rss") ("internet" . "internet/headlines.rss") ("mobile" . "mobile/headlines.rss") ("security" . "security/headlines.rss") ("management" . "management/headlines.rss") ("channel" . "channel/headlines.rss") ("odds" . "odds/headlines.rss"))) (defvar shimbun-the-register-groups (mapcar 'car shimbun-the-register-path-alist)) (luna-define-method shimbun-index-url ((shimbun shimbun-the-register)) (concat shimbun-the-register-url (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-the-register-path-alist)))) (luna-define-method shimbun-get-headers :around ((shimbun shimbun-the-register) &optional range) (mapcar (lambda (header) (shimbun-header-set-xref header (concat (shimbun-header-xref header) "print.html")) header) (luna-call-next-method))) (luna-define-method shimbun-make-contents :before ((shimbun shimbun-the-register) header) (save-excursion ;; remove annoying stuff (dolist (junk '(("(?<span class=\"URL\">" . "</span>)?") ("<div \\(class\\|id\\)=\"[^\"]*Ad\"" . "</div>") ("<a href=\"http://ad\\." . "</a>"))) (goto-char (point-min)) (message "%s" (car junk)) (while (re-search-forward (car junk) nil t) (let ((beg (match-beginning 0))) (when (re-search-forward (cdr junk) nil t) (delete-region beg (point)))))))) (provide 'sb-the-register) ;;; sb-the-register.el ends here �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-tigris.el����������������������������������������������������0000664�0000000�0000000�00000016317�14343750021�0021256�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-tigris.el --- shimbun backend for tigris.org ML ;; Copyright (C) 2005, 2007, 2009, 2017, 2019 ;; Tsuyoshi CHO <Tsuyoshi.CHO@Gmail.com> ;; Author: Tsuyoshi CHO <Tsuyoshi.CHO@Gmail.com> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-incf (require 'shimbun) (luna-define-class shimbun-tigris (shimbun) ()) (defvar shimbun-tigris-server-name "tigris.org") (defvar shimbun-tigris-url-regexp "http://%s.tigris.org/servlets/SummarizeList?listName=%s") (defcustom shimbun-tigris-group-alist '(("subversion" . ("announce" "dev" "issues" "svn" "svn-breakage" "users" "l10n-es" "l10n-fr")) ("rapidsvn" . ("users" "issues" "announce" "dev" "cvs")) ("tortoisesvn" . ("dev" "announce" "patches")) ("scarab" . ("announce" "dev" "users" "cvs" "issues")) ("xmlbasedsrs" . ("dev" "cvs" "announce" "users")) ("argouml" . ("announce" "issues" "cvs" "users" "dev" "modules-dev" "mda" "user-group-sweden" "users-espanol")) ("eyebrowse" . ("announce" "dev" "users" "cvs" "issues")) ("binarycloud" . ("users" "issues" "cvs" "dev")) ("phpcreate" . ("dev" "announce" "issues" "users")) ("lptools" . ("dev" "cvs" "announce" "issues" "users")) ("maxq" . ("users" "dev" "issues")) ("aut" . ("dev" "cvs" "announce" "issues" "users")) ("current" . ("dev" "cvs" "announce" "issues" "users")) ("readyset" . ("dev" "cvs" "issues" "announce")) ("gef" . ("issues" "dev" "users" "cvs" "announce")) ("axion" . ("dev" "cvs" "announce" "issues" "users")) ("style" . ("dev" "cvs" "announce" "issues" "users")) ("sstree" . ("issues" "dev" "cvs")) ("readings" . ("discuss" "issues" "announce" "cvs" "suggest")) ("spin" . ("dev" "cvs" "announce" "issues" "users")) ("elmuth" . ("users" "dev" "cvs" "announce" "issues")) ("ankhsvn" . ("issues" "users" "announce" "cvs" "svn-commit" "Draco-build")) ) "List of mailing lists serverd by Tigris.org." :group 'shimbun :type '(repeat (cons :format "%v" :indent 0 (string :format "Project Name: %v") (repeat :format "%v%i\n" :indent 12 (string :format "ML: %v")))) ) (defmacro shimbun-tigris-get-project (shimbun) `(nth 0 (split-string (shimbun-current-group-internal ,shimbun) "\\."))) (defmacro shimbun-tigris-get-ml-name (shimbun) `(nth 1 (split-string (shimbun-current-group-internal ,shimbun) "\\."))) (luna-define-method shimbun-groups ((shimbun shimbun-tigris)) "return groups : project.ml-name" (let (groups) (dolist (project shimbun-tigris-group-alist) (let ((mls (cdr project))) (dolist (ml-name mls) (push (concat (car project) "." ml-name) groups)))) groups)) (luna-define-method shimbun-index-url ((shimbun shimbun-tigris)) (shimbun-expand-url (format shimbun-tigris-url-regexp (shimbun-tigris-get-project shimbun) (shimbun-tigris-get-ml-name shimbun) ))) (defun shimbun-tigris-remove-amp (url) "Remove URL & -> &" (save-match-data (while (string-match "&" url) (setq url (replace-match "&" nil nil url)))) url) (luna-define-method shimbun-get-headers ((shimbun shimbun-tigris) &optional range) (save-excursion (let ((case-fold-search t) (pages (shimbun-header-index-pages range)) (link-regexp (format "http://%s.tigris.org/servlets/BrowseList\\?listName=%s&\\(amp;\\)?by=date&\\(amp;\\)?.*" (shimbun-tigris-get-project shimbun) (shimbun-tigris-get-ml-name shimbun))) indexes headers) (goto-char (point-min)) (search-forward "inclsummarizeby") ;; top of links (while (re-search-forward "<a +href=\"\\([^\"]+\\)\"" nil t) (let ((url (match-string 1))) (when (and url (string-match link-regexp url)) (push (concat (shimbun-tigris-remove-amp url) "&paged=false") indexes)))) (setq indexes (nreverse indexes)) (catch 'stop (let ((count 0) url) (while (and indexes (if pages (<= (cl-incf count) pages) t)) (erase-buffer) (setq url (pop indexes)) (shimbun-retrieve-url url) (goto-char (point-min)) (while (re-search-forward "<tr[^>]*>\\s *\ <td[^>]*>\\([^<]+\\)</td>\\s *\ <td[^>]*>\\s *<a *href=\"\\([^\"]+\\)\"[^>]*>\\([^<]+\\)</a>\\s *</td>\\s *\ <td[^>]*>\\([^<]+\\)</td>\\s *\ </tr>" nil t) (let* ((from (match-string-no-properties 1)) (url (shimbun-tigris-remove-amp (match-string-no-properties 2))) (title (match-string-no-properties 3)) (date (match-string-no-properties 4)) (count 0) id) (when (string-match ".*msgNo=\\([0-9]+\\).*" url) (setq count (string-to-number (match-string 1 url)))) (setq id (format "<%d%%%s.%s.%s>" count (shimbun-tigris-get-ml-name shimbun) (shimbun-tigris-get-project shimbun) shimbun-tigris-server-name )) (if (and (stringp date) (string-match "\\([0-9]*\\)-\\([0-9]*\\)-\\([0-9]*\\)" date)) (setq date (shimbun-make-date-string (string-to-number (match-string 1 date)) (string-to-number (match-string 2 date)) (string-to-number (match-string 3 date)))) (setq date nil)) ;; change to raw page (setq url (shimbun-expand-url (concat url "&raw=true"))) (when (shimbun-search-id shimbun id) (throw 'stop nil)) (push (shimbun-create-header count title from date id "" 0 0 url) headers)))))) headers))) (luna-define-method shimbun-make-contents ((shimbun shimbun-tigris) header) (let ((case-fold-search t) (beg nil) (end nil)) (when (search-forward "<PRE>") (forward-line 1) (beginning-of-line) (setq beg (point)) (delete-region (point-min) beg)) (when (search-forward "</PRE>") (forward-line -1) (end-of-line) (setq end (point)) (delete-region end (point-max))) ;; replace "<" -> "<" (goto-char (point-min)) (while (search-forward "<" nil t) (replace-match "<")) ;; header edit if deleted (goto-char (point-min)) (when (and beg end) (when (re-search-forward "^$" nil t) ;; end of header (goto-char (match-end 0)) (when (re-search-backward "^Message-ID" nil t) (replace-match "X-Original-Message-ID"))) ;; replace msg-id to x-ori-msg-id (goto-char (point-min)) (insert (concat "Message-ID: " (shimbun-header-id header) "\n")) ;; add msg-id (insert (concat "Xref: " (shimbun-header-xref header) "\n")) ;; add Xref )) (buffer-string)) (provide 'sb-tigris) ;;; sb-tigris.el ends here �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-toshiba.el���������������������������������������������������0000664�0000000�0000000�00000005713�14343750021�0021404�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-toshiba.el --- shimbun backend for TOSHIBA Linux users ML ;; Copyright (C) 2001, 2005, 2019 TSUCHIYA Masatoshi <tsuchiya@namazu.org> ;; Author: TSUCHIYA Masatoshi <tsuchiya@namazu.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; This is shimbun backend for TOSHIBA Linux users ML. ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-incf (require 'shimbun) (require 'sb-fml) (luna-define-class shimbun-toshiba (shimbun-fml) ()) (defvar shimbun-toshiba-url "http://linux.toshiba-dme.co.jp/ML/tlinux-users-j/") (defvar shimbun-toshiba-groups '("linux-users-j")) (defvar shimbun-toshiba-from-address "tlinux-users-j@linux.toshiba-dme.co.jp") (luna-define-method shimbun-get-headers ((shimbun shimbun-toshiba) &optional range) (let ((case-fold-search t) (pages (shimbun-header-index-pages range)) (count 0) headers auxs aux) (goto-char (point-min)) (while (and (if pages (<= (cl-incf count) pages) t) (re-search-forward "<a href=\"\\([0-9]+\\(\\.week\\|\\.month\\)?\\)/index.html\">" nil t)) (setq auxs (append auxs (list (match-string 1))))) (catch 'stop (while auxs (with-temp-buffer (shimbun-retrieve-url (concat (shimbun-index-url shimbun) (setq aux (car auxs)) "/") 'reload) (let ((case-fold-search t) id url date subject) (goto-char (point-min)) (while (re-search-forward "<LI><A HREF=\"\\([0-9]+\\.html\\)\">Article .*</A>\ <DIV><SPAN CLASS=article>Article <SPAN CLASS=article-value>\\([0-9]+\\)\ </SPAN></SPAN> at <SPAN CLASS=Date-value>\\([^<]*\\)</SPAN>\ <SPAN CLASS=Subject>Subject: <SPAN CLASS=Subject-value>\\([^<]*\\)\ </SPAN></SPAN></DIV>" nil t) (setq url (concat (shimbun-index-url shimbun) aux "/" (match-string 1)) id (format "<%s%05d%%%s>" aux (string-to-number (match-string 2)) (shimbun-current-group-internal shimbun)) date (shimbun-fml-parse-time (match-string 3)) subject (match-string 4)) (if (shimbun-search-id shimbun id) (throw 'stop nil)) (forward-line 1) (push (shimbun-create-header 0 subject (shimbun-from-address shimbun) date id "" 0 0 url) headers))) (setq auxs (cdr auxs))))) headers)) (provide 'sb-toshiba) ;;; sb-toshiba.el ends here �����������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-vinelinux.el�������������������������������������������������0000664�0000000�0000000�00000011501�14343750021�0021764�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-vinelinux.el --- shimbun backend class for vinelinux web site. ;; Copyright (C) 2001, 2002, 2003, 2004, 2006, 2009 ;; NAKAJIMA Mikio <minakaji@namazu.org> ;; Author: NAKAJIMA Mikio <minakaji@namazu.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (luna-define-class shimbun-vinelinux (shimbun) ()) (defconst shimbun-vinelinux-url "http://www.vinelinux.org") (defconst shimbun-vinelinux-group-path-alist '(("errata.4x.i386" . "errata/4x/i386.html") ("errata.4x.ppc" . "errata/4x/ppc.html") ("errata.3x.i386" . "errata/3x/i386.html") ("errata.3x.ppc" . "errata/3x/ppc.html") ("errata.3x.alpha" . "errata/3x/alpha.html") ("errata.25x.i386" . "errata/25x/i386.html") ("errata.25x.ppc" . "errata/25x/ppc.html") ("errata.25x.sparc" . "errata/25x/sparc.html") ("errata.25x.alpha" . "errata/25x/alpha.html") ("errata.2x.i386" . "errata/2x/i386.html") ("errata.2x.ppc" . "errata/2x/ppc.html") ("errata.2x.sparc" . "errata/2x/sparc.html") ("errata.2x.alpha" . "errata/2x/alpha.html") ("errata.1x" . "errata/1x/index.html"))) (defconst shimbun-vinelinux-groups (mapcar 'car shimbun-vinelinux-group-path-alist)) (defconst shimbun-vinelinux-from-address "webmaster@www.vinelinux.org") (defun shimbun-vinelinux-parse-time (str) (shimbun-make-date-string (string-to-number (substring str 0 4)) (string-to-number (substring str 4 6)) (string-to-number (substring str 6)))) (luna-define-method shimbun-index-url ((shimbun shimbun-vinelinux)) (concat (shimbun-url-internal shimbun) "/" (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-vinelinux-group-path-alist)))) (luna-define-method shimbun-get-headers ((shimbun shimbun-vinelinux) &optional range) (let ((case-fold-search t) start end headers url id date subject) (subst-char-in-region (point-min) (point-max) ?\t ? t) (setq start (progn (search-forward "</font>贋/絎恰宴с</h4>" nil t nil) (search-forward "<table>" nil t nil) (point)) end (progn (search-forward "</table>" nil t nil) (point))) (goto-char start) ;; Use entire archive. (catch 'stop (while (re-search-forward ;; <td><a href="20010501.html">quota 贋</a></td> ;; <td><a href="20010501-3.html">Vine Linux 2.1.5 ≪違若 xdvi tgif 膈ユ茯茵腓冴筝桁</a></td> "^<td><a href=\"\\(\\([0-9]+\\)\\(-[0-9]+\\)*\\.html\\)\">\\(.+\\)</a></td>" end t) (setq url (shimbun-expand-url (match-string-no-properties 1) (shimbun-index-url shimbun)) id (format "<%s%05d%%%s>" (match-string-no-properties 1) (string-to-number (match-string-no-properties 2)) (shimbun-current-group-internal shimbun)) date (shimbun-vinelinux-parse-time (match-string-no-properties 2)) subject (match-string 4)) (if (shimbun-search-id shimbun id) (throw 'stop nil)) (forward-line 1) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) (shimbun-from-address shimbun) date id "" 0 0 url) headers))) headers)) (luna-define-method shimbun-make-contents ((shimbun shimbun-vinelinux) header) ;;<h4>2002,1,22(2002,1,24 贋) ppxp 宴若吾篆罩</h4> ;; <h3>[ 2003,01,29 ] telnet </h4> ;; start with h3 and end with h4...f(^^;;; (if (not (re-search-forward "^<h4>[,0-9]+.*.*</h4>\\|^<h[34]>\\[ [,0-9]+ \\] .+</h[34]>" nil t nil)) nil (delete-region (progn (forward-line 1) (point)) (point-min)) (shimbun-header-insert shimbun header) (insert "Content-Type: text/html; charset=ISO-2022-JP\nMIME-Version: 1.0\n\n" "<html><head><base href=\"" (shimbun-header-xref header) "\"></head><body>") (goto-char (point-min)) (while (re-search-forward "</*blockquote>\n" nil t nil) (delete-region (match-beginning 0) (point))) (goto-char (point-max)) (insert "</body></html>") (encode-coding-string (buffer-string) (mime-charset-to-coding-system "ISO-2022-JP")))) (provide 'sb-vinelinux) ;;; sb-vinelinux.el ends here �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-w3m-dev.el���������������������������������������������������0000664�0000000�0000000�00000003706�14343750021�0021235�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-w3m-dev.el --- shimbun backend for w3m-dev ;; Copyright (C) 2001 NAKAJIMA Mikio ;; Copyright (C) 2005 Tsuyoshi CHO ;; Authors: NAKAJIMA Mikio <minakaji@namazu.org>, ;; Tsuyoshi CHO <Tsuyoshi.CHO@Gmail.com> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (require 'sb-fml) (luna-define-class shimbun-w3m-dev (shimbun-fml) ()) (defvar shimbun-w3m-dev-url "http://www.sic.med.tohoku.ac.jp/~satodai/") (defvar shimbun-w3m-dev-group-alist '(("w3m-dev" . "w3m-dev") ("w3m-dev-en" . "w3m-dev-en"))) (defvar shimbun-w3m-dev-groups (mapcar 'car shimbun-w3m-dev-group-alist)) (defvar shimbun-w3m-dev-coding-system 'euc-japan) (luna-define-method shimbun-index-url ((shimbun shimbun-w3m-dev)) (concat (shimbun-expand-url (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-w3m-dev-group-alist)) (shimbun-url-internal shimbun)) "/")) (luna-define-method shimbun-reply-to ((shimbun shimbun-w3m-dev)) "Return w3m-dev mailing list address." (concat (cdr (assoc (shimbun-current-group-internal shimbun) shimbun-w3m-dev-group-alist)) (shimbun-url-internal shimbun) "@mi.med.tohoku.ac.jp")) (provide 'sb-w3m-dev) ;;; sb-w3m-dev.el ends here ����������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-welt-de.el���������������������������������������������������0000664�0000000�0000000�00000004457�14343750021�0021320�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-welt-de.el --- shimbun backend for <http://www.welt.de> ;; Copyright (C) 2004, 2005, 2006, 2010 ;; Andreas Seltenreich <seltenreich@gmx.de> ;; Author: Andreas Seltenreich <seltenreich@gmx.de> ;; Keywords: news, shimbun ;; Created: June 13, 2004 ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; General national and international news in german. The items seem ;; directly forwarded from news agencies, so expect rather high ;; traffic. ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-welt-de (shimbun-rss) ()) (defvar shimbun-welt-de-groups '("news")) (defvar shimbun-welt-de-url "http://www.welt.de/z/newsticker/ticker_welt.xml") (defvar shimbun-welt-de-content-start "</b></p>") (defvar shimbun-welt-de-content-end "<noscript>") (luna-define-method shimbun-groups ((shimbun shimbun-welt-de)) shimbun-welt-de-groups) ;; Kill Javascript (luna-define-method shimbun-clear-contents :before ((shimbun shimbun-welt-de) headers) (let ((case-fold-search t) javascript-image) (goto-char (point-min)) (if (re-search-forward "<img src=\"\\([^\"]+?\\)_thumbnail.jpg" nil t) (setq javascript-image (match-string-no-properties 1))) (shimbun-remove-tags "table" t) (when javascript-image (goto-char (point-min)) (re-search-forward (shimbun-content-start shimbun)) (insert (concat "<img src=\"" javascript-image "_onlineBild.jpg\">"))))) (luna-define-method shimbun-groups ((shimbun shimbun-welt-de)) shimbun-welt-de-groups) (luna-define-method shimbun-index-url ((shimbun shimbun-welt-de)) shimbun-welt-de-url) (provide 'sb-welt-de) ;;; sb-welt-de.el ends here �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-wiki.el������������������������������������������������������0000664�0000000�0000000�00000011104�14343750021�0020705�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-wiki.el --- shimbun backend for wiki ;; Copyright (C) 2003, 2004, 2006, 2019 NAKAJIMA Mikio <minakaji@namazu.org> ;; Author: NAKAJIMA Mikio <minakaji@namazu.org> ;; Keywords: news ;; Created: Jun 19, 2003 ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; This program currently supports PukiWiki and Hiki. ;; For more detail about PukiWiki, see http://pukiwiki.org/index.php. ;; See http://www.namaraii.com/hiki/?FrontPage about Hiki. ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-wiki (shimbun-rss) ()) (defcustom shimbun-wiki-group-alist '(("pukiwiki" "http://pukiwiki.org/index.php?cmd=rss10" "webmaster@pukiwiki.org" nil "\n<h3 id=\"" "</address>") ("hiki" "http://www.namaraii.com/hiki/?c=rss" "webmaster@namaraii.com" nil "<div class=\"section\">" "<div class=\"sidebar\">")) "An alist of Wiki shimbun group definition. Each element is a list such as (NAME URL ADDRESS X-FACE CONTENT-START CONTENT-END). NAME is a shimbun group name. URL is the URL for Wiki access point of the group. Note that sb-wiki.el supports only RSS version 1.0 (0.91 does not have date tags). ADDRESS is the e-mail address for the diary owner. Optional X-FACE is a string for X-Face field. Optional CONTENT-START is a regexp string that represents content start of each article. Optional CONTENT-END is a regexp string that represents content start of each article." :group 'shimbun :type '(repeat (group :format "%v" :indent 4 (string :tag "Group name") (string :tag "URL") (string :tag "Site owner's mail address") (choice (string :tag "X-Face") (const :tag "No X-Face" nil)) (regexp :tag "Content beginning pattern") (regexp :tag "Content end pattern")))) (luna-define-method shimbun-headers :before ((shimbun shimbun-wiki) &rest range) (shimbun-set-from-address-internal shimbun (nth 2 (assoc (shimbun-current-group-internal shimbun) shimbun-wiki-group-alist))) shimbun) (luna-define-method shimbun-x-face ((shimbun shimbun-wiki)) (or (shimbun-x-face-internal shimbun) (shimbun-set-x-face-internal shimbun (or (nth 3 (assoc (shimbun-current-group-internal shimbun) shimbun-wiki-group-alist)) (cdr (assoc "default" (shimbun-x-face-alist-internal shimbun))) shimbun-x-face)))) (luna-define-method shimbun-groups ((shimbun shimbun-wiki)) (mapcar 'car shimbun-wiki-group-alist)) (luna-define-method shimbun-rss-build-message-id ((shimbun shimbun-wiki) url date) (let (page host datedesc) (unless (string-match "http:\\/\\/\\([^\/]+\\)\\/.+\\?\\(.+\\)" url) (error "Cannot find message-id base")) (setq host (match-string-no-properties 1 url) page (match-string-no-properties 2 url)) (unless (string-match "\\([0-9][0-9][0-9][0-9]\\)-\\([0-9][0-9]\\)-\\([0-9][0-9]\\)T\\([0-9][0-9]\\):\\([0-9][0-9]\\):\\([0-9][0-9]\\)" date) (error "Cannot find message-id base")) (setq datedesc (concat (match-string-no-properties 1 date) (match-string-no-properties 2 date) (match-string-no-properties 3 date) (match-string-no-properties 4 date) (match-string-no-properties 5 date))) (format "<%s%%%s@%s>" datedesc page host))) (luna-define-method shimbun-index-url ((shimbun shimbun-wiki)) (cadr (assoc (shimbun-current-group-internal shimbun) shimbun-wiki-group-alist))) (luna-define-method shimbun-clear-contents ((shimbun shimbun-wiki) header) (let* ((case-fold-search t) (alist (assoc (shimbun-current-group shimbun) shimbun-wiki-group-alist)) (cstart (nth 4 alist)) (cend (nth 5 alist)) start) (when (and cstart cend (re-search-forward cstart nil t) (setq start (point)) (re-search-forward cend nil t)) (delete-region (match-beginning 0) (point-max)) (delete-region (point-min) start) t))) (provide 'sb-wiki) ;;; sb-wiki.el ends here ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-wikimedia.el�������������������������������������������������0000664�0000000�0000000�00000024766�14343750021�0021727�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-wikimedia.el --- shimbun backend for Wikimedia Mailing list ;; Copyright (C) 2004, 2005, 2007, 2019 ;; Tsuyoshi CHO <Tsuyoshi.CHO@Gmail.com> ;; Author: Tsuyoshi CHO <Tsuyoshi.CHO@Gmail.com> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; See also ;;; URL <http://mail.wikipedia.org/> ;;; Code: (require 'shimbun) (require 'sb-mailman) (luna-define-class shimbun-wikimedia (shimbun-mailman) ()) (defvar shimbun-wikimedia-url "http://mail.wikipedia.org/pipermail/") (defvar shimbun-wikimedia-group-path-alist ;; entry path mailaccount date-format '(;; Wikimedia Foundation ("wikimedia.foundation" "foundation-l" "foundation-l" "en") ;; Foundation ML ("wikimedia.wikitech" "wikitech-l" "wikitech-l" "en") ;; Wikitech ML ("wikimedia.mediawiki-cvs" "mediawiki-cvs" "mediawiki-cvs" "en") ;; wikibugs-l@Wikipedia.org. redirect sourceforge.org proj ML ("wikimedia.vereinde" "vereinde-l" "vereinde-l" "de") ;; in-progress German Wikimedia organisation discussion ("wikimedia.commons" "commons-l" "commons-l" "en") ;; discussion list for the Wikimedia Commons <http://commons.wikimedia.org/> ("wikimedia.translators" "translators-l" "translators-l" "en") ;; a list for discussing and announcing translations across the Wikimedia projects ;; Project mailing lists ("project.wikibooks" "textbook-l" "textbook-l" "en") ;; Wikibooks ("project.wiktionary" "wiktionary-l" "wiktionary-l" "en") ;; Wiktionary ("project.wikipedia" "wikipedia-l" "wikipedia-l" "en") ;; Wikipedia global discuss ("project.wikiversityde" "wikiversityde-l" "wikiversityde-l" "en") ("project.wikispecies" "wikispecies-l" "wikispecies-l" "en") ("project.daily-article" "daily-article-l" "daily-article-l" "en") ;; Daily article? ;; Local Wikipedia mailing lists ;; Wikipedia ("wikipedia.ar" "wikiar-l" "wikiar-l" "en") ("wikipedia.da" "wikida-l" "wikida-l" "en") ("wikipedia.de" "wikide-l" "wikide-l" "de") ("wikipedia.en" "wikien-l" "wikien-l" "en") ("wikipedia.eo" "wikieo-l" "wikieo-l" "en") ("wikipedia.es" "wikies-l" "wikies-l" "es") ;; WikiFI-l non archived ("wikipedia.fr" "wikifr-l" "wikifr-l" "fr") ("wikipedia.hi" "wikihi-l" "wikihi-l" "en") ("wikipedia.ia" "wikiia-l" "wikiia-l" "ia") ("wikipedia.is" "wikiis-l" "wikiis-l" "is") ("wikipedia.it" "wikiit-l" "wikiit-l" "it") ("wikipedia.ja" "wikija-l" "wikija-l" "ja") ;; WikiNL-l. (The current archive is only available to the list members.) ("wikipedia.no" "wikino-l" "wikino-l" "no") ("wikipedia.pl" "wikipl-l" "wikipl-l" "pl") ;; WikiSV-l Archives. (The current archive is only available to the list members.) ;; Wikita-l Archives. non archived ;; Wiktionary ("wiktionary.de" "wiktionaryde-l" "wiktionaryde-l" "de") )) (defvar shimbun-wikimedia-groups (mapcar 'car shimbun-wikimedia-group-path-alist)) (defmacro shimbun-wikimedia-concat-url (shimbun url) `(concat (shimbun-url-internal ,shimbun) (nth 1 (assoc (shimbun-current-group-internal ,shimbun) shimbun-wikimedia-group-path-alist)) "/" ,url)) (luna-define-method shimbun-index-url ((shimbun shimbun-wikimedia)) (shimbun-expand-url (shimbun-wikimedia-concat-url shimbun ""))) (luna-define-method shimbun-reply-to ((shimbun shimbun-wikimedia)) (concat (nth 2 (assoc (shimbun-current-group-internal shimbun) shimbun-wikimedia-group-path-alist)) "@wikipedia.org")) (defun shimbun-wikimedia-l10n-make-contents (shimbun header) (subst-char-in-region (point-min) (point-max) ?\t ? t) (shimbun-decode-entities) (goto-char (point-min)) (let* ((case-fold-search t) (end (search-forward "<!--beginarticle-->")) name address date) (goto-char (point-min)) (search-forward "</HEAD>") (when (re-search-forward "<H1>\\([^\n]+\\)\\(\n +\\)?</H1>" end t nil) (shimbun-header-set-subject header (shimbun-mime-encode-string (match-string 1)))) (when (re-search-forward "<B>\\([^\n]+\\)\\(\n +\\)?</B> *\n +\ <A HREF=\"[^\n]+\n +TITLE=\"[^\n]+\">\\([^\n]+\\)" end t nil) (setq name (match-string 1) address (match-string 3)) ;; Yoshiki.Ohshima 鐚 acm.org (when (string-match " \\(鐚\\|at\\|w\\|a\\|en\\) " name) (setq name (concat (substring name 0 (match-beginning 0)) "@" (substring name (match-end 0))))) (when (string-match " \\(鐚\\|at\\|w\\|a\\|en\\) " address) (setq address (concat (substring address 0 (match-beginning 0)) "@" (substring address (match-end 0))))) (shimbun-header-set-from header (shimbun-mime-encode-string (concat name " <" address ">"))) (when (re-search-forward "<I>\\([^<]*\\)</I>" end t nil) (let (date-string func) (setq func (shimbun-wikimedia-date-function-select shimbun)) (setq date-string (match-string-no-properties 1)) (setq date (funcall func date-string)) (unless (eq "" date) (shimbun-header-set-date header date)))) (delete-region (point-min) end) (delete-region (search-forward "<!--endarticle-->") (point-max)) (shimbun-header-insert-and-buffer-string shimbun header nil t)))) (luna-define-method shimbun-make-contents ((shimbun shimbun-wikimedia) header) (shimbun-wikimedia-l10n-make-contents shimbun header)) (defun shimbun-wikimedia-date-function-select (shimbun) (let (lang func) (setq lang (nth 3 (assoc (shimbun-current-group-internal shimbun) shimbun-wikimedia-group-path-alist))) (setq func (intern (concat "shimbun-wikimedia-" lang "-date-decode"))) func)) ;; internal date decode functions ;; latin format pattern ;; 1.en: Fri Nov 19 19:38:56 UTC 2004 ;; 2a.pl: Czw, 1 Sty 2004, 12:17:45 UTC ;; 2b.ia: Dom 11 Gen 2004 15:50:50 UTC (defun shimbun-wikimedia-en-date-decode (date-string) "Decode date function for English (default)" (shimbun-wikimedia-latin-date-decode date-string '("Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct" "Nov" "Dec"))) (defun shimbun-wikimedia-de-date-decode (date-string) "Decode date function for de" (shimbun-wikimedia-latin-date-decode date-string '("Jan" "Feb" "Mar" "Apr" "Mai" "Jun" "Jul" "Aug" "Sep" "Okt" "Nov" "Dez"))) (defun shimbun-wikimedia-es-date-decode (date-string) "Decode date function for es" (shimbun-wikimedia-latin-date-decode date-string '("Jan" "Feb" "Mar" "Apr" "Maj" "Jun" "Jul" "Aug" "Sep" "Okt" "Nov" "Dec"))) (defun shimbun-wikimedia-fr-date-decode (date-string) "Decode date function for fr" (shimbun-wikimedia-latin-date-decode date-string '("Jan" "Fev" "Mar" "Avr" "Mai" "Jui" "Juli" "Aou" "Sep" "Oct" "Nov" "D辿c"))) (defun shimbun-wikimedia-ia-date-decode (date-string) "Decode date function for ia" (shimbun-wikimedia-en-date-decode date-string)) (defun shimbun-wikimedia-is-date-decode (date-string) "Decode date function for is" (shimbun-wikimedia-latin-date-decode date-string '("Jan" "Feb" "Mar" "Apr" "Ma鱈" "J炭n" "J炭l" "g炭" "Sep" "Okt" "N坦v" "Des"))) (defun shimbun-wikimedia-it-date-decode (date-string) "Decode date function for it" (shimbun-wikimedia-latin-date-decode date-string '("Gen" "Feb" "Mar" "Apr" "Mag" "Giu" "Lug" "Ago" "Set" "Ott" "Nov" "Dic"))) (defun shimbun-wikimedia-ja-date-decode (date-string) "Decode date function for Japnese localized" (if (string-match " *\\([0-9][0-9][0-9][0-9]\\)綛 *\\([0-9][0-9]*\\) *\\([0-9][0-9]*\\) *(\\(\\|\\|羂\\|\\|\\|\\|\\)) *\\([:0-9]+\\) *\\([A-Z]+\\) *" date-string) ;; <I>2003綛 4 11 () 02:43:25 CEST</I> ;; squeak-ja (shimbun-make-date-string (string-to-number (match-string 1 date-string)) (string-to-number (match-string 2 date-string)) (string-to-number (match-string 3 date-string)) (match-string 5 date-string) (match-string 6 date-string)) ;; In the early days, the RFC822 style date format has been used. date-string)) (defun shimbun-wikimedia-no-date-decode (date-string) "Decode date function for no" (shimbun-wikimedia-latin-date-decode date-string '("Jan" "Feb" "Mar" "Apr" "Mai" "Jun" "Jul" "Aug" "Sep" "Okt" "Nov" "Des"))) (defun shimbun-wikimedia-pl-date-decode (date-string) "Decode date function for pl" (shimbun-wikimedia-latin-date-decode date-string '("Sty" "Lut" "Mar" "Kwi" "Maj" "Cze" "Lip" "Sie" "Wrz" "Pa添" "Lis" "Gru"))) (defvar shimbun-wikimedia-date-decode-rule-alist '(;; Regex pattern(year month day time zone) ("\\([^ ,0-9]+\\) +\\([^ ,0-9]+\\) +\\([0-9]+\\) +\\([:0-9]+\\) +\\([A-Z]+\\) +\\([0-9]+\\)" . (6 2 3 4 5)) ("\\([^ ,0-9]+\\),? +\\([0-9]+\\)\\.? +\\([^ ,0-9]+\\) +\\([0-9]+\\),? +\\([:0-9]+\\) +\\([A-Z]+\\)" . (4 3 2 5 6)) )) (defun shimbun-wikimedia-latin-date-decode (date-string month-list) "Decode date function for latin,require month-string-list 1-12" (let ((alist shimbun-wikimedia-date-decode-rule-alist) (date "") (match-flag nil) regex rule year month day time zone) (while (progn (setq regex (car (car alist))) (setq rule (cdr (car alist))) (setq match-flag (string-match regex date-string)) ;; if match-flag is non-nil,match regex for date-string (when match-flag (setq year (match-string (nth 0 rule) date-string)) (setq month (match-string (nth 1 rule) date-string)) (setq day (match-string (nth 2 rule) date-string)) (setq time (match-string (nth 3 rule) date-string)) (setq zone (match-string (nth 4 rule) date-string))) (setq alist (cdr alist)) ;; repeat if alist is remain,and match-flag are nil (and alist (not match-flag)))) (when match-flag ;; matched (setq date (shimbun-make-date-string (string-to-number year) (length (member month (reverse month-list))) (string-to-number day) time zone)) (print date)) date)) (provide 'sb-wikimedia) ;;; sb-wikimedia.el ends here ����������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-wincefan.el��������������������������������������������������0000664�0000000�0000000�00000011440�14343750021�0021537�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-wincefan.el --- shimbun backend for WindowsCE FAN ;; Copyright (C) 2003-2005, 2019 NAKAJIMA Mikio <minakaji@osaka.email.ne.jp> ;; Author: NAKAJIMA Mikio <minakaji@osaka.email.ne.jp> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'shimbun) (luna-define-class shimbun-wincefan (shimbun) ()) (defconst shimbun-wincefan-url "http://www.wince.ne.jp/") (defvar shimbun-wincefan-groups '("news")) (defconst shimbun-wincefan-from-address "webmaster@wince.ne.jp") (defvar shimbun-wincefan-coding-system 'japanese-shift-jis) (defvar shimbun-wincefan-content-start "\\(<!-- *純荅括完 *-->\\|<B>鴻絎<\/B>\\)") (defvar shimbun-wincefan-content-end "<!-- \\/*\\(荐篋\\|純荅括完\\)-->") (defvar shimbun-wincefan-expiration-days 14) (luna-define-method shimbun-get-headers ((shimbun shimbun-wincefan) &optional outbuf) (let* ((from (shimbun-from-address shimbun)) (group (shimbun-current-group-internal shimbun)) (baseurl (when (string-match "\\`http://\\([^/]+\\)/*\\'" shimbun-wincefan-url) (match-string 1 shimbun-wincefan-url))) (case-fold-search t) url headers) (catch 'stop (if (not (re-search-forward "^<!--What's New-->" nil t nil)) (throw 'stop nil) (delete-region (point-min) (point))) (if (not (re-search-forward "^<!--//Whats' New-->" nil t nil)) (throw 'stop nil) (delete-region (point-max) (point))) (goto-char (point-min)) (while (re-search-forward ;;<FONT SIZE="-1" COLOR="#008000">130()</FONT> "<FONT [^<>]+>\\([0-9]+\\)\\([0-9]+\\)(\\(\\|\\|羂\\|\\|\\|\\|\\))<\/FONT>" nil t nil) (let* ((month (string-to-number (match-string-no-properties 1))) (day (string-to-number (match-string-no-properties 2))) (year (string-to-number (substring (current-time-string) 20))) (date (shimbun-make-date-string year month day)) (rawdate (string-to-number (format "%04d%02d%02d"year month day))) (end (save-excursion (or (re-search-forward "<FONT [^<>]+>\\([0-9]+\\)\\([0-9]+\\)(\\(\\|\\|羂\\|\\|\\|\\|\\))<\/FONT>" nil t nil) (point-max)))) (count -1) subject id) (while (re-search-forward ;;<TD><A HREF="/frame.asp?/soft2002/detail.asp?PID=3141" TARGET="_top"><FONT SIZE="-1" > vA20(吾с潟 ToDo)</FONT></A></TD> ;;<TD><A HREF="/NewsLink/" TARGET="_top"><FONT SIZE="-1" COLOR="#FF0000">News</FONT><BR></A><A HREF="http://www.wince.ne.jp/snap/cnBoard.asp?PID=1376" TARGET="_top"><FONT SIZE="-1" >激c若 HDD 莠綮箴∞ SL 吟鴻SL-C1000阪2</FONT><BR></A><FONT SIZE="-1" ></FONT></TD> "<A HREF=\"\\([^\"]+\\)\" TARGET=\"_top\"><FONT SIZE=[^<>]+>\\([^<>]+\\)<\\/FONT>" end t nil) (setq url (match-string-no-properties 1) subject (match-string-no-properties 2)) ;; ("/NewsLink/" "News") (when (not (and (string-match "\\`/.*/\\'" url) (string-match "\\`.*\\'" subject))) (setq count (1+ count)) ;; building ID (setq id (format "<%02d%08d%%%s@%s>" count rawdate group baseurl)) (if (shimbun-search-id shimbun id) (throw 'stop nil)) ;; not to use frame (when (string-match "/frame\\.asp\\?" url) (setq url (concat (substring url 0 (match-beginning 0)) (substring url (match-end 0))))) (setq url (shimbun-expand-url url shimbun-wincefan-url)) (push (shimbun-make-header 0 (shimbun-mime-encode-string subject) from date id "" 0 0 url) headers)))))) headers)) ;;(nreverse headers))) (luna-define-method shimbun-make-contents :before ((shimbun shimbun-wincefan) header) (let ((case-fold-search t)) (save-excursion (while (re-search-forward "<IMG SRC=\\(\"?/[^ ]+\\)" nil t nil) (let ((url (shimbun-expand-url (match-string-no-properties 1) shimbun-wincefan-url))) (delete-region (match-beginning 0) (match-end 0)) (insert "<IMG SRC=" url)))))) (provide 'sb-wincefan) ;;; sb-wincefan.el ends here ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-wired-jp.el��������������������������������������������������0000664�0000000�0000000�00000013571�14343750021�0021475�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-wired-jp.el --- shimbun backend for Hotwired Japan ;; Copyright (C) 2005, 2006, 2022 TSUCHIYA Masatoshi <tsuchiya@namazu.org> ;; Author: TSUCHIYA Masatoshi <tsuchiya@namazu.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-wired-jp (shimbun-rss shimbun) ()) (defvar shimbun-wired-jp-group-table '(("news" "http://hotwired.goo.ne.jp/news/index.rdf" nil "<!-- articles -->" "<!-- /articles -->") ("business" nil "http://hotwired.goo.ne.jp/news/business/" "<!-- articles -->" "<!-- /articles -->") ("culture" nil "http://hotwired.goo.ne.jp/news/culture/" "<!-- articles -->" "<!-- /articles -->") ("technology" nil "http://hotwired.goo.ne.jp/news/technology/" "<!-- articles -->" "<!-- /articles -->") ("blog.takahashi" "http://blog.goo.ne.jp/hwj-takahashi/index.rdf" nil "<div class=\"content3\">" "<!-- COMMENT MODULE -->") ("blog.sasaki" "http://blog.goo.ne.jp/hwj-sasaki/index.rdf" nil "<div class=\"content3\">" "<!-- COMMENT MODULE -->") ("blog.ogura" "http://blog.goo.ne.jp/hwj-ogura/index.rdf" nil "<div class=\"content3\">" "<!-- COMMENT MODULE -->"))) (defvar shimbun-wired-jp-server-name "Hotwired Japan") (defvar shimbun-wired-jp-x-face-alist '(("default" . "\ Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAQBAMAAACigOGCAAAABGdBTUEAALGPC/xhBQAAADB QTFRFAAAAAgIBBgcFCgsJDA0MDhANEhYOHDALK0kQOGEUSn8aYaYies4piugulfkymf8zRL4klQA AAC90RVh0U29mdHdhcmUAWFYgVmVyc2lvbiAzLjEwYStGTG1hc2sgIFJldjogMTIvMjkvOTQbx6p 8AAABfUlEQVR42h3MTyiDcRzH8e+ImT3KckBRNmGHPRfPRdpt5sBNe3bgynJRi5Q1jfL/T1moqSm i/Nth6jkMI8lh2pJQ6/c8K26PUTju+Un7+T5+h1effu9+P/D5fN6tbnRwQVec9+o3c17A3VucE0W x53Mc7c0NoQM5ETwed4hJLsE9wiSP4AmxTZfQtVachf7hsfiL2pkc22GqEBGu2W3nBSqBM7h3FdB 4NnpyedZO2tNB1ZFrllefwTm5l2lW+N++8+iJjbS8HxUch22aXQV+e18+TNbnbWQ5ZiVtNEsdCTu VCPBf+/l00kJqyFLMQmrpIm34qKPZO+C/NzAAKc1HYkAqaOCHk016aLxcl88wlJAD1EhTlJup0L+ qioYVmwIESCINpJymNO7IqLW+QdXK7lWHhiGZk/GdIhe43/L3oArmCX/8XoUUxFkBfWBP5ozhlT2 CoRpC7AasMIVaMJ8adHcBj7k4jTawMDryv0NFvx7KjqtR40UTalL0XSnDH6TavYxiVdRgAAAAB3R JTUUH1AoWBQgh+MK8xgAAAABJRU5ErkJggg=="))) (luna-define-method shimbun-groups ((shimbun shimbun-wired-jp)) (mapcar 'car shimbun-wired-jp-group-table)) (luna-define-method shimbun-index-url ((shimbun shimbun-wired-jp)) (let ((elem (assoc (shimbun-current-group shimbun) shimbun-wired-jp-group-table))) (or (nth 1 elem) (nth 2 elem)))) (luna-define-method shimbun-headers :around ((shimbun shimbun-wired-jp) &optional range) (if (nth 1 (assoc (shimbun-current-group shimbun) shimbun-wired-jp-group-table)) (luna-call-next-method) (with-temp-buffer (shimbun-fetch-url shimbun (shimbun-index-url shimbun) t) (shimbun-wired-jp-get-headers shimbun)))) (defun shimbun-wired-jp-get-headers (shimbun) (let ((headers) (base (shimbun-index-url shimbun)) (regexp (format "<a href=\"\\(/news/%s/story/[0-9]+\\.html\\)\">" (shimbun-current-group shimbun)))) (goto-char (point-min)) (while (re-search-forward regexp nil t) (let ((url (shimbun-expand-url (match-string 1) base))) (push (shimbun-create-header 0 (buffer-substring (point) (if (search-forward "</a>" nil t) (match-beginning 0) (line-end-position))) (format "%s (%s)" (shimbun-server-name shimbun) (shimbun-current-group shimbun)) "" (shimbun-rss-build-message-id shimbun url) "" 0 0 url) headers))) headers)) (luna-define-method shimbun-article-url ((shimbun shimbun-wired-jp) header) (let ((url (shimbun-article-base-url shimbun header))) (if (string-match "/news/[a-z]+/story/\\([0-9]+\\.html\\)\\'" url) (shimbun-expand-url (concat "/news/print/" (match-string 1 url)) url) url))) (luna-define-method shimbun-clear-contents ((shimbun shimbun-wired-jp) header) (let ((case-fold-search t) (start) (elem (assoc (shimbun-current-group shimbun) shimbun-wired-jp-group-table))) (when (string-match "/news/print/[0-9]+\\.html\\'" (shimbun-article-url shimbun header)) (goto-char (point-min)) (when (re-search-forward "<font[^>]*>\\([0-9]+\\)綛\\([0-9]+\\)\ \\([0-9]+\\) +\\([0-9]+\\):\\([0-9]+\\)\\([ap]m\\) +\\([A-Z]+\\)</font>" nil t) (setq start (match-end 0)) (shimbun-header-set-date header (shimbun-make-date-string (string-to-number (match-string 1)) (string-to-number (match-string 2)) (string-to-number (match-string 3)) (format "%2d:%s" (+ (string-to-number (match-string 4)) (if (string= "pm" (match-string 6)) 12 0)) (match-string 5)) (cdr (assoc (match-string 7) '(("JT" . "+0900") ("PT" . "-0700")))))) (forward-line -1) (when (looking-at "<b><font[^>]+>\\([^<>]+\\)</font></b><br>") (shimbun-header-set-from header (match-string 1))))) (goto-char (point-min)) (when (and (or start (when (re-search-forward (nth 3 elem) nil t) (setq start (point)))) (re-search-forward (nth 4 elem) nil t)) (delete-region (match-beginning 0) (point-max)) (delete-region (point-min) start) t))) (provide 'sb-wired-jp) ;;; sb-wired-jp.el ends here ���������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-x51.el�������������������������������������������������������0000664�0000000�0000000�00000016126�14343750021�0020370�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-x51.el --- shimbun backend for x51.org ;; Copyright (C) 2004-2006, 2010, 2019 Tsuyoshi CHO <Tsuyoshi.CHO@Gmail.com> ;; Author: Tsuyoshi CHO <Tsuyoshi.CHO@Gmail.com> ;; Keywords: news blog ;; Created: Feb 21, 2004 ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-incf (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-x51 (shimbun-rss) ()) (defvar shimbun-x51-group-alist '(("top" . "http://x51.org/index.rdf") ;; Top-RDF ("anima" . "http://anima.x51.org/index.rdf") ("enema" . "http://enema.x51.org/index.rdf") ("art" . "http://x51.org/x/art/") ("blow" . "http://x51.org/x/blow/") ("crime" . "http://x51.org/x/crime/") ("disaster" . "http://x51.org/x/disaster/") ("edge" . "http://x51.org/x/edge/") ("ghost" . "http://x51.org/x/ghost/") ("info" . "http://x51.org/x/info/") ("life" . "http://x51.org/x/life/") ("love" . "http://x51.org/x/love/") ("media" . "http://x51.org/x/media/") ("medical" . "http://x51.org/x/medical/") ("oparts" . "http://x51.org/x/oparts/") ("phallic" . "http://x51.org/x/phallic/") ("psychic" . "http://x51.org/x/psychic/") ("religion" . "http://x51.org/x/religion/") ("science" . "http://x51.org/x/science/") ("ufo" . "http://x51.org/x/ufo/") ("uma" . "http://x51.org/x/uma/") ("xfiles" . "http://x51.org/x/xfiles/"))) (defvar shimbun-x51-obsolete-groups '("auction" "cabal" "homme" "military" "news" "northkorea" "story") "Obsolete group names.") (defvar shimbun-x51-server-name "x51.org") (defvar shimbun-x51-from-address "webmaster@x51.org") (defvar shimbun-x51-auther "X51") (defvar shimbun-x51-coding-system 'utf-8) (defvar shimbun-x51-content-start "<!-- Article -->\\|<div class=\"blogbody\">") (defvar shimbun-x51-content-end "<!---/ Article --->\\|<div class=\"comments-body\">") ;; X-Face create from banner (defvar shimbun-x51-x-face-alist '(("default" ."X-Face: \"15Ng%Hp0)P[AP!e1^W3KhKMVHC*AcXANx^CaW]\ !dzRSN]tO68A5{`1RzK`g+0Yo$0q2RFM\n 7m?9-o[R6ou-[9X$JI1HYc>A-a[+DGgI"))) (luna-define-method shimbun-groups ((shimbun shimbun-x51)) (append shimbun-x51-obsolete-groups (mapcar 'car shimbun-x51-group-alist))) (defmacro shimbun-x51-concat-url (shimbun url) `(concat (cdr (assoc (shimbun-current-group-internal ,shimbun) shimbun-x51-group-alist)) ,url)) (luna-define-method shimbun-index-url ((shimbun shimbun-x51)) (shimbun-x51-concat-url shimbun "")) (luna-define-method shimbun-get-headers :around ((shimbun shimbun-x51) &optional range) (let* ((case-fold-search t) (url (shimbun-index-url shimbun)) headers) (cond ((member (shimbun-current-group-internal shimbun) shimbun-x51-obsolete-groups) (setq headers '())) ((member (shimbun-current-group-internal shimbun) '("top" "anima" "enema")) (setq headers (luna-call-next-method))) ;; call parent method (t (let* ((pages (shimbun-header-index-pages range)) (beg (point-min)) (end (point-max)) indexes) (push (concat url "index.php?page=1") indexes) ;; push page 1 (when (if pages (< 1 pages) t) (goto-char (point-min)) (when (search-forward "<div class=\"middlebar\">" nil t) (setq beg (point))) (when (search-forward "</div>" nil t) (setq end (point))) (save-excursion (narrow-to-region beg end) (goto-char (point-min)) (let* ((count 2)) (while (and (if pages (<= count pages) t) (re-search-forward (format "<a href=\"[^?]*\\?page=%d\"" count) nil t)) ;; push linked for page 2-end (push (format "%s%s%d" url "?page=" count) indexes) (cl-incf count))) (widen))) (setq indexes (nreverse indexes)) (catch 'stop (dolist (index indexes) (erase-buffer) (shimbun-retrieve-url index t) ;; retrieve target page (goto-char (point-min)) (setq beg (point-min) end (point-max)) (when (re-search-forward "<!-- *top article *-->" nil t) (setq beg (match-end 0))) (when (re-search-forward "<!--/ *middle bar *-->" nil t) (setq end (match-beginning 0))) (save-excursion (narrow-to-region beg end) ;; get header source (goto-char (point-min)) (let (title url date id) (while (re-search-forward "<a +href=\"\\(http://x51\\.org/x/\ \\([0-9][0-9]\\)/\\([0-9][0-9]\\)/\\([0-9][0-9]\\)\\([0-9][0-9]\\)\\.php\\)\"\ +class=\"title[^\"]*\">\\([^<]*\\)</a>" nil t) (setq url (match-string-no-properties 1) title (match-string-no-properties 6) date (shimbun-make-date-string (string-to-number (match-string 2)) (string-to-number (match-string 3)) (string-to-number (match-string 4)))) (setq id (shimbun-rss-build-message-id shimbun url date)) ;; check old id (when (shimbun-search-id shimbun id) (throw 'stop nil)) ;; create header & push header (push (shimbun-create-header 0 title (shimbun-from-address shimbun) date id "" 0 0 url) headers)) (widen)))))) headers)))) ;; normalize date (defun shimbun-x51-prepare-article (shimbun header) "Adjust a date header if there's a correct information available." (let* ((case-fold-search t) (start (re-search-forward (shimbun-content-start shimbun) nil t)) (end (and start (re-search-forward (shimbun-content-end shimbun) nil t) (prog1 (match-beginning 0) (goto-char start))))) ;; Posted by : X51 | 2004年05月22日 23:15 綛贋 (when (re-search-forward "Posted by[^|]*\|\ ?\\([0-9]*\\)\\(年\\|綛\\)\ \\([0-9]*\\)\\(月\\|\\)\ \\([0-9]*\\)\\(日\\|\\)\ ?\\([012][0-9]:[0-5][0-9]\\)" end t) (shimbun-header-set-date header (shimbun-make-date-string (string-to-number (match-string 1)) (string-to-number (match-string 3)) (string-to-number (match-string 5)) (match-string 7))) (goto-char (point-min))))) (luna-define-method shimbun-make-contents :before ((shimbun shimbun-x51) header) (shimbun-x51-prepare-article shimbun header)) (luna-define-method shimbun-clear-contents :before ((shimbun shimbun-x51) header) (shimbun-strip-cr) (shimbun-remove-tags "script\\|noscript" t) (shimbun-remove-tags "\\(div\\) class=\"\\(?:notes\\|line\\|middlebar\\)\"" t)) (provide 'sb-x51) ;;; sb-x51.el ends here ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-xemacs.el����������������������������������������������������0000664�0000000�0000000�00000004051�14343750021�0021225�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-xemacs.el --- shimbun backend for xemacs.org ;; Copyright (C) 2001, 2002 Akihiro Arisawa <ari@mbf.sphere.ne.jp> ;; Copyright (C) 2001, 2002 Yuuichi Teranishi <teranisi@gohome.org> ;; Author: Akihiro Arisawa <ari@mbf.sphere.ne.jp>, ;; Yuuichi Teranishi <teranisi@gohome.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was nnshimbun.el written by ;; TSUCHIYA Masatoshi <tsuchiya@namazu.org>. ;;; Code: (require 'shimbun) (require 'sb-glimpse) (luna-define-class shimbun-xemacs (shimbun-glimpse) ()) (defvar shimbun-xemacs-url "http://list-archive.xemacs.org/") (defvar shimbun-xemacs-groups '("xemacs-announce" "xemacs-beta-ja" "xemacs-beta" "xemacs-build-reports" "xemacs-cvs" "xemacs-design" "xemacs-mule" "xemacs-nt" "xemacs-patches" "xemacs-users-ja" "xemacs")) (defvar shimbun-xemacs-coding-system 'euc-jp) (defvar shimbun-xemacs-reverse-flag nil) (defvar shimbun-xemacs-litemplate-regexp "<td><strong><a name=\"\\([0-9]+\\)\" href=\"\\(msg[0-9]+.html\\)\">\\([^<]+\\)</a></strong>\n<td><em>\\([^<]+\\)</em>") (defvar shimbun-xemacs-x-face-alist '(("default" . "X-Face: %@A&y\\ef)A6pi|q43;M>uyhO)~N\ P*fpdo0XrUuutf0|nku\\O5JV(7EG%odc'n6}G@tYRl+B\n #[n,%B\ `.sHZ5>3MZvrm%,rWE7)c}ZXjH\\>=p@AL\\y\\gyu|.lJ8B`F++86"))) (provide 'sb-xemacs) ;;; sb-xemacs.el ends here ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-yahoo-auctions.el��������������������������������������������0000664�0000000�0000000�00000005455�14343750021�0022720�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-yahoo-auctions.el --- shimbun backend for Yahoo! AUCTIONS ;; Copyright (C) 2005, 2006, 2008, 2011, 2013, 2019 ;; ARISAWA Akihiro <ari@mbf.sphere.ne.jp> ;; Author: ARISAWA Akihiro <ari@mbf.sphere.ne.jp> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-yahoo-auctions (shimbun-rss) ()) (defcustom shimbun-yahoo-auctions-group-alist nil "An alist of Yahoo! AUCTIONS group definition. Each element looks like (NAME URL). NAME is a shimbun group name. URL is the URL for category or search result." :group 'shimbun :type '(repeat (cons :format "%v" (string :tag "Group name") (string :tag "URL")))) (defvar shimbun-yahoo-auctions-content-start "<!--\nITEMSUMMARY\n-->") (defvar shimbun-yahoo-auctions-content-end "<!--\nS\n-->") (luna-define-method shimbun-groups ((shimbun shimbun-yahoo-auctions)) (mapcar 'car shimbun-yahoo-auctions-group-alist)) (luna-define-method shimbun-group-p ((shimbun shimbun-yahoo-auctions) group) t) (luna-define-method shimbun-from-address ((shimbun shimbun-yahoo-auctions)) (format "Yahoo!若激с (%s)" (shimbun-current-group shimbun))) (luna-define-method shimbun-index-url ((shimbun shimbun-yahoo-auctions)) (let* ((group (shimbun-current-group shimbun)) (elem (assoc group shimbun-yahoo-auctions-group-alist))) (if elem (cdr elem) (concat "http://search.auctions.yahoo.co.jp/search_rss?p=" (shimbun-url-encode-string group 'euc-japan))))) (luna-define-method shimbun-rss-build-message-id ((shimbun shimbun-yahoo-auctions) url date) (unless (string-match "\\([^/]+\\)\\'" url) (error "Cannot find message-id base")) (format "<%s@auctions.yahoo.co.jp>" (match-string 1 url))) (luna-define-method shimbun-get-headers ((shimbun shimbun-yahoo-auctions) &optional range) (nreverse (shimbun-rss-get-headers shimbun range t t))) (luna-define-method shimbun-article-url :around ((shimbun shimbun-yahoo-auctions) header) (shimbun-real-url (luna-call-next-method))) (provide 'sb-yahoo-auctions) ;;; sb-yahoo-auctions.el ends here �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-yahoo-sports.el����������������������������������������������0000664�0000000�0000000�00000010500�14343750021�0022410�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-yahoo-sports.el --- shimbun backend for sports.yahoo.co.jp -*- coding: utf-8 -*- ;; Copyright (C) 2005 ;; MIYOSHI Masanori <miyoshi@meadowy.org> ;; Author: MIYOSHI Masanori <miyoshi@meadowy.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was sb-yahoo.el which is written by ;; Kazuyoshi KOREEDA <Kazuyoshi.Koreeda@rdmg.mgcs.mei.co.jp> ;;; Code: (require 'shimbun) (luna-define-class shimbun-yahoo-sports (shimbun) ()) (defvar shimbun-yahoo-sports-url "http://sports.yahoo.co.jp/") (defvar shimbun-yahoo-sports-groups-alist '(("baseball" "npb" "http://sports.yahoo.co.jp") ("keiba" "horse" "http://keiba.yahoo.co.jp") ("F1" "f1" "http://sports.yahoo.co.jp") ("NBA" "nba" "http://sports.yahoo.co.jp") ("NFL" "nfl" "http://sports.yahoo.co.jp") ("rugby" "rugby" "http://sports.yahoo.co.jp"))) (defvar shimbun-yahoo-sports-groups (mapcar 'car shimbun-yahoo-sports-groups-alist)) (defvar shimbun-yahoo-sports-from-address "webmaster@sports.yahoo.co.jp") (defvar shimbun-yahoo-sports-content-start "<!-+ ?PHOTO\\( MODULE \\)?-+>\\(.\\|\n\\)+<!-+ ?/?PHOTO\\( MODULE \\)?-+>\n+") (defvar shimbun-yahoo-sports-content-end "\n+\\(</font>\\(</td></tr></table>\\|\n+<p>\\)\\|</body>\\)") (defvar shimbun-yahoo-sports-x-face-alist '(("default" . "X-Face: \"Qj}=TahP*`:b#4o_o63:I=\"~wbql=kpF1a>Sp62\ fpAsVY`saZV[b*GqI!u|i|xKPjNh&P=\n R?n}rh38mkp_:')h=Bh:Rk>0pYF\\I?f\\\ PvPs3>/KG:03n47U?FC[?DNAR4QAQxE3L;m!L10OM$-]kF\n YD\\]-^qzd#'{(o2cu,\ (}CMi|3b9JDQ(^D\\:@DE}d2+0S2G{VS@E*1Og7Vj#35[77\"z9XBq9$1uF$+W\n u"))) (defvar shimbun-yahoo-sports-expiration-days 7) (defun shimbun-yahoo-sports-get-base-url (group) (nth 2 (assoc group shimbun-yahoo-sports-groups-alist))) (luna-define-method shimbun-index-url ((shimbun shimbun-yahoo-sports)) (let ((group (shimbun-current-group-internal shimbun))) (concat (nth 2 (assoc group shimbun-yahoo-sports-groups-alist)) "/hl?c=" (nth 1 (assoc group shimbun-yahoo-sports-groups-alist)) "&p=0"))) (luna-define-method shimbun-get-headers ((shimbun shimbun-yahoo-sports) &optional range) (let ((case-fold-search t) headers) (catch 'stop (while t (while (re-search-forward "<a href=\\(/hl\\?c=[^&]+&a=\\([0-9][0-9][0-9][0-9]\\)\\([0-9][0-9]\\)\\([0-9][0-9]\\)-\\([0-9]+\\)-[^>]+\\)>\\([^<]+\\)</a>.+\\([0-9][0-9]\\):\\([0-9][0-9]\\)" nil t) (let ((url (match-string 1)) (year (match-string 2)) (month (match-string 3)) (day (match-string 4)) (no (match-string 5)) (subject (match-string 6)) (hour (string-to-number (match-string 7))) (min (string-to-number (match-string 8))) id time) (setq id (format "<%s%s%s%s.%s@sports.yahoo.co.jp>" year month day no (shimbun-current-group-internal shimbun))) (if (shimbun-search-id shimbun id) (throw 'stop nil)) (setq time (format "%02d:%02d" hour min)) (push (shimbun-make-header 0 subject (shimbun-from-address shimbun) (shimbun-make-date-string (string-to-number year) (string-to-number month) (string-to-number day) time) id "" 0 0 (concat (shimbun-yahoo-sports-get-base-url (shimbun-current-group-internal shimbun)) url)) headers))) (if (re-search-forward "<a href=\\(/hl\\?c=[^&]+&[^>]+\\)>罨<若</a>" nil t) (progn (shimbun-retrieve-url (prog1 (concat (shimbun-yahoo-sports-get-base-url (shimbun-current-group-internal shimbun)) (match-string 1)) (erase-buffer)) t) (goto-char (point-min))) (throw 'stop nil)))) headers)) (provide 'sb-yahoo-sports) ;;; sb-yahoo-sports.el ends here ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-yahoo.el�����������������������������������������������������0000664�0000000�0000000�00000026445�14343750021�0021077�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-yahoo.el --- shimbun backend for news.yahoo.co.jp -*- coding: utf-8 -*- ;; Copyright (C) 2001-2003, 2005-2007, 2009, 2010, 2019 Kazuyoshi KOREEDA ;; Author: Kazuyoshi KOREEDA <Koreeda.Kazuyoshi@jp.panasonic.com>, ;; Katsumi Yamaoka <yamaoka@jpl.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was sb-asahi.el which is written by ;; TSUCHIYA Masatoshi <tsuchiya@namazu.org> and ;; Yuuichi Teranishi <teranisi@gohome.org> ;;; Code: (require 'shimbun) (luna-define-class shimbun-yahoo (shimbun) ()) (defvar shimbun-yahoo-prefer-text-plain nil "*Non-nil means prefer text/plain articles rather than html articles.") (defvar shimbun-yahoo-url "http://headlines.yahoo.co.jp/") (defvar shimbun-yahoo-groups-table (let* ((s0 "[\t\n ]*") (s1 "[\t\n ]+") (default (list (concat "<a" s1 "href=\"\\(?:[^\"]+\\)?" ;; 1. url "\\(http://headlines\\.yahoo\\.co\\.jp/hl\\?a=" ;; 2. serial number "\\(" ;; 3. year "\\(20[0-9][0-9]\\)" ;; 4. month "\\([01][0-9]\\)" ;; 5. day "\\([0-3][0-9]\\)" "[^\"]*\\)\\)" "\"" s0 ">" s0 "\\(?:<strong>" s0 "\\)?" ;; 6. subject "\\([^<]+\\)" "\\(?:" s0 "</strong>\\)?" s0 "</a>\\(?:\\(?:[^\n<鐚]*\\|[\t\n ]*\\)<[^>]+>\\)*" s0 "\\(?:鐚" s0 "\\(?:<a" s1 "[^>]+>" s0 "\\)?" ;; 7. source "\\([^<鐚]+\\)" s0 "\\(?:</a>" s0 "\\)?" s0 "鐚" "\\(?:" s0 "-\\(?:[^<]+)\\)?\ \\|" s0 "\\(?:<[^>]+>" s0 "\\)?\ \\(?:[01]?[0-9]\\)?[0-3]?[0-9]\\(?:([ユ羂贋])\\)?\\)?\ \\|[01]?[0-9][0-3]?[0-9]\\(?:([ユ羂贋])\\)?\\)" s0 ;; 8. hour "\\([012]?[0-9]\\)" s0 "" s0 ;; 9. minute "\\([0-5]?[0-9]\\)" s0 "" "\\(?:\\(?:" s0 "</[^>]+>\\)?[^<]+<a" s1 "href=\"[^\">]+\">" s0 ;; 10. source "\\([^<鐚]+\\)" s0 "</a>\\)?") 1 2 3 4 5 6 7 8 9 10)) (topnews (list (concat "<a" s1 "href=\"" ;; 1. url "\\(http://headlines\\.yahoo\\.co\\.jp/hl\\?a=" ;; 2. serial number "\\(" ;; 3. year "\\(20[0-9][0-9]\\)" ;; 4. month "\\([01][0-9]\\)" ;; 5. day "\\([0-3][0-9]\\)" "[^\"]*\\)\\)" "\"" s0 ">" s0 ;; 6. subject "\\([^<]+\\)" s0 "</a>\\(?:" s0 "<[^>]+>\\)+" s0 ;; 7. source "\\([^<]+\\)" ".+)" s0 ;; 8. hour "\\([012]?[0-9]\\)" s0 "" s0 ;; 9. minute "\\([0-5]?[0-9]\\)" s0 "篆") 1 2 3 4 5 6 7 8 9))) `(("topnews" "" "topnews" ,@topnews) ("news" "ャ若" news ,@default) ("politics" "炊音" "pol" ,@default) ("society" "腓鞘" "soci" ,@default) ("people" "篋" "peo" ,@default) ("business-all" "腟羝膩" "bus_all" ,@default) ("market" "絽羈" "brf" ,@default) ("stock" "綣" "biz" ,@default) ("industry" "fキ" "ind" ,@default) ("international" "羌桁" "int" ,@default) ("entertainment" "潟帥若ゃ潟<潟" "ent" ,@default) ("sports" "鴻若" "spo" ,@default) ("computer" "潟潟ャ若" "sci" ,@default) ("zenkoku" "" "loc" ,@default) ("hokkaido" "羌潔" "hok" ,@default) ("aomori" "罍" "l02" ,@default) ;; not "102" but "l02" ;-) ("iwate" "絏" "l03" ,@default) ("miyagi" "絎" "l04" ,@default) ("akita" "腱" "l05" ,@default) ("yamagata" "絮怨就" "l06" ,@default) ("fukushima" "胼鎤" "l07" ,@default) ("tokyo" "延根" "l13" ,@default) ("kanagawa" "腑絅綏" "l14" ,@default) ("chiba" "" "l12" ,@default) ("saitama" "主" "l11" ,@default) ("ibaraki" "" "l08" ,@default) ("tochigi" "" "l09" ,@default) ("gunma" "臂らΜ" "l10" ,@default) ("yamanashi" "絮掩※" "l19" ,@default) ("nagano" "潔" "l20" ,@default) ("niigata" "井" "l15" ,@default) ("toyama" "絲絮" "l16" ,@default) ("ishikawa" "喝" "l17" ,@default) ("fukui" "胼鋋" "l18" ,@default) ("aichi" "" "l23" ,@default) ("gifu" "絏" "l21" ,@default) ("shizuoka" "絏" "l22" ,@default) ("mie" "筝" "l24" ,@default) ("osaka" "紊ч" "l27" ,@default) ("hyogo" "球昆" "l28" ,@default) ("kyoto" "篋" "l26" ,@default) ("shiga" "羯莖" "l25" ,@default) ("nara" "絅" "l29" ,@default) ("wakayama" "罩絮" "l30" ,@default) ("tottori" "薐ュ" "l31" ,@default) ("shimane" "絣倶" "l32" ,@default) ("okayama" "絏≦臼" "l33" ,@default) ("hiroshima" "綺絣" "l34" ,@default) ("yamaguchi" "絮怨" "l35" ,@default) ("tokushima" "緇喝涯" "l36" ,@default) ("kagawa" "薤綏" "l37" ,@default) ("ehime" "紵" "l38" ,@default) ("kochi" "蕭" "l39" ,@default) ("fukuoka" "胼鎣" "l40" ,@default) ("saga" "篏莖" "l41" ,@default) ("nagasaki" "桁" "l42" ,@default) ("kumamoto" "" "l43" ,@default) ("oita" "紊у" "l44" ,@default) ("miyazaki" "絎經" "l45" ,@default) ("kagoshima" "藕水絣" "l46" ,@default) ("okinawa" "羃膰" "oki" ,@default))) "Alist of group names, their Japanese translations, index pages, regexps and numbers. Where numbers point to the search result in order of [0]url, [1]serial number, [2]year, [3]month, [4]day, [5]subject, [6]news source, [7]hour, [8]minute, and [9]news source (the last one may not be presented).") (defvar shimbun-yahoo-groups (mapcar 'car shimbun-yahoo-groups-table)) (defvar shimbun-yahoo-from-address "nobody@example.com") (defvar shimbun-yahoo-content-start "[012]?[0-9][0-5]?[0-9]篆[\t\n\r ]*\\(?:</[^>]+>[\t\n\r ]*\\)*") (defvar shimbun-yahoo-content-end "[\t\n\r ]*\\(<br>[\t\n\r ]*\\)*\ <!-+[\t\n\r ]*interest_match_relevant_zone_end[\t\n\r ]*-+>") (defvar shimbun-yahoo-x-face-alist '(("default" . "X-Face: \"Qj}=TahP*`:b#4o_o63:I=\"~wbql=kpF1a>Sp62\ fpAsVY`saZV[b*GqI!u|i|xKPjNh&P=\n R?n}rh38mkp_:')h=Bh:Rk>0pYF\\I?f\\\ PvPs3>/KG:03n47U?FC[?DNAR4QAQxE3L;m!L10OM$-]kF\n YD\\]-^qzd#'{(o2cu,\ (}CMi|3b9JDQ(^D\\:@DE}d2+0S2G{VS@E*1Og7Vj#35[77\"z9XBq9$1uF$+W\n u"))) (defvar shimbun-yahoo-expiration-days 7) (luna-define-method shimbun-index-url ((shimbun shimbun-yahoo)) ;;;<DEBUG> ;; (shimbun-yahoo-index-url shimbun)) ;; ;;(defun shimbun-yahoo-index-url (shimbun) ;;;</DEBUG> (let ((group (shimbun-current-group-internal shimbun)) (url (shimbun-url-internal shimbun))) (if (string-equal group "news") (concat url "hl") (format "%shl?c=%s&t=l" url (nth 2 (assoc group shimbun-yahoo-groups-table)))))) (luna-define-method shimbun-get-headers ((shimbun shimbun-yahoo) &optional range) ;;;<DEBUG> ;; (shimbun-yahoo-get-headers shimbun range)) ;; ;;(defun shimbun-yahoo-get-headers (shimbun range) ;;;</DEBUG> (let* ((case-fold-search t) (from "Yahoo!ャ若") (group (shimbun-current-group-internal shimbun)) (numbers (cdr (assoc group shimbun-yahoo-groups-table))) (jname (pop numbers)) (regexp (progn (setq numbers (cdr numbers)) (pop numbers))) (pages (shimbun-header-index-pages range)) (count 0) (index (shimbun-index-url shimbun)) id headers start) (catch 'stop (while t (if (string-equal group "news") (progn (when (and (re-search-forward "<!-+[\t\n ]*main[\t\n ]+start[\t\n ]*-+>" nil t) (progn (setq start (match-end 0)) (re-search-forward "<!-+[\t\n ]*main[\t\n ]+end[\t\n ]*-+>" nil t))) (delete-region (match-beginning 0) (point-max)) (delete-region (point-min) start) (goto-char (point-min))) (when (and (re-search-forward ">[\t\n ]*ャ若[\t\n ]*</a>\ \\(?:[\t\n ]*</[^>]+>\\)+[\y\n ]*\\(<div[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*\ class=\"ymuiContainer\"\\)" nil t) (shimbun-end-of-tag "div")) (delete-region (match-beginning 0) (match-end 0)))) (shimbun-remove-tags "<!-+[\t\n ]*≪祉鴻潟潟[\t\n ]*-+>" "<!-+[\t\n ]*/≪祉鴻潟潟[\t\n ]*-+>")) (goto-char (point-min)) (while (re-search-forward regexp nil t) (setq id (concat "<" (save-match-data (replace-regexp-in-string "-" "." (match-string (nth 1 numbers)))) "%" group ".headlines.yahoo.co.jp>")) (unless (and (shimbun-search-id shimbun id) (if (and (>= count 1) ;; We're in the next page. ;; Stop fetching iff range is not specified. (not pages)) (throw 'stop nil) t)) (if (save-match-data (string-match "荐篋[\t\n ]*\\'" (match-string (nth 5 numbers)))) (goto-char (match-end (nth 5 numbers))) (push (shimbun-create-header 0 (match-string (nth 5 numbers)) (concat from " (" jname "/" (or (match-string (nth 6 numbers)) (match-string (nth 9 numbers))) ")") (shimbun-make-date-string (string-to-number (match-string (nth 2 numbers))) (string-to-number (match-string (nth 3 numbers))) (string-to-number (match-string (nth 4 numbers))) (format "%02d:%02d" (string-to-number (match-string (nth 7 numbers))) (string-to-number (match-string (nth 8 numbers))))) id "" 0 0 (match-string (nth 0 numbers))) headers)))) (setq count (1+ count)) (goto-char (point-min)) (cond ((and pages (>= count pages)) (throw 'stop nil)) ((string-equal group "news") (if (>= count 2) (throw 'stop nil) (erase-buffer) (shimbun-retrieve-url "http://headlines.yahoo.co.jp/hl?c=flash" t))) ((re-search-forward "<a href=\"\\([^\"]+\\)\">罨<若</a>" nil t) (shimbun-retrieve-url (prog1 (match-string 1) (erase-buffer)) t)) ((and (re-search-forward "<!-+[\t\n ]*サ荐篋[\t\n ]*-+>" nil t) (progn (setq start (match-end 0)) (re-search-forward "<!-+[\t\n ]*/サ荐篋[\t\n ]*-+>" nil t)) (progn (narrow-to-region start (match-beginning 0)) (goto-char start) (or (re-search-forward "<option[\t\n ]+value=\"\ 20[0-9][0-9][01][0-9][0-3][0-9]\"[\t\n ]+selected[\t\n ]*>" nil t) (re-search-forward "<option[\t\n ]+value=\"\ 20[0-9][0-9][01][0-9][0-3][0-9]\"[\t\n ]*>" nil t))) (re-search-forward "<option[\t\n ]+value=\"\ \\(20[0-9][0-9][01][0-9][0-3][0-9]\\)\"[\t\n ]*>" nil t)) (shimbun-retrieve-url (prog1 (concat index "&d=" (match-string 1)) (erase-buffer)) t)) (t (throw 'stop nil))))) (shimbun-sort-headers headers))) (provide 'sb-yahoo) ;;; sb-yahoo.el ends here ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-yomiuri-html.el����������������������������������������������0000664�0000000�0000000�00000002772�14343750021�0022414�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-yomiuri-html.el --- shimbun backend for yomiuri online (HTML version) ;; Copyright (C) 2001, 2002, 2003, 2005 Yuuichi Teranishi <teranisi@gohome.org> ;; Author: Yuuichi Teranishi <teranisi@gohome.org>, ;; Katsumi Yamaoka <yamaoka@jpl.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; This module is now semi-obsolete. You can use sb-yomiuri.el to read ;; html articles by putting the following line in your init file. ;; ;;(setq shimbun-yomiuri-prefer-text-plain nil) ;;; Code: (require 'sb-yomiuri) (luna-define-class shimbun-yomiuri-html (shimbun-yomiuri) ()) (defconst shimbun-yomiuri-html-prefer-text-plain nil "Non-nil means prefer text/plain articles rather than html articles.") (provide 'sb-yomiuri-html) ;;; sb-yomiuri-html.el ends here ������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-yomiuri.el���������������������������������������������������0000664�0000000�0000000�00000064443�14343750021�0021455�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-yomiuri.el --- shimbun backend for www.yomiuri.co.jp ;; Copyright (C) 2001-2008, 2017, 2019, 2020 ;; Author: TSUCHIYA Masatoshi <tsuchiya@namazu.org>, ;; Yuuichi Teranishi <teranisi@gohome.org>, ;; Katsumi Yamaoka <yamaoka@jpl.org> ;; Keywords: news ;;; Copyright: ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was nnshimbun.el written by ;; TSUCHIYA Masatoshi <tsuchiya@namazu.org>. ;;; Code: (require 'shimbun) (luna-define-class shimbun-yomiuri (shimbun-japanese-newspaper shimbun) ()) (defvar shimbun-yomiuri-prefer-text-plain t "*Non-nil means prefer text/plain articles rather than html articles.") (defvar shimbun-yomiuri-top-level-domain "yomiuri.co.jp" "Name of the top level domain for the Yomiuri On-line.") (defvar shimbun-yomiuri-url (concat "http://www." shimbun-yomiuri-top-level-domain "/") "Name of the parent url.") (defvar shimbun-yomiuri-group-table (let* ((s0 "[\t\n ]*") (s1 "[\t\n ]+") (default (list (concat "<a" s1 "href=\"/" ;; 1. url "\\(%s/news/" ;; 2. serial number[1] "\\(" ;; 3. year "\\(20[0-9][0-9]\\)" "[01][0-9][0-3][0-9]\\)" ;; 4. serial number[2] "\\([^.]+\\)" "[^\"]+\\)" "\"[^>]*>" s0 ;; 5. subject "\\([^<]+\\)" s0 "</a>[^<鐚]*鐚" s0 ;; 6. month "\\([01]?[0-9]\\)" s0 "" s0 ;; 7. day "\\([0-3]?[0-9]\\)" s0 "" s0 ;; 8. hour:minute "\\([012][0-9]:[0-5][0-9]\\)") 1 2 4 3 5 6 7 8)) (default2 (list (concat "<a" s1 "href=\"/" ;; 1. url "\\(%s/" ;; 2. serial number[1] "\\(" ;; 3. year "\\(20[0-9][0-9]\\)" "[01][0-9][0-3][0-9]\\)" ;; 4. serial number[2] "\\([^.]+\\)" "[^\"]+\\)" "\"[^>]*>" s0 ;; 5. subject "\\([^<]+\\)" s0 "</a>" s0 "<span" s1 "class=\"date\">" "\\(?:" s0 "<span" s1 "[^>]+>[^<]+</span>\\)?" s0 "<span" s1 "class=\"m\">" s0 ;; 6. month "\\([01]?[0-9]\\)" s0 "" s0 "</span>" s0 "<span" s1 "class=\"d\">" s0 ;; 7. day "\\([0-3]?[0-9]\\)" s0 "" s0 "</span>") 1 2 4 3 5 6 7)) (kyoiku (cons (format (car default2) "kyoiku\\(?:/[^\"./]+\\)+") (cdr default2)))) `(("atmoney" "若紫羝") ("editorial" "腓乗祉潟" "" ,(concat "<a" s1 "href=\"/" ;; 1. url "\\(%s/news/" ;; 2. serial number[1] "\\(" ;; 3. year "\\(20[0-9][0-9]\\)" "[01][0-9][0-3][0-9]\\)" ;; 4. serial number[2] "\\([^.]+\\)" "[^\"]+\\)" "\"[^>]*>" s0 ;; 5. month ;; 6. ja month "\\(?:\\([01]?[0-9]\\)\\|\\([鐚鐚]?[鐚-鐚]\\)\\)" "" ;; 7. day ;; 8. ja day "\\(?:\\([0-3]?[0-9]\\)\\|\\([鐚-鐚]?[鐚-鐚]\\)\\)" "ヤ[\t\n ]*" ;; 9. subject "\\([^<]+\\)" s0) 1 2 4 3 9 5 7 nil 6 8) ("entertainment" "潟帥若ゃ潟<潟") ("iryou" "紫篁茘" "news/" ,(concat ">" s0 ;; 1. ja genre "\\(\\cj+\\)" "[^<]*</a>[^<]*<a" s1 "href=\"/" ;; 2. url "\\(%s/news/" ;; 3. genre "\\([^_]+\\)" "_news/" ;; 4. serial number[1] "\\(" ;; 5. year "\\(20[0-9][0-9]\\)" ;; 6. month "\\([01][0-9]\\)" ;; 7. day "\\([0-3][0-9]\\)" "\\)" ;; 8. serial number[2] "\\([^.]+\\)" "[^\"]+\\)" "\"[^>]*>" s0 ;; 9. subject "\\([^<]+\\)" s0) 2 4 8 5 9 6 7 nil nil nil 3 1) ("kyoiku" "" "" ,@kyoiku) ("kyoiku.children" "") ("kyoiku.english" "沿" "http://www.yomiuri.co.jp/kyoiku/learning/english/" ,@kyoiku) ("kyoiku.qanda" "Q&A") ("kyoiku.renaissance" "蚊泣潟" "http://www.yomiuri.co.jp/kyoiku/renai/") ("kyoiku.special" "拷") ("national" "腓鞘" "" ,@default) ("politics" "炊音" "" ,@default) ("science" "腱絖" "" ,@default) ("sports" "鴻若" "" ,(concat "<a" s1 "href=\"/" ;; 1. url "\\(%s/" ;; 2. genre "\\([^/]+\\)" "/news/" ;; 3. serial number[1] "\\(" ;; 4. year "\\(20[0-9][0-9]\\)" "[01][0-9][0-3][0-9]\\)" ;; 5. serial number[2] "\\([^.]+\\)" "[^\"]+\\)" "\"[^>]*>" s0 ;; 6. subject "\\([^<]+\\)" "\\(?:" s0 "<img" s0 "[^>]+>\\)?" s0 "</a>[^<鐚]*鐚" s0 ;; 7. month "\\([01]?[0-9]\\)" s0 "" s0 ;; 8. day "\\([0-3]?[0-9]\\)" s0 "" s0 ;; 9. hour:minute "\\([012][0-9]:[0-5][0-9]\\)") 1 3 5 4 6 7 8 9 nil nil 2) ("world" "初" "" ,@default))) "Alist of group names, their Japanese translations, index pages, regexps and numbers. Regexp may contain the \"%s\" token which is replaced with a regexp-quoted group name. Numbers point to the search result in order of [0]url, [1,2]serial numbers, [3]year, [4]subject, [5]month, [6]day, [7]hour:minute, [8]ja month, [9]ja day, [10]genre and [11]ja genre.") (defvar shimbun-yomiuri-subgroups-alist (let* ((s0 "[\t\n ]*") (s1 "[\t\n ]+") (default (list (concat "<a" s1 "href=\"/" ;; 1. url "\\(%s/" ;; 2. serial number[1] "\\(" ;; 3. year "\\(20[0-9][0-9]\\)" "[01][0-9][0-3][0-9]\\)" ;; 4. serial number[2] "\\([^.]+\\)" "[^\"]+\\)" "\"[^>]*>" s0 ;; 5. subject "\\([^<]+\\)" s0 "</a>[^<鐚]*鐚" s0 ;; 6. month "\\([01]?[0-9]\\)" s0 "" s0 ;; 7. day "\\([0-3]?[0-9]\\)" s0 "\\(?:" s0 ;; 8. hour:minute "\\([012][0-9]:[0-5][0-9]\\)\\)?") 1 2 4 3 5 6 7 8)) (default2 (list (concat "<a" s1 "href=\"/" ;; 1. url "\\(%s/" ;; 2. serial number[1] "\\(" ;; 3. year "\\(20[0-9][0-9]\\)" ;; 4. month "\\([01][0-9]\\)" ;; 5. day "\\([0-3][0-9]\\)" "\\)" ;; 6. serial number[2] "\\([^.]+\\)" "[^\"]+\\)" "\"[^>]*>" s0 ;; 7. subject "\\([^<]+\\)" s0) 1 2 6 3 7 4 5)) (default3 (list (concat "<a" s1 "href=\"/" ;; 1. url "\\(%s/" ;; 2. genre "\\([^/]+\\)" "/" ;; 3. serial number[1] "\\(" ;; 4. year "\\(20[0-9][0-9]\\)" ;; 5. month "\\([01][0-9]\\)" ;; 6. day "\\([0-3][0-9]\\)" "\\)" ;; 7. serial number[2] "\\([^.]+\\)" "[^\"]+\\)" "\"[^>]*>" s0 ;; 8. subject "\\([^<]+\\)" s0) 1 3 7 4 8 5 6 nil nil nil 2)) (default4 (list (concat "<a" s1 "href=\"/" ;; 1. url "\\(%s/" ;; 2. serial number[1] "\\(" ;; 3. year "\\(20[0-9][0-9]\\)" "[01][0-9][0-3][0-9]\\)" ;; 4. serial number[2] "\\([^.]+\\)" "[^\"]+\\)" "\"[^>]*>" s0 ;; 5. subject "\\([^<]+\\)" s0 "</a>" s0 "<span" s1 "class=\"date\">" "\\(?:" s0 "<span" s1 "[^>]+>[^<]+</span>\\)?" s0 "<span" s1 "class=\"m\">" s0 ;; 6. month "\\([01]?[0-9]\\)" s0 "" s0 "</span>" s0 "<span" s1 "class=\"d\">" s0 ;; 7. day "\\([0-3]?[0-9]\\)" s0 "" s0 "</span>") 1 2 4 3 5 6 7)) (entertainment (list (concat "alt=\"" ;; 1. ja genre "\\([^\"]+\\)" "\"[^>]+>" s0 "</a>\\(?:" s0 "</[^>]+>\\)?[^<]*<a" s1 "href=\"/" ;; 2. url "\\(entertainment/%s/" ;; 3. genre "\\([^/]+\\)" "/" ;; 4. serial number[1] "\\(" ;; 5. year "\\(20[0-9][0-9]\\)" "[01][0-9][0-3][0-9]\\)" ;; 6. serial number[2] "\\([^.]+\\)" "[^\"]+\\)" "\"[^>]*>" s0 ;; 7. subject "\\([^<]+\\)" s0 "</a>[^<鐚]*鐚" s0 ;; 8. month "\\([01]?[0-9]\\)" s0 "" s0 ;; 9. day "\\([0-3]?[0-9]\\)" s0 "") 2 4 6 5 7 8 9 nil nil nil 3 1))) `(("atmoney" ("絎" "lottery" "http://www.yomiuri.co.jp/atmoney/lottery/" ,(format (car default2) "atmoney/lottery") ,@(cdr default2)) ("ャ若" "mnews" "http://www.yomiuri.co.jp/atmoney/mnews/" ,(format (car default) "atmoney/mnews") ,@(cdr default)) ("腟羝ャ若" "news" "http://www.yomiuri.co.jp/atmoney/news/" ,(format (car default) "atmoney/news") ,@(cdr default)) ("域遵" "pnews" "http://www.yomiuri.co.jp/atmoney/pnews/" ,(format (car default) "atmoney/pnews") ,@(cdr default))) ("entertainment" ("" nil "http://www.yomiuri.co.jp/entertainment/cinema/" ,(format (car entertainment) "cinema") ,@(cdr entertainment)) ("鐔鐔鐔鐔鐔" "donna" "http://www.yomiuri.co.jp/donna/" ,(concat "<a" s1 "href=\"/" ;; 1. url "\\(donna/" ;; 2. serial number[1] "\\(do\\)" "_" ;; 3. serial number[2] "\\(" ;; 4. year "\\([0-9][0-9]\\)" ;; 5. month "\\([01][0-9]\\)" ;; 6. day "\\([0-3][0-9]\\)" "\\)" "[^\"]+\\)" "[^>]*>" s0 ;; 7. subject "\\([^<]+\\)") 1 2 3 4 7 5 6) ("DVD" "dvd" "http://www.yomiuri.co.jp/entertainment/cinema/dvd/" ,(format (car default) "entertainment/cinema/dvd") ,@(cdr default)) ("吾c宴" "ghibli" "http://www.yomiuri.co.jp/entertainment/ghibli/" ,(concat "<a" s1 "href=\"" ;; 1. url "\\(cnt_" ;; 2. genre "\\([^_]+\\)" "_" ;; 3. serial number[1] "\\(20[0-9][0-9][01][0-9][0-3][0-9]\\)" ;; 4. serial number[2] "\\([^.]+\\)" "[^\"]+\\)" "[^>]*>" s0 ;; 5. subject "\\([^<]+\\)" "</a>" s0 "鐚" ;; 6. year "\\(20[0-9][0-9]\\)" "綛" ;; 7. month "\\([01]?[0-9]\\)" "" ;; 8. day "\\([0-3]?[0-9]\\)" "") 1 3 4 6 5 7 8 nil nil nil 2) ("吟若脂え" "heather" "http://www.yomiuri.co.jp/entertainment/heather/" ,(format (car entertainment) "heather") ,@(cdr entertainment)) ("恰ソ" "music" "http://www.yomiuri.co.jp/entertainment/music/" ,(format (car default3) "entertainment/music") ,@(cdr default3)) ("ャ若" "news" "http://www.yomiuri.co.jp/entertainment/news/" ,(format (car default) "entertainment/news") ,@(cdr default)) ("" "stage" "http://www.yomiuri.co.jp/entertainment/stage/" ,(format (car entertainment) "stage") ,@(cdr entertainment)) ("鐚器雫" "tv" "http://www.yomiuri.co.jp/entertainment/tv/" ,(format (car default) "entertainment/tv") ,@(cdr default)) ("鐚刻鐚鴻" "yy" "http://www.yomiuri.co.jp/entertainment/yy/" ,(format (car default3) "entertainment/yy") ,@(cdr default3))) ("kyoiku" ("ャ若" nil "http://www.yomiuri.co.jp/kyoiku/news/" ,(format (car default4) "kyoiku/news") ,@(cdr default4)) ("画" nil "http://www.yomiuri.co.jp/kyoiku/news2/06.htm" ,(format (car default4) "kyoiku/news2") ,@(cdr default4)) ("潟c≪祉篁" nil "http://www.yomiuri.co.jp/kyoiku/news2/08.htm" ,(format (car default4) "kyoiku/news2") ,@(cdr default4))) ("kyoiku.children" ("鐚咲篆" "jkids" "http://www.yomiuri.co.jp/kyoiku/children/jkids/" ,(format (car default4) "kyoiku/children/jkids") ,@(cdr default4)) ("絖綽" "kodomo.hagukumu" "http://www.yomiuri.co.jp/kyoiku/hagukumu/kodomo/" ,(format (car default4) "kyoiku/hagukumu/kodomo") ,@(cdr default4)) ("ャ若鴻c若" "weekly" "http://www.yomiuri.co.jp/kyoiku/children/weekly/" ,(format (car default4) "kyoiku/children/weekly") ,@(cdr default4))) ("kyoiku.qanda" ("牙梧" "consul" "http://www.yomiuri.co.jp/kyoiku/qanda/consul/" ,(format (car default4) "kyoiku/qanda/consul") ,@(cdr default4)) ("帥≧眼" "worries" "http://www.yomiuri.co.jp/kyoiku/qanda/worries/" ,(format (car default4) "kyoiku/qanda/worries") ,@(cdr default4))) ("kyoiku.special" ("薑鐚¥滋鐚" "s06" "http://www.yomiuri.co.jp/kyoiku/special/s06/" ,(format (car default4) "kyoiku/special/s06") ,@(cdr default4))) ("national" ("" "culture" "http://www.yomiuri.co.jp/national/culture/" ,(format (car default) "national/culture/news") ,@(cdr default)) ("" "obit" "http://www.yomiuri.co.jp/national/obit/" ,(format (car default2) "national/obit/news") ,@(cdr default2))) ("sports" ("祉" "etc" "http://www.yomiuri.co.jp/sports/etc/" ,(format (car default) "sports/etc/news") ,@(cdr default)) ("眼" "golf" "http://www.yomiuri.co.jp/sports/golf/" ,(format (car default) "sports/golf/news") ,@(cdr default)) ("紊с若" "mlb" "http://www.yomiuri.co.jp/sports/mlb/" ,(format (car default) "sports/mlb/news") ,@(cdr default)) ("" "npb" "http://www.yomiuri.co.jp/sports/npb/" ,(format (car default) "sports/npb/news") ,@(cdr default)) ("泣" "soccer" "http://www.yomiuri.co.jp/sports/soccer/" ,(format (car default) "sports/soccer/news") ,@(cdr default)) ("延根紊у07" "ubb07" "http://www.yomiuri.co.jp/sports/ubb07/" ,(format (car default) "sports/ubb07/news") ,@(cdr default))))) "Alist of parent groups and lists of subgenres and tables for subgroups. Each table is the same as the `cdr' of the element of `shimbun-yomiuri-group-table'.") (defvar shimbun-yomiuri-content-start "\n<!--// contents_area_start //-->\n\ \\|\n<!--// article_start //-->\n\ \\|\n<!-- 弱若 -->\n\ \\|\n<!-- honbun start -->\n") (defvar shimbun-yomiuri-content-end "\n<!--// contents_area_end //-->\n\ \\|\n<!--// article_end //-->\n\ \\|\n<!-- honbun end -->\n") (defvar shimbun-yomiuri-text-content-start "\n<!--// contents_area_start //-->\n\ \\|\n<!--// article_start //-->\n\ \\|\n<!-- honbun start -->\n") (defvar shimbun-yomiuri-text-content-end shimbun-yomiuri-content-end) (defvar shimbun-yomiuri-x-face-alist '(("default" . "X-Face: #sUhc'&(fVr$~<rt#?PkH,u-.fV(>y)\ i\"#,TNF|j.dEh2dAzfa4=IH&llI]S<-\"dznMW2_j\n [N1a%n{SU&E&\ Ex;xlc)9`]D07rPEsbgyjP@\"_@g-kw!~TJNilrSC!<D|<m=%Uf2:eebg"))) (defvar shimbun-yomiuri-expiration-days 7) (luna-define-method initialize-instance :after ((shimbun shimbun-yomiuri) &rest init-args) (shimbun-set-server-name-internal shimbun "莅紕我域") (shimbun-set-from-address-internal shimbun "nobody@example.com") ;; To share class variables between `shimbun-yomiuri' and its ;; successor `shimbun-yomiuri-html'. (shimbun-set-x-face-alist-internal shimbun shimbun-yomiuri-x-face-alist) (shimbun-set-expiration-days-internal shimbun shimbun-yomiuri-expiration-days) (shimbun-set-content-start-internal shimbun shimbun-yomiuri-content-start) (shimbun-set-content-end-internal shimbun shimbun-yomiuri-content-end) shimbun) (luna-define-method shimbun-groups ((shimbun shimbun-yomiuri)) (mapcar 'car shimbun-yomiuri-group-table)) (luna-define-method shimbun-current-group-name ((shimbun shimbun-yomiuri)) (nth 1 (assoc (shimbun-current-group-internal shimbun) shimbun-yomiuri-group-table))) (luna-define-method shimbun-index-url ((shimbun shimbun-yomiuri)) (let* ((group (shimbun-current-group-internal shimbun)) (index (nth 2 (assoc group shimbun-yomiuri-group-table)))) (cond ((not index) "about:blank") ((string-match "\\`http:" index) index) (t (concat shimbun-yomiuri-url group "/" index))))) (defun shimbun-yomiuri-japanese-string-to-number (string) "Convert a Japanese zenkaku number to just a number." (let ((alist '((?鐚 . 0) (?鐚 . 1) (?鐚 . 2) (?鐚 . 3) (?鐚 . 4) (?鐚 . 5) (?鐚 . 6) (?鐚 . 7) (?鐚 . 8) (?鐚 . 9))) (len (length string)) (idx 0) (num 0)) (while (< idx len) (setq num (+ (cdr (assq (aref string idx) alist)) (* num 10)) idx (1+ idx))) num)) (defun shimbun-yomiuri-get-top-header (group from shimbun) "Return a list of a header for the top news." (when (and (search-forward "<!--// top_news_start -->" nil t) (re-search-forward (format (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "<a" s1 "href=\"/" ;; 1. url "\\(%s/" ;; 2. genre "\\(?:\\([^/]+\\)/\\)?" "news/" ;; 3. serial number[1] "\\(" ;; 4. year "\\(20[0-9][0-9]\\)" "[01][0-9][0-3][0-9]\\)" ;; 5. serial number[2] "\\([^.]+\\)" "[^\"]+\\)" "\"[^>]*>" s0 ;; 6. subject "\\([^<]+\\)" s0))) group) nil t)) (let* ((url (shimbun-expand-url (match-string 1) shimbun-yomiuri-url)) (genre (match-string 2)) (id (concat "<" (match-string 3) "." (match-string 5) "%" (when genre (concat genre ".")) group "." shimbun-yomiuri-top-level-domain ">")) year subject) (prog1 (unless (shimbun-search-id shimbun id) (setq year (string-to-number (match-string 4)) subject (match-string 6)) (when (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*")) (concat ">" s0 "鐚" s0 ;; 1. month "\\([01]?[0-9]\\)" s0 "" s0 ;; 2. day "\\([0-3]?[0-9]\\)" s0 "" s0 ;; 3. hour:minute "\\([012][0-9]:[0-5][0-9]\\)" s0 "鐚" s0 "<"))) nil t) (list (shimbun-create-header 0 subject from (shimbun-make-date-string year (string-to-number (match-string 1)) (string-to-number (match-string 2)) (match-string 3)) id "" 0 0 url)))) (search-forward "<!--// top_news_end //-->" nil t))))) (defun shimbun-yomiuri-get-headers (shimbun) "Return a list of headers." (let* ((group (shimbun-current-group-internal shimbun)) (from (concat (shimbun-server-name shimbun) " (" (shimbun-current-group-name shimbun) ")")) (case-fold-search t) (regexp (assoc group shimbun-yomiuri-group-table)) (subgroups (cdr (assoc group shimbun-yomiuri-subgroups-alist))) numbers headers subject month day genre subgenre jgenre id year subgrp) (setq regexp (when (setq numbers (nthcdr 4 regexp)) (format (nth 3 regexp) (regexp-quote group)))) (catch 'stop ;; The loop for fetching all the articles in the subgroups. (while t (shimbun-strip-cr) (goto-char (point-min)) ;; Extract top news. (when (member group '("atmoney" "entertainment" "national" "politics" "science" "sports" "world")) (setq headers (nconc headers (shimbun-yomiuri-get-top-header group from shimbun)))) (when regexp (while (re-search-forward regexp nil t) (setq subject (match-string (nth 4 numbers)) month (if (and (nth 8 numbers) (match-beginning (nth 8 numbers))) (shimbun-yomiuri-japanese-string-to-number (match-string (nth 8 numbers))) (string-to-number (match-string (nth 5 numbers)))) day (if (and (nth 9 numbers) (match-beginning (nth 9 numbers))) (shimbun-yomiuri-japanese-string-to-number (match-string (nth 9 numbers))) (string-to-number (match-string (nth 6 numbers)))) genre (or subgenre (when (nth 10 numbers) (match-string (nth 10 numbers)))) jgenre (when (nth 11 numbers) (match-string (nth 11 numbers)))) (cond ((string-equal group "editorial") (setq subject (format "%02d/%02d %s" month day (save-match-data (if (string-match "\\`鐚\\(.+\\)鐚純\\(.+\\)\\'" subject) (replace-match "\\1: \\2" nil nil subject) subject))))) (jgenre (setq subject (concat "[" jgenre "] " subject)))) (setq id (concat "<" (match-string (nth 1 numbers)) "." (match-string (nth 2 numbers)) "%" (when genre (concat genre ".")) (mapconcat 'identity (nreverse (save-match-data (split-string group "\\."))) ".") "." shimbun-yomiuri-top-level-domain ">")) (unless (shimbun-search-id shimbun id) (when (< (setq year (string-to-number (match-string (nth 3 numbers)))) 100) (setq year (+ year 2000))) (push (shimbun-create-header 0 subject from (shimbun-make-date-string year month day (when (and (nth 7 numbers) (match-beginning (nth 7 numbers))) (match-string (nth 7 numbers)))) id "" 0 0 (shimbun-expand-url (match-string (nth 0 numbers)) (if (string-match "吾c宴" from) "http://www.yomiuri.co.jp/entertainment/ghibli/" shimbun-yomiuri-url))) headers)))) (if subgroups (progn (erase-buffer) (setq subgrp (pop subgroups) from (concat (shimbun-server-name shimbun) " (" (car subgrp) ")") subgenre (cadr subgrp)) (shimbun-retrieve-url (caddr subgrp)) (setq regexp (cadddr subgrp) numbers (cddddr subgrp))) (throw 'stop nil)))) (shimbun-sort-headers headers))) (defun shimbun-yomiuri-get-headers-kyoiku-renaissance (shimbun) (let ((from (concat (shimbun-server-name shimbun) " (%s/" (shimbun-current-group-name shimbun) ")")) (case-fold-search t) next genre start end id headers) (while (cond ((eq next 'none) nil) (next (set-match-data next) (goto-char (match-end 0))) (t (re-search-forward "<h3[\t\n ]+class=\"hdst\">[\t\n ]*\\([^<]+\\)[\t\n ]*</h3>" nil t))) (setq genre (match-string 1) start (match-end 0)) (if (re-search-forward "<h3[\t\n ]+class=\"hdst\">[\t\n ]*\\([^<]+\\)[\t\n ]*</h3>" nil t) (setq end (match-beginning 0) next (match-data)) (setq end nil next 'none)) (goto-char start) (while (re-search-forward "\ <a[\t\n ]+href=\"/\\(kyoiku/renai/\\(20[0-9][0-9][01][0-9][0-3][0-9]\\)\ \\([^.]+\\)[^\"]+\\)\"[^>]*>[\t\n ]*\\([^<]+\\)[\t\n ]*</a>[\t\n ]*\ <span[\t\n ]+class=\"date\">[\t\n ]*<span[\t\n ]+class=\"y\">[\t\n ]*\ \\(20[0-9][0-9]\\)[\t\n ]*綛[\t\n ]*</span>[\t\n ]*<span[\t\n ]+class=\"m\">\ [\t\n ]*\\([01]?[0-9]\\)[\t\n ]*[\t\n ]*</span>[\t\n ]*\ <span[\t\n ]+class=\"d\">[\t\n ]*\\([0-3]?[0-9]\\)[\t\n ]*[\t\n ]*</span>" end t) (setq id (concat "<" (match-string 2) "." (match-string 3) "%renai.kyoiku." shimbun-yomiuri-top-level-domain ">")) (unless (shimbun-search-id shimbun id) (push (shimbun-create-header 0 (match-string 4) (format from genre) (shimbun-make-date-string (string-to-number (match-string 5)) (string-to-number (match-string 6)) (string-to-number (match-string 7))) id "" 0 0 (shimbun-expand-url (match-string 1) shimbun-yomiuri-url)) headers)))) headers)) (luna-define-method shimbun-get-headers ((shimbun shimbun-yomiuri) &optional range) (if (string-equal (shimbun-current-group-internal shimbun) "kyoiku.renaissance") (shimbun-yomiuri-get-headers-kyoiku-renaissance shimbun) (shimbun-yomiuri-get-headers shimbun))) (defun shimbun-yomiuri-prepare-article (shimbun header) (shimbun-with-narrowed-article shimbun ;; Correct Date header. (when (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+")) (concat "<!--" s0 "//" s1 "date_start" s1 "//" s0 "-->" s0 ;; 1. year "\\(20[0-9][0-9]\\)" s0 "綛" s0 ;; 2. month "\\([01]?[0-9]\\)" s0 "" s0 ;; 3. day "\\([0-3]?[0-9]\\)" s0 "" s0 ;; 4. hour "\\([012]?[0-9]\\)" s0 "" s0 ;; 5. minute "\\([0-5]?[0-9]\\)" s0 "" s0 "<!--" s0 "//" s1 "date_end" s1 "//" s0 "-->"))) nil t) (shimbun-header-set-date header (shimbun-make-date-string (string-to-number (match-string 1)) (string-to-number (match-string 2)) (string-to-number (match-string 3)) (format "%02d:%02d" (string-to-number (match-string 4)) (string-to-number (match-string 5))))) (goto-char (point-min))) ;; Remove the ャ若, the ≦ぇ buttons, etc. (while (re-search-forward (eval-when-compile (let ((s0 "[\t\n ]*") (s1 "[\t\n ]+") (n1 "[^\t\n >]+")) (concat s0 "\\(?:" "<a\\(?:" s1 n1 "\\)*" s1 "\\(?:class=\"photo-pn\"\\|target=\"photoWin\"\\)" "\\(?:" s1 n1 "\\)*" s0 ">" "\\|" "<img\\(?:" s1 n1 "\\)*" s1 "\\(?:alt=\"ャ若\"\\|class=\"photo-el\"\\)" "\\(?:" s1 n1 "\\)*" s0 ">" "\\|" "<div" s1 "class=\"enlargedphoto\">\\(?:[^<>]+\\)?" "<img" s1 "[^>]+>" s0 "</div>" "\\|" "<div" s1 "class=\"[^\"]+\">" s0 "<img\\(?:" s1 n1 "\\)*" s1 "src=\"/g/d\\.gif\"" "\\(?:" s1 n1 "\\)*" s0 ">" s0 "</div>" "\\|" s0 "rectangle(\"[^\"]+\");" s0 "\\)" s0))) nil t) (delete-region (match-beginning 0) (match-end 0))) (goto-char (point-min)) ;; Replace ≦ぇ with . (while (re-search-forward (eval-when-compile (let ((s1 "[\t\n ]+") (n1 "[^\t\n >]+")) (concat "<img\\(?:" s1 n1 "\\)*" s1 "alt=\"\\(≦ぇ\\)\""))) nil t) (delete-region (match-beginning 1) (match-end 1))) ;; Remove javascripts which will appear in text/plain articles. (shimbun-remove-tags "<!--// rectangle_start //-->" "<!--// rectangle_end //-->") (goto-char (point-min)) (let ((group (shimbun-current-group-internal shimbun))) (cond ((string-equal group "editorial") ;; Break continuous lines. (when (string-match " \\(?:帥絲梧\\|膩絽\\)\\'" (shimbun-header-subject header 'no-encode)) (while (search-forward "" nil t) (replace-match "<br><br>\n")))) ((string-equal group "entertainment") ;; Remove trailing garbage. (when (re-search-forward "[\t\n ]*\ <!-+<p[\t\n ]+class=\"align-c\">+</p>-+>[\t\n ]*" nil t) (delete-region (match-beginning 0) (match-end 0))) ;; Remove nav and track-back button, etc. (shimbun-remove-tags "[\t\n ]*<div[\t\n ]+class=\"\\(?:cl\\|nav-bn\\|track-back\\)\">" "</div>[\t\n ]*")))))) (luna-define-method shimbun-make-contents :before ((shimbun shimbun-yomiuri) header) (shimbun-yomiuri-prepare-article shimbun header)) (luna-define-method shimbun-clear-contents :around ((shimbun shimbun-yomiuri) header) (when (luna-call-next-method) t)) (provide 'sb-yomiuri) ;;; sb-yomiuri.el ends here �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-yoshirin.el��������������������������������������������������0000664�0000000�0000000�00000026614�14343750021�0021622�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-yoshirin.el --- shimbun backend for Yoshinori Kobayashi Official Site ;; Copyright (C) 2015, 2016, 2021, 2022 Katsumi Yamaoka ;; Author: Katsumi Yamaoka <yamaoka@jpl.org> ;; Keywords: news ;; This file is a part of shimbun. ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: ;;; Code: (require 'shimbun) (luna-define-class shimbun-yoshirin (shimbun-japanese-newspaper shimbun) ()) (defvar shimbun-yoshirin-top-level-domain "yoshinori-kobayashi.com") (defvar shimbun-yoshirin-url (concat "http://" shimbun-yoshirin-top-level-domain "/")) (defvar shimbun-yoshirin-server-name "絨綣泣ゃ") (defvar shimbun-yoshirin-group-table '(("blog" "BLOG" "http://yoshinori-kobayashi.com/category/blog/" "絨") ("topics" "TOPICS" "http://yoshinori-kobayashi.com/category/topics/" "篌"))) (defvar shimbun-yoshirin-index-range 20 "*The number of indices that should be checked to detect new articles. `all' or nil is for all indices, `last' is for the last index, and an integer N is for the last N pages of indices. This overrides any other index-range setting if it is non-nil. If you want to increase this value or change the value to nil or `all', you will need to re-create the group(s) (delete the group(s) completely in advance). If you don't do so, you will never get old articles.") (defvar shimbun-yoshirin-x-face-alist '(("default" . "X-Face: SX1=HV&[cI##/uM,,hed]\"a1.(e<M21Jl\ 2dAy1-JnWwb'yT9t|fq*~ZpiUV%bx\\@&sdy`Vb\n c5[lT$}jl2|X~V97O'\ I31<&o-eCYZDs~WZVK{m,T}x>b3T9PCilX3;\"*8oF;QS\"GCHWit%'u!of`\ \\p\n &ute*s]IuWa5co-wMr4X1dQqqx/PB3y,@P3~Cdc<:$9.Jp^X$-*DPC") ("\\`topics\\'" . "\ Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAADFBMVEUAAAD///9fX1/d3d1 VizmfAAAB0UlEQVQoz22SQWsTURSFz0yYxRiykqEgWehiuhHcpbhRIjiIYiGjczIz6UyaVrKIEmm RQCO0pAUR3SiWp26UgkYL3QnBlSBKF/6AURG0uNCFWxUqVPS+CG0W3tX7uOede97lgayaLwEYsyQ EoCuHIQT4VxqmR6GC/8HGKMBFNdoFG8nRXSggwKhsDxyEe5BhDjCztK7hHRpyfv+bC8NehPGHNa/ FhihQNcNnRZkd6uCRUWvdX4PDMiwk9tKhOztwJYmF0DbjAxKFP2CApwxulXNc7OrHnjRD1UO/Vi/ nwbOY74lTeO+2C3HJwdhCob1d0EHt3pGNBo4lYr1vB1jPf17AdgnR1w9mvsYZNuxNROWc93Tt4DL 98RkkzTPWdXKSU/vPI/n20bv1Z91isiLgXLRkjlKBv6oXkvm/OrL/y6vgi+DJd+oKfFB9mn2cZfz CRy1UszhlXonugYeYpUVOqzZ/jpVwKRsralGTN4nN6l37Gj0x8Ih+EPMcfeoQcLqT5I2EiqcF4om OiiYyDqHytjnga4d8I3fiqfaJNFVkQdw6abce9RVDi7hyQecaSLQSkRTlED4nK0rWb6fSaZGv9Ke YO07Ok5GrIewNrrpcOiz9v8e9pILarDM0AAAAAElFTkSuQmCC"))) (defvar shimbun-yoshirin-expiration-days 1000) (luna-define-method shimbun-groups ((shimbun shimbun-yoshirin)) (mapcar 'car shimbun-yoshirin-group-table)) (luna-define-method shimbun-current-group-name ((shimbun shimbun-yoshirin)) (nth 1 (assoc (shimbun-current-group-internal shimbun) shimbun-yoshirin-group-table))) (luna-define-method shimbun-index-url ((shimbun shimbun-yoshirin)) shimbun-yoshirin-url) (luna-define-method shimbun-get-headers ((shimbun shimbun-yoshirin) &optional range) (shimbun-yoshirin-get-headers shimbun (or shimbun-yoshirin-index-range range))) (luna-define-method shimbun-make-contents :before ((shimbun shimbun-yoshirin) header) (shimbun-yoshirin-make-contents shimbun header)) (luna-define-method shimbun-clear-contents :around ((shimbun shimbun-yoshirin) header) t) ;; Force inserting footer. (luna-define-method shimbun-footer :around ((shimbun shimbun-yoshirin) header &optional html) (shimbun-yoshirin-footer shimbun header)) (defun shimbun-yoshirin-footer (shimbun header) (concat "<div align=\"left\">\n-- <br>\n\ 荐篋茫御┤" (if (equal (shimbun-current-group-internal shimbun) "blog") "絨" "絨障篌") "絽医с<br> <a href=\"" (shimbun-article-base-url shimbun header) "\"><u></u></a>у障\n</div>\n")) (defvar shimbun-yoshirin-header-regexp (concat "<a\\(?:[\t\n\r ]+[^\t\n\r >]+\\)*[\t\n ]+href=\"" ;; 1. url "\\([^\n\"]+/" ;; 2. serial "\\([0-9]+\\)" "/?\\)" "\"[^>]*>[\t\n\r ]*" ;; 3. year "\\(20[1-9][0-9]\\)" "\\." ;; 4. month "\\([01][0-9]\\)" "\\." ;; 5. day "\\([0-3][0-9]\\)" "[^\n]*<br />[\t\n\r ]*" ;; 6. subject "\\([^<]+\\)" "</a>")) (defun shimbun-yoshirin-get-thumbnail (limit) "Get a thumbnail of the article in the area from LIMIT to the header." (save-excursion ;; Note: the site misspells "thumbnail" as "thumnail". (and (re-search-backward "\ <div\\(?:[\t\n\r ]+[^\t\n\r >]+\\)*[\t\n\r ]+class=\"thumb?nail\"" limit t) (shimbun-end-of-tag "div") (save-restriction (narrow-to-region (goto-char (match-beginning 2)) (match-end 2)) (re-search-forward "<img[\t\n\r ]+[^>]+>" nil t)) (list (cons 'Thumbnail (base64-encode-string (encode-coding-string (match-string 0) 'utf-8) t)))))) (defun shimbun-yoshirin-get-headers-top (shimbun) "Get headers for the latest articles in the group of SHIMBUN." (let* ((group (shimbun-current-group-internal shimbun)) (from (nth 3 (assoc group shimbun-yoshirin-group-table))) limit url serial year month day subject id headers) (when (and (re-search-forward (concat "\ <div\\(?:[\t\n\r ]+[^\t\n\r >]+\\)*[\t\n\r ]+class=\"top-" group "\"[^>]*>") nil t) (shimbun-end-of-tag "div")) (save-restriction (narrow-to-region (goto-char (match-beginning 2)) (match-end 2)) (setq limit (point)) (while (re-search-forward shimbun-yoshirin-header-regexp nil t) (setq url (match-string 1) serial (match-string 2) year (match-string 3) month (match-string 4) day (match-string 5) subject (match-string 6)) (setq id (concat "<" serial "." group "%" shimbun-yoshirin-top-level-domain ">")) (unless (shimbun-search-id shimbun id) (push (shimbun-create-header 0 subject from (shimbun-make-date-string (string-to-number year) (string-to-number month) (string-to-number day)) id "" 0 0 url (shimbun-yoshirin-get-thumbnail limit)) headers)) (setq limit (point))))) headers)) (defun shimbun-yoshirin-get-headers (shimbun range) "Get headers for articles in the group of SHIMBUN in RANGE." (let ((headers (shimbun-yoshirin-get-headers-top shimbun)) (count (cond ((memq range '(0 nil all)) nil) ((natnump range) range) (t 1)))) (when (and headers (or (not count) (> count 0))) (erase-buffer) (let* ((group (shimbun-current-group-internal shimbun)) (from (nth 3 (assoc group shimbun-yoshirin-group-table))) limit url serial year month day subject id) (shimbun-retrieve-url (nth 2 (assoc group shimbun-yoshirin-group-table))) (catch 'stop (while t (setq limit (point)) (while (re-search-forward shimbun-yoshirin-header-regexp nil t) (setq url (match-string 1) serial (match-string 2) year (match-string 3) month (match-string 4) day (match-string 5) subject (match-string 6)) (setq id (concat "<" serial "." group "%" shimbun-yoshirin-top-level-domain ">")) (when (shimbun-search-id shimbun id) (throw 'stop nil)) (push (shimbun-create-header 0 subject from (shimbun-make-date-string (string-to-number year) (string-to-number month) (string-to-number day)) id "" 0 0 url (shimbun-yoshirin-get-thumbnail limit)) headers) (setq limit (point))) (when (and count (<= (setq count (1- count)) 0)) (throw 'stop nil)) (goto-char (point-min)) (when (and (or (re-search-forward "\ <div\\(?:[\t\n\r ]+[^\t\n\r >]+\\)*[\t\n\r ]+class='wp-pagenavi'" nil t) (re-search-forward "\ <div\\(?:[\t\n\r ]+[^\t\n\r >]+\\)*[\t\n\r ]+class=\"pagination cf\"" nil t)) (shimbun-end-of-tag "div")) (save-restriction (narrow-to-region (goto-char (match-beginning 2)) (match-end 2)) (unless (re-search-forward "\ <span\\(?:[\t\n\r ]+[^\t\n\r >]+\\)*[\t\n\r ]+class='current'[^>]*>\ [\t\n\r ]*[0-9]+[\t\n\r ]*</span>[\t\n\r ]*\ <a\\(?:[\t\n\r ]+[^\t\n\r >]+\\)*[\t\n\r ]+href=\"\\([^\"]+\\)" nil t) (throw 'stop nil))) (shimbun-retrieve-url (prog1 (match-string 1) (erase-buffer)))))))) headers)) (defun shimbun-yoshirin-make-contents (shimbun header) "Make an html article." (let ((date (shimbun-header-date header))) (when (and (if (string-match " 00:00 " date) (or (re-search-forward "\"dateModified\":\"\\([^\"]+\\)[0-9][0-9]:[0-9][0-9]" nil t) (re-search-forward "\"datePublished\":\"\\([^\"]+\\)[0-9][0-9]:[0-9][0-9]" nil t)) (re-search-forward "\"dateModified\":\"\\([^\"]+\\)[0-9][0-9]:[0-9][0-9]" nil t)) (ignore-errors ;; The TZ seems to mistakenly be set in the site, ;; so we try fixing it. (setq date (decode-time (date-to-time (concat (match-string 1) "00:00"))) date (shimbun-header-set-date header (shimbun-make-date-string (nth 5 date) (nth 4 date) (nth 3 date) (apply #'format "%02d:%02d:%02d" (last (nreverse date) 3))))))) (shimbun-header-set-date header date))) (when (and (re-search-forward "\ <div\\(?:[\t\n\r ]+[^\t\n\r >]+\\)*[\t\n\r ]+class=\"entry\"" nil t) (shimbun-end-of-tag "div")) (delete-region (match-end 2) (point-max)) (delete-region (goto-char (point-min)) (match-beginning 2)) (when (and (re-search-forward "\ <h3\\(?:[\t\n\r ]+[^\t\n\r >]+\\)*[\t\n\r ]+class=\"blog-ttl\"" nil t) (shimbun-end-of-tag "h3")) (delete-region (point-min) (match-end 0)) (when (looking-at "[\t\n\r ]*<p> </p>[\t\n\r ]*") (delete-region (point) (match-end 0))) (when (re-search-forward "\\(?:[\t\n\r ]*<p> </p>\\)*[\t\n\r ]*\ <div\\(?:[\t\n\r ]+[^\t\n\r >]+\\)*[\t\n\r ]+class=\"post_facebook\"" nil t) (delete-region (match-beginning 0) (point-max)))) (let ((thumbnail (cdr (or (assq 'Thumbnail (shimbun-header-extra header)) (assq 'Thumnail (shimbun-header-extra header))))) (case-fold-search t) src caption) (when (and thumbnail (progn (setq thumbnail (decode-coding-string (base64-decode-string thumbnail) 'utf-8)) (string-match "src=\"[^\"]+\"" thumbnail)) (progn (setq src (regexp-quote (match-string 0 thumbnail))) (goto-char (point-min)) (not (re-search-forward (concat "\ <img\\(?:[\t\n\r ]+[^\t\n\r >]+\\)*[\t\n\r ]+" src) nil t)))) (when (string-match "[\t ]+alt=\"\\([^\"]+\\)\"" thumbnail) (setq caption (match-string 1 thumbnail) thumbnail (concat (substring thumbnail 0 (match-beginning 0)) (substring thumbnail (match-end 0)))) (when (string-match "\\`\\(?:%[0-9a-f][0-9a-f:]\\)+\\'" caption) (setq caption (w3m-url-decode-string caption 'utf-8))) (unless (string-match "\\`thumb?nail\\'" caption) (insert caption "<br>\n"))) (insert thumbnail "\n"))))) (provide 'sb-yoshirin) ;; sb-yoshirin.el ends here ��������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-zdnet-jp.el��������������������������������������������������0000664�0000000�0000000�00000012465�14343750021�0021510�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-zdnet-jp.el --- shimbun backend for ZDNet Japan -*- coding: utf-8 -*- ;; Copyright (C) 2005, 2006, 2019 Tsuyoshi CHO <Tsuyoshi.CHO@Gmail.com> ;; Author: Tsuyoshi CHO <Tsuyoshi.CHO@Gmail.com> ;; Keywords: news ;; Created: Jun 14, 2003 ;; This file is a part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; This code is based on sb-cnet-jp.el@ 2005-04-07. ;; Thanks. ;; NAKAJIMA Mikio <minakaji@namazu.org>, ;; TSUCHIYA Masatoshi <tsuchiya@namazu.org>, ;; Katsumi Yamaoka <yamaoka@jpl.org> ;;; Code: (require 'shimbun) (require 'sb-multi) (require 'sb-rss) (luna-define-class shimbun-zdnet-jp (shimbun-japanese-newspaper shimbun-multi shimbun-rss) ()) (defvar shimbun-zdnet-jp-group-alist '( ;; news ("news" . "http://japan.zdnet.com/rss/news/index.rdf") ("news.network" . "http://japan.zdnet.com/rss/news/nw/index.rdf") ("news.hardware" . "http://japan.zdnet.com/rss/news/hardware/index.rdf") ("news.software" . "http://japan.zdnet.com/rss/news/software/index.rdf") ("news.manage" . "http://japan.zdnet.com/rss/news/itm/index.rdf") ("news.security" . "http://japan.zdnet.com/rss/news/sec/index.rdf") ("news.internet" . "http://japan.zdnet.com/rss/news/internet/index.rdf") ("news.os" . "http://japan.zdnet.com/rss/news/os/index.rdf") ("news.db" . "http://japan.zdnet.com/rss/news/db/index.rdf") ("news.system" . "http://japan.zdnet.com/rss/news/devsys/index.rdf") ;; column ("column" . "http://japan.zdnet.com/rss/column/index.rdf") ("column.sp1" . "http://japan.zdnet.com/rss/column/sp1/index.rdf") ("column.netsecurity1" . "http://japan.zdnet.com/rss/column/netsecurity1/index.rdf") ("column.ea1" . "http://japan.zdnet.com/rss/column/ea1/index.rdf") ("column.btl" . "http://japan.zdnet.com/rss/column/btl/index.rdf") ("column.solutionIT" . "http://japan.zdnet.com/rss/column/solutionIT/index.rdf") ;; channel ("channel.security" . "http://japan.zdnet.com/rss/channel/sec/index.rdf") ("channel.ilm" . "http://japan.zdnet.com/rss/channel/ilm/index.rdf") ;; blog ("blog.iida" . "http://blog.japan.zdnet.com/iida/index.rdf") ("blog.mhatta" . "http://blog.japan.zdnet.com/mhatta/index.rdf") ("blog.kurei" . "http://blog.japan.zdnet.com/kurei/index.rdf") ("blog.opensource" . "http://blog.japan.zdnet.com/opensource/index.rdf") ("blog.soa" . "http://blog.japan.zdnet.com/soa/index.rdf") ("blog.dp" . "http://blog.japan.zdnet.com/dp/index.rdf"))) (defvar shimbun-zdnet-jp-x-face-alist '(("default" . "X-Face: 0p7.+XId>z%:!$ahe?x%+AEm37Abvn]n\ *GGh+>v=;[3`a{1lqO[$,~3C3xU_ri>[JwJ!9l0\n ~Y`b*eXAQ:*q=bBI\ _=ro*?]4:|n>]ZiLZ2LEo^2nr('C<+`lO~/!R[lH'N'4X&%\\I}8T!wt"))) (luna-define-method shimbun-groups ((shimbun shimbun-zdnet-jp)) (mapcar 'car shimbun-zdnet-jp-group-alist)) (luna-define-method shimbun-index-url ((shimbun shimbun-zdnet-jp)) (cdr (assoc (shimbun-current-group shimbun) shimbun-zdnet-jp-group-alist))) (luna-define-method shimbun-multi-next-url ((shimbun shimbun-zdnet-jp) header url) (goto-char (point-min)) (when (re-search-forward "<a href=\"\\([^\"]+\\)\" class=\"article_leaf_paging_next\"" nil t) (shimbun-expand-url (match-string 1) url))) (luna-define-method shimbun-multi-clear-contents ((shimbun shimbun-zdnet-jp) header has-previous-page has-next-page) (let (start end) (if (or has-previous-page has-next-page) (setq start "<div class=\"leaf_body\">" end "<div class=\"article_leaf_paging\">") (setq start "<div class=\"article_body\">" end "</div><!--/article_body-->")) (goto-char (point-min)) (when (and (search-forward start nil t) (setq start (point)) (re-search-forward end nil t)) (delete-region (match-beginning 0) (point-max)) (delete-region (point-min) start) t))) (luna-define-method shimbun-make-contents :before ((shimbun shimbun-zdnet-jp) header) (goto-char (point-min)) (when (re-search-forward "<div class=\"property cblack\">\\([^\n]+\\)</div>" nil t) (let ((from (match-string 1))) (setq from (replace-regexp-in-string "鐚" "" from)) (setq from (replace-regexp-in-string "膺肢┳≧o*" "" from)) (setq from (replace-regexp-in-string " *<br */?> *" ", " from)) (setq from (replace-regexp-in-string "" ", " from)) (shimbun-header-set-from header from)))) (luna-define-method shimbun-footer :around ((shimbun shimbun-zdnet-jp) header &optional html) (if (string-match "news" (shimbun-current-group shimbun)) (luna-call-next-method) "")) (provide 'sb-zdnet-jp) ;;; sb-zdnet-jp.el ends here �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/sb-zeit-de.el���������������������������������������������������0000664�0000000�0000000�00000011263�14343750021�0021311�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; sb-zeit-de.el --- shimbun backend for <http://www.zeit.de> ;; Copyright (C) 2004-2006, 2008-2010, 2019 ;; Andreas Seltenreich <seltenreich@gmx.de> ;; Author: Andreas Seltenreich <seltenreich@gmx.de> ;; Keywords: news ;; Created: May 23, 2004 ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Macro used to extract groups from the overview-page ;; (fset 'sb-zeit-de-macro [?\C-s ?d ?e ?/ ?\C-m ?\C- ?\C-a ?\C-w ?\" ;; ?\M-f ?\" ?\C-k ?\C-k ?\C-k return ?\C-k]) ;;; Code: (require 'shimbun) (require 'sb-rss) (luna-define-class shimbun-zeit-de (shimbun-rss) ()) (defvar shimbun-zeit-de-groups '("politik" "wirtschaft" "meinung" "gesellschaft" "kultur" "wissen" "digital" "studium" "karriere" "lebensart" "reisen" "auto" "sport" "blogs" "news")) (defvar shimbun-zeit-de-x-face-alist '(("default" . "X-Face: +@u:6eD3Nq>u{P_Ev&\"A6eW=EA{5H[OqH;|oz7H>atafNFsUS-&7\ %\\qo;KFS%E`=t5Z)'q~lhfl6<7rQ=]"))) (defvar shimbun-zeit-de-content-start "title\">\\|<!--content starts here-->\\(?:<table[^>]+>\\)?") (defvar shimbun-zeit-de-content-end (concat "</body>\\|</html>\\|navigation[^><]*>[^A]\\|" "<script language=\"JavaScript1\.2\" type=\"text/javascript\">\\|" "<div[^>]+\\(class\\|id\\)=\"comments\\|<li class=\"bookmarks\\\|" "class=\"com\"\\|class=\"toolad\"")) (defvar shimbun-zeit-de-from-address "DieZeit@zeit.de") (luna-define-method shimbun-headers :before ((shimbun shimbun-zeit-de) &rest range) shimbun) (luna-define-method shimbun-groups ((shimbun shimbun-zeit-de)) shimbun-zeit-de-groups) (luna-define-method shimbun-get-headers :around ((shimbun shimbun-zeit-de) &optional range) (mapc (lambda (header) (let ((url (shimbun-header-xref header))) ;; remove the "?from=rss" parameter (when (string-match "\\(.*\\)\\?from=rss\\'" url) (setq url (match-string 1 url))) (cond ((string-match "\\`http://www\\.zeit\\.de" url) (shimbun-header-set-xref header (concat url "?page=all"))) ((string-match "\\`/" url) (shimbun-header-set-xref header (concat "http://www.zeit.de" url)))))) (luna-call-next-method))) (luna-define-method shimbun-make-contents :before ((shimbun shimbun-zeit-de) header) (when (re-search-forward "<script.*window.location='\\(.+?\\)';" nil t) (let ((url (match-string 1))) (erase-buffer) (shimbun-retrieve-url (concat url "?page=all")))) (let* ((case-fold-search t) (start (re-search-forward (shimbun-content-start shimbun) nil t)) (end (and start (re-search-forward (shimbun-content-end shimbun) nil t) (prog1 (match-beginning 0) (goto-char start))))) (setq case-fold-search nil) (when (re-search-forward "(c)[^Z]*ZEIT[^0-9]*\ \\([0-3][0-9]\\)\\.\\([01][0-9]\\)\\.\\(20[0-9][0-9]\\)" end t) (shimbun-header-set-date header (shimbun-make-date-string (string-to-number (match-string 3)) (string-to-number (match-string 2)) (string-to-number (match-string 1)) nil "+02:00")) (goto-char (point-min))))) (luna-define-method shimbun-index-url ((shimbun shimbun-zeit-de)) (let ((group (shimbun-current-group shimbun))) (if (equal "news" group) "http://newsfeed.zeit.de/" (concat "http://newsfeed.zeit.de/" group "/index")))) (luna-define-method shimbun-clear-contents :after ((shimbun shimbun-zeit-de) header) ;; remove advertisements and 1-pixel-images aka webbugs (shimbun-remove-tags "<!--START: LESERMEINUNG-->" "<!--ENDE: LESERMEINUNG-->") (shimbun-remove-tags "\\(div\\)\\(?:[\t\n\r ]+\\[^\t\n\r >]+\\)*[\t\n\r ]+\ class=\"?\\(?:ad\\|most_read\\)" t) (shimbun-remove-tags "\\(a\\)[\t\n\r ][^>]*doubleclick\\.net" t) (shimbun-remove-tags "<IFRAME[^>]*doubleclick.net[^>]*>") (shimbun-remove-tags "<img[^>]*doubleclick.net[^>]*>") (shimbun-remove-tags "<img[^>]*\\(width\\|height\\)=\"1px\"[^>]*>") (shimbun-remove-tags "<tr><td[^>]*>Anzeige</td></tr>") (shimbun-remove-tags "\\(span\\) class=\"anzeige\"" t) t) (provide 'sb-zeit-de) ;;; sb-zeit-de.el ends here ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/shimbun/shimbun.el������������������������������������������������������0000664�0000000�0000000�00000200710�14343750021�0021010�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; shimbun.el --- interfacing with web newspapers ;; Copyright (C) 2001-2014, 2017-2019, 2021, 2022 ;; Yuuichi Teranishi <teranisi@gohome.org> ;; Author: TSUCHIYA Masatoshi <tsuchiya@namazu.org>, ;; Akihiro Arisawa <ari@mbf.sphere.ne.jp>, ;; Yuuichi Teranishi <teranisi@gohome.org>, ;; Katsumi Yamaoka <yamaoka@jpl.org> ;; Keywords: news ;; This file is the main part of shimbun. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Original code was nnshimbun.el written by ;; TSUCHIYA Masatoshi <tsuchiya@namazu.org>. ;; Shimbun API: ;; ;; shimbun-open ;; shimbun-server ;; shimbun-groups ;; shimbun-current-group ;; shimbun-open-group ;; shimbun-close-group ;; shimbun-headers ;; shimbun-reply-to ;; shimbun-x-face ;; shimbun-header-insert ;; shimbun-search-id ;; shimbun-article-expiration-days ;; shimbun-article ;; shimbun-close ;; Shimbun Header API: ;; ;; shimbun-header-subject ;; shimbun-header-set-subject ;; shimbun-header-from ;; shimbun-header-set-from ;; shimbun-header-date ;; shimbun-header-set-date ;; shimbun-header-id ;; shimbun-header-set-id ;; shimbun-header-references ;; shimbun-header-set-references ;; shimbun-header-chars ;; shimbun-header-set-chars ;; shimbun-header-lines ;; shimbun-header-set-lines ;; shimbun-header-xref ;; shimbun-header-set-xref ;; shimbun-header-extra ;; shimbun-header-set-extra ;;; Code: (require 'mcharset) (require 'eword-encode) (require 'luna) (require 'std11) (require 'w3m) (require 'xml) (eval-and-compile (luna-define-class shimbun () (mua server current-group groups x-face x-face-alist url coding-system from-address content-start content-end expiration-days server-name ;; Say whether to prefer text/plain articles. prefer-text-plain ;; Similar to `content-start' and `content-end' ;; but are used to extract html contents for ;; text/plain articles. text-content-start text-content-end ;; Say whether to convert Japanese zenkaku ;; ASCII chars into hankaku. japanese-hankaku ;; Number of times to retry fetching contents. retry-fetching)) (luna-define-internal-accessors 'shimbun)) (defgroup shimbun nil "shimbun - the backend library to read web newspapers." :group 'w3m :group 'hypermedia) (defcustom shimbun-x-face "X-Face: @Q+y!*#)K`rvKfSQnCK.Q\\{T0qs@?plqxVu<=@H-y\ 22NlKSprlFiND7{\"{]&Ddg1=P6{Ze|\n xbW2L1p5ofS\\&u~28A\ dJrT4Cd<Ls?U!G4}0S%FA~KegR;YZWieoc%`|$4M\\\"i*2avWm?" "Default X-Face field for shimbun." :group 'shimbun :type '(string :format "%{%t%}:\n%v")) (defcustom shimbun-server-additional-path nil "List of additional directories to search for shimbun servers." :group 'shimbun :type '(repeat (directory :format "%t: %v"))) (defcustom shimbun-checking-new-news-format "Checking new news on #S for #g" "Format string used to show a progress message while chacking new news. See `shimbun-message' for the special format specifiers." :group 'shimbun :type '(string :format "%{%t%}:\n%v")) (defcustom shimbun-verbose t "If non-nil, `shimbun-message' will display echo messages. If it is nil, messages will be neither displayed nor logged into the \"Messages*\" buffer. Note that the meaning of this variable differs from `w3m-verbose'. See also `shimbun-message-enable-logging'." :group 'shimbun :type 'boolean) (defcustom shimbun-message-enable-logging nil "If non-nil, `shimbun-message' logs echo messages in *Messages* buffer. See also `shimbun-verbose'." :group 'shimbun :type 'boolean) (defcustom shimbun-japanese-hankaku nil "Non-nil means convert Japanese zenkaku ASCII chars into hankaku. A non-nil value of this variable affects all shimbun articles except ones fetched by shimbun modules that override the `shimbun-headers' method or the `shimbun-clear-contents' method. Valid values include: `header' or `subject': Perform the hankaku conversion on only subjects. `body': Perform the hankaku conversion on only bodies. non-nil values excluding `header', `subject', `body', and `never': Perform the hankaku conversion on both subjects and bodies. nil: Don't perform the hankaku conversion. `never': Never perform the hankaku conversion. Another way is to set `shimbun-SERVER-japanese-hankaku' to non-nil per SERVER. If you want to perform the hankaku conversion on articles except ones fetched from SERVER for example, set this variable to t and set `shimbun-SERVER-japanese-hankaku' to `never'." :group 'shimbun :type '(radio (sexp :format "Header only\n" :value header :match (lambda (widget value) (memq value '(header subject)))) (const :tag "Body only" body) (sexp :format "Header and Body\n" :value t :match (lambda (widget value) (and value (not (memq value '(header subject body never)))))) (const :tag "Don't convert" nil) (const :tag "Never convert" never))) (defcustom shimbun-retry-fetching nil "Number of times to retry fetching the web contents of a url. If it is a positive number and the fetching of the contents of a url fails, it will be retried until it is successful or until the number of times to retry reaches to that number. Note that a non-nil value of `shimbun-SERVER-retry-fetching' overrides this variable." :group 'shimbun :type '(radio (const :format "Don't retry " nil) (integer :tag "Number of retries" :match (lambda (widget value) (natnump value)) :value 1))) (defcustom shimbun-use-local nil "Specifies if local files should be used (\"offline\" mode). This way, you can use an external script to retrieve the necessary HTML/XML files. For an example, see `nnshimbun-generate-download-script'. If a local file for an URL cannot be found, it will silently be retrieved as usual." :group 'shimbun :type 'boolean) (defcustom shimbun-local-path w3m-default-save-directory "Directory where local shimbun files are stored. Default is the value of `w3m-default-save-directory'." :group 'shimbun :type 'directory) (defun shimbun-servers-list () "Return a list of shimbun servers." (let (servers) (dolist (dir (cons (file-name-directory (locate-library "shimbun")) shimbun-server-additional-path)) (when (file-directory-p dir) (dolist (file (directory-files dir nil nil t)) (and (string-match "\\`sb-\\(.*\\)\\.elc?\\'" file) (not (member (setq file (match-string 1 file)) '("fml" "glimpse" "lump" "mailarc" "mailman" "mhonarc" "text" "hash" "rss" "atom" "multi"))) (not (member file servers)) (push file servers))))) (sort servers 'string-lessp))) (defun shimbun-servers-alist () "Return an associative list of shimbun servers." (mapcar 'list (shimbun-servers-list))) ;;; Shimbun MUA (eval-and-compile (luna-define-class shimbun-mua () (shimbun)) (luna-define-internal-accessors 'shimbun-mua)) (luna-define-generic shimbun-mua-search-id (mua id) "Return non-nil when MUA found a message structure which corresponds to ID.") (defun shimbun-mua-shimbun (mua) "Return the shimbun object created by MUA." (shimbun-mua-shimbun-internal mua)) ;;; emacs-w3m implementation of url retrieval and entity decoding. (defalias 'shimbun-beginning-of-tag 'w3m-beginning-of-tag) (defalias 'shimbun-decode-anchor-string 'w3m-decode-anchor-string) (defalias 'shimbun-decode-entities 'w3m-decode-entities) (defalias 'shimbun-decode-entities-string 'w3m-decode-entities-string) (defalias 'shimbun-end-of-tag 'w3m-end-of-tag) (defalias 'shimbun-expand-url 'w3m-expand-url) (defalias 'shimbun-find-coding-system 'w3m-find-coding-system) (defalias 'shimbun-flet 'w3m-flet) (defalias 'shimbun-interactive-p 'w3m-interactive-p) (defalias 'shimbun-url-encode-string 'w3m-url-encode-string) (defun shimbun-retrieve-url (url &optional no-cache no-decode referer) "Rertrieve URL contents and insert to current buffer. Return content-type of URL as string when retrieval succeeded." (let ((w3m-message-silent (not shimbun-verbose)) (w3m-verbose shimbun-message-enable-logging) type charset fname) (if (and url shimbun-use-local shimbun-local-path (file-regular-p (setq fname (concat (file-name-as-directory (expand-file-name shimbun-local-path)) (substring (md5 url) 0 10) "_shimbun")))) ;; get local file contents (progn (let ((coding-system-for-read 'no-conversion)) (insert-file-contents fname)) (when (re-search-forward "^$" nil t) (let ((pos (match-beginning 0))) (re-search-backward "\ ^Content-Type: \\(.*?\\)\\(?:[ ;]+\\|$\\)\\(charset=\\(.*\\)\\)?" nil t) (setq type (match-string 1) charset (match-string 3)) (delete-region (point-min) pos)))) ;; retrieve URL (when url (setq type (w3m-retrieve (w3m-url-transfer-encode-string url) nil no-cache nil referer)))) (if type (progn (unless no-decode (if charset (w3m-decode-buffer url charset type) (w3m-decode-buffer url)) (goto-char (point-min))) type) (unless no-decode (set-buffer-multibyte t) nil)))) (luna-define-generic shimbun-retry-fetching (shimbun) "Return the number of times to retry fetching the web contents of a url.") (luna-define-method shimbun-retry-fetching ((shimbun shimbun)) (or (shimbun-retry-fetching-internal shimbun) shimbun-retry-fetching)) (defun shimbun-fetch-url (shimbun url &optional no-cache no-decode referer) "Retrieve contents specified by URL for SHIMBUN." (let ((retry (shimbun-retry-fetching shimbun))) (save-restriction (narrow-to-region (point) (point)) (or (shimbun-retrieve-url url no-cache no-decode referer) (and retry (let (retval) (shimbun-message shimbun "shimbun: Retrying to fetch contents...") (while (and (> retry 0) (not retval)) (delete-region (point-min) (point-max)) (setq retval (shimbun-retrieve-url url no-cache no-decode referer) retry (1- retry))) (shimbun-message shimbun "shimbun: Retrying to fetch contents...%s" (if retval "done" "failed")) retval)))))) (defun shimbun-real-url (url &optional no-cache) "Return a real URL." (w3m-real-url url no-cache)) ;;; Implementation of Header API. (eval-and-compile (luna-define-class shimbun-header () (number subject from date id references chars lines xref extra)) (luna-define-internal-accessors 'shimbun-header)) (defun shimbun-header-number (header) (shimbun-header-number-internal header)) (defun shimbun-header-set-number (header number) (shimbun-header-set-number-internal header number)) (defun shimbun-header-subject (header &optional no-encode) (if no-encode (shimbun-header-subject-internal header) (shimbun-mime-encode-string (shimbun-header-subject-internal header)))) (defun shimbun-header-normalize (string &optional keep-angle-brackets) (when string (save-match-data ;; This is a trick to keep backward compatibility for ;; `shimbun-header-set-subject' and `shimbun-header-set-from'. (if (string-match eword-encoded-word-regexp string) (eword-decode-string string) (with-temp-buffer (insert string) (unless keep-angle-brackets (shimbun-remove-markup)) (shimbun-decode-entities) (subst-char-in-region (point-min) (point-max) ?\t ? t) (subst-char-in-region (point-min) (point-max) ?\r ? t) (subst-char-in-region (point-min) (point-max) ?\f ? t) (subst-char-in-region (point-min) (point-max) ?\n ? t) (goto-char (point-min)) (skip-chars-forward " ") (buffer-substring (point) (progn (goto-char (point-max)) (skip-chars-backward " ") (point)))))))) (defun shimbun-header-set-subject (header subject &optional asis) (shimbun-header-set-subject-internal header (if asis subject (shimbun-header-normalize subject)))) (defun shimbun-header-from (header &optional no-encode) (if no-encode (shimbun-header-from-internal header) (shimbun-mime-encode-string (shimbun-header-from-internal header)))) (defun shimbun-header-set-from (header from &optional asis) (shimbun-header-set-from-internal header (if asis from (shimbun-header-normalize from t)))) (defun shimbun-header-date (header) (shimbun-header-date-internal header)) (defun shimbun-header-set-date (header date &optional asis) (shimbun-header-set-date-internal header (if asis date (shimbun-header-normalize date)))) (defun shimbun-header-id (header) (shimbun-header-id-internal header)) (defun shimbun-header-set-id (header id &optional asis) (shimbun-header-set-id-internal header (if asis id (shimbun-header-normalize id t)))) (defun shimbun-header-references (header) (shimbun-header-references-internal header)) (defun shimbun-header-set-references (header references &optional asis) (shimbun-header-set-references-internal header (if asis references (shimbun-header-normalize references t)))) (defun shimbun-header-chars (header) (shimbun-header-chars-internal header)) (defun shimbun-header-set-chars (header chars) (shimbun-header-set-chars-internal header chars)) (defun shimbun-header-lines (header) (shimbun-header-lines-internal header)) (defun shimbun-header-set-lines (header lines) (shimbun-header-set-lines-internal header lines)) (defun shimbun-header-xref (header) (shimbun-header-xref-internal header)) (defun shimbun-header-set-xref (header xref) (shimbun-header-set-xref-internal header xref)) (defun shimbun-header-extra (header) (shimbun-header-extra-internal header)) (defun shimbun-header-set-extra (header extra) (shimbun-header-set-extra-internal header extra)) (defun shimbun-create-header (&optional number subject from date id references chars lines xref extra asis) "Return a new header for a shimbun article. Because `shimbun-create-header' normalizes arguments with `shimbun-header-normalize' before creating new header object, following operations are unnecessary: * MIME-encoding of subjects and from addresses. * Removal of HTML tags. * Decode of HTML entities. * Replacement of space characteres, such as tab, newline, and linefeed. If optional 11th argument ASIS is non-nil, normalization of header values is suppressed." (let ((new (luna-make-entity 'shimbun-header :number number))) (shimbun-header-set-subject new subject asis) (shimbun-header-set-from new from asis) (shimbun-header-set-date new date asis) (shimbun-header-set-id new id asis) (shimbun-header-set-references new references asis) (shimbun-header-set-chars new chars) (shimbun-header-set-lines new lines) (shimbun-header-set-xref new xref) (shimbun-header-set-extra new extra) new)) (defun shimbun-make-header (&optional number subject from date id references chars lines xref extra) "Return a new header for a shimbun article. This function is obsolete. You should use `shimbun-create-header' instead of this function." (shimbun-create-header number (and subject (eword-decode-string subject)) (and from (eword-decode-string from)) date id references chars lines xref extra t)) ;; Functions for the internal use. (defun shimbun-article-base-url (shimbun header) "Return URL which points the original page specified by HEADER for SHIMBUN." (let ((xref (shimbun-header-xref header))) (if (and xref (eq (aref xref 0) ?/)) (concat (shimbun-url-internal shimbun) xref) xref))) (luna-define-generic shimbun-article-url (shimbun header) "Return URL which points the printable page specified by HEADER for SHIMBUN.") (luna-define-method shimbun-article-url ((shimbun shimbun) header) (shimbun-article-base-url shimbun header)) (defcustom shimbun-encapsulate-images t "If non-nil, inline images will be encapsulated in the articles. Generated article have a multipart/related content-type." :group 'shimbun :type 'boolean) ;;; Base class for shimbun message entities: (eval-and-compile (luna-define-class shimbun-entity () (type cid data)) (luna-define-internal-accessors 'shimbun-entity)) (luna-define-generic shimbun-entity-type (entity) "Return TYPE of ENTITY.") (luna-define-method shimbun-entity-type ((entity shimbun-entity)) (shimbun-entity-type-internal entity)) (luna-define-generic shimbun-entity-cid (entity) "Return CID of ENTITY.") (luna-define-method shimbun-entity-cid ((entity shimbun-entity)) (shimbun-entity-cid-internal entity)) (defun shimbun-entity-set-cid (entity cid) (shimbun-entity-set-cid-internal entity cid)) (gv-define-simple-setter shimbun-entity-cid shimbun-entity-set-cid) (luna-define-generic shimbun-entity-insert (entity) "Insert ENTITY as a MIME part.") (luna-define-method shimbun-entity-insert ((entity shimbun-entity)) (insert "Content-Type: " (shimbun-entity-type entity) "\n") (when (shimbun-entity-cid entity) (insert "Content-ID: <" (shimbun-entity-cid entity) ">\n")) (insert "\n")) ;;; Class for multipart entities: (eval-and-compile (luna-define-class shimbun-multipart-entity (shimbun-entity) (boundary)) (luna-define-internal-accessors 'shimbun-multipart-entity)) (defvar shimbun-multipart-entity-counter 0) (luna-define-method initialize-instance :before ((entity shimbun-multipart-entity) &rest init-args) (shimbun-multipart-entity-set-boundary-internal entity (apply 'format "===shimbun_%d_%d_%d_%d===" (cl-incf shimbun-multipart-entity-counter) (time-convert nil 'list)))) (defun shimbun-make-multipart-entity (&optional type cid) (luna-make-entity 'shimbun-multipart-entity :type type :cid cid)) (luna-define-method shimbun-entity-type ((entity shimbun-multipart-entity)) (concat (or (shimbun-entity-type-internal entity) (shimbun-entity-set-type-internal entity (catch 'type (dolist (child (shimbun-entity-data-internal entity)) (unless (string-match "\\`text/" (shimbun-entity-type child)) (throw 'type "multipart/related"))) "multipart/mixed"))) "; boundary=\"" (shimbun-multipart-entity-boundary-internal entity) "\"" (when (string= "multipart/related" (shimbun-entity-type-internal entity)) (catch 'start (dolist (child (shimbun-entity-data-internal entity)) (when (string-match "\\`\\(?:text/\\|multipart/mixed\\)" (shimbun-entity-type child)) (throw 'start (concat "; type=\"" (shimbun-entity-type-internal child) "\"; start=\"<" (shimbun-entity-cid child) ">\"")))))))) (luna-define-method shimbun-entity-insert :after ((entity shimbun-multipart-entity)) (let ((boundary (shimbun-multipart-entity-boundary-internal entity))) (dolist (child (shimbun-entity-data-internal entity)) (insert "--" boundary "\n") (shimbun-entity-insert child) (insert (if (bolp) "\n" "\n\n"))) (insert "--" boundary "--\n"))) (defun shimbun-entity-add-child (entity &rest children) (shimbun-entity-set-data-internal entity (nconc (shimbun-entity-data-internal entity) children))) ;;; Class of text entities: (eval-and-compile (luna-define-class shimbun-text-entity (shimbun-entity) (charset)) (luna-define-internal-accessors 'shimbun-text-entity)) (defun shimbun-make-text-entity (type data &optional cid) (luna-make-entity 'shimbun-text-entity :type type :data data :cid cid)) (luna-define-generic shimbun-text-entity-charset (entity &optional begin end) "Return MIME charset of ENTITY.") (luna-define-method shimbun-text-entity-charset ((entity shimbun-text-entity) &optional begin end) (let (cur tmp) (unless (and begin end) (setq cur (current-buffer)) (set-buffer (generate-new-buffer " *temp*")) (insert (shimbun-entity-data-internal entity)) (setq begin (point-min) end (point-max) tmp (current-buffer))) (prog1 ;; Prefer meta charset. (or (let ((charset (progn (goto-char begin) (and (re-search-forward "\ <meta\\s-+http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']\ text/\\sw+\\(?:\;\\s-*charset=\\(.+\\)\\)?[\"'][^>]*>" end t) (match-string 1))))) (when (and charset (w3m-find-coding-system (intern (downcase charset)))) (shimbun-text-entity-set-charset-internal entity (upcase charset)))) (shimbun-text-entity-charset-internal entity) (shimbun-text-entity-set-charset-internal entity (upcase (symbol-name (detect-mime-charset-region begin end))))) (when cur (set-buffer cur) (kill-buffer tmp))))) (luna-define-method shimbun-entity-type ((entity shimbun-text-entity)) (concat (shimbun-entity-type-internal entity) "; charset=" (shimbun-text-entity-charset entity))) (luna-define-method shimbun-entity-insert :around ((entity shimbun-text-entity)) (save-restriction (narrow-to-region (point) (point)) (insert (shimbun-entity-data-internal entity)) (encode-coding-region (point-min) (point-max) (mime-charset-to-coding-system (shimbun-text-entity-charset entity (point-min) (point-max)))) (goto-char (point-min)) (luna-call-next-method) (goto-char (point-max)))) ;;; Class for image entities: (eval-and-compile (luna-define-class shimbun-image-entity (shimbun-entity) (disposition)) (luna-define-internal-accessors 'shimbun-image-entity)) (luna-define-method initialize-instance :before ((entity shimbun-image-entity) &rest init-args) (shimbun-image-entity-set-disposition-internal entity "inline")) (defun shimbun-make-image-entity (type data &optional cid) (luna-make-entity 'shimbun-image-entity :type type :data data :cid cid)) (luna-define-method shimbun-entity-insert :around ((entity shimbun-image-entity)) (insert "Content-Transfer-Encoding: base64\n" "Content-Disposition: " (shimbun-image-entity-disposition-internal entity) "\n") (luna-call-next-method) (insert (base64-encode-string (shimbun-entity-data-internal entity)))) (defun shimbun-mime-replace-image-tags (shimbun base-cid &optional base-url images) "Replace all IMG tags with references to inlined image parts. This function takes a BASE-CID as a base string for CIDs of inlined image parts, and returns an alist of URLs and image entities." (goto-char (point-min)) (let ((case-fold-search t) start end url img type) (while (and (re-search-forward "\\(<[\t\n\f\r ]*img\\)[\t\n\f\r ]" nil t) (progn (setq start (match-end 1)) (search-forward ">" nil 'move)) (progn (setq end (match-beginning 0)) (goto-char start) (re-search-forward (eval-when-compile (let ((spc "\t\n\f\r ")) (concat "[" spc "]+" ;; 1. replaceable part "\\(src[" spc "]*=[" spc "]*" "\\(?:\"" ;; 2. url quoted with \" "\\([^\"]+\\)" "\"\\|'" ;; 3. url quoted with ' "\\([^']+\\)" "'\\|" ;; 4. url unquoted "\\([^" spc "\"']+\\)" "\\)\\)"))) end t))) (setq start (match-beginning 1) end (match-end 1) url (or (match-string 2) (match-string 3) (match-string 4))) (setq url (shimbun-expand-url ;; See the FIXME comment within the function definition ;; of `w3m-decode-anchor-string' in w3m.el. (shimbun-decode-anchor-string (if (string-match "[\t\n\f\r ]+\\'" url) (substring url 0 (match-beginning 0)) url)) base-url)) (unless (or (setq img (assoc url images)) (and w3m-ignored-image-url-regexp (string-match w3m-ignored-image-url-regexp url))) (with-temp-buffer (set-buffer-multibyte nil) (setq case-fold-search nil type (shimbun-fetch-url shimbun url nil t base-url)) (goto-char (point-min)) (when (or (and (looking-at "\\(GIF8\\)\\|\\(\377\330\\)\\|\211PNG\r\n") (setq type (concat "image/" (cond ((match-beginning 1) "gif") ((match-beginning 2) "jpeg") (t "png"))))) (and type (string-match "\\`image/" type))) (push (setq img (cons url (shimbun-make-image-entity type (buffer-string) (format "shimbun.inline.%d.%s" (length images) base-cid)))) images)))) (when img ;; Only when an image is successfully retrieved, its ;; source URI should be rewritten. (goto-char start) (delete-region start end) (insert "src=\"cid:" (shimbun-entity-cid (cdr img)) "\"")))) images) (defun shimbun-make-mime-article (shimbun header &optional base-url) "Make a MIME article according to SHIMBUN and HEADER. If article have inline images, generated article have a multipart/related content-type if `shimbun-encapsulate-images' is non-nil." (let ((base-cid (shimbun-header-id header)) images) (when (string-match "\\`<\\([^>]+\\)>\\'" base-cid) (setq base-cid (match-string 1 base-cid))) (when shimbun-encapsulate-images (setq images (shimbun-mime-replace-image-tags shimbun base-cid (or base-url (shimbun-article-url shimbun header))))) (let ((body (shimbun-make-text-entity "text/html" (buffer-string)))) (erase-buffer) (when images (let ((new (shimbun-make-multipart-entity))) (setf (shimbun-entity-cid body) (concat "shimbun.0." base-cid)) (shimbun-entity-add-child new body) (apply 'shimbun-entity-add-child new (mapcar 'cdr (nreverse images))) (setq body new))) (shimbun-header-insert shimbun header) (insert "MIME-Version: 1.0\n") (shimbun-entity-insert body)))) (defcustom shimbun-x-face-database-function nil "Function to get faces from a favorite database. When its initial value is nil and BBDB or LSDB is loaded, it will be set to an appropriate default value. You can set this to `never' if you want to use no database." :group 'shimbun :type '(radio (const :tag "Default" nil) (const :tag "Use no database" never) (const :tag "Use BBDB" shimbun-bbdb-get-x-face) (const :tag "Use LSDB" shimbun-lsdb-get-x-face) (function :format "User defined function: %v"))) (defun shimbun-header-insert (shimbun header) (let ((from (shimbun-header-from header)) (refs (shimbun-header-references header)) (reply-to (shimbun-reply-to shimbun)) x-face) (insert (with-temp-buffer ;; Make sure the temp buffer's multibyteness is true. It is ;; needed to make `encode-mime-charset-string' (which is ;; employed by `eword-encode-string') encode non-ascii text. (set-buffer-multibyte t) (insert "Subject: " (or (eword-encode-string (shimbun-header-subject header t)) "(none)") "\nFrom: " (or (eword-encode-string (shimbun-header-from header t)) "(nobody)") "\nDate: " (or (shimbun-header-date header) "") "\nMessage-ID: " (shimbun-header-id header) "\n") (when reply-to (insert "Reply-To: " reply-to "\n")) (when (and refs (string< "" refs)) (insert "References: " refs "\n")) (insert "Lines: " (number-to-string (or (shimbun-header-lines header) 0)) "\n" "Xref: " (or (shimbun-article-base-url shimbun header) "") "\n") (unless shimbun-x-face-database-function (when (and (fboundp 'bbdb-get-field) (not (eq 'autoload (car-safe (symbol-function 'bbdb-get-field)))) (boundp 'bbdb-file) (stringp (symbol-value 'bbdb-file)) (file-exists-p (symbol-value 'bbdb-file))) (setq shimbun-x-face-database-function 'shimbun-bbdb-get-x-face))) (unless shimbun-x-face-database-function (when (and (fboundp 'lsdb-lookup-records) (not (eq 'autoload (car-safe (symbol-function 'lsdb-lookup-records))))) (setq shimbun-x-face-database-function 'shimbun-lsdb-get-x-face))) (when (setq x-face (or (and from (functionp shimbun-x-face-database-function) (funcall shimbun-x-face-database-function from)) (shimbun-x-face shimbun))) (insert x-face) (unless (bolp) (insert "\n"))) (buffer-string))))) (eval-when-compile ;; Attempt to pick up the inline function `bbdb-search-simple'. (condition-case nil (require 'bbdb) (error (autoload 'bbdb-search-simple "bbdb") (autoload 'bbdb-get-field "bbdb")))) (defun shimbun-bbdb-get-x-face (person) "Search a face of a PERSON from BBDB. When missing it, return nil." (let (x) (and (setq x (cadr (mail-extract-address-components person))) (setq x (bbdb-search-simple nil x)) (setq x (bbdb-get-field x 'face)) (not (zerop (length x))) (concat "X-Face: " (mapconcat 'identity (split-string x) "\nX-Face: "))))) (eval-when-compile (condition-case nil (require 'lsdb) (error (autoload 'lsdb-maybe-load-hash-tables "lsdb") (autoload 'lsdb-lookup-records "lsdb")))) (defun shimbun-lsdb-get-x-face (person) "Return a face of a PERSON from LSDB. When missing it, return nil." (lsdb-maybe-load-hash-tables) (let (x) (and (setq x (car (mail-extract-address-components person))) (setq x (car (lsdb-lookup-records x))) (setq x (cdr (assq 'x-face x))) (not (zerop (length x))) (mapconcat (lambda (x-face) (concat "X-Face: " (mapconcat 'identity (split-string x-face) "\n "))) x "\n")))) ;;; Implementation of Shimbun API. (defconst shimbun-attributes '(url groups coding-system server-name from-address content-start content-end x-face-alist expiration-days prefer-text-plain text-content-start text-content-end japanese-hankaku retry-fetching)) (defun shimbun-open (server &optional mua) "Open a shimbun for SERVER. Optional MUA is a `shimbun-mua' instance." (let ((load-path (append shimbun-server-additional-path load-path)) rest subst shimbun) (require (intern (concat "sb-" server))) (setq shimbun (apply 'luna-make-entity (intern (concat "shimbun-" server)) :mua mua :server server (dolist (attr shimbun-attributes (nreverse rest)) (push (intern (format ":%s" attr)) rest) (push (if (setq subst (assq attr '((content-start . text-content-start) (content-end . text-content-end) (text-content-start . content-start) (text-content-end . content-end)))) (or (symbol-value (intern-soft (format "shimbun-%s-%s" server attr))) (symbol-value (intern-soft (format "shimbun-%s-%s" server (cdr subst))))) (symbol-value (intern-soft (format "shimbun-%s-%s" server attr)))) rest)))) (when mua (shimbun-mua-set-shimbun-internal mua shimbun)) shimbun)) (defun shimbun-server (shimbun) "Return the server name of SHIMBUN." (shimbun-server-internal shimbun)) (luna-define-generic shimbun-server-name (shimbun) "Return the server name of SHIMBUN in human-readable style.") (luna-define-method shimbun-server-name ((shimbun shimbun)) (or (shimbun-server-name-internal shimbun) (shimbun-server-internal shimbun))) (luna-define-generic shimbun-groups (shimbun) "Return a list of groups which are available in the SHIMBUN.") (luna-define-method shimbun-groups ((shimbun shimbun)) (shimbun-groups-internal shimbun)) (luna-define-generic shimbun-group-p (shimbun group) "Return non-nil if group is available in the SHIMBUN.") (luna-define-method shimbun-group-p ((shimbun shimbun) group) (member group (shimbun-groups shimbun))) (defun shimbun-current-group (shimbun) "Return the current group of SHIMBUN." (shimbun-current-group-internal shimbun)) (luna-define-generic shimbun-current-group-name (shimbun) "Return the current group name of SHIMBUN in human-readable style.") (luna-define-method shimbun-current-group-name ((shimbun shimbun)) (shimbun-current-group-internal shimbun)) (defun shimbun-open-group (shimbun group) "Open a SHIMBUN GROUP." (if (shimbun-group-p shimbun group) (shimbun-set-current-group-internal shimbun group) (error "No such group %s" group))) (defun shimbun-close-group (shimbun) "Close opened group of SHIMBUN." (when (shimbun-current-group-internal shimbun) (shimbun-set-current-group-internal shimbun nil))) (luna-define-generic shimbun-japanese-hankaku (shimbun) "Say whether to convert Japanese zenkaku ASCII chars into hankaku.") (luna-define-method shimbun-japanese-hankaku ((shimbun shimbun)) (let ((hankaku (or (shimbun-japanese-hankaku-internal shimbun) shimbun-japanese-hankaku))) (unless (eq hankaku 'never) hankaku))) (luna-define-generic shimbun-headers (shimbun &optional range) "Return a SHIMBUN header list. Optional argument RANGE is one of following: nil or `all': Retrieve all header indices. `last': Retrieve the last header index. integer n: Retrieve n pages of header indices.") (defmacro shimbun-header-index-pages (range) "Return number of pages to retrieve according to RANGE. Return nil if all pages should be retrieved." (if (consp range) `(let ((range ,range)) (if (eq 'last range) 1 (if (eq 'all range) nil range))) `(if (eq 'last ,range) 1 (if (eq 'all ,range) nil ,range)))) (defvar shimbun-use-refresh t "Non-nil means honor the REFRESH attribute in META tags. Bind it to nil per shimbun if the refresh brings unwanted page.") ;; FIXME: It seems better that `shimbun-fetch-url' provides the redirection ;; support, whereas it is currently done by `shimbun-headers-1' for headers ;; and `shimbun-article-1' for articles separately. The reason doing so is ;; that `shimbun-article-1' needs to replace urls in XREFs with the redirected ;; ones. (defun shimbun-headers-1 (shimbun url) "Run `shimbun-fetch-url' and refresh the contents if necessary." (let (;; The default url used when it is not specified for refresh. (w3m-current-url url) (w3m-use-refresh shimbun-use-refresh)) (when (and (shimbun-fetch-url shimbun url 'reload) (progn (w3m-check-refresh-attribute) (and w3m-current-refresh (not (string-equal url (cdr w3m-current-refresh)))))) (erase-buffer) (shimbun-headers-1 shimbun (cdr w3m-current-refresh))))) (luna-define-method shimbun-headers ((shimbun shimbun) &optional range) (shimbun-message shimbun (concat shimbun-checking-new-news-format "...")) (prog1 (with-temp-buffer (let ((w3m-message-silent (not shimbun-verbose)) (w3m-verbose shimbun-message-enable-logging) headers) (shimbun-headers-1 shimbun (shimbun-index-url shimbun)) (setq headers (shimbun-get-headers shimbun range)) (if (memq (shimbun-japanese-hankaku shimbun) '(body nil)) headers (dolist (header headers headers) (erase-buffer) (insert (shimbun-header-subject-internal header)) (shimbun-japanese-hankaku-buffer) (shimbun-header-set-subject-internal header (buffer-string)))))) (shimbun-message shimbun (concat shimbun-checking-new-news-format "...done")))) (luna-define-generic shimbun-reply-to (shimbun) "Return a reply-to field body for SHIMBUN.") (luna-define-method shimbun-reply-to ((shimbun shimbun)) nil) (luna-define-generic shimbun-x-face (shimbun) "Return a X-Face field string for SHIMBUN.") (luna-define-method shimbun-x-face ((shimbun shimbun)) (shimbun-set-x-face-internal shimbun (let ((group (shimbun-current-group-internal shimbun)) (alist (shimbun-x-face-alist-internal shimbun))) (or (cdr (assoc group alist)) (catch 'face (dolist (elem alist) (when (and (string-match "[]$*+\\^[]" (car elem)) (string-match (car elem) group)) (throw 'face (cdr elem))))) (cdr (assoc "default" alist)) shimbun-x-face)))) (defun shimbun-search-id (shimbun id) "Return non-nil when MUA found a message structure which corresponds to ID." (when (shimbun-mua-internal shimbun) (shimbun-mua-search-id (shimbun-mua-internal shimbun) id))) (defun shimbun-article-expiration-days (shimbun) "Return an expiration day number of SHIMBUN. Return nil when articles are not expired." (shimbun-expiration-days-internal shimbun)) (defun shimbun-content-start (shimbun) "Return the `content-start' value according to SHIMBUN." (if (shimbun-prefer-text-plain-internal shimbun) (or (shimbun-text-content-start-internal shimbun) (shimbun-content-start-internal shimbun)) (or (shimbun-content-start-internal shimbun) (shimbun-text-content-start-internal shimbun)))) (defun shimbun-content-end (shimbun) "Return the `content-end' value according to SHIMBUN." (if (shimbun-prefer-text-plain-internal shimbun) (or (shimbun-text-content-end-internal shimbun) (shimbun-content-end-internal shimbun)) (or (shimbun-content-end-internal shimbun) (shimbun-text-content-end-internal shimbun)))) (luna-define-generic shimbun-from-address (shimbun) "Make a From address like \"SERVER (GROUP) <ADDRESS>\".") (luna-define-method shimbun-from-address ((shimbun shimbun)) (let ((addr (or (shimbun-from-address-internal shimbun) (shimbun-reply-to shimbun)))) (if addr (format "%s (%s) <%s>" (shimbun-server-name shimbun) (shimbun-current-group-name shimbun) addr) (format "%s (%s)" (shimbun-server-name shimbun) (shimbun-current-group-name shimbun))))) (luna-define-generic shimbun-article (shimbun header &optional outbuf) "Retrieve a SHIMBUN article which corresponds to HEADER to the OUTBUF. HEADER is a shimbun-header which is obtained by `shimbun-headers'. If OUTBUF is not specified, article is retrieved to the current buffer.") ;; See also the FIXME comment around `shimbun-headers-1'. (defun shimbun-article-1 (shimbun header) "Run `shimbun-fetch-url' and refresh the contents if necessary." (let* ((url (shimbun-article-url shimbun header)) ;; The default url used when it is not specified for refresh. (w3m-current-url url) (w3m-use-refresh shimbun-use-refresh) real) (when (shimbun-fetch-url shimbun url nil nil (shimbun-article-base-url shimbun header)) (w3m-check-refresh-attribute) (if (and w3m-current-refresh ;; The page may specify to refresh itself. (not (string-equal url (cdr w3m-current-refresh)))) (progn (shimbun-header-set-xref header (cdr w3m-current-refresh)) (erase-buffer) (shimbun-article-1 shimbun header)) (unless (string-equal url (setq real (w3m-real-url url))) (shimbun-header-set-xref header real)))))) (luna-define-method shimbun-article ((shimbun shimbun) header &optional outbuf) (when (shimbun-current-group-internal shimbun) (with-current-buffer (or outbuf (current-buffer)) (w3m-insert-string (or (with-temp-buffer (shimbun-article-1 shimbun header) (shimbun-message shimbun "shimbun: Make contents...") (goto-char (point-min)) (prog1 (shimbun-make-contents shimbun header) (shimbun-message shimbun "shimbun: Make contents...done"))) ""))))) (luna-define-generic shimbun-make-contents (shimbun header) "Return a content string of SHIMBUN article using current buffer content. HEADER is a header structure obtained via `shimbun-headers'.") (defun shimbun-insert-footer (shimbun header &optional html &rest args) "Insert the footer and ARGS." ;; Remove <p> and </p> from the last paragraph in order to prevent ;; an empty line from being inserted at the end. (goto-char (point-min)) (when (re-search-forward "[\t\n ]*<p>[\t\n ]*\\([^<]+\\)</p>[\t\n ]*\ \\(?:<\\(?:![^>]+\\|/?div\\|/?p\\)>[\t\n ]*\\)*\\'" nil t) (replace-match "\n\\1")) (goto-char (point-min)) (when (re-search-forward "[\t\n ]*\\(?:<\\(?:![^>]+\\|br\\|div\\)>[\t\n ]*\\)*\\'" nil 'move) (delete-region (match-beginning 0) (point-max))) (apply 'insert "\n" (shimbun-footer shimbun header html) args)) (defun shimbun-current-base-url () "Process BASE tag in the current buffer." (let ((case-fold-search t)) (goto-char (point-min)) (when (re-search-forward "</head\\(?:[ \t\r\f\n][^>]*\\)?>" nil t) (save-restriction (narrow-to-region (point-min) (point)) (goto-char (point-min)) (when (re-search-forward "<base[ \t\r\f\n]+" nil t) (w3m-parse-attributes (href) (when (< 0 (length href)) href))))))) (defun shimbun-make-html-contents (shimbun header) (let ((base-url (or (shimbun-current-base-url) (file-name-directory (shimbun-article-url shimbun header))))) (when (shimbun-clear-contents shimbun header) (goto-char (point-min)) (insert "<html>\n<head>\n<base href=\"" base-url "\">\n</head>\n<body>\n") (shimbun-insert-footer shimbun header t "</body>\n</html>\n")) (shimbun-make-mime-article shimbun header base-url) (buffer-string))) (eval-and-compile (autoload 'shimbun-make-text-contents "sb-text")) (luna-define-method shimbun-make-contents ((shimbun shimbun) header) (if (shimbun-prefer-text-plain-internal shimbun) (shimbun-make-text-contents shimbun header) (shimbun-make-html-contents shimbun header))) (luna-define-generic shimbun-clear-contents (shimbun header) "Clear a content in this current buffer for an article of SHIMBUN. Return nil, unless a content is cleared successfully.") (luna-define-method shimbun-clear-contents ((shimbun shimbun) header) (let ((start (shimbun-content-start shimbun)) (end (shimbun-content-end shimbun)) (case-fold-search t)) (goto-char (point-min)) (when (and (stringp start) (re-search-forward start nil t) (progn (setq start (point)) (stringp end)) (re-search-forward end nil t)) (delete-region (match-beginning 0) (point-max)) (delete-region (point-min) start) (unless (memq (shimbun-japanese-hankaku shimbun) '(header subject nil)) (shimbun-japanese-hankaku-buffer t) (goto-char (point-min))) t))) (luna-define-generic shimbun-footer (shimbun header &optional html) "Make a footer string for SHIMBUN and HEADER.") (luna-define-method shimbun-footer ((shimbun shimbun) header &optional html) "Return a null string for servers that have no footer." "") (luna-define-generic shimbun-index-url (shimbun) "Return a index URL of SHIMBUN.") (luna-define-method shimbun-index-url ((shimbun shimbun)) (shimbun-url-internal shimbun)) (luna-define-generic shimbun-get-headers (shimbun &optional range) "Return a shimbun header list of SHIMBUN. Optional argument RANGE is one of following: nil or `all': Retrieve all header indices. `last': Retrieve the last header index. integer n: Retrieve n pages of header indices.") (luna-define-generic shimbun-close (shimbun) "Close a SHIMBUN.") (luna-define-method shimbun-close ((shimbun shimbun)) (shimbun-close-group shimbun)) ;;; Virtual class for Newspapers: (luna-define-class shimbun-newspaper () ()) (luna-define-method shimbun-footer ((shimbun shimbun-newspaper) header &optional html) (if html (concat "<div align=\"left\">\n-- <br>\n<i>" (shimbun-server-name shimbun) " holds the copyright of this article.<br>\n" "The original article is <a href=\"" (shimbun-article-base-url shimbun header) "\">" "here</a>.\n</i></div>\n") (concat "-- \n" (shimbun-server-name shimbun) " holds the the copyright of this article.\n" "The original article is in:\n" (shimbun-article-base-url shimbun header) "\n"))) ;;; Virtual class for Japanese Newspapers: (luna-define-class shimbun-japanese-newspaper () ()) (luna-define-method shimbun-footer ((shimbun shimbun-japanese-newspaper) header &optional html) (if html (concat "<div align=\"left\">\n-- <br>\n荐篋篏罔" (shimbun-server-name shimbun) "腓障絽医障<br>\n <a href=\"" (shimbun-article-base-url shimbun header) "\"><" (shimbun-article-base-url shimbun header) "></a> у障\n</div>\n") (concat "-- \n荐篋篏罔" (shimbun-server-name shimbun) "腓障絽医障\n <" (shimbun-article-base-url shimbun header) "> у障\n"))) ;;; Misc Functions (defun shimbun-header-insert-and-buffer-string (shimbun header &optional charset html) "Insert headers and footer in the current buffer and return the contents. SHIMBUN and HEADER specify what headers and footer are. CHARSET, which defaults to the one that the `detect-mime-charset-region' function determines, specifies the content charset and is used to encode the return value of this function. A non-nil value of HTML specifies that the content type is text/html, otherwise text/plain." (unless charset (setq charset (upcase (symbol-name (detect-mime-charset-region (point-min) (point-max)))))) (goto-char (point-min)) (shimbun-header-insert shimbun header) (insert "Content-Type: text/" (if html "html" "plain") "; charset=" charset "\nMIME-Version: 1.0\n\n") (if html (progn (insert "<html>\n<head>\n<base href=\"" (file-name-directory (shimbun-article-url shimbun header)) "\">\n</head>\n<body>\n") (shimbun-insert-footer shimbun header t "</body>\n</html>\n")) (shimbun-insert-footer shimbun header)) (encode-mime-charset-string (buffer-string) charset)) (defun shimbun-mime-encode-string (string) (condition-case nil (save-match-data (with-temp-buffer ;; Make sure the temp buffer's multibyteness is true. It is ;; needed to make `encode-mime-charset-string' (which is ;; employed by `eword-encode-string') encode non-ascii text. (set-buffer-multibyte t) (mapconcat #'identity (split-string (or (eword-encode-string (shimbun-decode-entities-string string)) "")) " "))) (error string))) (defun shimbun-make-date-string (year month day &optional time timezone) "Make a date string which will be used as shimbun headers. YEAR is a 4-digit number, and MONTH and DAY are also numbers. TIME is a string in the \"HH:MM\" form, where HH is a number of hours and MM is a number of minutes. It defaults to \"00:00\". TIMEZONE defaults to \"+0900\" by the historical reason. You should specify this if a time is represented based on other than the \"+0900\" zone." (setq year (cond ((< year 69) (+ year 2000)) ((< year 100) (+ year 1900)) ((< year 1000) ; possible 3-digit years. (+ year 1900)) ; why isn't it 1000? (t year))) (let ((cts (current-time-string (encode-time 0 0 0 day month year)))) (format "%s, %02d %s %04d %s %s" (substring cts 0 3) day (substring cts 4 7) year (or time "00:00") (or timezone "+0900")))) (autoload 'timezone-fix-time "timezone") (defun shimbun-time-parse-string (string) "Parse the time-string STRING into the Emacs style (HIGH LOW) time." (let ((x (nreverse (append (timezone-fix-time string nil nil) nil)))) (time-convert (apply 'encode-time (nconc (cdr x) (list (car x)))) 'list))) (defun shimbun-decode-time (&optional specified-time specified-zone) "Decode a time value as (SEC MINUTE HOUR DAY MONTH YEAR DOW DST ZONE). This function behaves as well as `decode-time' if the optional 2nd arg SPECIFIED-ZONE is nil. If it is an integer indicating the number of seconds ahead of UTC (east of Greenwich), the return value expresses the local time of the zone that the value indicates. For instance, the following form returns the present time of Japan, wherever you are. (shimbun-decode-time nil 32400)" (if specified-zone (let* ((tz (- (car (current-time-zone)) specified-zone)) (ct (time-convert (or specified-time (current-time)) 'list)) (ms (car ct)) (ls (- (cadr ct) tz))) (cond ((< ls 0) (setq ls (+ ls 65536) ms (1- ms))) ((>= ls 65536) (setq ls (- ls 65536) ms (1+ ms)))) (nconc (nbutlast (decode-time (list ms ls))) (list specified-zone))) (decode-time specified-time))) (defun shimbun-sort-headers (headers) "Return a list of sorted HEADERS by date in increasing order." (sort headers (lambda (a b) (setq a (shimbun-time-parse-string (shimbun-header-date a)) b (shimbun-time-parse-string (shimbun-header-date b))) (or (< (car a) (car b)) (and (= (car a) (car b)) (< (cadr a) (cadr b))))))) (defun shimbun-remove-tags (begin-tag &optional end-tag) "Remove all occurrences of regions surrounded by BEGIN-TAG and END-TAG. If END-TAG is neither nil nor a string, it works strictly for open and close tags (i.e. <tag>...</tag>). In that case, BEGIN-TAG should be a regexp matching text within an open tag \"<...>\", and buffer's text that matches the first non-shy sub-expression surrounded by parens \"\\\\(...\\\\)\" in BEGIN-TAG is regarded as a name of an open tag; if there is no paren in BEGIN-TAG, the whole text that matches BEGIN-TAG is regarded as a tag name." (let ((case-fold-search t)) (goto-char (point-min)) (cond ((stringp end-tag) (let (pos) (while (and (re-search-forward begin-tag nil t) (setq pos (match-beginning 0)) (re-search-forward end-tag nil t)) (delete-region pos (point))))) ((null end-tag) (while (re-search-forward begin-tag nil t) (delete-region (match-beginning 0) (match-end 0)))) (t (setq begin-tag (if (string-match "\\\\([^?]" begin-tag) (concat "<[\t\n\r ]*" begin-tag) (concat "<[\t\n\r ]*\\(" begin-tag "\\)[\t\n\r >]"))) (while (re-search-forward begin-tag nil t) (when (or (not (eq (match-end 0) (match-end 1))) (memq (char-after) '(?\t ?\n ?\r ? ?>))) (goto-char (match-beginning 0)) (if (shimbun-end-of-tag (match-string 1) t) (replace-match "\n") (goto-char (match-end 0))))))))) (defun shimbun-remove-orphaned-tag-strips (string) "Remove orphaned tag strips that match STRING. STRING is like the inside of a \"\\\\(...\\\\)\" in a regular expression." (let (regexp st nd) (setq regexp (concat "<[\t\n\r ]*/[\t\n\r ]*\\(" string "\\)\\(?:[\t\n\r ][^>]+\\)?[\t\n\r ]*>[\t ]*")) (goto-char (point-max)) (while (re-search-backward regexp nil t) (setq st (match-beginning 0) nd (goto-char (match-end 0))) (unless (prog1 (shimbun-beginning-of-tag (match-string 1)) (goto-char st)) (skip-chars-backward "\t\n\r ") (delete-region (point) nd))) (setq regexp (concat "[\t\n\r ]*<[\t\n\r ]*\\(" string "\\)\\(?:[\t\n\r ][^>]+\\)?[\t\n\r ]*>[\t ]*")) (goto-char (point-min)) (while (re-search-forward regexp nil t) (setq st (goto-char (match-beginning 0)) nd (match-end 0)) (unless (prog1 (shimbun-end-of-tag (match-string 1)) (goto-char nd)) (delete-region st nd))))) (defun shimbun-remove-markup () "Remove all HTML markup, leaving just plain text." (save-excursion (goto-char (point-min)) (while (search-forward "<!--" nil t) (delete-region (match-beginning 0) (or (search-forward "-->" nil t) (point-max)))) (goto-char (point-min)) (while (re-search-forward "<[^>]+>" nil t) (replace-match "" t t)))) (defun shimbun-strip-cr () "Strip ^M from the end of all lines." (goto-char (point-max)) (while (search-backward "\r\n" nil t) (delete-char 1))) (defun shimbun-message (shimbun fmt &rest args) "Function equivalent to `message' enabling to handle special formats. SHIMBUN is a shimbun entity object. FMT and ARGS are the same as the arguments of `message'. This function allows the following special format specifiers: #g means print a group name. #s means print a server name. #S means print a human-readable server name. Use ## to put a single # into the output. If `shimbun-verbose' is nil, it will run silently. The `shimbun-message-enable-logging' variable controls whether this function should log messages in the \"*Messages*\" buffer." (let (specifier) (with-temp-buffer (set-buffer-multibyte t) (insert fmt) (goto-char (point-min)) (while (search-forward "#" nil t) (setq specifier (char-after)) (delete-region (1- (point)) (1+ (point))) (cond ((eq specifier ?#) (insert "#")) ((eq specifier ?g) (insert (shimbun-current-group-internal shimbun))) ((eq specifier ?s) (insert (shimbun-server-internal shimbun))) ((eq specifier ?S) (insert (or (shimbun-server-name-internal shimbun) (shimbun-server-internal shimbun)))))) (setq fmt (buffer-string)))) (if shimbun-verbose (if shimbun-message-enable-logging (apply 'message fmt args) (let (message-log-max) (apply 'message fmt args))) (apply 'format fmt args))) (defmacro shimbun-with-narrowed-article (shimbun &rest forms) "Narrow to the article in the buffer and evaluate FORMS." `(progn (shimbun-strip-cr) (goto-char (point-min)) (let ((case-fold-search t) start) (when (re-search-forward (shimbun-content-start ,shimbun) nil t) (setq start (match-end 0)) (when (re-search-forward (shimbun-content-end ,shimbun) nil t) (narrow-to-region start (match-beginning 0)) (goto-char (point-min)) ;; Remove trailing whitespace. (while (re-search-forward "[\t ]+$" nil t) (delete-region (match-beginning 0) (match-end 0))) (goto-char (point-min)) ,@forms (widen)) (goto-char (point-min)))))) (defun shimbun-char-category-list (char) "Return a list of category mnemonics for CHAR." (append (category-set-mnemonics (char-category-set char)) nil)) (eval-when-compile (defsubst shimbun-japanese-hankaku-region-1 (start end quote) (save-restriction (narrow-to-region start end) (goto-char start) (when quote (while (re-search-forward "鐚\\(?:[ ]\\| \\)?" nil t) (replace-match "<")) (goto-char start) (while (re-search-forward "\\(?:[ ]\\| \\)?鐚" nil t) (replace-match ">")) (goto-char start) (while (search-forward "鐚" nil t) (replace-match "&")) (goto-char start)) (while (re-search-forward "\ \\(?:[鐚鐔][鐚鐔][鐚鐔][鐚ワ]\\|[鐚鐔][鐚器][鐚逸]\ \\|[鐚鐔][鐚器][鐚器][鐚逸][鐚鰹]?\\|[鐚鐔][鐚¥][鐚鐔][鐚鐔][鐚器][鐚鐔]\\)\ 鐚\\cj+" nil t) (japanese-hankaku-region (match-beginning 0) (match-end 0) t)) (goto-char start) (while (re-search-forward "\\([^0-9鐚-鐚]\\)鐚\\|鐚\\([^ 0-9鐚-鐚]\\)" nil t) (if (match-beginning 1) (replace-match "\\1:") (replace-match ":\\2") (backward-char 1)) (unless (looking-at " ") (insert " "))) (goto-char start) (while (search-forward "鐚" nil t) (replace-match ";") (unless (looking-at "[ ]\\| ") (insert " "))) (goto-char start) ;; 鐚削鐚 -> 鐚@鐚 ;; where 鐚 is a zenkaku alphanumeric, 鐚 is a zenkaku symbol. (while (re-search-forward "\\cA[鐚ツ器鐚常漆鐚鐚種鐚]\\cA" nil t) (backward-char 2) (insert (prog1 (cdr (assq (char-after) '((?鐚 . ?.) (?卒 . ?') (?鐔 . ?`) (?鐚 . ?^) (?鐚 . ?_) (? . ?-) (? . ?-) (?鐚 . ?/) (?鐚 . ?\\) (?鐔 . ?|) (? . ?') (?鐚 . ?@)))) (delete-char 1)))) (goto-char start) ;; Replace Chinese hyphen with "". (condition-case nil (let ((regexp (concat "[" (list (make-char 'chinese-gb2312 35 45) (make-char 'chinese-big5-1 34 49)) "]"))) (while (re-search-forward regexp nil t) (replace-match ""))) (error)) (goto-char start) (while (re-search-forward "[^鐚鐚鐚帥錫鐚鐚鐚誌悉鐔鐔鐚霞鰹織]+" nil t) (japanese-hankaku-region (match-beginning 0) (match-end 0) t)) (goto-char start) ;; Exclude ">" in order not to break paragraph start. (while (re-search-forward "\\([!-=?-~]\\)\\|\\([!-~]\\)" nil t) (if (match-beginning 1) (replace-match "\\1 ") (unless (memq (char-before (match-beginning 0)) '(nil ?\n ?>)) (replace-match " \\2")) (backward-char 1))) (goto-char start) (while (re-search-forward "\\([!-~]\\)[ ]*\\([!-~]\\)" nil t) (replace-match "\\1, \\2") (backward-char 1)) (goto-char start) (while (re-search-forward "鐚\\(\\cj\\)" nil t) (replace-match "\\1") (backward-char 1)) (goto-char start) (while (re-search-forward "\\(\\cj\\)鐚" nil t) (replace-match "\\1")) (goto-char start) (while (re-search-forward "\\([0-9]\\)鐚\\([0-9][0-9][0-9][^0-9]\\)" nil t) (replace-match "\\1,\\2") (backward-char 2)) (goto-char start) (while (re-search-forward "\ \\([0-9]\\)\\(?:\\(鐚\\)\\|\\(鐚\\)\\|\\(\\)\\|\\(\\)\\)\\([0-9]\\)" nil t) (replace-match (cond ((match-beginning 2) "\\1.\\6") ((match-beginning 3) "\\1_\\6") ((or (match-beginning 4) (match-beginning 5)) "\\1-\\6"))) (backward-char 1)) (when (eq w3m-output-coding-system 'utf-8) (goto-char start) (while (re-search-forward "\\([]\\)\\|[属属霞]" nil t) (if (match-beginning 1) (or (memq (char-before (match-beginning 1)) '(? ?)) (string-equal (buffer-substring (match-beginning 1) (max (- (match-beginning 1) 6) start)) " ") (progn (backward-char 1) (insert " ") (forward-char 1))) (unless (looking-at "?:[ ]\\| ") (insert " "))))) ;; Do wakachi-gaki. ;; FIXME:宴筝 3鴻 8峨財 (goto-char start) (while (re-search-forward "\\(\\cj\\)\\(?:[ ]\\| \\)\\([])>}]\ \\|&#\\(?:62\\|187\\|8217\\|8221\\|8250\\|8969\\|8971\\|9002\\);\ \\|&\\(?:gt\\|raquo\\|rsquo\\|rdquo\\|rsaquo\\|rceil\\|rfloor\\|rang\\);\\)\ \\|\\([(<[{]\\|&#\\(?:60\\|171\\|8216\\|8220\\|8249\\|8968\\|8970\\|9001\\);\ \\|&\\(?:lt\\|laquo\\|lsquo\\|ldquo\\|lsaquo\\|lceil\\|lfloor\\|lang\\);\\)\ \\(?:[ ]\\| \\)\\(\\cj\\)" nil t) (replace-match (if (match-beginning 1) "\\1\\2" "\\3\\4")) (backward-char 1)) (goto-char start) (while (re-search-forward "\ \\(\\(?:[^0-9]\\|\\`\\)\\cj\\)\\([0-9]+\\(?:[,.][0-9]+\\)*[^0-9]\\)\ \\|\\(\\(?:[^0-9]\\|\\`[0-9]*\\)[!-/:-=?-~][0-9]+\\(?:[,.][0-9]+\\)*\\)\ \\(\\cj\\)\ \\|\\([0-9]\\)\\(\\cH[^0-9]\\)\ \\|\\(\\cj\\)\\([(<A-Z[a-z{]\ \\|&#\\(?:60\\|171\\|8216\\|8220\\|8249\\|8968\\|8970\\|9001\\);\ \\|&\\(?:lt\\|laquo\\|lsquo\\|ldquo\\|lsaquo\\|lceil\\|lfloor\\|lang\\);\\)\ \\|\\([]%)>A-Za-z}]\ \\|&#\\(?:62\\|187\\|8217\\|8221\\|8250\\|8969\\|8971\\|9002\\);\ \\|&\\(?:gt\\|raquo\\|rsquo\\|rdquo\\|rsaquo\\|rceil\\|rfloor\\|rang\\);\\)\ \\(\\cj\\)" nil t) (cond ((match-beginning 1) (unless (or (and (member (match-string 1) '("羃" "紊ф" "" "綛恰")) (eq (char-before) ?綛)) (and (member (match-string 1) '("" "緇")) (eq (char-before) ?)) (memq (char-before (match-end 1)) '(? ?鐚 ? ?賊 ? ?歎 ?鐚 ? ? ? ? ? ?)) (and (memq (char-before (match-end 1)) '(?膃 ?膣)) (memq ?j (shimbun-char-category-list (char-before))))) (replace-match "\\1 \\2")) (goto-char (match-end 1))) ((match-beginning 3) (replace-match "\\3 \\4") (goto-char (match-end 3))) ((match-beginning 5) (unless (memq (char-after (match-beginning 6)) '(?)) (replace-match "\\5 \\6")) (goto-char (match-end 5))) ((match-beginning 7) (unless (eq (char-after (match-beginning 7)) ?) (replace-match "\\7 \\8")) (goto-char (match-end 7))) (t (unless (string-equal (buffer-substring (max (- (match-beginning 10) 3) (point-min)) (match-beginning 10)) "<p>") (replace-match (concat "\\9 " (match-string 10)))) (goto-char (match-end 9))))) ;; Replace hankaku tilde with swung dash. (goto-char start) (while (search-forward (eval-when-compile (string (make-char 'ascii '126))) nil t) (replace-match (eval-when-compile (string (make-char 'unicode 0 32 83))))) (goto-char start) (let ((regexp (if (eq w3m-output-coding-system 'utf-8) "\\(\\cG\\|\\cg\\)\\(\\cj\\)\\|\\(\\cj\\)\\(\\cG\\|\\cg\\)" "\\(\\cg\\)\\(\\cj\\)\\|\\(\\cj\\)\\(\\cg\\)"))) (while (re-search-forward regexp nil t) (if (match-beginning 1) (unless (eq (char-before) ?) (replace-match "\\1 \\2")) (unless (eq (char-after (match-beginning 3)) ?) (replace-match "\\3 \\4"))) (backward-char 1))) ;; Finally strip useless space. (goto-char start) (while (re-search-forward "\\(\\) \\([0-9]\\)" nil t) (replace-match "\\1\\2")) (goto-char start) (let ((regexp (if (eq w3m-output-coding-system 'utf-8) (eval-when-compile (let ((chars "鐚鐚鐚鐚祉鐃c純障\ 鐚鐚鐚誌悉鐔鐔")) (concat "\\(?:[ ]\\| \\)\\([" chars "]\\)" "\\|\\([" chars "]\\)\\(?:[ ]\\| \\)"))) (eval-when-compile (let ((chars "属霞蛎э鐚鐚鐚祉即\ 鐃c純障モ鐚鐚鐚誌悉鐔鐔属霞蛎")) (concat "\\(?:[ ]\\| \\)\\([" chars "]\\)" "\\|\\([" chars "]\\)\\(?:[ ]\\| \\)")))))) (while (re-search-forward regexp nil t) (goto-char (match-beginning 0)) (if (match-beginning 1) (if (or (bobp) (eq (save-match-data (when (re-search-backward ">[\t\n ]*" nil t) (match-end 0))) (match-beginning 0))) ;; Don't break paragraph start. (goto-char (match-beginning 1)) (delete-region (goto-char (match-beginning 0)) (match-beginning 1))) (delete-region (match-end 2) (match-end 0))))) (goto-char (point-max))))) (defun shimbun-japanese-hankaku-region (start end &optional quote) "Convert Japanese zenkaku ASCII chars between START and END into hankaku. There are exceptions; some chars and the ones in links aren't converted, and \"鐚\", \"鐚\" and \"鐚\" are quoted if QUOTE is non-nil." (setq end (set-marker (make-marker) end)) (while start (goto-char start) (set-match-data nil) (re-search-forward "<a[\t\n\r ]+\\(?:[^\t\n\r ]+[\t\n\r ]+\\)*\ \\(?:href=\"\\([^\"]+\\)\\|href=\'\\([^']+\\)\\)\ \\|<img[\t\n\r ]+\\(?:[^\t\n\r ]+[\t\n\r ]+\\)*\ \\(?:src=\"\\([^\"]+\\)\\|src=\'\\([^']+\\)\\)" end t) (shimbun-japanese-hankaku-region-1 (prog1 start (setq start (cadr (match-data)))) ;; marker of (match-end 0) (or (match-beginning 1) (match-beginning 2) (match-beginning 3) (match-beginning 4) end) quote)) (set-marker end nil)) (defun shimbun-japanese-hankaku-buffer (&optional quote) "Convert Japanese zenkaku ASCII chars in the current buffer into hankaku. Sections surrounded by the <pre>...</pre> tags are not processed. There are exceptions; some chars aren't converted, and \"鐚\", \"鐚\" and \"鐚\" are quoted if QUOTE is non-nil." (let ((start (goto-char (point-min)))) (while (search-forward "<pre>" nil t) (when (> (match-beginning 0) start) (shimbun-japanese-hankaku-region start (match-beginning 0) quote) (forward-char 5)) (search-forward "</pre>" nil 'move) (setq start (point))) (unless (eobp) (shimbun-japanese-hankaku-region start (point-max) quote)))) (declare-function libxml-available-p "xml.c") (declare-function libxml-parse-xml-region "xml.c" (start end &optional base-url)) (defun shimbun-xml-parse-buffer () "Calls (lib)xml-parse-region on the whole buffer. This is a wrapper for `xml-parse-region', which will resort to using `libxml-parse-xml-region' if available, since it is much faster." ;; FIXME: work around a kind of malformed xml. ;; (Mainichi used unquoted "Q&A" in an xml form.) (save-excursion (goto-char (point-min)) (while (search-forward "<" nil t) (while (not (zerop (skip-chars-forward "^<&"))) (when (and (eq (char-after) ?&) (not (looking-at xml-entity-or-char-ref-re))) (delete-char 1) (insert "鐚"))))) (if (libxml-available-p) (save-excursion (goto-char (point-min)) (let ((xml (when (search-forward "<" nil t) (libxml-parse-xml-region (match-beginning 0) (point-max)))) start stylestring stylesheet) (if xml (progn ;; Parse the stylesheet (goto-char (point-min)) (when (re-search-forward "<\\(rss\\|feed\\)\\(.*?\\)>" nil t) (setq stylestring (match-string 2) start 0) (while (string-match "\\(xmlns:?.*?\\)=\"\\(.*?\\)\"" stylestring start) (setq start (match-end 0)) (push (cons (intern (match-string 1 stylestring)) (match-string 2 stylestring)) stylesheet))) ;; Add stylesheet into XML structure (when stylesheet (if (nth 1 xml) (nconc (nth 1 xml) stylesheet) (setcar (cdr xml) stylesheet))) (list xml)) ;; Unfortunately libxml failed parsing for some reason. (xml-parse-region (point-min) (point-max))))) ;; We don't have libxml, so just use the slow one. (xml-parse-region (point-min) (point-max)))) (provide 'shimbun) ;;; shimbun.el ends here ��������������������������������������������������������emacs-w3m-emacs-w3m-4f27810/w3m-antenna.el����������������������������������������������������������0000664�0000000�0000000�00000052715�14343750021�0020040�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; w3m-antenna.el --- Utility to detect changes of WEB -*- lexical-binding: t -*- ;; Copyright (C) 2001-2005, 2007, 2017, 2019, 2022 ;; TSUCHIYA Masatoshi <tsuchiya@namazu.org> ;; Authors: TSUCHIYA Masatoshi <tsuchiya@namazu.org> ;; Keywords: w3m, WWW, hypermedia ;; This file is a part of emacs-w3m. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; w3m-antenna.el is the add-on utility of emacs-w3m to detect changes ;; of WEB pages. For more detail about emacs-w3m, see: ;; ;; http://emacs-w3m.namazu.org/ ;;; How to install: ;; Please put this file to appropriate directory, and if you want ;; byte-compile it. And add following lisp expressions to your ;; ~/.emacs. ;; ;; (autoload 'w3m-antenna "w3m-antenna" "Report changes of WEB sites." t) ;;; Code: (require 'cl-lib) ;; cl-incf (require 'w3m-util) (require 'w3m-rss) (require 'w3m) (defgroup w3m-antenna nil "w3m-antenna - Utility to detect changes of WEB." :group 'w3m :prefix "w3m-antenna-") (define-widget 'w3m-antenna-string 'string "String widget with default value. When creating a new widget, its value is given by an expression specified with :value-from." :tag "URL" :value-from nil :create 'w3m-antenna-string-create) (defun w3m-antenna-string-create (widget) (if (string= "" (widget-get widget :value)) ;; No value is given. (widget-put widget :value (let* ((symbol (widget-get widget :value-from)) (value (eval symbol))) (if value (set symbol nil) (setq value "")) value))) (widget-default-create widget)) (defvar w3m-antenna-alist nil "A list of site information (internal variable). nil means that antenna database is not initialized. Each site information is a list that consists of: 0. Format string of URL. 1. Title. 2. Class (Normal, HNS or TIME). 3. Real URL. 4. Last modification time. 5. Size in bytes. 6. Time when size modification is detected. ") (defmacro w3m-antenna-site-key (site) `(car ,site)) (defmacro w3m-antenna-site-title (site) `(nth 1 ,site)) (defmacro w3m-antenna-site-class (site) `(nth 2 ,site)) (defmacro w3m-antenna-site-url (site) `(nth 3 ,site)) (defmacro w3m-antenna-site-last-modified (site) `(nth 4 ,site)) (defmacro w3m-antenna-site-size (site) `(nth 5 ,site)) (defmacro w3m-antenna-site-size-detected (site) `(nth 6 ,site)) (defcustom w3m-antenna-file (expand-file-name ".antenna" w3m-profile-directory) "File which has list of antenna URLs." :group 'w3m-antenna :type 'file) (defcustom w3m-antenna-refresh-interval nil "Interval time to update (to refresh) the antenna page automatically. The value should be a positive integer in seconds, or nil which means not to update the page." :group 'w3m-antenna :type '(choice (const :tag "Not reload" nil) (integer :tag "Interval seconds"))) (defcustom w3m-antenna-sites (unless noninteractive (mapcar (lambda (site) (list (w3m-antenna-site-key site) (w3m-antenna-site-title site) (w3m-antenna-site-class site))) (w3m-load-list w3m-antenna-file))) "List of WEB sites, watched by `w3m-antenna'." :group 'w3m-antenna :type `(repeat (group :indent 2 (w3m-antenna-string :format "URL: %v" :value-from w3m-antenna-tmp-url) (w3m-antenna-string :format "Title: %v" :value-from w3m-antenna-tmp-title) (choice :tag "Procedure" (const :tag "Check either its last modified time or its size" nil) (const :tag "Check its last modified time only" time) (const :tag "Check its current date provided by Hyper Nikki System" hns) (list :tag "Check RSS" :indent 4 (function-item :format "" w3m-antenna-check-rss) (string :format "URL: %v" :value "")) (list :tag "Check the another changelog page" :indent 4 (function-item :format "" w3m-antenna-check-another-page) (string :format "URL: %v" :value "")) (list :tag "Check the page linked by the anchor that matches" :indent 4 (function-item :format "" w3m-antenna-check-anchor) (regexp :value "") (integer :value 0)) (cons :tag "Check with a user defined function" :indent 4 (function :match (lambda (widget value) (and (functionp value) (not (memq value '(w3m-antenna-check-rss w3m-antenna-check-another-page w3m-antenna-check-anchor)))))) (repeat :tag "Arguments" sexp)))))) (defcustom w3m-antenna-html-skelton (eval-when-compile (concat "<!doctype html public \"-//W3C//DTD HTML 3.2//EN\">\n" "<html>\n<head>\n<title>Antenna\n%R\n\n" "

    Antenna

    \n

    Checked at %D.

    \n" "

    Updated

    \n
      \n%C
    \n" "

    Visited

    \n
      \n%U
    \n" "\n\n")) "HTML skelton of antenna." :group 'w3m-antenna :type 'string) (defcustom w3m-antenna-make-summary-function 'w3m-antenna-make-summary-like-natsumican "Function to make summary of site information." :group 'w3m-antenna :type '(choice :format "%{%t%}:\n %[Value Menu%] %v" (function-item :tag "Simple style" :format "%t" w3m-antenna-make-summary) (function-item :tag "Natsumican style" :format "%t" w3m-antenna-make-summary-like-natsumican) (function :format "User function: %v" :size 8))) (defcustom w3m-antenna-sort-changed-sites-function 'w3m-antenna-sort-sites-by-time "Function to sort list of changed sites." :group 'w3m-antenna :type '(choice :format "%{%t%}:\n %[Value Menu%] %v" (function-item :tag "Sort by last modification time" :format "%t" w3m-antenna-sort-sites-by-time) (function-item :tag "Sort by title" :format "%t" w3m-antenna-sort-sites-by-title) (function-item :tag "Do nothing" :format "%t" identity) (function :format "User function: %v" :size 8))) (defcustom w3m-antenna-sort-unchanged-sites-function 'w3m-antenna-sort-sites-by-time "Function to sort list of unchanged sites." :group 'w3m-antenna :type '(choice :format "%{%t%}:\n %[Value Menu%] %v" (function-item :tag "Sort by last modification time" :format "%t" w3m-antenna-sort-sites-by-time) (function-item :tag "Sort by title" :format "%t" w3m-antenna-sort-sites-by-title) (function-item :tag "Do nothing" :format "%t" identity) (function :format "User function: %v" :size 8))) (defun w3m-antenna-alist () (let ((alist (w3m-load-list w3m-antenna-file))) (mapcar (lambda (site) (let ((l (assoc (w3m-antenna-site-key site) alist))) (if l (progn (setf (w3m-antenna-site-class l) (w3m-antenna-site-class site)) l) (append site (list nil nil nil nil))))) w3m-antenna-sites))) (defun w3m-antenna-hns-last-modified (url handler) (w3m-process-do-with-temp-buffer (type (w3m-retrieve (w3m-expand-url "di.cgi" url) nil t nil nil handler)) (when type (or (let (start str) ;; Process a line such as "Tue, 27 Mar 2001 12:43:16 GMT
    ". (goto-char (point-min)) (and (search-forward "\nLast-Modified: " nil t) (setq start (match-end 0)) (search-forward "
    " nil t) (setq str (buffer-substring start (match-beginning 0))) ;; Ignore format such as "2001, 27 03 GMT", which is used ;; by old HNS. (not (string-match " *[0-9][0-9][0-9][0-9], +[0-9][0-9] +[0-9][0-9] +" str)) (w3m-time-parse-string str))) (progn ;; Process a line such as "newest day is 2001/03/15". (goto-char (point-min)) (and (re-search-forward "\ ^newest day is \\([0-9][0-9][0-9][0-9]\\)/\\([0-9][0-9]\\)/\\([0-9][0-9]\\)$" nil t) (encode-time 0 0 0 (string-to-number (match-string 3)) (string-to-number (match-string 2)) (string-to-number (match-string 1)) 32400))))))) (defun w3m-antenna-check-hns (site handler) "Check the page served by HNS (Hyper Nikki System) asynchronously." (w3m-process-do (time (w3m-antenna-hns-last-modified (w3m-antenna-site-key site) handler)) (if time (w3m-antenna-site-update site (w3m-antenna-site-key site) time nil) (w3m-antenna-check-page site handler)))) (defun w3m-antenna-check-rss (site handler url) "Check RSS to detect change of SITE asynchronously. In order to use this function, `xml.el' is required." (w3m-process-do-with-temp-buffer (type (w3m-retrieve url nil t nil nil handler)) (let (link date dates) (when type (w3m-decode-buffer url) (let* ((xml (ignore-errors (xml-parse-region (point-min) (point-max)))) (dc-ns (w3m-rss-get-namespace-prefix xml "http://purl.org/dc/elements/1.1/")) (rss-ns (w3m-rss-get-namespace-prefix xml "http://purl.org/rss/1.0/")) (channel (car (w3m-rss-find-el (intern (concat rss-ns "channel")) xml))) (items (w3m-rss-find-el (intern (concat rss-ns "item")) xml))) (setq link (nth 2 (car (w3m-rss-find-el (intern (concat rss-ns "link")) channel)))) (setq dates (append (w3m-rss-find-el (intern (concat dc-ns "date")) channel) (w3m-rss-find-el (intern (concat dc-ns "date")) items) (w3m-rss-find-el 'pubDate channel) (w3m-rss-find-el 'pubDate items))) (when dates ;; Ignore future entries to display site announcements. (let ((now (time-convert nil 'list))) (let ((low (+ (nth 1 now) 3600))) ; 3600 = clock skew margin (setq now (if (>= low 65536) (list (1+ (car now)) (- low 65536) (nth 2 now)) (list (car now) low (nth 2 now))))) (setq date '(0 0)) (dolist (tmp dates) (setq tmp (w3m-rss-parse-date-string (nth 2 tmp))) (and (w3m-time-newer-p tmp date) (w3m-time-newer-p now tmp) (setq date tmp))))))) (if (and link date) (w3m-antenna-site-update site link date nil) (w3m-antenna-check-page site handler))))) (defun w3m-antenna-check-another-page (site handler url) "Check the another page to detect change of SITE asynchronously. This function checks the another page specified by the URL before checking the SITE itself. This function is useful when the SITE's owner either maintains the page which describes the change of the SITE." (w3m-process-do-with-temp-buffer (time (w3m-last-modified url t handler)) (if time (w3m-antenna-site-update site (w3m-antenna-site-key site) time nil) (w3m-antenna-check-page site handler)))) (defun w3m-antenna-check-anchor (site handler regexp number) "Check the page linked from SITE asynchronously. This function checks the page linked by an anchor that matches REGEXP from the page that is specified by SITE's key attribute." (or number (setq number 0)) (w3m-process-do-with-temp-buffer (type (w3m-retrieve (w3m-antenna-site-key site) nil nil nil nil handler)) (w3m-antenna-check-page site handler (when type (w3m-decode-buffer (w3m-antenna-site-key site)) (goto-char (point-min)) (when (re-search-forward regexp nil t) (w3m-expand-url (match-string number) (w3m-antenna-site-key site))))))) ;; To avoid byte-compile warning. (eval-and-compile (autoload 'w3m-filter "w3m-filter")) (defun w3m-antenna-check-page (site handler &optional url) "Check SITE with the generic procedure. It consists of 3 steps: (1) Check the time when the SITE was last modified with HEAD request. (2) Check the size of the SITE with HEAD request. (3) Get the real content of the SITE, and check its size. " (or url (setq url (or (w3m-antenna-site-url site) (w3m-antenna-site-key site)))) (w3m-process-do (attr (w3m-attributes url t handler)) (when attr (if (nth 4 attr) ; Use the value of Last-modified header. (w3m-antenna-site-update site url (nth 4 attr) (nth 2 attr)) (unless (eq 'time (w3m-antenna-site-class site)) (if (nth 2 attr) ; Use the value of Content-Length header. (w3m-antenna-site-update site url nil (nth 2 attr)) ;; Get the real content of the SITE, and calculate its size. (w3m-process-do-with-temp-buffer (type (w3m-retrieve url nil t nil nil handler)) (when type (w3m-decode-buffer url nil type) (w3m-remove-comments) (when w3m-use-filter (w3m-filter url)) (w3m-antenna-site-update site url nil (buffer-size)))))))))) (defun w3m-antenna-site-update (site url time size) "Update SITE's status information with specified TIME and SIZE." ;; (w3m-antenna-site-size-detected site) keeps the time when SITE's ;; size attribute is checked. (setf (w3m-antenna-site-size-detected site) (when size (or (when (and url (w3m-antenna-site-url site) (string= url (w3m-antenna-site-url site)) (w3m-antenna-site-size site) (= size (w3m-antenna-site-size site))) (w3m-antenna-site-size-detected site)) (time-convert nil 'list)))) (setf (w3m-antenna-site-url site) url) (setf (w3m-antenna-site-last-modified site) (time-convert time 'list)) (setf (w3m-antenna-site-size site) size) site) (defun w3m-antenna-check-site (site handler) "Check SITE asynchronously. If a class attribute of the SITE is a list that consists of a function to check SITE and its options, call it. When a class attribute of the SITE is equal to the symbol `hns', call `w3m-antenna-check-hns'. Otherwise, call `w3m-antenna-check-page'." (if (and (listp (w3m-antenna-site-class site)) (functionp (car (w3m-antenna-site-class site)))) (apply (car (w3m-antenna-site-class site)) site handler (cdr (w3m-antenna-site-class site))) (if (eq 'hns (w3m-antenna-site-class site)) (w3m-antenna-check-hns site handler) (w3m-antenna-check-page site handler (format-time-string (w3m-antenna-site-key site) (current-time)))))) (defun w3m-antenna-mapcar (function sequence handler) "Apply FUNCTION to each element of SEQUENCE asynchronously, and make a list of the results." (let ((index -1) (table (make-symbol "table")) (buffer (make-symbol "buffer"))) (set table (make-vector (length sequence) nil)) (set buffer (current-buffer)) (dolist (element sequence) (aset (symbol-value table) (cl-incf index) (funcall function element (cons `(lambda (x) (aset ,table ,index x) (w3m-antenna-mapcar-after ,table ,buffer)) handler)))) (w3m-antenna-mapcar-after (symbol-value table) (symbol-value buffer)))) (defun w3m-antenna-mapcar-after (result buffer) "Handler function of `w3m-antenna-mapcar'. If all asynchronous processes have finished, return a list of the results for the further handler functions. Otherwise, return an asynchronous process that has not finished yet." (or (catch 'found-proces (let ((index -1)) (while (< (cl-incf index) (length result)) (when (w3m-process-p (aref result index)) (throw 'found-proces (aref result index)))))) (progn (set-buffer buffer) (append result nil)))) (defun w3m-antenna-check-all-sites (&optional handler) "Check all sites specified in `w3m-antenna-sites'." (unless w3m-antenna-alist (setq w3m-antenna-alist (w3m-antenna-alist))) (if (not handler) (w3m-process-with-wait-handler (w3m-antenna-check-all-sites handler)) (w3m-process-do (nil (w3m-antenna-mapcar 'w3m-antenna-check-site w3m-antenna-alist handler)) (prog1 w3m-antenna-alist (w3m-save-list w3m-antenna-file w3m-antenna-alist) (setq w3m-antenna-alist nil))))) (defun w3m-antenna-make-summary (site) (format "
  • %s %s" (or (w3m-antenna-site-url site) (w3m-antenna-site-key site)) (w3m-antenna-site-title site) (cond ((w3m-antenna-site-last-modified site) (current-time-string (w3m-antenna-site-last-modified site))) ((w3m-antenna-site-size site) "Size") (t "")))) (defun w3m-antenna-make-summary-like-natsumican (site) (let ((t1 (w3m-antenna-site-last-modified site)) (t2 (w3m-antenna-site-size-detected site))) (format "
  • %20s  (%s)  %s" (if (or t1 t2) (format-time-string "%Y/%m/%d %R" (or t1 t2)) "----/--/-- --:--") (cond (t1 "T") (t2 "S") (t "?")) (or (w3m-antenna-site-url site) (w3m-antenna-site-key site)) (w3m-antenna-site-title site)))) (defun w3m-antenna-sort-sites-by-time (sites) (sort sites (lambda (a b) (w3m-time-newer-p (or (w3m-antenna-site-last-modified a) (w3m-antenna-site-size-detected a)) (or (w3m-antenna-site-last-modified b) (w3m-antenna-site-size-detected b)))))) (defun w3m-antenna-sort-sites-by-title (sites) (sort sites (lambda (a b) (string< (w3m-antenna-site-title a) (w3m-antenna-site-title b))))) (defun w3m-antenna-make-contents (changed-sites unchanged-sites) (insert w3m-antenna-html-skelton) (goto-char (point-min)) (while (re-search-forward "%\\(.\\)" nil t) (let ((c (char-after (match-beginning 1)))) (cond ((memq c '(?C ?U)) (save-restriction (narrow-to-region (match-beginning 0) (match-end 0)) (delete-region (point-min) (point-max)) (goto-char (point-min)) (dolist (site (if (eq c ?C) changed-sites unchanged-sites)) (insert (funcall w3m-antenna-make-summary-function site) "\n")) (goto-char (point-max)))) ((eq c '?D) (goto-char (match-beginning 0)) (delete-region (match-beginning 0) (match-end 0)) (insert (let ((time (nth 5 (file-attributes w3m-antenna-file)))) (if time (current-time-string time) "(unknown)")))) ((eq c '?R) (save-restriction (narrow-to-region (match-beginning 0) (match-end 0)) (delete-region (point-min) (point-max)) (when (and w3m-antenna-refresh-interval (integerp w3m-antenna-refresh-interval) (< 0 w3m-antenna-refresh-interval)) (insert (format "\n" w3m-antenna-refresh-interval))))))))) ;;;###autoload (defun w3m-about-antenna (_url &optional _no-decode no-cache _post-data _referer handler) (w3m-process-do (alist (if no-cache (w3m-antenna-check-all-sites handler) (or w3m-antenna-alist (w3m-antenna-alist)))) (let (changed unchanged) (dolist (site alist) (if (w3m-time-newer-p (or (w3m-antenna-site-last-modified site) (w3m-antenna-site-size-detected site)) (or (w3m-arrived-last-modified (w3m-antenna-site-url site)) (w3m-arrived-time (w3m-antenna-site-url site)))) (progn (w3m-cache-remove (w3m-antenna-site-url site)) (push site changed)) (push site unchanged))) (w3m-antenna-make-contents (funcall w3m-antenna-sort-changed-sites-function (nreverse changed)) (funcall w3m-antenna-sort-unchanged-sites-function (nreverse unchanged))) "text/html"))) ;;;###autoload (defun w3m-antenna (&optional no-cache) "Report changes of WEB sites, which is specified in `w3m-antenna-sites'." (interactive "P") (w3m-goto-url "about://antenna/" no-cache)) (defvar w3m-antenna-tmp-url nil) (defvar w3m-antenna-tmp-title nil) (defun w3m-antenna-add-current-url (&optional arg) "Add link of current page to antenna. With prefix, ask new url to add instead of current page." (interactive "P") (w3m-antenna-add (if arg (w3m-canonicalize-url (w3m-input-url)) w3m-current-url) (w3m-encode-specials-string w3m-current-title))) (defun w3m-antenna-add (url &optional title) "Add URL to antenna. Optional argument TITLE is title of link." (setq w3m-antenna-tmp-url url) (setq w3m-antenna-tmp-title title) (customize-variable 'w3m-antenna-sites) ;; dirty... (goto-char (point-max)) (re-search-backward "INS") (widget-button-press (point)) (re-search-forward "State:\\|\\(\\[State\\]:\\)") (backward-char (if (match-beginning 1) 3 2))) (defvar w3m-antenna-mode-map (let ((map (make-sparse-keymap))) (substitute-key-definition 'w3m-edit-current-url 'w3m-antenna-edit map w3m-mode-map) map) "*Keymap for `w3m-antenna-mode'.") (defvar w3m-antenna-mode nil "Non-nil if w3m antenna mode is enabled.") (make-variable-buffer-local 'w3m-antenna-mode) (unless (assq 'w3m-antenna-mode minor-mode-alist) (push (list 'w3m-antenna-mode " antenna") minor-mode-alist)) (unless (assq 'w3m-antenna-mode minor-mode-map-alist) (push (cons 'w3m-antenna-mode w3m-antenna-mode-map) minor-mode-map-alist)) (defun w3m-antenna-mode (&optional arg) "\\ Minor mode to edit antenna. \\[w3m-antenna-edit] Customize `w3m-antenna-sites'. " (interactive "P") (when (setq w3m-antenna-mode (if arg (> (prefix-numeric-value arg) 0) (not w3m-antenna-mode))) (run-hooks 'w3m-antenna-mode-hook))) (defun w3m-antenna-mode-setter (url) "Activate `w3m-antenna-mode', when visiting page shows antenna." (w3m-antenna-mode (if (string-match "\\`about://antenna/" url) (progn (setq default-directory (file-name-directory w3m-antenna-file)) 1) 0))) (add-hook 'w3m-display-functions 'w3m-antenna-mode-setter) (defun w3m-antenna-edit () "Start customize of `w3m-antenna-sites'." (interactive) (customize-variable 'w3m-antenna-sites)) (provide 'w3m-antenna) ;;; w3m-antenna.el ends here emacs-w3m-emacs-w3m-4f27810/w3m-bookmark.el000066400000000000000000000520111434375002100202060ustar00rootroot00000000000000;;; w3m-bookmark.el --- Functions to operate bookmark file of w3m ;; Copyright (C) 2001-2003, 2005-2012, 2017, 2019-2022 ;; TSUCHIYA Masatoshi ;; Authors: Shun-ichi GOTO , ;; TSUCHIYA Masatoshi ;; Keywords: w3m, WWW, hypermedia ;; This file is a part of emacs-w3m. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; w3m-bookmark.el is the add-on program of emacs-w3m to operate ;; bookmark file. For more detail about emacs-w3m, see: ;; ;; http://emacs-w3m.namazu.org/ ;;; Code: (eval-when-compile (require 'cl-lib)) ;; cl-incf, cl-labels (require 'w3m-util) (require 'w3m) (require 'easymenu) (defcustom w3m-bookmark-file (expand-file-name "bookmark.html" w3m-profile-directory) "Bookmark file of w3m." :group 'w3m :type 'file) (defcustom w3m-bookmark-file-coding-system 'euc-japan "Coding system for a created bookmark file. This option is used when a new bookmark file is created, or when an existing bookmark file includes ASCII characters only. If the coding system which is used to encode your using bookmark file is different from the value of this option, emacs-w3m does not change the encoding of your bookmark file." :group 'w3m :type 'coding-system) (defcustom w3m-bookmark-default-section nil "Default section to add new entry." :group 'w3m :type '(radio (const :tag "Not specified" nil) (string :format "Default section name: %v"))) (defcustom w3m-bookmark-mode-hook nil "Hook run at the end of function `w3m-bookmark-mode'." :group 'w3m :type 'hook) (defcustom w3m-bookmark-menu-open-new-session nil "If non-nil, \"Bookmark\" menu item open new session." :group 'w3m :type 'boolean) (eval-and-compile (defconst w3m-bookmark-section-delimiter "\n")) (eval-and-compile (defconst w3m-bookmark-section-format (eval-when-compile (concat "

    %s

    \n
      \n" "
    • %s\n" w3m-bookmark-section-delimiter "
    \n")))) (defconst w3m-bookmark-initial-format (eval-when-compile (concat "Bookmarks\n" "\n

    Bookmarks

    \n" w3m-bookmark-section-format "\n\n"))) (defvar w3m-bookmark-section-history nil) (defvar w3m-bookmark-title-history nil) (defvar w3m-bookmark-buffer-file-name nil "Non-nil means that `w3m-bookmark-file' has been loaded to this buffer.") (make-variable-buffer-local 'w3m-bookmark-buffer-file-name) (defvar w3m-bookmark-mode-map (let ((map (make-sparse-keymap)) (table '((kill-line . w3m-bookmark-kill-entry) (undo . w3m-bookmark-undo)))) (dolist (pair table) (substitute-key-definition (car pair) (cdr pair) map global-map)) (substitute-key-definition 'w3m-edit-current-url 'w3m-bookmark-edit map w3m-mode-map) map) "*Keymap for `w3m-bookmark-mode'.") (defvar w3m-bookmark-mode nil "Non-nil if w3m bookmark mode is enabled.") (make-variable-buffer-local 'w3m-bookmark-mode) (unless (assq 'w3m-bookmark-mode minor-mode-alist) (push (list 'w3m-bookmark-mode " bookmark") minor-mode-alist)) (unless (assq 'w3m-bookmark-mode minor-mode-map-alist) (push (cons 'w3m-bookmark-mode w3m-bookmark-mode-map) minor-mode-map-alist)) (defun w3m-bookmark-mode (&optional arg) "\\ Minor mode to edit bookmark. \\[w3m-bookmark-kill-entry] Kill the current entry of this bookmark. \\[w3m-bookmark-undo] Undo some previous changes on this bookmark. \\[w3m-bookmark-edit] Open `w3m-bookmark-file'. " (interactive "P") (when (setq w3m-bookmark-mode (if arg (> (prefix-numeric-value arg) 0) (not w3m-bookmark-mode))) (run-hooks 'w3m-bookmark-mode-hook))) (defun w3m-bookmark-mode-setter (url) "Activate `w3m-bookmark-mode', when visiting page shows bookmark." (w3m-bookmark-mode (if (string-match "\\`about://bookmark/" url) (progn (setq default-directory (file-name-directory w3m-bookmark-file)) 1) 0))) (add-hook 'w3m-display-functions 'w3m-bookmark-mode-setter) (defun w3m-bookmark-file-modtime () "Return the modification time of the bookmark file `w3m-bookmark-file'. The value is a list of two time values `(HIGH LOW)' if the bookmark file exists, otherwise nil." (nth 5 (file-attributes (file-chase-links w3m-bookmark-file)))) (defun w3m-bookmark-buffer (&optional no-verify-modtime) "Return the buffer reading `w3m-bookmark-file' current." (let ((buffer (get-file-buffer w3m-bookmark-file))) (if buffer ;; When a buffer visiting `w3m-bookmark-file' is found, return ;; it instead of a working buffer. In this case, kill the ;; working buffer which was generated in the past. (progn (w3m-kill-buffer " *w3m bookmark*") buffer) ;; Generate a working buffer. (with-current-buffer (w3m-get-buffer-create " *w3m bookmark*") (unless (and w3m-bookmark-buffer-file-name (or no-verify-modtime (equal (visited-file-modtime) (w3m-bookmark-file-modtime)))) (when (file-readable-p w3m-bookmark-file) (buffer-disable-undo) (erase-buffer) (let ((coding-system-for-read 'binary)) (insert-file-contents w3m-bookmark-file)) (w3m-decode-buffer (w3m-expand-file-name-as-url w3m-bookmark-file)) (set-buffer-file-coding-system (if (memq w3m-current-coding-system '(undecided undecided-dos undecided-mac undecided-unix)) w3m-bookmark-file-coding-system w3m-current-coding-system)) (set-buffer-modified-p nil)) (setq w3m-bookmark-buffer-file-name w3m-bookmark-file) (set-visited-file-modtime (or (w3m-bookmark-file-modtime) ;; No bookmark file. '(0 0))) (buffer-enable-undo)) (current-buffer))))) (defun w3m-bookmark-verify-modtime () (unless (equal (visited-file-modtime) (w3m-bookmark-file-modtime)) (if (buffer-file-name) (ask-user-about-supersession-threat w3m-bookmark-file) (let ((modified (buffer-modified-p)) (name (buffer-name))) (unwind-protect (progn (set-visited-file-name w3m-bookmark-file) (ask-user-about-supersession-threat w3m-bookmark-file)) (set-visited-file-name nil) (rename-buffer name) (set-buffer-modified-p modified)))))) (defun w3m-bookmark-sections () "Return collection of registered sections." (let (sections) (with-current-buffer (w3m-bookmark-buffer) (goto-char (point-min)) (while (search-forward "

    " nil t) (push (cons (buffer-substring-no-properties (point) (if (search-forward "

    " nil t) (match-beginning 0) (line-end-position))) nil) sections))) (nreverse sections))) (defun w3m-bookmark-save-buffer () "Save this current buffer to `w3m-bookmark-file'." (cond ((buffer-file-name) (basic-save-buffer)) ((buffer-modified-p) (let ((backup-info (find-backup-file-name w3m-bookmark-file)) (modes (when (file-exists-p w3m-bookmark-file) (file-modes w3m-bookmark-file)))) (when (and modes ; means that `w3m-bookmark-file' exists. make-backup-files (funcall backup-enable-predicate w3m-bookmark-file)) (rename-file w3m-bookmark-file (car backup-info) t)) (write-region (point-min) (point-max) w3m-bookmark-file) (when modes (set-file-modes w3m-bookmark-file modes)) (set-visited-file-modtime (w3m-bookmark-file-modtime)) (set-buffer-modified-p nil) (dolist (file (cdr backup-info)) (condition-case () (delete-file file) (file-error nil))))))) (defun w3m-bookmark-write-file (url title section) "Make new bookmark with specified spec, and save it." (with-current-buffer (w3m-bookmark-buffer) (cl-labels ((safe-string (string format) (if (string= string (decode-coding-string (encode-coding-string string buffer-file-coding-system) buffer-file-coding-system)) string (error format string)))) (setq title (safe-string title "Specified title includes unsafe character(s): %s") section (safe-string section "Specified section includes unsafe character(s): %s"))) (if (zerop (buffer-size)) ;; New bookmark file. (progn (insert (format w3m-bookmark-initial-format section url title)) (set-buffer-file-coding-system w3m-bookmark-file-coding-system)) (goto-char (point-min)) (if (search-forward (format "

    %s

    " section) nil t) (progn (unless (search-forward w3m-bookmark-section-delimiter nil t) (error "Can't find section delimiter: %s" section)) (goto-char (match-beginning 0)) (insert (format "
  • %s\n" url title))) ;; New section. (unless (search-forward "\n" nil t) (error "%s" "Can't find terminator of bookmark")) (goto-char (match-beginning 0)) (insert (format w3m-bookmark-section-format section url title)))) (w3m-bookmark-save-buffer))) (defun w3m-bookmark-add (url &optional title) "Add URL to bookmark. Optional argument TITLE is title of link." ;; NOTE: this code shares much in common with function ;; `w3m-bookmark-add-all-urls', so when making changes here, ;; also consider that function. (let ((section (completing-read (if w3m-bookmark-default-section (format "Section (default %s): " w3m-bookmark-default-section) "Section: ") (w3m-bookmark-sections) nil nil nil 'w3m-bookmark-section-history))) (and (string= section "") (setq section w3m-bookmark-default-section)) (when (or (not section) (string-match "\\`[\t ]*\\'" section)) (error "%s" "You must specify a bookmark section name")) (setq title (read-string "Title: " title 'w3m-bookmark-title-history)) (when (or (not title) (string-match "\\`[\t ]*\\'" title)) (error "%s" "You must specify a bookmark title")) (setq title (w3m-encode-specials-string title)) (w3m-bookmark-write-file url title (w3m-encode-specials-string section))) (push url w3m-input-url-history) (push title w3m-input-url-history)) ;;;###autoload (defun w3m-bookmark-add-this-url () "Add link under cursor to bookmark." (interactive) (if (null (w3m-anchor)) (message "No anchor") ; nothing to do (let ((url (w3m-anchor)) (title (buffer-substring-no-properties (previous-single-property-change (1+ (point)) 'w3m-href-anchor) (next-single-property-change (point) 'w3m-href-anchor)))) (w3m-bookmark-add url title)) (message "Added"))) ;;;###autoload (defun w3m-bookmark-add-current-url (&optional arg) "Add a url of the current page to the bookmark. With prefix, ask for a new url instead of the present one." (interactive "P") (w3m-bookmark-add (if arg (w3m-canonicalize-url (w3m-input-url)) w3m-current-url) w3m-current-title) (message "Added")) ;;;###autoload (defun w3m-bookmark-add-all-urls () "Add urls of all pages being visited to the bookmark." (interactive) (let* ((buffers (w3m-list-buffers)) (len (length buffers)) (default-section (format-time-string "Saved bookmarks: %Y-%m-%d %H:%M:%S" (current-time))) (error-count 0) section title bookmark-buffers) (cond ((zerop len) (w3m-message "No w3m buffers found to bookmark")) ((= len 1) (w3m-bookmark-add-current-url)) ((> len 1) ;; NOTE: this code shares much in common with function ;; `w3m-bookmark-add', so when making changes here, also ;; consider that function. (setq section (completing-read (format "Section (default %s): " default-section) (append (list (list default-section)) (w3m-bookmark-sections)) nil nil nil 'w3m-bookmark-section-history)) (when (or (not section) (not (stringp section)) (string= section "")) (setq section default-section)) (if (string-match "\\`[\t ]*\\'" section) (w3m-message "You must specify a bookmark section name") (while buffers (set-buffer (pop buffers)) (if (string= w3m-current-url "about://bookmark/") (add-to-list 'bookmark-buffers (current-buffer)) (setq title (w3m-encode-specials-string (or w3m-current-title w3m-current-url))) (cond (w3m-current-url (w3m-bookmark-write-file w3m-current-url title (w3m-encode-specials-string section)) (push w3m-current-url w3m-input-url-history) (push title w3m-input-url-history)) (t (message "w3m-bookmark: Error saving buffer %s\n url: %s\n title: %s" (current-buffer) w3m-current-url w3m-current-title) (cl-incf error-count))))) (when (> error-count 0) (w3m-message "%s Errors encountered. See *Messages* buffer for details" error-count)) (while bookmark-buffers (set-buffer (pop bookmark-buffers)) (w3m-redisplay-this-page))))))) ;;;###autoload (defun w3m-bookmark-add-current-url-group () "Add link of the group of current urls to the bookmark." (interactive) (w3m-bookmark-add (concat "group:" (mapconcat 'w3m-url-encode-string (mapcar (lambda (buffer) (with-current-buffer buffer w3m-current-url)) (w3m-list-buffers)) "&"))) (message "Added as URL group")) ;;;###autoload (defun w3m-bookmark-view (&optional reload) "Display the bookmark list in the current buffer." (interactive "P") (if (file-exists-p w3m-bookmark-file) (progn ;; Store the current position in the history structure. (w3m-history-store-position) (w3m-goto-url "about://bookmark/" reload)) (message "No bookmark file is available"))) ;;;###autoload (defun w3m-bookmark-view-new-session (&optional reload) "Display the bookmark list in a new buffer." (interactive "P") (if (not (eq major-mode 'w3m-mode)) (message "This command can be used in w3m mode only") (if (file-exists-p w3m-bookmark-file) (w3m-goto-url-new-session "about://bookmark/" reload) (message "No bookmark file is available")))) ;;;###autoload (defun w3m-about-bookmark (&rest args) (insert-buffer-substring (w3m-bookmark-buffer)) (let ((ident) (i 0) (j 0)) (goto-char (point-min)) (while (search-forward (setq ident (format "w3mbk%d." i)) nil t) (cl-incf i)) (setq i 0) (goto-char (point-min)) (while (re-search-forward "\n<\\(?:h2\\|\\(li\\)\\)>" nil t) (forward-char -1) (insert (if (match-beginning 1) (format " id=\"%s%d.%d\"" ident i (cl-incf j)) (format " id=\"%s%d\"" ident (cl-incf i)))))) "text/html") (defun w3m-bookmark-current-number () "Return the ordinal number of the current bookmark entry." (let ((x (car (get-text-property (line-end-position) 'w3m-name-anchor)))) (and x (string-match "\\`w3mbk[0-9]+\\.[0-9]+\\.\\([0-9]+\\)\\'" x) (string-to-number (match-string 1 x))))) (defun w3m-bookmark-kill-entry (num) "Kill the bookmark entry of the current line. With prefix argument, kill that many entries from point." (interactive "p") (let ((entries (w3m-bookmark-current-number))) (when entries (setq entries (list entries)) (while (> (cl-decf num) 0) (push (1+ (car entries)) entries)) (condition-case nil (w3m-bookmark-kill-entries entries) (file-supersession nil)) (w3m-bookmark-view t)))) (defun w3m-bookmark-kill-entries (entries) (with-current-buffer (w3m-bookmark-buffer t) (w3m-bookmark-verify-modtime) (goto-char (point-min)) (let ((i 0)) (while (search-forward "\n
  • " nil t) (when (memq (cl-incf i) entries) (let ((beg (line-beginning-position)) (end (progn (search-forward w3m-bookmark-section-delimiter) (match-beginning 0)))) (delete-region (goto-char beg) (if (search-forward "\n
  • " end t) (line-beginning-position) end)) (goto-char (1- beg)))))) (w3m-bookmark-save-buffer))) (defun w3m-bookmark-undo (&optional arg) "Undo some previous changes on bookmark." (interactive "p") (condition-case nil (with-current-buffer (w3m-bookmark-buffer t) (w3m-bookmark-verify-modtime) (undo arg) (w3m-bookmark-save-buffer)) (file-supersession nil)) (w3m-bookmark-view t)) (defun w3m-bookmark-edit () "Edit the bookmark file." (interactive) (w3m-edit-url (w3m-expand-file-name-as-url w3m-bookmark-file))) ;; Bookmark menu (defvar w3m-bookmark-menu-items (let ((etsu (when w3m-use-japanese-menu ""))) `(([,(w3m-make-menu-item (concat "若" etsu "荀") "View Bookmark") w3m-bookmark-view t] [,(w3m-make-menu-item (concat "違祉激с潟с若" etsu "荀") "View Bookmark in a New Session") w3m-bookmark-view-new-session t] [,(w3m-make-menu-item "若膩" "Edit Bookmark") w3m-bookmark-edit t] "----" [,(w3m-make-menu-item "若吾若" "Add Current URL to Bookmark") w3m-bookmark-add-current-url t] [,(w3m-make-menu-item "鴻 URL 若" "Add These URLs to Bookmark") w3m-bookmark-add-current-url-group t] [,(w3m-make-menu-item " URL 若" "Add This URL to Bookmark") w3m-bookmark-add-this-url (w3m-anchor)]) . ([,(w3m-make-menu-item "潟羔サ" "Kill Current Entry") w3m-bookmark-kill-entry (text-property-not-all (line-beginning-position) (line-end-position) 'w3m-href-anchor nil)] [,(w3m-make-menu-item "祉" "Undo") w3m-bookmark-undo t] [,(w3m-make-menu-item "若膩" "Edit Bookmark") w3m-bookmark-edit t]))) "*List of the bookmark menu items. The car is used if `w3m-bookmark-mode' is nil, otherwise the cdr is used.") ;;;###autoload (defun w3m-setup-bookmark-menu () "Setup w3m bookmark items in menubar." (unless (lookup-key w3m-mode-map [menu-bar Bookmark]) (easy-menu-define w3m-bookmark-menu w3m-mode-map "" '("Bookmark")) (w3m-easy-menu-add w3m-bookmark-menu) (add-hook 'menu-bar-update-hook 'w3m-bookmark-menubar-update))) (defun w3m-bookmark-menubar-update () "Update w3m bookmark menubar." (when (and (eq major-mode 'w3m-mode) menu-bar-mode) (let ((items (if w3m-bookmark-mode (cdr w3m-bookmark-menu-items) (car w3m-bookmark-menu-items))) (pages (ignore-errors ;; <- FIXME: ;; A workaround to avoid a miscellaneous error caused when first ;; invoking `M-x w3m-cookie', etc. on freshly launched Emacs ;; (some hash table has not been initialized at that time). (w3m-bookmark-make-menu-items)))) (easy-menu-define w3m-bookmark-menu w3m-mode-map "The menu kepmap for the emacs-w3m bookmark." (cons "Bookmark" (if pages (append items '("----") pages) items)))))) (defun w3m-bookmark-iterator () "Iteration bookmark groups/entries. Format as (list (\"Group name\" . (\"Entry URL\" . \"Entry name\")* )* )." (let ((entries nil)) (with-current-buffer (w3m-bookmark-buffer) (goto-char (point-min)) (let (group entry beg end) (while (re-search-forward "

    \\([^<]+\\)

    " nil t) (setq group (match-string-no-properties 1)) (setq beg (match-beginning 0)) (setq end (re-search-forward "" nil t)) (save-excursion (let (urls) (narrow-to-region beg end) (goto-char (point-min)) (while (re-search-forward "\\([^<]+\\)" nil t) (push (cons (match-string-no-properties 1) (match-string-no-properties 2)) urls)) (setq entry (cons group (nreverse urls))) (push entry entries) (widen))) (goto-char (match-end 0)))) (nreverse entries)))) (defun w3m-bookmark-menu-open-item (url) "Open URL at current/new buffer" (if w3m-bookmark-menu-open-new-session (w3m-goto-url-new-session url) (w3m-goto-url url))) (defvar w3m-bookmark-menu-items-pre nil) (defvar w3m-bookmark-menu-items-time nil) (defun w3m-bookmark-make-menu-items (&optional nomenu) "Create w3m bookmark menu items." (when (not nomenu) (if (and w3m-bookmark-menu-items-pre w3m-bookmark-menu-items-time (equal w3m-bookmark-menu-items-time (w3m-bookmark-file-modtime))) w3m-bookmark-menu-items-pre (setq w3m-bookmark-menu-items-time (w3m-bookmark-file-modtime)) (let ((entries (when (file-exists-p w3m-bookmark-file) (w3m-bookmark-iterator)))) (setq w3m-bookmark-menu-items-pre (and entries (mapcar (lambda (entry) (let ((group (car entry)) (items (cdr entry))) (cons group (and items (mapcar (lambda (item) (vector (cdr item) `(w3m-bookmark-menu-open-item ,(car item)))) items))))) entries))))))) (provide 'w3m-bookmark) ;;; w3m-bookmark.el ends here emacs-w3m-emacs-w3m-4f27810/w3m-bug.el000066400000000000000000000144161434375002100171650ustar00rootroot00000000000000;;; w3m-bug.el --- command to report emacs-w3m bugs ;; Copyright (C) 2002, 2003, 2005, 2007, 2010, 2019, 2022 ;; TSUCHIYA Masatoshi ;; Author: Katsumi Yamaoka ;; Keywords: w3m, WWW, hypermedia ;; This file is a part of emacs-w3m. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; `M-x report-emacs-w3m-bug' starts an email note to the emacs-w3m ;; developers describing a problem. ;;; Code: (defvar report-emacs-w3m-bug-address "emacs-w3m@namazu.org" "*Address of mailing list for emacs-w3m bugs.") (defvar report-emacs-w3m-bug-no-explanations nil "*If non-nil, suppress the explanations given for the sake of novice users.") (defconst report-emacs-w3m-bug-system-informations (eval '`(emacs-w3m-git-revision emacs-w3m-version emacs-version ;; The form ,@(if (boundp 'foo) '(foo)) used here is ;; meant to generate nothing if `foo' is not bound. ,@(if (boundp 'mule-version) '(mule-version)) system-type (featurep 'gtk) (featurep 'w3m-load) w3m-version w3m-type w3m-compile-options w3m-language w3m-command-arguments w3m-command-arguments-alist w3m-command-environment w3m-input-coding-system w3m-output-coding-system)) "List of the system informations. Users should NEVER modify the value." ;; For the developers: ;; It is possible that it would be a security hole. To prevent those ;; rogue attacks, this constant should be reloaded for each time to ;; send a bug report. Each element can be the symbol of a variable, ;; a Lisp function with no argument or any Lisp form to be evaluated. ) ;;;###autoload (defun report-emacs-w3m-bug (topic &optional buffer) "Report a bug in emacs-w3m. Prompts for bug subject. Leaves you in a mail buffer." (interactive (let* ((buffer (current-buffer)) (buffers (cons buffer (delq buffer (buffer-list)))) keymap) (save-current-buffer (while buffers (setq buffer (car buffers) buffers (cdr buffers)) (set-buffer buffer) (save-restriction (widen) (if (or (eq major-mode 'w3m-mode) (and (keymapp (setq keymap (or (get-text-property (max (1- (point-max)) (point-min)) 'keymap) (get-text-property (max (1- (point-max)) (point-min)) 'local-map))))) (where-is-internal 'w3m-print-current-url keymap)) (setq buffers nil) (setq buffer nil))))) (list (read-string "Bug Subject: ") buffer))) (let (after-load-alist) (load "w3m-load" t t) ;; See the comment for `report-emacs-w3m-bug-system-informations'. (load "w3m-bug")) (compose-mail report-emacs-w3m-bug-address topic nil 'new) (goto-char (point-min)) (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$")) (forward-line 1) (unless buffer (insert (if (and (boundp 'w3m-language) (equal (symbol-value 'w3m-language) "Japanese")) "純 emacs-w3m 莎桁眼\n" "It is if possible, please redo after starting emacs-w3m.\n") "\ ================================================================\n")) (unless report-emacs-w3m-bug-no-explanations ;; Insert warnings for the novice users. (if (and (boundp 'w3m-language) (equal (symbol-value 'w3m-language) "Japanese")) (progn (insert "違若 emacs-w3m 冴若障\n") (put-text-property (point) (progn (insert "\ 若泣ゃ膊∞絎с障!!") (point)) 'face 'underline) (insert "\n\nс膂≧菴違鴻: \t- 篏莎激障? \t- 綵鴻c障? \t- 篏障? (罩g∈) Lisp 若鴻井兄篁\n")) (insert "\ This bug report will be sent to the emacs-w3m development team,\n") (put-text-property (point) (progn (insert " not to your local site managers!!") (point)) 'face 'italic) (insert "\nPlease write in ") (put-text-property (point) (progn (insert "simple") (point)) 'face 'italic) (insert " English, because the emacs-w3m developers aren't good at English reading. ;-) Please describe as succinctly as possible: \t- What happened. \t- What you thought should have happened. \t- Precisely what you were doing at the time. Please also include any Lisp back-traces that you may have.\n")) (insert "\ ================================================================\n")) (insert "Dear Bug Team!\n\n") (let ((user-point (point)) (print-escape-newlines t) (print-quoted t) infos print-length print-level) (insert "\n ================================================================ System Info to help track down your bug: ---------------------------------------\n") (with-current-buffer (or buffer (current-buffer)) (dolist (info report-emacs-w3m-bug-system-informations) (push (prin1-to-string info) infos) (push "\n => " infos) (push (cond ((functionp info) (prin1-to-string (condition-case code (funcall info) (error code)))) ((symbolp info) (prin1-to-string (condition-case code (symbol-value info) (error code)))) ((consp info) (prin1-to-string (condition-case code (eval info) (error code))))) infos) (push "\n" infos))) (apply 'insert (nreverse infos)) (goto-char user-point) (set-buffer-modified-p nil))) ;;; w3m-bug.el ends here emacs-w3m-emacs-w3m-4f27810/w3m-cookie.el000066400000000000000000000521211434375002100176540ustar00rootroot00000000000000;;; w3m-cookie.el --- Functions for cookie processing ;; Copyright (C) 2002, 2003, 2005, 2006, 2008-2010, 2017, 2019 ;; TSUCHIYA Masatoshi ;; Authors: Teranishi Yuuichi ;; Keywords: w3m, WWW, hypermedia ;; This file is a part of emacs-w3m. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; This file contains the functions for cookies. For more detail ;; about emacs-w3m, see: ;; ;; http://emacs-w3m.namazu.org/ ;; Reference for version 0 cookie: ;; http://www.netscape.com/newsref/std/cookie_spec.html ;; Reference for version 1 cookie: ;; http://www.ietf.org/rfc/rfc2965.txt ;; ;;; Code: (require 'w3m-util) (require 'w3m) (require 'url-domsuf) (defvar w3m-cookies nil "A list of cookie elements. Currently only browser local cookies are stored.") (defcustom w3m-cookie-accept-domains nil "A list of trusted domain name string." :group 'w3m :type '(repeat (string :format "Domain name: %v"))) (defcustom w3m-cookie-reject-domains nil "A list of untrusted domain name string." :group 'w3m :type '(repeat (string :format "Domain name: %v"))) (defcustom w3m-cookie-accept-bad-cookies nil "If nil, don't accept bad cookies. If t, accept bad cookies. If ask, ask user whether accept bad cookies or not." :group 'w3m :type '(radio (const :tag "Don't accept bad cookies" nil) (const :tag "Ask accepting bad cookies" ask) (const :tag "Always accept bad cookies" t))) (defcustom w3m-cookie-save-cookies t "Non-nil means save cookies when emacs-w3m cookie system shutdown." :group 'w3m :type 'boolean) (defcustom w3m-cookie-file (expand-file-name ".cookie" w3m-profile-directory) "File in which cookies are kept." :group 'w3m :type 'file) ;;; Cookie accessor. (defmacro w3m-cookie-url (cookie) "Return the url of COOKIE." `(aref ,cookie 0)) (defmacro w3m-cookie-domain (cookie) "Return the domain of COOKIE." `(aref ,cookie 1)) (defmacro w3m-cookie-secure (cookie) "Return whether COOKIE is secure." `(aref ,cookie 2)) (defmacro w3m-cookie-name (cookie) "Return the name of COOKIE." `(aref ,cookie 3)) (defmacro w3m-cookie-value (cookie) "Return the value of COOKIE." `(aref ,cookie 4)) (defmacro w3m-cookie-path (cookie) "Return the relative file path of COOKIE." `(aref ,cookie 5)) (defmacro w3m-cookie-version (cookie) "Return a version information of COOKIE." `(aref ,cookie 6)) (defmacro w3m-cookie-expires (cookie) "Return when COOKIE will expire." `(aref ,cookie 7)) (defmacro w3m-cookie-ignore (cookie) "Return t if COOKIE is marked to be ignored by emacs-w3m." `(aref ,cookie 8)) (defun w3m-cookie-create (&rest args) (let ((cookie (make-vector 9 nil))) (setf (w3m-cookie-url cookie) (plist-get args :url)) (setf (w3m-cookie-domain cookie) (plist-get args :domain)) (setf (w3m-cookie-secure cookie) (plist-get args :secure)) (setf (w3m-cookie-name cookie) (plist-get args :name)) (setf (w3m-cookie-value cookie) (plist-get args :value)) (setf (w3m-cookie-path cookie) (plist-get args :path)) (setf (w3m-cookie-version cookie) (or (plist-get args :version) 0)) (setf (w3m-cookie-expires cookie) (plist-get args :expires)) (setf (w3m-cookie-ignore cookie) (plist-get args :ignore)) cookie)) (defun w3m-cookie-store (cookie) "Store COOKIE." (let (ignored) (catch 'found (dolist (c w3m-cookies) (when (and (string= (w3m-cookie-domain c) (w3m-cookie-domain cookie)) (string= (w3m-cookie-path c) (w3m-cookie-path cookie)) (string= (w3m-cookie-name c) (w3m-cookie-name cookie))) (if (w3m-cookie-ignore c) (setq ignored t) (setq w3m-cookies (delq c w3m-cookies))) (throw 'found t)))) (unless ignored (push cookie w3m-cookies)))) (defun w3m-cookie-remove (domain path name) "Remove COOKIE if stored." (dolist (c w3m-cookies) (when (and (string= (w3m-cookie-domain c) domain) (string= (w3m-cookie-path c) path) (string= (w3m-cookie-name c) name)) (setq w3m-cookies (delq c w3m-cookies))))) (defun w3m-cookie-retrieve (host path &optional secure) "Retrieve cookies for DOMAIN and PATH." (let ((case-fold-search t) expires cookies) (dolist (c w3m-cookies) (if (and (w3m-cookie-expires c) (w3m-time-newer-p (current-time) (w3m-time-parse-string (w3m-cookie-expires c)))) (push c expires) (when (and (not (w3m-cookie-ignore c)) (or ;; A special case that domain name is ".hostname". (string= (concat "." host) (w3m-cookie-domain c)) (string-match (concat (regexp-quote (w3m-cookie-domain c)) "\\'") host)) (string-match (concat "\\`" (regexp-quote (w3m-cookie-path c))) path)) (if (w3m-cookie-secure c) (if secure (push c cookies)) (push c cookies))))) ;; Delete expired cookies. (dolist (expire expires) (setq w3m-cookies (delq expire w3m-cookies))) cookies)) ;; HTTP URL parser. (defun w3m-parse-http-url (url) "Parse an absolute HTTP URL." (let (secure split) (w3m-string-match-url-components url) (when (and (match-beginning 4) (or (equal (match-string 2 url) "http") (setq secure (equal (match-string 2 url) "https")))) (setq split (save-match-data (split-string (match-string 4 url) ":"))) (vector secure (nth 0 split) (string-to-number (or (nth 1 split) "80")) (if (eq (length (match-string 5 url)) 0) "/" (match-string 5 url)))))) (defsubst w3m-http-url-secure (http-url) "Secure flag of the HTTP-URL." (aref http-url 0)) (defsubst w3m-http-url-host (http-url) "Host name of the HTTP-URL." (aref http-url 1)) (defsubst w3m-http-url-port (http-url) "Port number of the HTTP-URL." (aref http-url 2)) (defsubst w3m-http-url-path (http-url) "Path of the HTTP-URL." (aref http-url 3)) ;;; Cookie parser. (defvar w3m-cookie-parse-args-syntax-table (copy-syntax-table emacs-lisp-mode-syntax-table) "A syntax table for parsing sgml attributes.") (modify-syntax-entry ?' "\"" w3m-cookie-parse-args-syntax-table) (modify-syntax-entry ?` "\"" w3m-cookie-parse-args-syntax-table) (modify-syntax-entry ?{ "(" w3m-cookie-parse-args-syntax-table) (modify-syntax-entry ?} ")" w3m-cookie-parse-args-syntax-table) (defun w3m-cookie-parse-args (str &optional nodowncase) (let (name value results name-pos val-pos) (with-current-buffer (get-buffer-create " *w3m-cookie-parse-temp*") (erase-buffer) (set-syntax-table w3m-cookie-parse-args-syntax-table) (insert str) (goto-char (point-min)) (while (not (eobp)) (skip-chars-forward "; \n\t") (setq name-pos (point)) (skip-chars-forward "^ \n\t=;") (unless nodowncase (downcase-region name-pos (point))) (setq name (buffer-substring name-pos (point))) (skip-chars-forward " \t\n") (if (/= (or (char-after (point)) 0) ?=) ; There is no value (setq value nil) (skip-chars-forward " \t\n=") (setq val-pos (point) value (cond ((or (= (or (char-after val-pos) 0) ?\") (= (or (char-after val-pos) 0) ?')) (buffer-substring (1+ val-pos) (condition-case () (prog2 (forward-sexp 1) (1- (point)) (skip-chars-forward "\"")) (error (skip-chars-forward "^ \t\n") (point))))) (t (buffer-substring val-pos (progn (skip-chars-forward "^;") (skip-chars-backward " \t") (point))))))) (push (cons name value) results) (skip-chars-forward "; \n\t")) (nreverse results)))) (defun w3m-cookie-trusted-host-p (host) "Returns non-nil when the HOST is specified as trusted by user." (let ((accept w3m-cookie-accept-domains) (reject w3m-cookie-reject-domains) (trusted t) regexp tlen rlen) (while accept (cond ((string= (car accept) ".") (setq regexp ".*")) ((string= (car accept) ".local") (setq regexp "\\`[^\\.]+\\'")) ((eq (string-to-char (car accept)) ?.) (setq regexp (concat (regexp-quote (car accept)) "\\'"))) (t (setq regexp (concat "\\`" (regexp-quote (car accept)) "\\'")))) (when (string-match regexp host) (setq tlen (length (car accept)) accept nil)) (pop accept)) (while reject (cond ((string= (car reject) ".") (setq regexp ".*")) ((string= (car reject) ".local") (setq regexp "\\`[^\\.]+\\'")) ((eq (string-to-char (car reject)) ?.) (setq regexp (concat (regexp-quote (car reject)) "\\'"))) (t (setq regexp (concat "\\`" (regexp-quote (car reject)) "\\'")))) (when (string-match regexp host) (setq rlen (length (car reject)) reject nil)) (pop reject)) (if tlen (if rlen (if (<= tlen rlen) (setq trusted nil))) (if rlen (setq trusted nil))) trusted)) ;;; Version 0 cookie. (defun w3m-cookie-1-acceptable-p (host domain) (cond ((string= host domain) ; Apparently netscape lets you do this t) ;; A special case that domain name is ".hostname". ((string= (concat "." host) domain) t) (t (url-domsuf-cookie-allowed-p (if (eq (aref domain 0) ?.) (substring domain 1) domain))))) (defun w3m-cookie-1-set (url &rest args) ;; Set-Cookie:, version 0 cookie. (let ((http-url (w3m-parse-http-url url)) (case-fold-search t) secure domain expires max-age path cookie) (when http-url (setq secure (and (w3m-assoc-ignore-case "secure" args) t) domain (or (cdr-safe (w3m-assoc-ignore-case "domain" args)) (w3m-http-url-host http-url)) expires (cdr-safe (w3m-assoc-ignore-case "expires" args)) max-age (cdr-safe (w3m-assoc-ignore-case "max-age" args)) path (or (cdr-safe (w3m-assoc-ignore-case "path" args)) (file-name-directory (w3m-http-url-path http-url))) cookie (car args)) ;; Convert Max-Age to Expires (and max-age (setq max-age (ignore-errors (format-time-string "%a %b %d %H:%M:%S %Y GMT" (time-add nil (read max-age)) t))) (setq expires max-age)) (cond ((not (w3m-cookie-trusted-host-p (w3m-http-url-host http-url))) ;; The site was explicity marked as untrusted by the user nil) ((or (w3m-cookie-1-acceptable-p (w3m-http-url-host http-url) domain) (eq w3m-cookie-accept-bad-cookies t) (and (eq w3m-cookie-accept-bad-cookies 'ask) (y-or-n-p (format "Accept bad cookie from %s for %s? " (w3m-http-url-host http-url) domain)))) ;; Cookie is accepted by the user, and passes our security checks ;; If a CGI script wishes to delete a cookie, it can do so by ;; returning a cookie with the same name, and an expires time ;; which is in the past. (when (and expires (w3m-time-newer-p (current-time) (w3m-time-parse-string expires))) (w3m-cookie-remove domain path (car cookie))) (w3m-cookie-store (w3m-cookie-create :url url :domain domain :name (car cookie) :value (cdr cookie) :path path :expires expires :secure secure))) (t (message "%s tried to set a cookie for domain %s - rejected." (w3m-http-url-host http-url) domain)))))) ;;; Version 1 cookie. (defun w3m-cookie-2-acceptable-p (http-url domain) ;; A user agent rejects (SHALL NOT store its information) if the Version ;; attribute is missing. Moreover, a user agent rejects (SHALL NOT ;; store its information) if any of the following is true of the ;; attributes explicitly present in the Set-Cookie2 response header: ;; * The value for the Path attribute is not a prefix of the ;; request-URI. ;; * The value for the Domain attribute contains no embedded dots, ;; and the value is not .local. ;; * The effective host name that derives from the request-host does ;; not domain-match the Domain attribute. ;; * The request-host is a HDN (not IP address) and has the form HD, ;; where D is the value of the Domain attribute, and H is a string ;; that contains one or more dots. ;; * The Port attribute has a "port-list", and the request-port was ;; not in the list. ) (defun w3m-cookie-2-set (url &rest args) ;; Set-Cookie2:, version 1 cookie. ;; Not implemented yet. ) ;;; Save & Load (defvar w3m-cookie-init nil) (defun w3m-cookie-clear () "Clear cookie list." (interactive) (setq w3m-cookies nil) (dolist (buffer (w3m-list-buffers t)) (with-current-buffer buffer (when (equal w3m-current-url "about://cookie/") (let ((w3m-message-silent t)) (w3m-history-remove-properties '(:forms nil :post-data nil)) (w3m-reload-this-page nil t)))))) (defun w3m-cookie-save (&optional domain) "Save cookies. When DOMAIN is non-nil, only save cookies whose domains match it." (interactive) (let (cookies) (dolist (cookie w3m-cookies) (when (and (or (not domain) (string= (w3m-cookie-domain cookie) domain)) (w3m-cookie-expires cookie) (w3m-time-newer-p (w3m-time-parse-string (w3m-cookie-expires cookie)) (current-time))) (push cookie cookies))) (w3m-save-list w3m-cookie-file cookies))) (defun w3m-cookie-save-current-site-cookies () "Save cookies for the current site." (interactive) (when (and w3m-current-url (not (w3m-url-local-p w3m-current-url))) (w3m-string-match-url-components w3m-current-url) (w3m-cookie-save (match-string 4 w3m-current-url)))) (defun w3m-cookie-load () "Load cookies." (when (null w3m-cookies) (setq w3m-cookies (w3m-load-list w3m-cookie-file)))) (defun w3m-cookie-setup () "Setup cookies. Returns immediataly if already initialized." (interactive) (unless w3m-cookie-init (w3m-cookie-load) (setq w3m-cookie-init t))) ;;;###autoload (defun w3m-cookie-shutdown (&optional interactive-p) "Save cookies, and reset cookies' data." (interactive (list t)) ;; Don't error out no matter what happens ;; since `kill-emacs-hook' runs this function. (condition-case err (progn (when w3m-cookie-save-cookies (w3m-cookie-save)) (setq w3m-cookie-init nil) (w3m-cookie-clear) (let ((buf (get-buffer " *w3m-cookie-parse-temp*"))) (when buf (kill-buffer buf)))) (error (if interactive-p (signal (car err) (cdr err)) (message "Error while running w3m-cookie-shutdown: %s" (error-message-string err)))))) (add-hook 'kill-emacs-hook 'w3m-cookie-shutdown) ;;;###autoload (defun w3m-cookie-set (url beg end) "Register cookies which correspond to URL. BEG and END should be an HTTP response header region on current buffer." (w3m-cookie-setup) (when (and url beg end) (save-excursion (let ((case-fold-search t) (version 0) data) (goto-char beg) (while (re-search-forward "^\\(?:Set-Cookie\\(2\\)?:\\) *\\(.*\\(?:\n[ \t].*\\)*\\)\n" end t) (setq data (match-string 2)) (if (match-beginning 1) (setq version 1)) (apply (pcase version (0 'w3m-cookie-1-set) (1 'w3m-cookie-2-set)) url (w3m-cookie-parse-args data 'nodowncase))))))) ;;;###autoload (defun w3m-cookie-get (url) "Get a cookie field string which corresponds to the URL." (w3m-cookie-setup) (let* ((http-url (w3m-parse-http-url url)) (cookies (and http-url (w3m-cookie-retrieve (w3m-http-url-host http-url) (w3m-http-url-path http-url) (w3m-http-url-secure http-url)))) value) ;; When sending cookies to a server, all cookies with a more specific path ;; mapping should be sent before cookies with less specific path mappings. (setq cookies (sort cookies (lambda (x y) (< (length (w3m-cookie-path x)) (length (w3m-cookie-path y)))))) (when cookies (mapconcat (lambda (cookie) (if (setq value (w3m-cookie-value cookie)) (concat (w3m-cookie-name cookie) "=" value) (w3m-cookie-name cookie))) cookies "; ")))) ;;;###autoload (defun w3m-cookie (&optional no-cache) "Display cookies and enable you to manage them." (interactive "P") (unless w3m-use-cookies (when (y-or-n-p "Use of cookies is currently disable. Enable? ") (setq w3m-use-cookies t))) (when w3m-use-cookies (w3m-goto-url-new-session "about://cookie/" no-cache) (w3m-history-minimize))) ;;;###autoload (defun w3m-about-cookie (url &optional no-decode no-cache post-data &rest args) "Make the html contents to display and to enable you to manage cookies. To delete all cookies associated with amazon.com for example, do it in the following two steps: 1. Mark them `unused' (type `C-c C-c' or press any OK button). Limit to [amazon.com ] <= [ ]regexp [OK] ( )Noop ( )Use all (*)Unuse all ( )Delete unused all [OK] 2. Delete cookies that are marked `unused'. Limit to [amazon.com ] <= [ ]regexp [OK] ( )Noop ( )Use all ( )Unuse all (*)Delete unused all [OK] You can mark cookies on the one-by-one basis of course. The `Limit-to' string is case insensitive and allows a regular expression." (w3m-cookie-setup) (let ((case-fold-search t) (pos 0) ;; The car is a string used to limit cookies to the ones matching, ;; and the cdr is a boolean flag that specifies whether the string ;; is a regexp or not. (match '(nil . nil)) delete dels cookies regexp) (when post-data (dolist (pair (split-string post-data "&")) (setq pair (split-string pair "=")) (pcase (car pair) ("delete" (setq delete (cadr pair))) ("re-search" (setcdr match t)) ("search" (setcar match (replace-regexp-in-string "[\n\r].*" "" (w3m-url-decode-string (cadr pair))))) (_ (when (equal (cadr pair) "0") (push (string-to-number (car pair)) dels)))))) (if (zerop (length (car match))) (setq match nil cookies w3m-cookies) (setq regexp (car match)) (unless (cdr match) (setq regexp (regexp-quote regexp))) (dolist (cookie w3m-cookies) (when (string-match regexp (w3m-cookie-url cookie)) (push cookie cookies))) (setq cookies (nreverse cookies))) (pcase delete ("0" (dolist (del dels) (setf (w3m-cookie-ignore (nth del cookies)) t))) ("1" (dolist (cookie cookies) (setf (w3m-cookie-ignore cookie) nil))) ("2" (dolist (cookie cookies) (setf (w3m-cookie-ignore cookie) t))) ("3" (progn (dolist (del dels) (setf (w3m-cookie-ignore (nth del cookies)) t)) (dolist (cookie cookies) (when (w3m-cookie-ignore cookie) (setq cookies (delq cookie cookies) w3m-cookies (delq cookie w3m-cookies))))))) (insert (concat ;; Allow nil values in operand. "Cookies
    Cookies

    Limit to  <= regexp 
    Noop  Use all  Unuse all  Delete unused all 

      ")) (dolist (cookie cookies) (insert (concat ;; Allow nil values in operand. "

    1. " (w3m-cookie-url cookie) "

      " "" "" (when (w3m-cookie-expires cookie) (concat "")) "" (when (w3m-cookie-domain cookie) (concat "")) (when (w3m-cookie-path cookie) (concat "")) "
      Cookie:" (w3m-cookie-name cookie) "=" (or (w3m-cookie-value cookie) "(no value)") "
      Expires:" (w3m-cookie-expires cookie) "
      Version:" (number-to-string (w3m-cookie-version cookie)) "
      Domain:" (w3m-cookie-domain cookie) "
      Path:" (w3m-cookie-path cookie) "
      Secure:" (if (w3m-cookie-secure cookie) "Yes" "No") "
      Use:" (format "Yes" pos (if (w3m-cookie-ignore cookie) "" " checked")) "  " (format "No" pos (if (w3m-cookie-ignore cookie) " checked" "")) "  " "
      ")) (setq pos (1+ pos))) (insert "
    ") "text/html")) (provide 'w3m-cookie) ;;; w3m-cookie.el ends here emacs-w3m-emacs-w3m-4f27810/w3m-dtree.el000066400000000000000000000201231434375002100175030ustar00rootroot00000000000000;;; w3m-dtree.el --- The add-on program to display local directory tree. ;; Copyright (C) 2001-2003, 2005-2007, 2009, 2017, 2019, 2022 ;; TSUCHIYA Masatoshi ;; Author: Hideyuki SHIRAI , ;; TSUCHIYA Masatoshi ;; Keywords: w3m, WWW, hypermedia, directory, tree ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; w3m-dtree.el is the add-on program of emacs-w3m to display local ;; directory tree. For more detail about emacs-w3m, see: ;; ;; http://emacs-w3m.namazu.org/ ;;; Code: (require 'w3m) (defcustom w3m-dtree-default-allfiles nil "If non-nil, set \"allfiles\" to default." :group 'w3m :type 'boolean) (defcustom w3m-dtree-directory-depth 8 "Interger of a depth of the viewing directory." :group 'w3m :type '(choice (const :tag "No limit" nil) (integer :format "%t: %v" :tag "depth" 10))) (defcustom w3m-dtree-indent-strings ["|-" "+-" "| " " "] "Vector of strings to be used for indentation with w3m-dtree. If use default value or choice 'ASCII', display like this, /home/shirai/work/emacs-w3m/ |-CVS/ |-icons/ | +-CVS/ +-shimbun/ +-CVS/ If you care for another style, set manually and try it :-). " :group 'w3m :type '(radio (const :format "ASCII: [\"|-\" \"+-\" \"| \" \" \"]\n" ["|-" "+-" "| " " "]) (vector :convert-widget w3m-widget-type-convert-widget (let ((defaults (if (equal w3m-language "Japanese") (vconcat '("" "" "" "")) ["|-" "+-" "| " " "]))) `(:format "Others:\n%v" :indent 4 (string :format "%{\"|-\"%} %v\n" :sample-face widget-field-face :value ,(aref defaults 0)) (string :format "%{\"+-\"%} %v\n" :sample-face widget-field-face :value ,(aref defaults 1)) (string :format "%{\"| \"%} %v\n" :sample-face widget-field-face :value ,(aref defaults 2)) (string :format "%{\" \"%} %v" :sample-face widget-field-face :value ,(aref defaults 3))))))) (defcustom w3m-dtree-stop-strings ["|=" "+="] "Vector of strings to be used for indentation when a depth of directory over the `w3m-dtree-directory-depth'." :group 'w3m :type '(radio (const :format "ASCII: [\"|=\" \"+=\"]\n" ["|=" "+="]) (const :format "ASCII Bold: [\"|-\" \"+-\"]\n" ["|-" "+-"]) (vector :convert-widget w3m-widget-type-convert-widget (let ((defaults (if (equal w3m-language "Japanese") (vconcat '("" "")) ["|=" "+="]))) `(:format "Others:\n%v" :indent 4 (string :format "\"|=\" \"%{|=%}\" %v\n" :sample-face bold :value ,(aref defaults 0)) (string :format "\"+=\" \"%{+=%}\" %v" :sample-face bold :value ,(aref defaults 1))))))) (defun w3m-dtree-expand-file-name (path) (if (string-match "\\`\\(.\\):\\(.*\\)" path) (if w3m-use-cygdrive (concat "/cygdrive/" (match-string 1 path) (match-string 2 path)) (concat "/" (match-string 1 path) "|" (match-string 2 path))) path)) (defun w3m-dtree-directory-name (path) (when (and w3m-treat-drive-letter (string-match "\\`/\\(?:\\([A-Za-z]\\)[|:]?\\|cygdrive/\\([A-Za-z]\\)\\)/" path)) (setq path (concat (or (match-string 1 path) (match-string 2 path)) ":/" (substring path (match-end 0))))) path) (defmacro w3m-dtree-has-child (path) `(let ((w32-get-true-file-link-count t)) ;; true link count for Meadow (and (nth 1 (file-attributes ,path)) (/= (nth 1 (file-attributes ,path)) 2)))) (defun w3m-dtree-create-sub (path allfiles dirprefix fileprefix indent depth) (let* ((files (condition-case err (directory-files path t) (error (list "----")))) (limit (and (integerp w3m-dtree-directory-depth) (>= depth w3m-dtree-directory-depth))) (indent-sub1 (if limit (aref w3m-dtree-stop-strings 0) (aref w3m-dtree-indent-strings 0))) (indent-sub2 (aref w3m-dtree-indent-strings 2)) file fullpath tmp) (setq files (delete (concat (file-name-as-directory path) ".") (delete (concat (file-name-as-directory path) "..") files))) (unless allfiles (setq tmp files) (while (setq file (car tmp)) (unless (file-directory-p file) (setq files (delete file files))) (setq tmp (cdr tmp)))) (while (setq fullpath (car files)) (when (= (length files) 1) (if limit (setq indent-sub1 (aref w3m-dtree-stop-strings 1)) (setq indent-sub1 (aref w3m-dtree-indent-strings 1))) (setq indent-sub2 (aref w3m-dtree-indent-strings 3))) (setq file (file-name-nondirectory fullpath)) (cond ((or (not allfiles) (file-directory-p fullpath)) (insert (format "%s%s%s%s\n" indent indent-sub1 (if allfiles "[d]" "") dirprefix (w3m-dtree-expand-file-name (file-name-as-directory fullpath)) (concat file "/"))) (when (and (null limit) (or allfiles (w3m-dtree-has-child fullpath))) (w3m-dtree-create-sub fullpath allfiles dirprefix fileprefix (concat indent indent-sub2) (1+ depth)))) ((and allfiles (file-exists-p fullpath)) (insert (format "%s%s%s%s\n" indent indent-sub1 (if allfiles "(f)" "") fileprefix (w3m-dtree-expand-file-name fullpath) file)))) (setq files (cdr files))))) (defun w3m-dtree-create (path allfiles dirprefix fileprefix) (let ((charset (or (car (rassq w3m-file-name-coding-system w3m-charset-coding-system-alist)) w3m-file-name-coding-system))) (insert "\n" "\n\n" "\n" "" path "\n\n\n
    \n")
        (insert (format "%s%s\n"
    		    dirprefix (w3m-dtree-expand-file-name path) path
    		    (if allfiles " (allfiles)" "")))
        (if (file-directory-p path)
    	(w3m-dtree-create-sub path allfiles dirprefix fileprefix " " 0)
          (insert (format "\n

    Warning: Directory not found.

    \n"))) (insert "
    \n\n\n"))) ;;;###autoload (defun w3m-about-dtree (url &optional nodecode allfiles &rest args) (let ((prelen (length "about://dtree")) (dirprefix "about://dtree") (fileprefix "file://") path) (if (string-match "\\?allfiles=\\(?:\\(true\\)\\|false\\)\\'" url) (progn (setq path (substring url prelen (match-beginning 0))) (if (match-beginning 1) (setq allfiles t))) (if w3m-dtree-default-allfiles (setq allfiles (not allfiles))) (setq path (substring url prelen))) ;; counter drive letter (setq path (file-name-as-directory (w3m-dtree-directory-name path))) (setq default-directory path) (w3m-message "Dtree (%s)..." path) (w3m-dtree-create path allfiles dirprefix fileprefix) (w3m-message "Dtree...done") "text/html")) ;;;###autoload (defun w3m-dtree (allfiles path) "Display directory tree on local file system. If called with prefix argument, display all directories and files." (interactive "P\nDDtree directory: ") (if w3m-dtree-default-allfiles (setq allfiles (not allfiles))) (w3m-goto-url (format "about://dtree%s%s" (w3m-dtree-expand-file-name (file-name-as-directory (expand-file-name path))) (if allfiles "?allfiles=true" "")))) (provide 'w3m-dtree) ;;; w3m-dtree.el ends here emacs-w3m-emacs-w3m-4f27810/w3m-ems.el000066400000000000000000001345701434375002100172000ustar00rootroot00000000000000;;; w3m-ems.el --- GNU Emacs stuff for emacs-w3m -*- lexical-binding: t -*- ;; Copyright (C) 2001-2013, 2016-2020 TSUCHIYA Masatoshi ;; Authors: Yuuichi Teranishi , ;; TSUCHIYA Masatoshi , ;; Katsumi Yamaoka ;; Keywords: w3m, WWW, hypermedia ;; This file is a part of emacs-w3m. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; This file contains GNU Emacs stuff that emacs-w3m uses. For more ;; detail about emacs-w3m, see: ;; ;; http://emacs-w3m.namazu.org/ ;;; Code: (require 'cl-lib) ;; cl-decf, cl-incf (require 'w3m-util) (require 'w3m-proc) (require 'w3m-image) (require 'w3m-favicon) (require 'wid-edit) ;; Functions and variables which should be defined in the other module ;; at run-time. (defvar w3m-add-tab-number) (defvar w3m-coding-system) (defvar w3m-current-process) (defvar w3m-current-title) (defvar w3m-current-url) (defvar w3m-default-coding-system) (defvar w3m-display-inline-images) (defvar w3m-favicon-image) (defvar w3m-form-input-textarea-coding-system) (defvar w3m-form-use-fancy-faces) (defvar w3m-icon-directory) (defvar w3m-image-default-background) (defvar w3m-mode-map) (defvar w3m-modeline-process-status-on) (defvar w3m-new-session-in-background) (defvar w3m-previous-session-buffer) (defvar w3m-process-queue) (defvar w3m-show-graphic-icons-in-mode-line) (defvar w3m-show-graphic-icons-in-tab-line) (defvar w3m-toolbar) (defvar w3m-toolbar-buttons) (defvar w3m-use-favicon) (defvar w3m-use-header-line) (defvar w3m-use-header-line-title) (defvar w3m-use-tab) (defvar w3m-use-tab-line) ;; `w3m-tab-move-right' calls the inline function `w3m-buffer-set-number' ;; which uses it. (defvar w3m-use-title-buffer-name) (defvar w3m-work-buffer-list) (defvar w3m-work-buffer-name) (declare-function w3m-copy-buffer "w3m" (&optional buffer new-name background empty last)) (declare-function w3m-delete-buffer "w3m" (&optional force)) (declare-function w3m-image-type "w3m" (content-type)) (declare-function w3m-retrieve "w3m" (url &optional no-uncompress no-cache post-data referer handler)) (declare-function w3m-select-buffer-update "w3m" (&rest args)) ;; emacs-nox (defvar image-types) (declare-function image-size "image.c" (spec &optional pixels frame)) ;;; Coding system and charset. (defsubst w3m-find-coding-system (obj) "Return OBJ if it is a coding-system." (if (coding-system-p obj) obj)) (defun w3m-detect-coding-region (start end &optional priority-list) "Detect coding system of the text in the region between START and END. Return the first possible coding system. PRIORITY-LIST is a list of coding systems ordered by priority." (with-coding-priority priority-list (car (detect-coding-region start end)))) (defun w3m-mule-unicode-p () "Check the existence as charsets of mule-unicode." (and (charsetp 'mule-unicode-0100-24ff) (charsetp 'mule-unicode-2500-33ff) (charsetp 'mule-unicode-e000-ffff))) (defun w3m-make-ccl-coding-system (coding-system mnemonic docstring decoder encoder) "Define a new CODING-SYSTEM by CCL programs DECODER and ENCODER. CODING-SYSTEM, DECODER and ENCODER must be symbols. This function is an interface to `define-coding-system'." (define-coding-system coding-system docstring :mnemonic mnemonic :coding-type 'ccl :ccl-decoder decoder :ccl-encoder encoder)) (defun w3m-ucs-to-char (codepoint) (or (decode-char 'ucs codepoint) ?~)) (defun w3m-display-inline-images-p () "Returns non-nil when images can be displayed under the present circumstances." (and w3m-display-inline-images (display-images-p))) ;; Animation. (defcustom w3m-image-animate-seconds 10 "Animate images (if possible) for this many seconds. If nil, don't play the animation. If t, loop forever." :group 'w3m :type '(choice (integer :tag "Animate for (seconds)") (const :tag "Inhibit animation" nil) (const :tag "Animate forever" t))) (defun w3m-image-animate (image) "Start animating IMAGE if possible. Return IMAGE." (when (and w3m-image-animate-seconds (cdr (image-multi-frame-p image))) (image-animate image nil w3m-image-animate-seconds) ;; Reset an image to the initial one after playing the animation. ;; FIXME: Is there a better way? (when (numberp w3m-image-animate-seconds) (run-with-timer (1+ w3m-image-animate-seconds) nil (lambda (image) (image-animate image 0 0)) image))) image) (defun w3m-create-image (url &optional no-cache referer size handler) "Retrieve data from URL and create an image object. If optional argument NO-CACHE is non-nil, cache is not used. If second optional argument REFERER is non-nil, it is used as Referer: field. If third optional argument SIZE is non-nil, its car element is used as width and its cdr element is used as height." (if (not handler) (w3m-process-with-wait-handler (w3m-create-image url no-cache referer size handler)) (let ((cur (current-buffer)) (set-size size) type image) (w3m-process-do-with-temp-buffer (content-type (progn (set-buffer-multibyte nil) (w3m-retrieve url nil no-cache nil referer handler))) (goto-char (point-min)) ;; The image type that the Content-Type header specifies might ;; sometimes be wrong, so we parse actual image data as for at ;; least well-used types. (when (if (let ((case-fold-search nil)) (looking-at "\\(GIF8\\)\\|\\(\377\330\\)\\|\211PNG\r\n")) (w3m-image-type-available-p (setq type (cond ((match-beginning 1) 'gif) ((match-beginning 2) 'jpeg) (t 'png)))) (setq type (w3m-image-type content-type))) (and (eq type 'convert) content-type (string-match "\\`image/" content-type) (w3m-imagick-convert-buffer (substring content-type (match-end 0)) "png") (setq type 'png)) (setq image (apply #'create-image (buffer-string) type t :ascent 'center :background w3m-image-default-background (when (eq type 'image-convert) (list :format (intern content-type))))) (if (and w3m-resize-images set-size) (progn (set-buffer-multibyte t) (setq size (image-size image 'pixels)) (if (and (null (car set-size)) (cdr set-size)) (setcar set-size (/ (* (car size) (cdr set-size)) (cdr size)))) (if (and (null (cdr set-size)) (car set-size)) (setcdr set-size (/ (* (cdr size) (car set-size)) (car size)))) (if (or (not (eq (car size) (car set-size))) ; width is different (not (eq (cdr size) (cdr set-size)))) ; height is different (w3m-process-do (resized (w3m-resize-image (plist-get (cdr image) :data) (car set-size)(cdr set-size) handler)) (if resized (plist-put (cdr image) :data resized)))))) (with-current-buffer cur (w3m-image-animate image))))))) (defun w3m-create-resized-image (url rate &optional referer size handler) "Resize an cached image object. URL is the image file's url. RATE is resize percentage. If REFERER is non-nil, it is used as Referer: field. If SIZE is non-nil, its car element is used as width and its cdr element is used as height." (if (not handler) (w3m-process-with-wait-handler (w3m-create-image url nil referer size handler)) (let (image) (w3m-process-do-with-temp-buffer (type (progn (set-buffer-multibyte nil) (w3m-retrieve url nil nil nil referer handler))) (when (setq type (w3m-image-type type)) (setq image (create-image (buffer-string) type t :ascent 'center)) (progn (set-buffer-multibyte t) (w3m-process-do (resized (w3m-resize-image-by-rate (plist-get (cdr image) :data) rate handler)) (if resized (plist-put (cdr image) :data resized)) image))))))) (defun w3m-insert-image (beg end image &rest _args) "Display image on the current buffer. Buffer string between BEG and END are replaced with IMAGE." (let ((faces (get-text-property beg 'face)) (idx 0) orig len face) (add-text-properties beg end (list 'display image 'intangible image 'invisible nil)) ;; Hide underlines behind inline images. ;; Gerd Moellmann , the maintainer of Emacs 21, wrote in ;; the article <86heyi7vks.fsf@gerd.segv.de> in the list emacs-pretest- ;; bug@gnu.org on 18 May 2001 that to show an underline of a text even ;; if it has an image as a text property is the feature of Emacs 21. ;; However, that behavior is not welcome to the w3m buffers, so we do ;; to fix it with the following stuffs. (when faces (unless (listp faces) (setq faces (list faces))) (setq orig (copy-sequence faces) len (length orig)) (while (< idx len) (when (face-underline-p (setq face (nth idx orig))) (setq faces (delq face faces))) (setq idx (1+ idx))) (when (< (length faces) len) (put-text-property beg end 'face faces) (put-text-property beg end 'w3m-faces-with-underline orig))))) (defun w3m-remove-image (beg end) "Remove an image which is inserted between BEG and END." (remove-text-properties beg end '(display nil intangible nil)) (let ((underline (get-text-property beg 'w3m-faces-with-underline))) (when underline (add-text-properties beg end (list 'face underline 'w3m-faces-with-underline nil))))) (defun w3m-image-type-available-p (type) "Return non-nil if an image with TYPE can be displayed inline." (and (display-images-p) (image-type-available-p type))) ;;; Form buttons (defface w3m-form-button '((((type x w32 mac ns) (class color)) :background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button)) (((class color) (background light)) (:foreground "cyan" :underline t)) (((class color) (background dark)) (:foreground "red" :underline t)) (t (:underline t))) "Face to fontify buttons in forms." :group 'w3m-face) (defface w3m-form-button-mouse '((((type x w32 mac ns) (class color)) :background "DarkSeaGreen1" :foreground "black" :box (:line-width 2 :style released-button)) (((class color) (background light)) (:foreground "cyan" :underline t)) (((class color) (background dark)) (:foreground "red" :underline t)) (t (:underline t))) "Face to fontify focused buttons in forms." :group 'w3m-face) (defface w3m-form-button-pressed '((((type x w32 mac ns) (class color)) :background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button)) (((class color) (background light)) (:foreground "cyan" :underline t)) (((class color) (background dark)) (:foreground "red" :underline t)) (t (:underline t))) "Face to fontify pressed buttons in forms." :group 'w3m-face) (defvar w3m-form-button-keymap (let ((map (copy-keymap widget-keymap))) (substitute-key-definition 'widget-forward nil map) (substitute-key-definition 'widget-backward nil map) map)) (define-widget 'w3m-form-button 'push-button "Widget for w3m form button." :keymap w3m-form-button-keymap :action (function (lambda (widget &optional _e) (eval (widget-get widget :w3m-form-action))))) (defun w3m-form-make-button (start end properties &optional readonly) "Make button on the region from START to END." (cond (readonly (w3m-add-text-properties start end (append '(face w3m-form-inactive w3m-form-readonly t) properties))) (w3m-form-use-fancy-faces (unless (memq (face-attribute 'w3m-form-button :box) '(nil unspecified)) (and (eq ?\[ (char-after start)) (eq ?\] (char-before end)) (save-excursion (goto-char start) (delete-char 1) (insert " ") (goto-char end) (delete-char -1) (insert " ") (setq start (1+ start) end (1- end))))) ;; Empty text won't be buttonized, so we fill it with something. ;; "submit" seems to be a proper choice in nine cases out of ten. (when (= start end) (goto-char start) (insert "submit") (setq end (point))) (let ((w (widget-convert-button 'w3m-form-button start end :w3m-form-action (plist-get properties 'w3m-action)))) (overlay-put (widget-get w :button-overlay) 'evaporate t)) (add-text-properties start end properties)) (t (w3m-add-text-properties start end (append '(face w3m-form) properties))))) (defun w3m-setup-widget-faces () (make-local-variable 'widget-button-face) (make-local-variable 'widget-mouse-face) (make-local-variable 'widget-button-pressed-face) (setq widget-button-face 'w3m-form-button) (setq widget-mouse-face 'w3m-form-button-mouse) (setq widget-button-pressed-face 'w3m-form-button-pressed)) ;;; Menu bar (defun w3m-menu-on-forefront (arg &optional curbuf) "Place emacs-w3m menus on the forfront of the menu bar if ARG is non-nil. If CURBUF is given, this function works only in the current buffer, otherwise works in all the emacs-w3m buffers." (if curbuf (if arg (let ((items (mapcar 'car (cdr (lookup-key global-map [menu-bar]))))) (when items (set (make-local-variable 'menu-bar-final-items) items))) (kill-local-variable 'menu-bar-final-items)) (save-current-buffer (dolist (buffer (w3m-list-buffers t)) (set-buffer buffer) (w3m-menu-on-forefront arg t))))) ;;; Toolbar (defcustom w3m-use-toolbar (and (display-images-p) (or (featurep 'gtk) (image-type-available-p 'xpm))) "Non-nil enables toolbar." :group 'w3m :type 'boolean) (defcustom w3m-toolbar-icon-preferred-image-types (if (featurep 'gtk) '(png) '(xpm)) "List of image types that you prefer to use for the tool bar icons. By default, `png' is most preferred for Emacs built with GTK and `xpm' is for others." :group 'w3m :type '(repeat (symbol :tag "Image type")) :set (lambda (symbol value) (prog1 (custom-set-default symbol value) (unless (or noninteractive ;; Loading w3m.elc is just in progress... (not (featurep 'w3m))) (w3m-update-toolbars))))) (defcustom w3m-toolbar-use-single-image-per-icon nil "Non-nil means use single image (named *-up) per icon. If it is nil, subsidiaries, e.g., *-down and *-disabled, if any, are used together. Note that this option will be ignored if running Emacs built with Gtk+ and every button will use a single icon image." :group 'w3m :type 'boolean :set (lambda (symbol value) (prog1 (custom-set-default symbol value) (unless (or noninteractive ;; Loading w3m.elc is just in progress... (not (featurep 'w3m))) (w3m-update-toolbars))))) (defcustom w3m-toolbar-configurations `((tool-bar-button-margin . global) ,@(unless (featurep 'gtk) '((tool-bar-button-relief . global)))) "Alist of variables and values that controls the tool bar appearance. The value `global' means to use the global value of the variable. If you're annoyed with changing of the frame height of Emacs built for GTK because of the difference of the sizes between the emacs-w3m tool bar icons and the ones that Emacs natively uses, try customizing this variable or both the value of this variable and the global value of `tool-bar-button-margin'. For examples: ;; The case where the emacs-w3m icons are smaller than the others. (setq w3m-toolbar-configurations \\='((tool-bar-button-margin . 5))) ;; The case where the emacs-w3m icons are bigger than the others. (setq w3m-toolbar-configurations \\='((tool-bar-button-margin . 0)) tool-bar-button-margin 7)" :group 'w3m :type '(repeat (cons :format "%v" (symbol :tag "Variable") (radio :format "%v" (const :format "%v " global) (sexp :tag "Local Value")))) :set (lambda (symbol value) (prog1 (custom-set-default symbol value) (unless (or noninteractive ;; Loading w3m.elc is just in progress... (not (featurep 'w3m))) (w3m-toolbar-set-configurations))))) (defun w3m-toolbar-define-keys (keymap defs) (let ((n (length defs)) def) (while (>= n 0) (setq n (1- n) def (nth n defs)) (define-key keymap (vector 'tool-bar (aref def 1)) (list 'menu-item " " (aref def 1) :enable (aref def 2) :help (aref def 3) :image (symbol-value (aref def 0))))))) (defun w3m-find-image (name &optional directory) "Find image file for NAME and return cons of file name and type. This function searches only in DIRECTORY, that defaults to the value of `w3m-icon-directory', for an image file of which the base name is NAME. Files of types that Emacs does not support are ignored." (unless directory (setq directory w3m-icon-directory)) (when (and directory (file-directory-p directory) (display-images-p)) (let* ((case-fold-search nil) (files (directory-files directory t (concat "\\`" (regexp-quote name) "\\."))) (types (append w3m-toolbar-icon-preferred-image-types image-types)) file type rest) (while files (when (string-match "\\.\\([^.]+\\)\\'" (setq file (pop files))) (setq type (intern (downcase (match-string 1 file)))) (setq type (or (cdr (assq type '((tif . tiff) (jpg . jpeg) (ps . postscript) (pgm . pbm) (ppm . pbm)))) type)) (push (cons file (memq type types)) rest))) (setq rest (car (sort rest (lambda (a b) (> (length a) (length b)))))) (when (cdr rest) (cons (car rest) (cadr rest)))))) (defun w3m-toolbar-make-buttons (buttons &optional force) (let ((xpm-props '(:color-symbols (("backgroundToolBarColor" . "None")))) button icon down disabled up) (while buttons (setq button (pop buttons) icon (intern (concat "w3m-toolbar-" button "-icon"))) (when (or force (not (boundp icon))) (setq down (w3m-find-image (concat button "-down")) disabled (w3m-find-image (concat button "-disabled"))) (if (setq up (or (w3m-find-image (concat button "-up")) (prog1 (or down disabled (w3m-find-image button)) (setq down nil disabled nil)))) (progn (setq up (apply 'create-image (car up) (cdr up) nil :ascent 'center (when (eq (cdr up) 'xpm) xpm-props))) (if (or (boundp 'gtk-version-string) w3m-toolbar-use-single-image-per-icon (not (or down disabled))) (set icon up) (when down (setq down (apply 'create-image (car down) (cdr down) nil :ascent 'center (when (eq (cdr up) 'xpm) xpm-props)))) (when disabled (setq disabled (apply 'create-image (car disabled) (cdr disabled) nil :ascent 'center (when (eq (cdr disabled) 'xpm) xpm-props)))) (set icon (vector down up disabled disabled)))) (error "Icon file %s-up.* not found" button)))))) (defun w3m-toolbar-set-configurations (&optional curbuf) "Set values of variables according to `w3m-toolbar-configurations'. If CURBUF is given, this function works only in the current buffer, otherwise works in all the emacs-w3m buffers." (if curbuf (dolist (config w3m-toolbar-configurations) (if (eq (cdr config) 'global) (kill-local-variable (car config)) (set (make-local-variable (car config)) (cdr config)))) (let ((cur (selected-frame)) buffer buffers) (walk-windows (lambda (window) (setq buffer (window-buffer window)) (unless (memq buffer buffers) (set-buffer buffer) (when (eq major-mode 'w3m-mode) (push buffer buffers) (select-frame (window-frame window)) ;;(set-buffer buffer) (w3m-toolbar-set-configurations t)))) 'ignore 'visible) (select-frame-set-input-focus cur) (save-current-buffer (dolist (buffer (w3m-list-buffers t)) (unless (memq buffer buffers) (set-buffer buffer) (w3m-toolbar-set-configurations t)))) (select-frame-set-input-focus cur)))) (defun w3m-setup-toolbar () (when (and w3m-use-toolbar (w3m-find-image "antenna-up")) (w3m-toolbar-make-buttons w3m-toolbar-buttons) (w3m-toolbar-set-configurations t) (w3m-toolbar-define-keys w3m-mode-map w3m-toolbar))) (defun w3m-update-toolbars () (when (and w3m-use-toolbar (w3m-find-image "antenna-up")) (w3m-toolbar-make-buttons w3m-toolbar-buttons t) (w3m-toolbar-set-configurations) (w3m-toolbar-define-keys w3m-mode-map w3m-toolbar))) ;;; tab-line & tabs (defcustom w3m-tab-width 16 "w3m tab width." :group 'w3m :set (lambda (symbol value) (custom-set-default symbol (if (and (numberp value) (> value 0)) value 16))) :type 'integer) (defface w3m-tab-unselected '((((type x w32 mac ns) (class color)) :background "Gray70" :foreground "Gray20" :box (:line-width -1 :style released-button)) (((class color)) (:background "blue" :foreground "black"))) "Face to fontify unselected tabs." :group 'w3m-face) (defface w3m-tab-unselected-retrieving '((((type x w32 mac ns) (class color)) :background "Gray70" :foreground "OrangeRed" :box (:line-width -1 :style released-button)) (((class color)) (:background "blue" :foreground "OrangeRed"))) "Face to fontify unselected tabs which are retrieving their pages." :group 'w3m-face) (defface w3m-tab-unselected-unseen '((((type x w32 mac ns) (class color)) :background "Gray70" :foreground "Gray20" :box (:line-width -1 :style released-button)) (((class color)) (:background "blue" :foreground "gray60"))) "Face to fontify unselected and unseen tabs." :group 'w3m-face) (defface w3m-tab-selected '((((type x w32 mac ns) (class color)) :background "Gray90" :foreground "black" :box (:line-width -1 :style released-button)) (((class color)) (:background "cyan" :foreground "black")) (t (:underline t))) "Face to fontify selected tab." :group 'w3m-face) (defface w3m-tab-selected-retrieving '((((type x w32 mac ns) (class color)) :background "Gray90" :foreground "red" :box (:line-width -1 :style released-button)) (((class color)) (:background "cyan" :foreground "red")) (t (:underline t))) "Face to fontify selected tab which is retrieving its page." :group 'w3m-face) (defface w3m-tab-background '((((type x w32 mac ns) (class color)) :background "LightSteelBlue" :foreground "black") (((class color)) (:background "white" :foreground "black"))) "Face to fontify background of tab line." :group 'w3m-face) (defface w3m-tab-selected-background '((((type x w32 mac ns) (class color)) :background "LightSteelBlue" :foreground "black") (((class color)) (:background "white" :foreground "black"))) "Face to fontify selected background tab." :group 'w3m-face) (defface w3m-tab-mouse '((((type x w32 mac ns) (class color)) :background "Gray75" :foreground "white" :box (:line-width -1 :style released-button))) "Face used to highlight tabs under the mouse." :group 'w3m-face) (defvar w3m-modeline-spinner-map nil "Keymap used on the spinner in the mode-line.") (defvar w3m-spinner-map-help-echo "mouse-2 kills the current process" "String used for the :help-echo property on the spinner.") (defun w3m-setup-tab-line () (let (format mouse2) (if w3m-use-tab-line (progn (setq format 'tab-line-format mouse2 [tab-line mouse-2]) (when (or (equal '(:eval (w3m-tab-line)) header-line-format) (string-match "w3m-header-line-" (prin1-to-string header-line-format))) (setq header-line-format nil))) (setq format 'header-line-format mouse2 [header-line mouse-2]) (when (and (boundp 'tab-line-format) (or (equal '(:eval (w3m-tab-line)) tab-line-format) (string-match "w3m-header-line-" (prin1-to-string tab-line-format)))) (setq tab-line-format nil))) (set format (cond (w3m-use-tab '(:eval (w3m-tab-line))) (w3m-use-header-line (list (if w3m-use-header-line-title (list (propertize "Title: " 'face (list 'w3m-header-line-title)) `(:eval (propertize (replace-regexp-in-string "%" "%%" (w3m-current-title)) 'face (list 'w3m-header-line-content) 'mouse-face '(highlight :foreground ,(face-foreground 'default)) 'local-map (let ((map (make-sparse-keymap))) (define-key map ,mouse2 'w3m-goto-url) map) 'help-echo "mouse-2 prompts to input URL")) (propertize ", " 'face (list 'w3m-header-line-background))) "") (propertize "Location: " 'face (list 'w3m-header-line-title)) `(:eval (propertize (if (stringp w3m-current-url) (replace-regexp-in-string "%" "%%" w3m-current-url) "") 'face (list 'w3m-header-line-content) 'mouse-face '(highlight :foreground ,(face-foreground 'default)) 'local-map (let ((map (make-sparse-keymap))) (define-key map ,mouse2 'w3m-goto-url) map) 'help-echo "mouse-2 prompts to input URL")) (propertize " " 'display (list 'space :width (* (window-width) 8)) 'face 'w3m-header-line-background))))))) (define-obsolete-function-alias 'w3m-setup-header-line 'w3m-setup-tab-line "27.1") (defun w3m-force-window-update (&optional window) "Force redisplay of WINDOW which defaults to the selected window." (force-window-update (or window (selected-window))) (sit-for 0)) (defun w3m-tab-drag-mouse-function (event buffer) (let ((window (posn-window (event-end event))) mpos prev) (when (framep window) ; dropped at outside of the frame. (setq window nil mpos (mouse-position)) (and (framep (car mpos)) (car (cdr mpos)) (cdr (cdr mpos)) (setq window (window-at (car (cdr mpos)) (cdr (cdr mpos)) (car mpos)))) (unless window (when (one-window-p 'nomini) (split-window)) (setq window (next-window)))) (unless (eq (setq prev (window-buffer window)) buffer) (select-window window) (switch-to-buffer buffer) (setq w3m-previous-session-buffer prev) (w3m-force-window-update window)))) (defun w3m-tab-click-mouse-function (event buffer) (let* ((window (posn-window (event-start event))) (prev (window-buffer window))) (select-window window) (switch-to-buffer buffer) (setq w3m-previous-session-buffer prev) (w3m-force-window-update window))) (defun w3m-tab-double-click-mouse1-function (event _buffer) (let ((window (posn-window (event-start event)))) (when (eq major-mode 'w3m-mode) (if w3m-new-session-in-background (save-window-excursion (w3m-copy-buffer)) (w3m-copy-buffer))) (w3m-force-window-update window))) (defun w3m-tab-double-click-mouse2-function (event _buffer) (let ((window (posn-window (event-start event)))) (when (eq major-mode 'w3m-mode) (w3m-delete-buffer)) (w3m-force-window-update window))) (defcustom w3m-tab-track-mouse t "Say whether to make the mouse track the selected tab. It controls the behavior of the commands `w3m-tab-previous-buffer', `w3m-tab-next-buffer', `w3m-tab-move-right', and `w3m-tab-move-left' invoked by the mouse. You may want to set this to nil if you use a proportional font for the tab faces. See also `w3m-tab-mouse-position-adjuster'." :group 'w3m :type 'boolean) (defcustom w3m-tab-mouse-position-adjuster '(0.5 . -4) "Values used to adjust the mouse position on tabs. It is used when the command `w3m-tab-previous-buffer', `w3m-tab-next-buffer', `w3m-tab-move-right', or `w3m-tab-move-left' is invoked by the mouse. The value consists of the cons of a floating point number M and an integer N that are applied to calculating of the mouse position, which is given in pixel units, as follows: (TAB_WIDTH + M) * ORDER + N Where TAB_WIDTH is the pixel width of a tab and ORDER is the order number in tabs. The result is rounded towards zero. Note that the calculation will always fail if you use a proportional font for the tab faces. See also `w3m-tab-track-mouse'." :group 'w3m :type '(cons (number :tag "M") (integer :tag "N"))) (defun w3m-tab-mouse-track-selected-tab (event order &optional decelerate) "Make the mouse track the selected tab. EVENT is a command event. ORDER is the order number in tabs. The optional DECELERATE if it is non-nil means not to respond to too fast operation of mouse wheel." (when (and w3m-use-tab w3m-tab-track-mouse (display-graphic-p) (consp event) (symbolp (car event))) (let ((e (get (car event) 'event-symbol-elements)) (len (* (car w3m-tab-mouse-position-adjuster) order)) (fcw (frame-char-width)) posn tab start end disp next) (when (and (consp e) (symbolp (car e)) (or (memq (car e) '(mouse-4 mouse-5 wheel-up wheel-down)) (string-match "\\`mouse-" (symbol-name (car e))))) ;; Ignore values gotten by the mouse pointing to other frames. ;; It might happen if the frame in question gets out of focus ;; by a certain desktop tool such as unclutter. (let ((frame (selected-frame))) (while (not (cadr (setq posn (mouse-pixel-position)))) (select-frame-set-input-focus frame))) ;; Update the tab line. (setq tab (w3m-tab-line)) (with-temp-buffer (insert tab) (setq start (point-min) end (point)) (while (and (> order 0) (setq start (text-property-any start end 'tab-separator t)) (setq start (text-property-not-all start end 'tab-separator t))) (setq order (1- order))) (setq end (1- start) start (point-min) next start disp (get-text-property start 'display)) (while (and (< next end) (setq next (next-single-property-change start 'display nil end))) (setq len (+ (cond ((eq (car disp) 'image) (or (car w3m-favicon-size) (frame-char-height))) ((eq (car disp) 'space) (* (or (plist-get (cdr disp) :width) 1) fcw)) (t (* (string-width (buffer-substring start next)) fcw))) len) start next disp (get-text-property start 'display)))) (set-mouse-pixel-position (car posn) (truncate (+ len (cdr w3m-tab-mouse-position-adjuster))) (cddr posn)) (when decelerate (sleep-for 0.1)) (discard-input))))) (defun w3m-tab-next-buffer (&optional n event) "Turn N pages of emacs-w3m buffers ahead." (interactive (list (prefix-numeric-value current-prefix-arg) last-command-event)) (unless n (setq n 1)) (when (and (/= n 0) (eq major-mode 'w3m-mode)) (let ((buffers (w3m-list-buffers))) (switch-to-buffer (nth (mod (+ n (w3m-buffer-number (current-buffer)) -1) (length buffers)) buffers)) (run-hooks 'w3m-select-buffer-hook) (w3m-select-buffer-update) (w3m-tab-mouse-track-selected-tab event (w3m-buffer-number (current-buffer)))))) (defun w3m-tab-previous-buffer (&optional n event) "Turn N pages of emacs-w3m buffers behind." (interactive (list (prefix-numeric-value current-prefix-arg) last-command-event)) (w3m-tab-next-buffer (- (or n 1)) event)) (defun w3m-tab-move-right (&optional mv-amt event) "Move the current tab right-ward (ie. next, higher number). Use the prefix argument to move the tab MV-AMT positions right-ward. EVENT is an internal arg for mouse control." (interactive (list (prefix-numeric-value current-prefix-arg) last-command-event)) (unless mv-amt (setq mv-amt 1)) (if (> 0 mv-amt) (w3m-tab-move-left (- mv-amt) event) (when (and (/= mv-amt 0) (eq major-mode 'w3m-mode)) (let* ((start-buf (current-buffer)) (start-num (w3m-buffer-number start-buf)) (buffers (w3m-list-buffers)) (len (length buffers)) (this-num (1- start-num)) this-buf) (setq mv-amt (min mv-amt (- len start-num))) (when (> mv-amt 0) (setq buffers (last buffers (- len start-num))) (setq buffers (butlast buffers (- (length buffers) mv-amt))) (rename-buffer "*w3m*<0>") (while (setq this-buf (pop buffers)) (w3m-buffer-set-number this-buf (cl-incf this-num))) (w3m-buffer-set-number start-buf (+ start-num mv-amt)) (w3m-select-buffer-update) (w3m-tab-mouse-track-selected-tab event (+ start-num mv-amt) t)))))) (defalias 'w3m-tab-move-next 'w3m-tab-move-right) (defun w3m-tab-move-left (&optional mv-amt event) "Move the current tab left-ward (ie. prior, lower number). Use the prefix argument to move the tab MV-AMT positions left-ward. EVENT is an internal arg for mouse control." (interactive (list (prefix-numeric-value current-prefix-arg) last-command-event)) (unless mv-amt (setq mv-amt 1)) (if (> 0 mv-amt) (w3m-tab-move-right (- mv-amt) event) (when (and (/= mv-amt 0) (eq major-mode 'w3m-mode)) (let* ((start-buf (current-buffer)) (start-num (w3m-buffer-number start-buf)) (buffers (nreverse (w3m-list-buffers))) (this-num (1+ start-num)) this-buf) (setq mv-amt (min mv-amt (1- start-num))) (when (> mv-amt 0) (setq buffers (last buffers (1- start-num))) (setq buffers (butlast buffers (- (length buffers) mv-amt))) (rename-buffer "*w3m*<0>") (while (setq this-buf (pop buffers)) (w3m-buffer-set-number this-buf (cl-decf this-num))) (w3m-buffer-set-number start-buf (- start-num mv-amt)) (w3m-select-buffer-update) (w3m-tab-mouse-track-selected-tab event (- start-num mv-amt) t)))))) (defalias 'w3m-tab-move-prior 'w3m-tab-move-left) (defvar w3m-tab-map nil) (make-variable-buffer-local 'w3m-tab-map) (defvar w3m-tab-spinner-map nil) (make-variable-buffer-local 'w3m-tab-spinner-map) (defun w3m-tab-make-keymap (&optional force) "Make a keymap used for tab-line. The optional FORCE forces making it. It does nothing if the keymap already exists and FORCE is nil. Keymap to be made will be the one used for header-line instead of tab-line if `w3m-use-tab-line' is nil." (when (or force (not w3m-tab-map) (not (eq (caadr w3m-tab-map) (if w3m-use-tab-line 'tab-line 'header-line)))) (setq w3m-tab-map (make-sparse-keymap)) (let* ((map1 (make-sparse-keymap)) (map2 (make-sparse-keymap)) (prefix (if w3m-use-tab-line [tab-line] [header-line])) (cur (current-buffer)) (f1 (lambda (fn) `(lambda (e) (interactive "e") (,fn e ,cur)))) (f2 (lambda (fn) `(lambda (n e) (interactive (list (prefix-numeric-value current-prefix-arg) last-command-event)) (select-window (posn-window (event-start e))) (switch-to-buffer ,cur) (setq this-command ',fn) (,fn n e)))) (drag-action (funcall f1 'w3m-tab-drag-mouse-function)) (single-action (funcall f1 'w3m-tab-click-mouse-function)) (double-action1 (funcall f1 'w3m-tab-double-click-mouse1-function)) (double-action2 (funcall f1 'w3m-tab-double-click-mouse2-function)) (menu-action (funcall f1 'w3m-tab-button-menu)) (menu-action2 (funcall f1 'w3m-tab-button-menu2)) (next-buffer-action (funcall f2 'w3m-tab-next-buffer)) (previous-buffer-action (funcall f2 'w3m-tab-previous-buffer)) (move-left-action (funcall f2 'w3m-tab-move-left)) (move-right-action (funcall f2 'w3m-tab-move-right))) (define-key w3m-tab-map prefix map1) (define-key map1 [down-mouse-1] 'ignore) (define-key map1 [down-mouse-2] 'ignore) (define-key map1 [mouse-1] single-action) (define-key map1 [mouse-2] single-action) (define-key map1 [drag-mouse-1] drag-action) (define-key map1 [drag-mouse-2] drag-action) (define-key map1 [double-mouse-1] double-action1) (define-key map1 [double-mouse-2] double-action2) (define-key map1 [mouse-3] menu-action) (define-key map1 [wheel-up] previous-buffer-action) (define-key map1 [wheel-down] next-buffer-action) (define-key map1 [mouse-4] previous-buffer-action) (define-key map1 [mouse-5] next-buffer-action) (define-key map1 [C-wheel-up] move-left-action) (define-key map1 [C-wheel-down] move-right-action) (define-key map1 [C-mouse-4] move-left-action) (define-key map1 [C-mouse-5] move-right-action) (define-key w3m-mode-map prefix map2) (define-key map2 [double-mouse-1] 'w3m-goto-new-session-url) (define-key map2 [mouse-3] menu-action2) ;; The following bindings in `w3m-mode-map', not `w3m-tab-map', ;; are required for some platforms, in which mouse wheel events ;; sometimes pass by `w3m-tab-map' for the unresolved reason and ;; see `w3m-mode-map', or else the `undefined' errors will arise. (define-key map2 [mouse-4] 'w3m-tab-previous-buffer) (define-key map2 [mouse-5] 'w3m-tab-next-buffer) (define-key map2 [wheel-up] 'w3m-tab-previous-buffer) (define-key map2 [wheel-down] 'w3m-tab-next-buffer) (define-key map2 [C-wheel-up] 'w3m-tab-move-left) (define-key map2 [C-wheel-down] 'w3m-tab-move-right) (define-key map2 [C-mouse-4] 'w3m-tab-move-left) (define-key map2 [C-mouse-5] 'w3m-tab-move-right) (unless w3m-tab-spinner-map (setq w3m-tab-spinner-map (make-sparse-keymap)) (define-key w3m-tab-spinner-map (vconcat prefix [mouse-2]) `(lambda (e) (interactive "e") (save-current-buffer ;; Why the `(w3m-process-stop BUFFER)' doesn't work? (set-buffer ,(current-buffer)) (call-interactively 'w3m-process-stop)))))))) (defvar w3m-tab-half-space (propertize " " 'display '(space :width 0.5)) "The space of half width.") (defvar w3m-tab-separator-map nil) (when (or (not w3m-tab-separator-map) (not (eq (caadr w3m-tab-separator-map) (if w3m-use-tab-line 'tab-line 'header-line)))) (setq w3m-tab-separator-map (make-sparse-keymap)) (let ((map (make-sparse-keymap))) (define-key w3m-tab-separator-map (if w3m-use-tab-line [tab-line] [header-line]) map) (define-key map [wheel-up] 'w3m-tab-previous-buffer) (define-key map [wheel-down] 'w3m-tab-next-buffer) (define-key map [mouse-4] 'w3m-tab-previous-buffer) (define-key map [mouse-5] 'w3m-tab-next-buffer) (define-key map [C-wheel-up] 'w3m-tab-move-left) (define-key map [C-wheel-down] 'w3m-tab-move-right) (define-key map [C-mouse-4] 'w3m-tab-move-left) (define-key map [C-mouse-5] 'w3m-tab-move-right))) (defun w3m-tab-line () (let* ((current (current-buffer)) (buffers (w3m-list-buffers)) (breadth 1) (number 0) (fringes (window-fringes)) (width (+ (window-width) (/ (float (+ (or (car fringes) 0) (or (nth 1 fringes) 0))) (frame-char-width)) ;; Assume that the vertical scroll-bar has ;; the width of two space characters. (if (car (frame-current-scroll-bars)) 2 0))) (nbuf (length buffers)) (graphic (and w3m-show-graphic-icons-in-tab-line (display-images-p))) (margin (if (display-graphic-p) (+ (if graphic 3.0 0.5) ;; Right and left shadows. (/ 2.0 (frame-char-width))) 1)) (spinner (when w3m-process-queue (w3m-make-spinner-image))) buffer title data datum process unseen favicon keymap face icon line) (save-current-buffer (while buffers (set-buffer (setq buffer (pop buffers))) (setq number (1+ number)) (setq title (if w3m-add-tab-number (format "%d.%s" number (w3m-current-title)) (w3m-current-title))) (setq breadth (max breadth ;; There may be a wide character in the beginning of ;; the title. (if (> (length title) 0) (char-width (aref title 0)) 0))) (push (list (eq current buffer) w3m-current-process (w3m-unseen-buffer-p buffer) title (when w3m-use-favicon w3m-favicon-image) w3m-tab-map) data))) (setq width (if (> (* nbuf (+ margin w3m-tab-width)) width) (max (truncate (- (/ width nbuf) margin)) breadth) w3m-tab-width)) (while data (setq datum (pop data) current (car datum) process (nth 1 datum) unseen (nth 2 datum) title (nth 3 datum) favicon (nth 4 datum) keymap (nth 5 datum) face (list (if process (if current 'w3m-tab-selected-retrieving 'w3m-tab-unselected-retrieving) (if current 'w3m-tab-selected (if unseen 'w3m-tab-unselected-unseen 'w3m-tab-unselected)))) icon (when graphic (cond (process (when spinner (propertize " " 'display spinner 'face face 'local-map w3m-tab-spinner-map 'help-echo w3m-spinner-map-help-echo))) (favicon (propertize " " 'display favicon 'face face 'local-map keymap 'help-echo title)))) breadth (cond (icon width) (graphic (+ 2 width)) (t width))) (push (list icon (propertize (concat (when graphic w3m-tab-half-space) (replace-regexp-in-string "%" "%%" (if (and (> (string-width title) breadth) (> breadth 6)) (truncate-string-to-width (concat (truncate-string-to-width title (- breadth 3)) "...") breadth nil ?.) (truncate-string-to-width title breadth nil ? )))) 'face face 'mouse-face 'w3m-tab-mouse 'local-map keymap 'help-echo title) (propertize " " 'face (list 'w3m-tab-background) 'mouse-face 'w3m-tab-selected-background 'display (if graphic '(space :width 0.5)) 'tab-separator t 'local-map w3m-tab-separator-map)) line)) (concat (apply 'concat (apply 'nconc line)) (propertize " " 'display (list 'space :width (window-width)) 'face (list 'w3m-tab-background))))) (add-hook 'w3m-mode-setup-functions 'w3m-tab-make-keymap) (add-hook 'w3m-mode-setup-functions 'w3m-setup-tab-line) (add-hook 'w3m-mode-setup-functions 'w3m-setup-widget-faces) (add-hook 'w3m-select-buffer-hook 'w3m-force-window-update) ;; Graphic icons. (defcustom w3m-space-before-modeline-icon "" "String of space character(s) to be put in front of the mode-line icon. It may be better to use one or more spaces if you are using oblique or italic font in the modeline." :group 'w3m :type 'string) (defvar w3m-spinner-image-file nil "Image file used to show a spinner in the tab-line.") (defvar w3m-spinner-image-frames 3 "Number of frames which the spinner image contains.") (defvar w3m-spinner-image-index 0 "Counter used to rotate spinner images. This is a buffer-local variable.") (make-variable-buffer-local 'w3m-spinner-image-index) ;; Images to be displayed in the modeline. (defvar w3m-modeline-process-status-on-icon nil) (defvar w3m-modeline-image-status-on-icon nil) (defvar w3m-modeline-status-off-icon nil) (defvar w3m-modeline-ssl-image-status-on-icon nil) (defvar w3m-modeline-ssl-status-off-icon nil) (defun w3m-initialize-graphic-icons (&optional force) "Make icon images which will be displayed in the mode-line." (interactive "P") (when (or (image-type-available-p 'xpm) (image-type-available-p 'png)) ;; FIXME: Is this comment true even in Emacs in 2019? -ky ;; Prefer xpm icons rather than png icons since Emacs doesn't display ;; background colors of icon images other than xpm images transparently ;; in the mode line. (let* ((w3m-toolbar-icon-preferred-image-types (if (image-type-available-p 'xpm) '(xpm) '(png))) (defs `((w3m-modeline-status-off-icon ,(w3m-find-image "state-00") w3m-modeline-status-off) (w3m-modeline-image-status-on-icon ,(w3m-find-image "state-01") w3m-modeline-image-status-on) (w3m-modeline-ssl-status-off-icon ,(w3m-find-image "state-10") w3m-modeline-ssl-status-off) (w3m-modeline-ssl-image-status-on-icon ,(w3m-find-image "state-11") w3m-modeline-ssl-image-status-on))) def icon file type status keymap) (while defs (setq def (car defs) defs (cdr defs) icon (car def) file (car (nth 1 def)) type (cdr (nth 1 def)) status (nth 2 def)) (if (and w3m-show-graphic-icons-in-mode-line file) (progn (when (or force (not (symbol-value icon))) (unless keymap (setq keymap (make-mode-line-mouse-map 'mouse-2 'w3m-reload-this-page))) (set icon (propertize " " 'display (create-image file type nil :ascent 'center) 'local-map keymap 'mouse-face 'mode-line-highlight 'help-echo "mouse-2 reloads this page")) (put icon 'risky-local-variable t) (put status 'risky-local-variable t)) (when (stringp (symbol-value status)) ;; Save the original status strings as properties. (put status 'string (symbol-value status))) (set status (list "" 'w3m-space-before-modeline-icon icon))) ;; Don't use graphic icons. (when (get status 'string) (set status (get status 'string))))))) (let (file) ;; Spinner (when (and (or force (not w3m-spinner-image-file)) (image-type-available-p 'gif) w3m-icon-directory (file-directory-p w3m-icon-directory) (file-exists-p (setq file (expand-file-name "spinner.gif" w3m-icon-directory)))) (setq w3m-spinner-image-file file) (define-key (setq w3m-modeline-spinner-map (make-sparse-keymap)) [mode-line mouse-2] 'w3m-process-stop) (put 'w3m-modeline-process-status-on 'risky-local-variable t) (put 'w3m-modeline-process-status-on-icon 'risky-local-variable t)) (if (and w3m-show-graphic-icons-in-mode-line w3m-spinner-image-file (display-images-p)) (progn (when (stringp w3m-modeline-process-status-on) ;; Save the original status strings as properties. (put 'w3m-modeline-process-status-on 'string w3m-modeline-process-status-on)) (setq w3m-modeline-process-status-on '("" w3m-space-before-modeline-icon w3m-modeline-process-status-on-icon))) (when (get 'w3m-modeline-process-status-on 'string) (setq w3m-modeline-process-status-on (get 'w3m-modeline-process-status-on 'string)))))) (defun w3m-make-spinner-image () "Make an image used to show a spinner. It should be called periodically in order to spin the spinner." (when w3m-spinner-image-file (unless (< (cl-incf w3m-spinner-image-index) w3m-spinner-image-frames) (setq w3m-spinner-image-index 0)) (let ((image (create-image w3m-spinner-image-file 'gif nil :ascent 'center :mask 'heuristic :index w3m-spinner-image-index))) (setq w3m-modeline-process-status-on-icon (propertize " " 'display image 'local-map w3m-modeline-spinner-map 'help-echo w3m-spinner-map-help-echo)) image))) (defun w3m-form-coding-system-accept-region-p (&optional from to coding-system) "Check whether `coding-system' can encode specified region." (let ((pos (unencodable-char-position (or from (point-min)) (or to (point-max)) (or coding-system w3m-form-input-textarea-coding-system)))) (or (not pos) (y-or-n-p (format "\"%c\" would not be accepted. Continue? " (char-after pos)))))) (provide 'w3m-ems) ;;; w3m-ems.el ends here emacs-w3m-emacs-w3m-4f27810/w3m-favicon.el000066400000000000000000000306571434375002100200420ustar00rootroot00000000000000;;; w3m-favicon.el --- utilities for handling favicon in emacs-w3m -*- lexical-binding: t -*- ;; Copyright (C) 2001-2005, 2007, 2009, 2011, 2017, 2018, 2019 ;; TSUCHIYA Masatoshi ;; Authors: Yuuichi Teranishi , ;; TSUCHIYA Masatoshi , ;; Katsumi Yamaoka ;; Keywords: w3m, WWW, hypermedia ;; This file is a part of emacs-w3m. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (require 'w3m-image) (defvar w3m-current-buffer) (defvar w3m-current-url) (defvar w3m-favicon-image) (defvar w3m-icon-data) (defvar w3m-message-silent) (defvar w3m-modeline-favicon) (defvar w3m-profile-directory) (defvar w3m-use-favicon) (defvar w3m-work-buffer-name) (defvar w3m-work-buffer-list) (declare-function w3m-expand-url "w3m" (url &optional base)) (declare-function w3m-load-list "w3m" (file &optional coding-system)) (declare-function w3m-message "w3m" (&rest args)) (declare-function w3m-retrieve "w3m" (url &optional no-uncompress no-cache post-data referer handler)) (declare-function w3m-save-list "w3m" (file list &optional coding-system escape-ctl-chars)) (declare-function w3m-url-readable-string "w3m" (url)) (defcustom w3m-favicon-size nil "Size of favicon. The value should be `(WIDTH . HEIGHT)' or nil. Where WIDTH and HEIGHT are positive integers; both or any of them can be omitted." :group 'w3m :type '(radio (const :tag "Not specified" nil) (cons :format "%v" (integer :format "Width: %v " :value 16 :size 8) (integer :format "Height: %v " :value 16 :size 8)))) (defconst w3m-favicon-name "favicon.ico" "The favicon name.") (add-hook 'w3m-display-functions 'w3m-favicon-setup) (defcustom w3m-favicon-use-cache-file nil "If non-nil, use favicon cache file." :group 'w3m :type 'boolean) (defcustom w3m-favicon-cache-file nil "Filename of saving favicon cache. It defaults to the file named \".favicon\" under the directory specified by the `w3m-profile-directory' variable." :group 'w3m :type '(radio (const :format "Not specified\n") (file :format "%t: %v"))) (defcustom w3m-favicon-cache-expire-wait (* 30 24 60 60) "The cache will be expired after specified seconds passed since retrieval. If this variable is nil, never expired." :group 'w3m :type 'integer) (defcustom w3m-favicon-type (when (boundp 'image-types) (catch 'det (dolist (type '(gif png pbm svg xpm bmp) nil) (if (image-type-available-p type) (throw 'det type))))) "Image type of favicon." :group 'w3m :type '(radio :convert-widget w3m-widget-type-convert-widget ;; The variable `image-types' will not be available ;; if Emacs was built without the graphics stuff. (if (boundp 'image-types) (let ((types (delq 'imagemagick (delq 'postscript (copy-sequence image-types))))) (nconc (mapcar (lambda (x) `(const :format "%v " ,x)) (butlast types)) `((const ,(car (last types)))))) '((const :match (lambda (widget value) t) nil))))) (defcustom w3m-space-before-favicon " " "String of space char(s) to be put in front of favicon in the mode-line. It may be better to use two or more spaces if you are using oblique or italic font in the modeline." :group 'w3m :type 'string) (defcustom w3m-favicon-convert-args nil "List of additional arguments passed to ImageMagick's convert program. Args that are always passed to convert in addition to this value are: (\"-geometry\" \"WIDTHxHEIGHT\" \"fromTYPE:temp-file\" \"toTYPE:-\") Args might also contain (\"-transparent\" \"COLOR\") in the beginning." :group 'w3m :type `(repeat (group :format "%v" :inline t :match-inline (lambda (widget vals) (if (and (eq (aref (car vals) 0) ?-) (cdr vals) (not (eq (aref (nth 1 vals) 0) ?-))) (cons (list (car vals) (nth 1 vals)) (nthcdr 2 vals)) (cons (list (car vals)) (cdr vals)))) (string :format "Arg: %v " :value "-") (group :format "%v" :inline t (checklist :inline t (string :format "Value: %v")))))) (defcustom w3m-favicon-default-background nil "Color name used as transparent color of favicon image. Nil means to use the background color of the Emacs frame. The null string \"\" is special, that will be replaced with the background color of the tab line or the mode line on which the favicon is displayed." :group 'w3m :type '(radio (string :format "Color: %v" :match (lambda (widget value) (and (stringp value) (> (length value) 0)))) (const :tag "Use the background color of the Emacs frame" nil) (const :tag "Null string" ""))) (defvar w3m-favicon-type-alist '((pbm . ppm)) "A cons of what image type Emacs says and its real type generally told.") (defvar w3m-favicon-cache-data nil "A list of favicon cache (internal variable). Each information is a list whose elements are: 0. URL 1. (RAW_DATA . TYPE) 2. DATE when the RAW_DATA was retrieved 3. IMAGE Where IMAGE highly depends on the Emacs version and is not saved in the cache file.") (put 'w3m-modeline-favicon 'risky-local-variable t) (make-variable-buffer-local 'w3m-modeline-favicon) (make-variable-buffer-local 'w3m-favicon-image) (defmacro w3m-favicon-cache-p (url) "Say whether the favicon data for URL has been chached." `(assoc ,url w3m-favicon-cache-data)) (defmacro w3m-favicon-cache-favicon (url) "Pull out the favicon image corresponding to URL from the cache." `(nth 3 (assoc ,url w3m-favicon-cache-data))) (defmacro w3m-favicon-cache-retrieved (url) "Return the time when the favicon data for URL was retrieved." `(nth 2 (assoc ,url w3m-favicon-cache-data))) (defmacro w3m-favicon-set-image (image) "Set IMAGE to `w3m-favicon-image' and `w3m-modeline-favicon'." `(when (setq w3m-favicon-image ,image) (set 'w3m-modeline-favicon (list "" 'w3m-space-before-favicon (propertize " " 'display w3m-favicon-image) (propertize " " 'display '(space :width 0.5)))))) (defun w3m-favicon-setup (url) "Set up the favicon data in the current buffer. The buffer-local variable `w3m-favicon-image' will be set to non-nil value when the favicon is ready." (w3m-favicon-set-image nil) (when (and w3m-use-favicon w3m-current-url (display-images-p) (image-type-available-p w3m-favicon-type)) (let (icon) (cond ((and (string-match "\\`about://\\([^/]+\\)/" url) (setq icon (intern-soft (concat "w3m-about-" (match-string 1 url) "-favicon")))) (with-current-buffer w3m-current-buffer (w3m-favicon-set-image (w3m-favicon-convert (base64-decode-string (symbol-value icon)) 'ico)))) ((or (string-match "\\`\\(https?\\|file\\)://" url) (and (string-match "\\`about://\\(?:header\\|source\\)/https?://" url) (setq url (substring url 15)))) (if w3m-icon-data (w3m-favicon-retrieve (car w3m-icon-data) (cdr w3m-icon-data) w3m-current-buffer) (w3m-favicon-retrieve (w3m-expand-url (concat "/" w3m-favicon-name) url) 'ico w3m-current-buffer))))))) (defun w3m-favicon-convert (data type) "Convert the favicon DATA in TYPE to the favicon image and return it." (when (or (not (eq type 'ico)) ;; Is it really in the ico format? (and (>= (length data) 4) (string-equal "\x00\x00\x01\x00" (substring data 0 4))) ;; Some icons named favicon.ico are animated GIFs. (and (>= (length data) 5) (member (substring data 0 5) '("GIF87" "GIF89")) (setq type 'gif))) (let ((height (or (cdr w3m-favicon-size) (frame-char-height))) bg args img) ;; Examine the transparent color of the image. (when (and w3m-imagick-identify-program (equal w3m-favicon-default-background "")) (with-temp-buffer (set-buffer-multibyte nil) (insert data) (let ((coding-system-for-read 'raw-text) (coding-system-for-write 'binary)) (condition-case nil (call-process-region (point-min) (point-max) w3m-imagick-identify-program t t nil "-verbose" (format "%s:-" type)) (error))) (goto-char (point-min)) (setq case-fold-search t) (while (and (not bg) (re-search-forward "^ *Transparent +color: *\ \\([^\n ]+\\(?: +[^\n ]+\\)*\\)" nil t)) (when (string-match "\\`none\\'" (setq bg (match-string 1))) (setq bg nil))))) (setq args (list "-geometry" (format "%dx%d" (or (car w3m-favicon-size) height) height))) ;; "-transparent" should precede the other arguments. (setq args (nconc (when bg (list "-transparent" bg)) args w3m-favicon-convert-args)) (setq img (apply #'w3m-imagick-convert-data data (symbol-name type) (symbol-name (or (cdr (assq w3m-favicon-type w3m-favicon-type-alist)) w3m-favicon-type)) args)) (when img (create-image img w3m-favicon-type t :ascent 'center :background w3m-favicon-default-background))))) (declare-function zlib-available-p "decompress.c") (declare-function zlib-decompress-region "decompress.c" (start end &optional allow-partial)) (defun w3m-favicon-retrieve (url type target) "Retrieve favicon from URL and convert it to image as TYPE in TARGET. TYPE is a symbol like `ico' and TARGET is a buffer where the image is stored in the `w3m-favicon-image' buffer-local variable." (if (and (w3m-favicon-cache-p url) (or (null w3m-favicon-cache-expire-wait) (< (- (float-time) (float-time (w3m-favicon-cache-retrieved url))) w3m-favicon-cache-expire-wait))) (with-current-buffer target (w3m-favicon-set-image (w3m-favicon-cache-favicon url))) (let ((silent w3m-message-silent)) (w3m-process-with-null-handler (w3m-process-do-with-temp-buffer (ok (w3m-retrieve url 'raw nil nil nil handler)) (let ((w3m-message-silent silent) idata image) (if (and ok ;; Some broken servers provides empty contents. (>= (buffer-size) 4)) (progn (when (string-equal "\037\213" (buffer-substring 1 3)) (if (and (fboundp 'zlib-available-p) (zlib-available-p)) (zlib-decompress-region (point-min) (point-max)) (let ((coding-system-for-read 'binary) (coding-system-for-write 'binary)) (shell-command-on-region (point-min) (point-max) "gzip -d" nil t)))) (setq idata (buffer-string) image (w3m-favicon-convert idata type))) (w3m-message "Reading %s...done (no favicon)" (w3m-url-readable-string url))) (with-current-buffer target (w3m-favicon-set-image image) (push (list url idata (current-time) w3m-favicon-image) w3m-favicon-cache-data))))))) ;; Emacs frame needs to be redisplayed to make favicon come out. (w3m-force-window-update-later target 1)) (defun w3m-favicon-save-cache-file () "Save the cached favicon data into the local file." (when w3m-favicon-use-cache-file (w3m-save-list (or w3m-favicon-cache-file (expand-file-name ".favicon" w3m-profile-directory)) (delq nil (mapcar (lambda (elem) (when (= (length elem) 4) (butlast elem))) w3m-favicon-cache-data)) 'binary))) (defun w3m-favicon-load-cache-file () "Load the cached favicon data from the local file." (when (and w3m-favicon-use-cache-file (null w3m-favicon-cache-data)) (let ((cache (w3m-load-list (or w3m-favicon-cache-file (expand-file-name ".favicon" w3m-profile-directory)) 'binary)) elem data image) (while cache (setq elem (car cache) cache (cdr cache) data (cadr elem)) (when (stringp data) (setcar (cdr elem) (setq data (cons data 'ico)))) (when (setq image (condition-case nil (w3m-favicon-convert (car data) (cdr data)) (error nil))) (push (nconc elem (list image)) w3m-favicon-cache-data)))))) (add-hook 'w3m-arrived-setup-functions 'w3m-favicon-load-cache-file) (add-hook 'w3m-arrived-shutdown-functions 'w3m-favicon-save-cache-file) (provide 'w3m-favicon) ;;; w3m-favicon.el ends here emacs-w3m-emacs-w3m-4f27810/w3m-fb.el000066400000000000000000000141051434375002100167720ustar00rootroot00000000000000;;; w3m-fb.el --- frame-local buffers support for emacs-w3m ;;; Copyright (C) 2005, 2006, 2018, 2019 Matthew P. Hodges ;; Author: Matthew P. Hodges ;; Version: $Id$ ;; w3m-fb.el is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published ;; by the Free Software Foundation; either version 2, or (at your ;; option) any later version. ;; w3m-fb.el is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;;; Commentary: ;; ;; This mode handles the DEDICATED-FRAMES and TABBED-DEDICATED-FRAMES ;; display options, set in variable `w3m-display-mode' as 'frames or ;; 'tabbed-frames. ;; ;; With this mode switched on, W3M buffers are associated with the ;; frame on which they were created. For TABBED-DEDICATED-FRAMES, only ;; tabs for the current frame's W3M buffers are shown; other affected ;; commands are w3m-next-buffer w3m-previous-buffer, w3m-select-buffer ;; and w3m-quit. ;; ;; Switch the mode on programmatically with: ;; ;; (w3m-fb-mode 1) ;; ;; or toggle interactively with M-x w3m-fb-mode RET. ;;; Code: (defconst w3m-fb-version "1.0.0" "Version number of this package.") (declare-function w3m-delete-buffer "w3m" (&optional force)) (declare-function w3m-list-buffers "w3m-util" (&optional nosort)) (declare-function w3m-next-buffer "w3m" (arg &optional buffer)) (defvar w3m-pop-up-frames) (defvar w3m-fb-list-buffers-frame nil "Frame to list buffers for in `w3m-list-buffers'. Bind this if the buffers associated with a frame other than the selected frame are required.") ;; Customizable variables (defgroup w3m-fb nil "Frame local buffers for emacs-w3m." :group 'w3m) (defcustom w3m-fb-delete-frame-kill-buffers t "If non-nil, kill W3M buffers after deleting frames." :group 'w3m-fb :type 'boolean :set (lambda (sym val) (set sym val) (when (boundp 'w3m-fb-mode) (if w3m-fb-mode (add-hook 'delete-frame-functions 'w3m-fb-delete-frame-buffers) (remove-hook 'delete-frame-functions 'w3m-fb-delete-frame-buffers))))) ;; Internal variables (defvar w3m-fb-buffer-list nil "List of w3m buffers associated with the selected frame.") (defvar w3m-fb-inhibit-buffer-selection nil "Non-nil to inhibit selecting a suitable w3m buffer.") ;; Internal functions (defun w3m-fb-delete-frame-buffers (&optional frame) "Delete W3M buffers associated with frame FRAME." (let* ((w3m-fb-list-buffers-frame frame) (buffers (w3m-list-buffers)) ;; Now bind w3m-fb-mode to nil so that w3m-delete-buffer ;; doesn't call w3m-quit when there are w3m buffers belonging ;; to other frames. (w3m-fb-mode nil) (w3m-fb-inhibit-buffer-selection t)) (dolist (b buffers) (kill-buffer b)))) ;; Could use set-frame-parameter here, but it isn't portable (defun w3m-fb-set-frame-parameter (frame parameter value) "Set for frame FRAME parameter PARAMETER to VALUE." (modify-frame-parameters frame (list (cons parameter value)))) (defun w3m-fb-add () "Add current buffer to `w3m-fb-buffer-list'." (let ((val (frame-parameter nil 'w3m-fb-buffer-list))) (w3m-fb-set-frame-parameter nil 'w3m-fb-buffer-list (nconc val (list (current-buffer)))))) (defun w3m-fb-remove () "Remove current buffer from `w3m-fb-buffer-list'. Applies to all frames." (when (eq major-mode 'w3m-mode) (let (val) (dolist (f (frame-list)) (setq val (frame-parameter f 'w3m-fb-buffer-list)) (w3m-fb-set-frame-parameter f 'w3m-fb-buffer-list (delq (current-buffer) val)))))) (defun w3m-fb-associate () "Associate all `w3m-mode' buffers with a frame." (let (buffers done rest) ;; Buffers displayed in windows (dolist (f (frame-list)) (setq buffers nil) (dolist (w (window-list f nil (frame-selected-window f))) (when (with-current-buffer (window-buffer w) (eq major-mode 'w3m-mode)) (setq buffers (nconc buffers (list (window-buffer w)))) (setq done (nconc done (list (window-buffer w)))))) (w3m-fb-set-frame-parameter f 'w3m-fb-buffer-list buffers)) ;; Buffers not displayed in windows; add to selected frame (let ((w3m-fb-mode nil)) (setq rest (w3m-list-buffers))) (dolist (b done) (setq rest (delq b rest))) (when rest (w3m-fb-set-frame-parameter nil 'w3m-fb-buffer-list (nconc (frame-parameter nil 'w3m-fb-buffer-list) rest))))) (defun w3m-fb-dissociate () "Disassociate `w3m-mode' buffers from frames." (dolist (f (frame-list)) (w3m-fb-set-frame-parameter f 'w3m-fb-buffer-list nil))) (defun w3m-fb-select-buffer () "Select an appropriate W3M buffer to display." ;; If there are w3m buffers belonging to this frame, ensure one is ;; selected; if not make sure that we're not displaying a w3m ;; buffer (cond ;; Select w3m buffer belonging to frame, if one is available ((w3m-list-buffers) (unless (memq (current-buffer) (w3m-list-buffers)) (w3m-next-buffer -1))) (t ;; If no w3m buffers belong to frame, don't display any w3m buffer (while (eq major-mode 'w3m-mode) ;; (assert (eq (current-buffer) (window-buffer (selected-window)))) (bury-buffer))))) ;; Minor mode setup ;;;###autoload (define-minor-mode w3m-fb-mode "Toggle W3M Frame Buffer mode. This allows frame-local lists of buffers (tabs)." :init-value nil :group 'w3m-fb :global t (if (and w3m-fb-mode (if w3m-pop-up-frames (prog1 (setq w3m-fb-mode nil) (message "\ W3M Frame Buffer mode not activated (Hint: `M-x w3m-display-mode').") (sit-for 2)) t)) (progn (add-hook 'w3m-mode-hook 'w3m-fb-add) (add-hook 'kill-buffer-hook 'w3m-fb-remove) (when w3m-fb-delete-frame-kill-buffers (add-hook 'delete-frame-functions 'w3m-fb-delete-frame-buffers)) (w3m-fb-associate)) (remove-hook 'w3m-mode-hook 'w3m-fb-add) (remove-hook 'kill-buffer-hook 'w3m-fb-remove) (remove-hook 'delete-frame-functions 'w3m-fb-delete-frame-buffers) (w3m-fb-dissociate))) (provide 'w3m-fb) ;;; w3m-fb.el ends here emacs-w3m-emacs-w3m-4f27810/w3m-filter.el000066400000000000000000001504161434375002100176760ustar00rootroot00000000000000;;; w3m-filter.el --- filtering utility of advertisements on WEB sites ;; Copyright (C) 2001-2008, 2012-2015, 2017-2021 ;; TSUCHIYA Masatoshi ;; Authors: TSUCHIYA Masatoshi ;; Keywords: w3m, WWW, hypermedia ;; This file is a part of emacs-w3m. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; w3m-filter.el is the add-on utility to filter advertisements on WEB ;; sites. ;;; Code: (provide 'w3m-filter) (require 'w3m) (defcustom w3m-filter-configuration `((t ("Strip Google's click-tracking code from link urls" "Google click-tracking 潟若潟 url ゃ障") "\\`https?://[a-z]+\\.google\\." w3m-filter-google-click-tracking) (t ("Align table columns vertically to shrink the table width in Google" "Google 罎膣∝若膰劫ф綛障") "\\`http://\\(www\\|images\\|news\\|maps\\|groups\\)\\.google\\." w3m-filter-google-shrink-table-width) (t ("Add name anchors that w3m can handle in all pages" "鴻若吾 w3m 宴 name ≪潟若菴遵障") "" w3m-filter-add-name-anchors) (t ("Substitute disabled attr with readonly attr in forms" "若筝 disabled 絮с readonly 絮ст撮障") "" w3m-filter-subst-disabled-with-readonly) (nil ("Render ... after ..." "若 緇祉障") "" w3m-filter-fix-tfoot-rendering) (t "Filter top and bottom cruft for rt.com" "\\`https://www.rt\\.com/" w3m-filter-rt) (t "Filter for slashdot" "\\`https?://\\([a-z]+\\.\\)?slashdot\\.org/" w3m-filter-slashdot) (t "GNOME Bugzilla - ignore
       in order to fold long lines"
         "\\`https://bugzilla\\.gnome\\.org/show_bug\\.cgi\\?id="
         w3m-filter-gnome-bugzilla)
        (nil
         "Generic page header filter"
         "\\`https?://"
         w3m-filter-generic-page-header)
        (t
         "Filter top and bottom cruft for stackexchange.com"
         "\\`https://\\(?:[0-9A-Za-z_~-]+\\.\\)*stackexchange\\.com\\(?:\\'\\|/\\)"
         w3m-filter-stackexchange)
        (nil
         ("Remove garbage in http://www.geocities.co.jp/*"
          "http://www.geocities.co.jp/* с眼ゃ障")
         "\\`http://www\\.geocities\\.co\\.jp/"
         w3m-filter-geocities-remove-garbage)
        (nil
         ("Remove ADV in http://*.hp.infoseek.co.jp/*"
          "http://*.hp.infoseek.co.jp/* уゃ障")
         "\\`http://[a-z]+\\.hp\\.infoseek\\.co\\.jp/"
         w3m-filter-infoseek-remove-ads)
        (nil
         ("Remove ADV in http://linux.ascii24.com/linux/*"
          "http://linux.ascii24.com/linux/* уゃ障")
         "\\`http://linux\\.ascii24\\.com/linux/"
         w3m-filter-ascii24-remove-ads)
        (nil
         "A filter for Google"
         "\\`http://\\(www\\|images\\|news\\|maps\\|groups\\)\\.google\\."
         w3m-filter-google)
        (nil
         "A filter for Amazon"
         "\\`https?://\\(?:www\\.\\)?amazon\\.\
    \\(?:com\\|co\\.\\(?:jp\\|uk\\)\\|fr\\|de\\)/"
         w3m-filter-amazon)
        (nil
         ("A filter for Mixi.jp"
          "激gc")
         "\\`https?://mixi\\.jp" w3m-filter-mixi)
        (nil
         "A filter for http://eow.alc.co.jp/*/UTF-8*"
         "\\`http://eow\\.alc\\.co\\.jp/[^/]+/UTF-8" w3m-filter-alc)
        (nil
         "A filter for http://imepita.jp/NUM/NUM*"
         "\\`http://imepita\\.jp/[0-9]+/[0-9]+" w3m-filter-imepita)
        (nil
         "A filter for http://allatanys.jp/*"
         "\\`http://allatanys\\.jp/" w3m-filter-allatanys)
        (nil
         "A filter for Wikipedia"
         "\\`http://.*\\.wikipedia\\.org/" w3m-filter-wikipedia)
        (t "filter for github.com repository main page"
           "\\`http[s]?://github\\.com"
           w3m-filter-github)
        (t "xkcd filter" "\\`http[s]?://xkcd.com/" w3m-filter-xkcd)
        (nil
         ("Remove inline frames in all pages"
          "鴻若吾сゃ潟ゃ潟若ゃ障")
         ""
         w3m-filter-iframe)
        (t
         ("Prefer a lazy image specified with data-src= in img tags"
          "img 帥医 data-src= ф絎綮句糸障")
         ""
         w3m-filter-prefer-lazy-images))
      "List of filter configurations applied to web contents.
    Each filter configuration consists of the following form:
    
    (FLAG DESCRIPTION REGEXP FUNCTION)
    
    FLAG
      Non-nil means this filter is enabled.
    DESCRIPTION
      Describe what this filter does.  The value may be a string or a list
      of two strings; in the latter case, those descriptions are written in
      English and Japanese in order respectively, and the unwanted one will
      be hidden according to `w3m-language' when customizing this variable.
    REGEXP
      Regular expression to restrict this filter so as to run only on web
      contents of which the url matches.
    FUNCTION
      Filter function to run on web contents.  The value may be a function
      or a list of a function and rest argument(s).  A function should take
      at least one argument, a url of contents retrieved then, as the first
      argument even if it is useless.  Use the latter (i.e. a function and
      arguments) if the function requires rest arguments."
      :group 'w3m
      :get (lambda (symbol)
    	 (mapcar (lambda (elem)
    		   (when (consp (cadr elem))
    		     (setcar (cdr (setq elem (copy-sequence elem)))
    			     (if (equal "Japanese" w3m-language)
    				 (concat (cadadr elem) "\n(" (caadr elem) ")")
    			       (concat (caadr elem) "\n(" (cadadr elem) ")"))))
    		   elem)
    		 (default-value symbol)))
      :set (lambda (symbol value)
    	 (custom-set-default
    	  symbol
    	  (mapcar
    	   (lambda (elem)
    	     (let ((s (cadr elem)))
    	       (cond ((null s))
    		     ((consp s))
    		     ((string-match "\\`\\(.+\\)\n(\\(.+\\))\\'" s)
    		      (setcar
    		       (cdr (setq elem (copy-sequence elem)))
    		       (if (equal "Japanese" w3m-language)
    			   (list (match-string 2 s) (match-string 1 s))
    			 (list (match-string 1 s) (match-string 2 s))))))
    	       elem))
    	   value)))
      :type '(repeat
    	  :convert-widget w3m-widget-type-convert-widget
    	  (let ((locker (lambda (fn)
    			  `(lambda (&rest args)
    			     (when (and (not inhibit-read-only)
    					(eq (get-char-property (point) 'face)
    					    'widget-inactive))
    			       (when (and (not debug-on-error)
    					  (eventp (cadr args))
    					  (memq 'down
    						(event-modifiers (cadr args))))
    				 (setq before-change-functions
    				       `((lambda (from to)
    					   (setq before-change-functions
    						 ',before-change-functions)))))
    			       (error "The widget here is not active"))
    			     (apply #',fn args)))))
    	    `((group
    	       :format "\n%v" :indent 0
    	       :value-create
    	       (lambda (widget)
    		 (widget-group-value-create widget)
    		 (unless (car (widget-value widget))
    		   (let ((children (widget-get widget :children)))
    		     (widget-specify-inactive
    		      (cadr (widget-get widget :args))
    		      (widget-get (car children) :to)
    		      (widget-get (car (last children)) :to)))))
    	       (checkbox
    		:action
    		(lambda (widget &optional event)
    		  (let ((widget-edit-functions
    			 (lambda (widget)
    			   (let* ((parent (widget-get widget :parent))
    				  (child (cadr (widget-get parent :args))))
    			     (if (widget-value widget)
    				 (progn
    				   (widget-specify-active child)
    				   (widget-put child :inactive nil))
    			       (widget-specify-inactive
    				child
    				(widget-get widget :to)
    				(widget-get
    				 (car (last
    				       (widget-get
    					(car (last
    					      (widget-get parent :children)))
    					:children)))
    				 :to)))))))
    		    (widget-checkbox-action widget event))))
    	       (group
    		:format "%v" :indent 2 :inline t
    		(choice
    		 :format " %v"
    		 (string :format "%h"
    			 :value ,(if (equal "Japanese" w3m-language)
    				     "ユ茯茯  壕х
    (沿茯  綣су蚊)"
    				   "Description in English  end with newline
    (Description in Japanese  enclose in parentheses)")
    			 :documentation-property identity)
    		 (const :format "Not documented\n" nil))
    		(regexp :format "Regexp matching url: %v")
    		(choice
    		 :tag "Type" :format "Function %[Type%]: %v"
    		 :action ,(funcall locker 'widget-choice-action)
    		 (function :tag "Function with no rest arg" :format "%v")
    		 (group
    		  :tag "Function and rest arg(s)" :indent 0 :offset 4
    		  (function :format "%v")
    		  (editable-list
    		   :inline t
    		   :entry-format "%i %d Arg: %v"
    		   :insert-before
    		   ,(funcall locker 'widget-editable-list-insert-before)
    		   :delete-at
    		   ,(funcall locker 'widget-editable-list-delete-at)
    		   (sexp :format "%v"))))))))))
    
    (defcustom w3m-filter-rules nil
      "Rules to filter advertisements on WEB sites.
    This variable is semi-obsolete; use `w3m-filter-configuration' instead."
      :group 'w3m
      :type '(repeat
    	  (group :format "%v" :indent 2
    		 (regexp :format "Regexp: %v" :value ".*")
    		 (choice
    		  :format "Filtering Rule:\n  %[Value Menu%]\n  %v"
    		  (group :format "%v" :inline t
    			 :tag "Delete regions surrounded with these patterns"
    			 (const :format "Function: %v\n"
    				w3m-filter-delete-regions)
    			 (string :format "Start: %v"
    				 :value "not a regexp")
    			 (string :format "  End: %v"
    				 :value "not a regexp"))
    		  (function :tag "Filter with a user defined function"
    			    :format "Function: %v"
    			    :match
    			    (lambda (_widget value)
    			      (unless (eq value 'w3m-filter-delete-regions)
    				(or (fboundp value) (functionp value)
    				    (symbolp value)))))))))
    
    (defcustom w3m-filter-google-use-utf8 (not (equal "Japanese" w3m-language))
      ;; FIXME: what does this docstring say? - ky
      "Use the converting rule to UTF-8 on the site of Google."
      :group 'w3m
      :type 'boolean)
    
    (defcustom w3m-filter-google-use-ruled-line  t
      "Use the ruled line on the site of Google."
      :group 'w3m
      :type 'boolean)
    
    (defcustom w3m-filter-google-separator "
    " "Field separator for Google's search results ." :group 'w3m :type 'string) (defcustom w3m-filter-amazon-regxp (concat "\\`\\(https?://\\(?:www\\.\\)?amazon\\." "\\(?:com\\|co\\.\\(?:jp\\|uk\\)\\|fr\\|de\\)" ;; "Joyo.com" "\\)/" "\\(?:" "\\(?:exec/obidos\\|o\\)/ASIN" "\\|" "gp/product" "\\|" "\\(?:[^/]+/\\)?dp" "\\)" "/\\([0-9]+\\)") "Regexp to extract ASIN number for Amazon." :group 'w3m :type 'string) (defcustom w3m-filter-amazon-short-url-bottom nil "Amazon short URLs insert bottom position." :group 'w3m :type 'boolean) ;;;###autoload (defun w3m-filter (url) "Apply filtering rule of URL against a content in this buffer." (save-match-data (dolist (elem (append w3m-filter-rules (delq nil (mapcar (lambda (config) (when (car config) (if (consp (nth 3 config)) (cons (nth 2 config) (nth 3 config)) (list (nth 2 config) (nth 3 config))))) w3m-filter-configuration)))) (when (string-match (car elem) url) (apply (cadr elem) url (cddr elem)))))) (defvar w3m-filter-selection-history nil) ;;;###autoload (defun w3m-toggle-filtering (arg) "Toggle whether to modify html source by the filters before rendering. With prefix arg, prompt for a single filter to toggle (a function toggled last will first appear) with completion." (interactive "P") (if (not arg) ;; toggle state for all filters (progn (setq w3m-use-filter (not w3m-use-filter)) (message (concat "web page filtering now " (if w3m-use-filter "enabled" "disabled")))) ;; the remainder of this function if for the case of toggling ;; an individual filter (let* ((selection-list (delq nil (mapcar (lambda (elem) (when (and (symbolp (nth 3 elem)) (fboundp (nth 3 elem))) (symbol-name (nth 3 elem)))) w3m-filter-configuration))) (choice (completing-read "Enter filter name: " selection-list nil t (or (car w3m-filter-selection-history) (car selection-list)) 'w3m-filter-selection-history)) (filters w3m-filter-configuration) elem) (unless (string= "" choice) (setq choice (intern choice)) (while (setq elem (pop filters)) (when (eq choice (nth 3 elem)) (setq filters nil) (setcar elem (not (car elem))) (when (car elem) (setq w3m-use-filter t)) (message "filter `%s' now %s" choice (if (car elem) "enabled" "disabled")))))))) (defmacro w3m-filter-delete-regions (url start end &optional without-start without-end use-regex start-pos end-pos count) "Delete regions surrounded with a START pattern and an END pattern. Return t if at least one region is deleted. If WITHOUT-START is non-nil, do not delete the START pattern. If WITHOUT-END is non-nil, do not delete the the END strings. If USE-REGEX is non-nil, treat START and END as regular expressions. START-POS is a position from which to begin deletions. END-POS is a position at which to stop deletions. COUNT is the maximum number of deletions to make." `(let (p (i 0) _dummy) (goto-char ,(or start-pos '(point-min))) (while (and ,@(if count `((< i ,count))) ,(if use-regex `(re-search-forward ,start ,end-pos t) `(search-forward ,start ,end-pos t)) (setq p ,(if without-start '(match-end 0) '(match-beginning 0))) ,(if use-regex `(re-search-forward ,end ,end-pos t) `(search-forward ,end ,end-pos t))) (delete-region p ,(if without-end '(match-beginning 0) '(match-end 0))) (setq i (1+ i))) (setq _dummy (> i 0)))) (defmacro w3m-filter-replace-regexp (url regexp to-string &optional start-pos end-pos count) "Replace all occurrences of REGEXP with TO-STRING. Return t if at least one replacement is made. Optional START-POS, END-POS, and COUNT limit the scope of the replacements." `(let ((i 0) _dummy) (goto-char ,(or start-pos '(point-min))) (while ,(if count `(and (< i ,count) #1=(re-search-forward ,regexp ,end-pos t)) `#1#) (replace-match ,to-string nil nil) (setq i (1+ i))) (setq _dummy (> i 0)))) ;; Filter functions: (defun w3m-filter-google-click-tracking (url) "Strip Google's click-tracking code from link urls" (goto-char (point-min)) (while (re-search-forward "\\(]+[\t\n ]+\\)*\ href=\"\\)\\(?:[^\"]+\\)?/\\(?:imgres\\?imgurl\\|url\\?\\(?:q\\|url\\)\\)=\ \\([^&]+\\)[^>]+>" nil t) ;; In a search result Google encodes some special characters like "+" ;; and "?" to "%2B" and "%3F" in a real url, so we need to decode them. (insert (w3m-url-decode-string (prog1 (concat (match-string 1) (match-string 2) "\">") (delete-region (match-beginning 0) (match-end 0))))))) (defun w3m-filter-google-shrink-table-width (url) "Align table columns vertically to shrink the table width." (let ((case-fold-search t) last) (goto-char (point-min)) (while (re-search-forward "]" nil t) (when (w3m-end-of-tag "tr") (save-restriction (narrow-to-region (goto-char (match-beginning 0)) (match-end 0)) (setq last nil) (while (re-search-forward "]" nil t) (when (w3m-end-of-tag "td") (setq last (match-end 0)) (replace-match "\\&"))) (when last (goto-char (+ 4 last)) (delete-char 4)) (goto-char (point-max))))) ;; Remove rowspan and width specs, and
    s. (goto-char (point-min)) (while (re-search-forward "]" nil t) (when (w3m-end-of-tag "table") (save-restriction (narrow-to-region (goto-char (match-beginning 0)) (match-end 0)) (while (re-search-forward "\ [\t\n\r ]*\\(?:\\(?:rowspan\\|width\\)=\"[^\"]+\"\\|
    \\)[\t\n\r ]*" nil t) ;; Preserve a space at the line-break point. (replace-match " ")) ;; Insert a space between ASCII and non-ASCII characters ;; and after a comma. (goto-char (point-min)) (while (re-search-forward "\ \\([!-;=?-~]\\)\\([^ -~]\\)\\|\\([^ -~]\\)\\([!-;=?-~]\\)\\|\\(,\\)\\([^ ]\\)" nil t) (forward-char -1) (insert " ") (forward-char)) (goto-char (point-max))))))) (defun w3m-filter-add-name-anchors (url) ;; cf. [emacs-w3m:11153], [emacs-w3m:12339], [emacs-w3m:12422], ;; [emacs-w3m:12812], [emacs-w3m:12830] "Add name anchors that w3m can handle. This function adds ``'' in front of ``FOO BAR'' in the current buffer." (let ((case-fold-search t) (maxregexps 10) names regexp i st nd) (goto-char (point-min)) (while (re-search-forward "]+[\t\n\r ]+\\)*\ href=\"#\\([^\"]+\\)\"" nil t) (add-to-list 'names (match-string 1))) (setq case-fold-search nil) (while names (setq regexp "[\t\n\r ]+[Ii][Dd]=\"\\(" i maxregexps) (while (and names (> i 0)) (setq regexp (concat regexp (regexp-quote (pop names)) "\\|") i (1- i))) (setq regexp (concat (substring regexp 0 -1) ")\"")) (goto-char (point-min)) (while (re-search-forward "<[^>]+>" nil t) (setq st (match-beginning 0) nd (match-end 0)) (goto-char st) (if (re-search-forward regexp nd t) (progn (goto-char st) (insert "") (goto-char (+ nd (- (point) st)))) (goto-char nd)))))) (defun w3m-filter-subst-disabled-with-readonly (url) ;; cf. [emacs-w3m:12146] [emacs-w3m:12222] "Substitute disabled attr with readonly attr in forms." (let ((case-fold-search t) st opt nd val default) (goto-char (point-min)) (while (re-search-forward "\ <\\(?:input\\|\\(option\\)\\|textarea\\)[\t\n ]" nil t) (setq st (match-beginning 0) opt (match-beginning 1)) (when (and (search-forward ">" nil t) (progn (setq nd (match-end 0)) (goto-char (1+ st)) (re-search-forward "[\t\n ]\ \\(?:\\(disabled\\(=\"[^\"]+\"\\)?\\)\\|\\(readonly\\(?:=\"[^\"]+\"\\)?\\)\\)" nd t))) (setq val (if (match-beginning 1) (if (match-beginning 2) "readonly=\"readonly\"" "readonly") (match-string 3))) (if opt ;; Unfortunately w3m doesn't support readonly attr in `select' ;; forms, so we replace them with read-only input forms. (if (and (re-search-backward "]+\\)*[\t\n ]selected\\(?:=\"[^\"]+\"\\)?\ \\(?:[\t\n ]+[^\t\n >]+\\)*[\t\n /]*>[\t\n ]*\\([^<]+\\)" nil t) (goto-char (match-end 1)) (skip-chars-backward "\t\n ") (buffer-substring (match-beginning 1) (point)))) (delete-region (point-min) (point-max)) (insert "")) (goto-char (point-max))))) (goto-char nd)) (if (match-beginning 1) (save-restriction (narrow-to-region st nd) (delete-region (goto-char (match-beginning 1)) (match-end 1)) (insert val) (goto-char (point-max))) (goto-char nd))))))) (defun w3m-filter-fix-tfoot-rendering (url &optional recursion) "Render ... after ...." (let ((table-exists recursion) (mark "!-- emacs-w3m-filter ") (tbody-end (make-marker)) tfoots) (goto-char (if table-exists (match-end 0) (point-min))) (while (or table-exists (re-search-forward "]" nil t)) (setq table-exists nil) (save-restriction (if (w3m-end-of-tag "table") (narrow-to-region (match-beginning 0) (match-end 0)) (narrow-to-region (match-beginning 0) (point-max))) (goto-char (1+ (match-beginning 0))) (insert mark) (while (re-search-forward "]" nil t) (w3m-filter-fix-tfoot-rendering url t)) (goto-char (point-min)) (while (search-forward "" nil t) (set-marker tbody-end (match-end 0)) (goto-char (1+ (match-beginning 0))) (insert mark)) (unless (bobp) (setq tfoots nil) (goto-char (point-min)) (while (re-search-forward "]" nil t) (when (w3m-end-of-tag "tfoot") (push (match-string 0) tfoots) (delete-region (match-beginning 0) (match-end 0)))) (when tfoots (goto-char tbody-end) (dolist (tfoot (nreverse tfoots)) (insert "<" mark (substring tfoot 1))))) (goto-char (point-max)))) (set-marker tbody-end nil) (unless recursion (goto-char (point-min)) (while (search-forward mark nil t) (delete-region (match-beginning 0) (match-end 0)))))) (defun w3m-filter-google (url) "Insert separator within items." (goto-char (point-min)) (let ((endm (make-marker)) (case-fold-search t) pos beg end) (when (and w3m-filter-google-use-utf8 (re-search-forward "\ " nil t)) (insert w3m-filter-google-separator)) (if w3m-filter-google-use-ruled-line (while (search-backward "
    ")))))) (defun w3m-filter-amazon (url) "Insert Amazon short URIs." (when (string-match w3m-filter-amazon-regxp url) (let* ((base (match-string 1 url)) (asin (match-string 2 url)) (shorturls `(,(concat base "/dp/" asin "/") ,(concat base "/o/ASIN/" asin "/") ,(concat base "/gp/product/" asin "/"))) (case-fold-search t) shorturl) (goto-char (point-min)) (setq url (file-name-as-directory url)) (when (or (and (not w3m-filter-amazon-short-url-bottom) (search-forward "" nil t)) (and w3m-filter-amazon-short-url-bottom (search-forward "" nil t) (goto-char (match-beginning 0)))) (insert "\n") (while (setq shorturl (car shorturls)) (setq shorturls (cdr shorturls)) (unless (string= url shorturl) (insert (format "Amazon Short URL: %s
    \n" shorturl shorturl)))) (insert "\n"))))) (defun w3m-filter-mixi (url) "Direct jump to the external diary." (goto-char (point-min)) (let (newurl) (while (re-search-forward "]+\\)>" nil t) (setq newurl (match-string 1)) (when newurl (delete-region (match-beginning 0) (match-end 0)) (when (string-match "&owner_id=[0-9]+\"?\\'" newurl) (setq newurl (substring newurl 0 (match-beginning 0)))) (insert (format "" (w3m-url-readable-string newurl))))))) (defun w3m-filter-alc (url) (let ((baseurl "http://eow.alc.co.jp/%s/UTF-8/") curl cword beg tmp1) (when (string-match "\\`http://eow\\.alc\\.co\\.jp/\\([^/]+\\)/UTF-8/" url) (setq curl (match-string 0 url)) (setq cword (match-string 1 url)) (setq cword (car (split-string (w3m-url-decode-string cword 'utf-8) " "))) (goto-char (point-min)) (while (search-forward "若帥荵∵胼障" nil t) (delete-region (line-beginning-position) (line-end-position)) (insert "
    ")) (goto-char (point-min)) (when (search-forward "沿 on the WEB

    \n") (setq beg (point)) (when (search-forward "" nil t) (forward-line 1) (delete-region beg (point))) (when (search-forward "" nil t) (forward-line 1) (setq beg (point)) (when (search-forward "" nil t) (delete-region beg (match-beginning 0)))) (insert "
    鐚若帥荵∵胼障") ;; next/previous page (goto-char (point-min)) (while (re-search-forward "
    " nil t) (setq tmp1 (match-string 1)) (delete-region (match-beginning 0) (match-end 0)) (insert (format "" curl tmp1))) ;; wordlink (goto-char (point-min)) (while (re-search-forward "\\([^<]+\\)" nil t) (setq tmp1 (match-string 1)) (delete-region (match-beginning 0) (match-end 0)) (insert (format "%s" (format baseurl tmp1) tmp1))) ;; goGradable/goFairWord (goto-char (point-min)) (while (re-search-forward "" nil t) (setq tmp1 (match-string 2)) (delete-region (match-beginning 0) (match-end 0)) (insert (format "" (format baseurl tmp1)))) ;; remove spacer (goto-char (point-min)) (while (search-forward "img/spacer.gif" nil t) (delete-region (line-beginning-position) (line-end-position))) (goto-char (point-min)) ;; remove 若潟 (when (search-forward "alt=\"若潟\"" nil t) (delete-region (line-beginning-position) (line-end-position))) ;; 茵腓冴∞ (goto-char (point-min)) (while (re-search-forward (concat "
    *" "
    " "茵腓冴") nil t) (delete-region (match-beginning 0) (match-end 0))) ;; Java Document write... ;_; ;; (while (re-search-forward ;; "" ;; nil t) ;; (setq tmp1 (match-string 1)) ;; (setq tmp2 (match-string 2)) ;; (delete-region (match-beginning 0) (match-end 0)) ;; ;; &dk=JE, &dk=EJ ;; (insert (format "" ;; curl tmp1 tmp2 ;; (if (string-match "\\Cj" cword) "JE" "EJ")))) )))) (defun w3m-filter-imepita (url) "JavaScript emulation." (goto-char (point-min)) (let (tmp) (when (re-search-forward (concat "\n" "") nil t) (setq tmp (match-string 1)) (delete-region (match-beginning 0) (match-end 0)) (insert tmp)))) (defun w3m-filter-iframe (url) (goto-char (point-min)) (while (re-search-forward "