From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs Subject: bug#18687: mw: modular MediaWiki interface for Emacs Date: Wed, 31 Dec 2014 12:12:49 +0000 Message-ID: <87k3186mri.fsf_-_@violet.siamics.net> References: <87oatpkof7.fsf@passepartout.tim-landscheidt.de> <87r3ye3mf7.fsf@violet.siamics.net> <87zjd1zj0q.fsf@violet.siamics.net> <87k342zabt.fsf@violet.siamics.net> <874muvpz2m.fsf__26477.4647228935$1414013842$gmane$org@violet.siamics.net> <87siide1r2.fsf@violet.siamics.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1420028058 10559 80.91.229.3 (31 Dec 2014 12:14:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Dec 2014 12:14:18 +0000 (UTC) To: 18687@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 31 13:14:13 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y6IAG-0005eB-7A for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Dec 2014 13:14:12 +0100 Original-Received: from localhost ([::1]:39892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6IAF-0005lT-9W for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Dec 2014 07:14:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6IAA-0005lD-7e for bug-gnu-emacs@gnu.org; Wed, 31 Dec 2014 07:14:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y6IA6-0005tO-U8 for bug-gnu-emacs@gnu.org; Wed, 31 Dec 2014 07:14:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6IA6-0005rh-IA for bug-gnu-emacs@gnu.org; Wed, 31 Dec 2014 07:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y6IA6-0006d4-45 for bug-gnu-emacs@gnu.org; Wed, 31 Dec 2014 07:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Dec 2014 12:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18687-submit@debbugs.gnu.org id=B18687.142002798525401 (code B ref 18687); Wed, 31 Dec 2014 12:14:02 +0000 Original-Received: (at 18687) by debbugs.gnu.org; 31 Dec 2014 12:13:05 +0000 Original-Received: from localhost ([127.0.0.1]:33329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y6I9A-0006bX-F9 for submit@debbugs.gnu.org; Wed, 31 Dec 2014 07:13:05 -0500 Original-Received: from fely.am-1.org ([78.47.74.50]:47132) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y6I97-0006b5-5V for 18687@debbugs.gnu.org; Wed, 31 Dec 2014 07:13:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=sLdDjrRrj3XNmF1uamMPHwyy7Qz/8IeeMHbQzbH2w28=; b=QsGcfoO4OJZO48EyMZjkM0MtaBRqjN+c51Qj4KD6nPbWVtP12vg7JunK4TGTbyJSdWxEk44lVQ4vfrFoeyh45uumjnKnlNYngl1kZZIisSq1qnKhSsXvb6z4xWGGfQODPL1pPjGt5gLVB+mc6SYlbKFkMnKlkxyrvXfuSasNrWs=; Original-Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Y6I94-000103-Ql for 18687@debbugs.gnu.org; Wed, 31 Dec 2014 12:12:59 +0000 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Y6I8w-0007F0-8j for 18687@debbugs.gnu.org; Wed, 31 Dec 2014 19:12:50 +0700 Mail-Followup-To: 18687@debbugs.gnu.org In-Reply-To: <87siide1r2.fsf@violet.siamics.net> (Ivan Shmakov's message of "Fri, 24 Oct 2014 18:55:29 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:97894 Archived-At: I kept improving the code throughout late October, late November to early December, and then from December, 26=E2=80=A6 And by now, as one might guess, =E2=80=93 the vc-mw.el code has hardly any readability left. So, I=E2=80=99ve started cleaning up the resulting shameful mess. Which includes moving a fair share of code from (my private version of) vc-mw.el, as well as the =E2=80=9Ctokens=E2=80=9D support bit = from mw-api.el, into the new mw-xapi.el module. Along the way, I also hope to publish fixes for the few bugs which I was able to spot in the code as available from [1, 2]. Also to note that I use this interface on more or less daily basis (see [3]), so even though I=E2=80=99m lazy to publish the changes, =E2=80=93 rest assured that the code gets a whole lot of my attention. (Not that the HTTP server logs indicate that anyone=E2=80=99s interested, but still=E2=80=A6) [1] https://am-1.org/~ivan/archives/git/mw-el-2014.git [2] https://am-1.org/~ivan/archives/git/gitweb.cgi?p=3Dmw-el-2014.git [3] https://tools.wmflabs.org/pirsquared/guc/?user=3DIvan_Shmakov Below is the summary of the features already implemented (but yet to be made public) since the last published revision, in roughly the order of decreasing =E2=80=9Cuser visibility.=E2=80=9D =E2=80=A2 Fixed =E2=80=98vc-mw-buffer-page-state=E2=80=99 to support the n= ew (as of 2014-11-20) two-argument interface in, =E2=80=93 bringing back the vc-mw.el compatibility with Emacs=C2=A025. (Support for the Emacs=C2=A024 three-argument interface is retained.) =E2=80=A2 Added support for vc-dir, vc-diff, and vc-revert operations. =E2=80=A2 Adapted =E2=80=98mw-eww-preview=E2=80=99 to the =E2=80=98eww-dis= play-html=E2=80=99 =E2=80=9Cmulti-buffer=E2=80=9D support added on 2014-11-10. =E2=80=A2 New =E2=80=98vc-mw-revision-query-alist=E2=80=99 customizable va= riable, allowing for an empty =E2=80=9Ccontinuation cookie=E2=80=9D to be added = to all the vc-mw.el queries in order to silence a warning emitted by the recent MediaWiki versions. And it allows for the set of entries shown by vc-print-log to be customized, too, =E2=80=93 to the extent allowed by the remote MediaWiki instance. =E2=80=A2 New =E2=80=98mw-buffer=E2=80=99, =E2=80=98mw-api=E2=80=99, and t= he package=E2=80=99s top-level =E2=80=98mw=E2=80=99 customization groups, allowing for easier customization of the respective variables. =E2=80=A2 The state determination code (vc-mw-buffer-page-state) will now use SHA-1 digests of the revisions, either as returned by the MediaWiki endpoint (including after running vc-print-log), or as computed by vc-mw.el itself. (Prior to this change, vc-mw.el had to retrieve the full content of the page to discern the needs-update vs. needs-merge and update vs. edited states.) Either way, the digests will be cached. =E2=80=A2 Support for token types other than =E2=80=98csrf=E2=80=99 and = =E2=80=98edit=E2=80=99. =E2=80=A2 A few further fixes to vc-mw.el and mw-eww.el. The features just planned are as follows. =E2=80=A2 Associate buffer with a revision by its (cached) SHA-1. Makes it possible to recover the state after, say, erasing the desktop file. =E2=80=A2 Customizable queries for mw-buffer.el, mw-eww.el, and mw-info.el facilities, =E2=80=93 also providing a way to get rid of certain MediaWiki warnings. =E2=80=A2 Asynchronous operation, =E2=80=93 especially for vc-dir and mw-buffer-try-file-name (try using vc-dir on a directory holding some 768+ individual MediaWiki page files! or restoring a desktop file listing all of them, anyway), but also possibly for vc-print-log. --=20 FSF associate member #7257 np. Conclusion =E2=80=94 Apocalyptica 3013 B6A0= 230E 334A