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#19104: eww.el vs. plist-put documentation (docstring, doc/lispref/lists.texi) Date: Thu, 20 Nov 2014 04:47:26 +0000 Message-ID: <871toy32ch.fsf@violet.siamics.net> References: <877fyr78n5.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 1416458904 18918 80.91.229.3 (20 Nov 2014 04:48:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Nov 2014 04:48:24 +0000 (UTC) To: 19104@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 20 05:48:19 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 1XrJfG-000621-0P for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Nov 2014 05:48:18 +0100 Original-Received: from localhost ([::1]:33528 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrJfF-0008GR-L6 for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Nov 2014 23:48:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrJf8-0008GH-6B for bug-gnu-emacs@gnu.org; Wed, 19 Nov 2014 23:48:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrJf0-0000HY-W0 for bug-gnu-emacs@gnu.org; Wed, 19 Nov 2014 23:48:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrJf0-0000HR-Ky for bug-gnu-emacs@gnu.org; Wed, 19 Nov 2014 23:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XrJf0-0000dZ-BO for bug-gnu-emacs@gnu.org; Wed, 19 Nov 2014 23:48: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: Thu, 20 Nov 2014 04:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19104 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19104-submit@debbugs.gnu.org id=B19104.14164588662426 (code B ref 19104); Thu, 20 Nov 2014 04:48:02 +0000 Original-Received: (at 19104) by debbugs.gnu.org; 20 Nov 2014 04:47:46 +0000 Original-Received: from localhost ([127.0.0.1]:38921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XrJeg-0000d0-Dj for submit@debbugs.gnu.org; Wed, 19 Nov 2014 23:47:46 -0500 Original-Received: from fely.am-1.org ([78.47.74.50]:41512) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XrJea-0000cn-NT for 19104@debbugs.gnu.org; Wed, 19 Nov 2014 23:47:40 -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=zqhSpTROvK7pXDNbUNCC/1paID3fqNU4gN0xy5SWcP4=; b=KdvO/kebZdLSbX6wtWggknbsmIsQEzGwufx2AHKnAtMMYK1B6v2UdI5D1TABGemPZAFaBXYZ0Hhq3FqlQGUvXLxOPaGTxsmXjD0VMSWSTEE2wjHXMr/kGL/r+RgnkGaSXyw1GDyXhWc6cuPRMOd3OtO0ViyWFmSLCZWUugVIM50=; 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 1XrJeY-0002Jg-SU for 19104@debbugs.gnu.org; Thu, 20 Nov 2014 04:47:35 +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 1XrJeR-00086G-Dx for 19104@debbugs.gnu.org; Thu, 20 Nov 2014 11:47:27 +0700 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Wed, 19 Nov 2014 18:26:59 +0100") 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:96305 >>>>> Lars Magne Ingebrigtsen writes: >>>>> Ivan Shmakov writes: >> Briefly scanning over eww.el, I see no actual bugs that may arise >> from that given the current plist-put implementation (which >> apparently returns a new list if and only if given nil as the >> argument, and modifies the list given otherwise.) > It should be documented. > On the other hand, eww should really be using an object for this > stuff and not a plist. What for, specifically? For instance, the current (property list) version of the eww-desktop-data-1 filter is as follows: (defun eww-desktop-data-1 (alist) (let ((acc nil) (tail alist)) (while tail (let ((k (car tail)) (v (cadr tail))) (when (memq k eww-desktop-data-save) (setq acc (cons k (cons v acc))))) (setq tail (cddr tail))) acc)) The association list version could be as simple as: (defun eww-desktop-data-1 (alist) (remove-if-not (lambda (k) (memq k eww-desktop-data-save)) alist :key 'car)) And for eww-data and eww-history to be object-based, I can=E2=80=99t readily suggest any simple implementation. (For a hash table, it could presumably be something based on maphash.) --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A