From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id AD29BTQH1maXJQEAqHPOHw:P1 (envelope-from ) for ; Mon, 02 Sep 2024 18:43:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id AD29BTQH1maXJQEAqHPOHw (envelope-from ) for ; Mon, 02 Sep 2024 20:43:00 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=outlook.com header.s=selector1 header.b="gmKcj/0U"; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=outlook.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1725302580; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=5AwIQyZTWa5CnDgf/9ylerkUfTvCVIx2DSXTJQXsGOc=; b=g9ks4IlA9CPA2pSEM/LHDtt08vs1ykR1Sh7NLLQ/kj9GST3LexXRA+BV4IvR0PO7NAt1yC EVcFBa1jcgYqZ8XbtPsDtZWplF0hA77TVIMW7dq9u0vqq+n4jHtWVVDZqLvyQMCJU8Y6W2 I8LrtcqMM9A9yld/NxpDYsh236Ni6HgKJ4tR9V8/255/6gMnxj/g14oN2Kj3DGNz2T/G9O f1OHdDIFQQTGty0vNLOZn7lfJ1Y0MKu52m5MviYrE09r/IdE9MNmY9XqUyXd68rGvnuLln toPHSY8EH1MNn+GrrdZ4UlucltOhifJB7cYAOHmAKMhFClGSaJQzQngyn6HUUw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=outlook.com header.s=selector1 header.b="gmKcj/0U"; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=outlook.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Seal: i=2; s=key1; d=yhetil.org; t=1725302580; a=rsa-sha256; cv=pass; b=r/CQs2NDlA4cZyfg6uyht8mXrugCLGStdNezjEg5PKVoCXBEaLUxo/l/xJFJS0dWzTW//z +wo6ItUTxLNCxqQHHFYD8p2yXCTryczPHTq4oAeb5JxzVAJejRYXVP3H9pSHIB5cfJm6QM UR5ezChfbFVk1O9SqVgVjCS/osSHdHMyclcgGPJkjQFkgEX6/zZa8mKHX5FBUgAeUfATuu Re4SFV6pqnBIx2illmIuW+V3EGearYFgzyJgIMoXS5jwfcubztIzF18n73/cEK23qzlc5m l8JdO6nkQv6/LVTv/ccJ6oq7d8Dr5fO7699mv2PW0C9b971tEfLL+w479qt8Hw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A6F5971575 for ; Mon, 2 Sep 2024 20:42:59 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slC03-0000OE-5d; Mon, 02 Sep 2024 14:42:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1slC01-0000O5-NV for emacs-orgmode@gnu.org; Mon, 02 Sep 2024 14:42:01 -0400 Received: from mail-bn7nam10olkn20810.outbound.protection.outlook.com ([2a01:111:f403:2804::810] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1slBzz-0006uk-JZ for emacs-orgmode@gnu.org; Mon, 02 Sep 2024 14:42:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ai1bucuUYkPBruAS7aHJemchX7JVL6NYcLFJQNTtIwLAJN3U14KNXOFowcsH//s/rYMjzEnDMwmiHmoAYpe33N1lFJa7wS0d4bg5A6/dJ5a4FhM+nOMrTa8ynQYX9V34B5TLg9IZGALNZybPKnpfRCd7z++SpyrtVTk5txutu51AiT71dBgMZHiUG1Jfl3VeRqTSNyK5bbruxcKJRw1Nk8DFvXPX3TK0GrhM68sVbYEeWjgmBAJi818nd4bvAb8UvzcCtAE4N+HAVANladlzSpysZQRduf8NuMY4N6G32rMoqPvIkZJ1eh9pNxupxv21v4HWrrSKbUKpPQyUowEU8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5AwIQyZTWa5CnDgf/9ylerkUfTvCVIx2DSXTJQXsGOc=; b=XX1mzhYW453tMMVBuxKwScuEtODX+QgUq8qDUmkkp2A25F5a3IkBCXLnIlxLR9X1kncopTlD5wFyXetrSPM11B08uxEHUapPcypitIaD3s77+nwi0MQbHPccsnwubSBFoyGOqvoJJk+Qp/Jm3GsbBrjm1a2vq4kolGwwj0MH4VNX14MgVuGzJUxq7w0CRxLELaQcTv5kelmbnfVAzDKbz2Iyl2EJRYP6hgGCUiOuvPmyRtpnxUIgbvqyt7CKkzhln5/yq1C74G/bSfm7LVsIFgwAP080ULJ3kLCV7M1otExVx6tYKMXDydSbXZ+Bk/sBxxap3j8mcKFk8gWRMBryPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5AwIQyZTWa5CnDgf/9ylerkUfTvCVIx2DSXTJQXsGOc=; b=gmKcj/0UASDuC3qj8+/5MAk/wV3olwKiWjO7bdhgY3uxkSHv2DGCXKdghCKPtFxpb9wZbRUTcCuHCcNwcHwy6d2cyud29vxsCogJr8YPqbhmcp8dyzZuwYNSLNF9bOqi4HESV8khijYnSEZPoxKh8wH/tEQ8hJOSwCwA6fdzNyYp9e6w0QvEJe2yliscaAinmxDc9Ob2LUEHOj+bbx6kQ3jZm9a451VuurEXre9ln0pgfVFFWTEe38LEXwhy4oVcry07Xgdos7xmdaP+4Ng1uWbJnhM86AvzsWya4MVqfHp2i0CZnFru2fpfQvM/IDRZAJiBdw9+c2cwqeRXCIYtXw== Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) by SJ2PR84MB3784.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:a03:58e::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25; Mon, 2 Sep 2024 18:36:54 +0000 Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::5c77:7a58:48ed:9aef]) by CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::5c77:7a58:48ed:9aef%7]) with mapi id 15.20.7897.021; Mon, 2 Sep 2024 18:36:54 +0000 From: Morgan Smith To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Testing: Add tests for `org-tags-sort-function' In-Reply-To: <8734mj8pn7.fsf@localhost> (Ihor Radchenko's message of "Sun, 01 Sep 2024 13:33:32 +0000") References: <8734mj8pn7.fsf@localhost> X-Hashcash: 1:20:240902:yantar92@posteo.net::qb0txeSW8TzqrK4p:EH/ X-Hashcash: 1:20:240902:emacs-orgmode@gnu.org::v7FE8/l5iUrbcHF+:1y18 Date: Mon, 02 Sep 2024 14:36:23 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Content-Type: multipart/mixed; boundary="=-=-=" X-TMN: [e+V+n5qDwPN5NQpDnVJ+vIWnmq78KK0HHuuJDy7gkjaNpIVMJfNgNw==] X-ClientProxiedBy: YQBPR0101CA0004.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00::17) To CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) X-Microsoft-Original-Message-ID: <875xrdzyvs.fsf@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR84MB3424:EE_|SJ2PR84MB3784:EE_ X-MS-Office365-Filtering-Correlation-Id: e4601071-0d70-46dc-6e66-08dccb7e37be X-Microsoft-Antispam: BCL:0; ARA:14566002|5072599009|6092099012|15080799006|8060799006|19110799003|461199028|3412199025|440099028; X-Microsoft-Antispam-Message-Info: DQdRKvYOJlr0KUp68TnYE1uV2GureAA+6YPhbEtmSjmTNJrkV+7HgVLThtO7US8sCRqh9V9VB76USw7DT8Jmo7FKn9cTtOJXZkbc6okEWHYBvR5LRjAqvolYoq3NAn30D9pxCpDOIuP5AWulPxwWXI9JDUyjTdukjQNS0QSIueVsLRD5lyWpMtFfCMhIIjRp5B9A5fLhhd6wJbqWtK1zippodXGzyzlu8U4tR8x7hSnED4CtlsGEf6IMirmcwPzLPwayFDN2pIoLxqNT58vNDnymCAAIbfDn59+Vgl4pm0KMktO6kW02ovoT5PmOKCOheaog3+gkSqIPiv757W/2FAj2Nm91GW9Xv2Icor8WkuepPDkplhrRxwVmHJoQKgAm1SZAHRGDvLivwk/aW1T9/cCY5+vnJhlhmyM+WGkuXBeyGEjnx8leL21OHq6TtScsEW7QcUf8qLXVrjLTZjGEhM70y6gTUsTuA+VcC5WMjLvr7EzkLBXAeUqSZ+0LbLWunR3G4KbH/HckgpptRPKwNuz5p9brOmqF8SV8ul312Sls11s8IoVZQlADeRinn613/dMPWlT6EAViNNxsIoUJohVwtm4fSS0tfS8EnxspZKpSdC1HeOf5eLn1iHF85dsqmxhu+zpzOdZLDk+j50ltao1Tq+fJpkTrkPHo13f8Yg0LJFhHNMx3/ou+ycvWtnwdjLsWpcOzMd5Bkt7j4pHboJdxVqhvJExuvQlHXgM6A0A= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?iV2Eqq2F5ZeWFzrutlKUDPt4emw7NHGlipqhP19pU/AO2OY6nSajda1mbm9R?= =?us-ascii?Q?oBrl4h792uynR12vpZsSFS6SRs4CmeaGwAn8DrctdzBL2Wy5tQ29tqCnO8BV?= =?us-ascii?Q?3LDZvJw4dRxiSvM2tORSmz6RX3ryFQ4fklLbbtVJGdJIC178QLwm/F/SSfsU?= =?us-ascii?Q?Em25L5FOwDy23YHOkAC2MiB6LIQVrjWhZFYCsDtoIVLzRMtDUiZj3R2zAAoV?= =?us-ascii?Q?mf56728TwUchB+AOenWq4X0nNzinDXTnBAxaha+JDzUa3YPlHm3v9OIqot2m?= =?us-ascii?Q?gB6kJeUFefQt+IOsjlSHU60x2f7tD17gVJfCNB3m5eLoz5n0kQvH2ZLL+iIS?= =?us-ascii?Q?S6d4rFQQv1EKY/8NOCLEkMWb3blHfwtD6H6p1O+7C2bJANrGseQaccel4lst?= =?us-ascii?Q?2MJq7jku7kj4G22NCXIaZeRMwHyDgP+GOiLP4Xc4eVZsIBJq6yPMceRsub+Y?= =?us-ascii?Q?CqhzVbOS63wvRzKN6yp3XIQyorA/cOqNw5jvBQ+wkgqaEshYrogqnJtMx9aT?= =?us-ascii?Q?/exrWkWbAZd4tuU+O95qAHLkWkyPjvtbTa0dx/L+Uqrmvj9zAKoqQnewSLSR?= =?us-ascii?Q?S/pVxCrGHw5JNShzcUGBLGuQqV33eF9V/c9+TBzfn/e8tvy3QpaD0B7yGtYU?= =?us-ascii?Q?o6fkHYrcuWg5RBLjuri7bwmy0ejRmWskJgAV9CosYutpPIqN4fCUSYbf/r9T?= =?us-ascii?Q?lxL2AaGuo74EbRVN+kW9AtP+OQa9D9GdVHMranyob+xbQ6wY97HPHTv7er5E?= =?us-ascii?Q?hJIwCBvFMWF277qAN5n/L4jUokk9ungzQaTJwUGbrXTSIdSgHgGWANjDfhmU?= =?us-ascii?Q?O/R4AZPfIObi3m7eghbGgaZ1iruZNZ/sOY8XqczRXBvuGCj1RWeEWG6FO86n?= =?us-ascii?Q?+z5spDEhAJUdebKEOvcS0Dfcm3PSYwlReiqQrxjQgbBT8DI9OSoCOM9HIpO+?= =?us-ascii?Q?jh90q2H/zwiRGSOWRpKVbrql7MLKxfsnYTFkN8D90+JlFTXelKgpwPxOYZ6Q?= =?us-ascii?Q?N97+jEpH/3nm00t1IAuO7SX92QoEdKMdW5mAtUX45rVcweTPjGr2rYxRrvwE?= =?us-ascii?Q?bJ+xngzeOYYz17iLVvNbW67dbmTsfOw/v1BcCJHj4kHd2PwvCRyyfNjuNTfD?= =?us-ascii?Q?yoE9UGVRpdXqmo2QIWKKkp5BnPJz5m5YmsYIRi2jXQv2av4gKC9kQDHd6vGW?= =?us-ascii?Q?lOh424qU7goQQpzmjldlV4ZN+Bu0AFo515+at8bZMNKWM1UqahNwySqsGCBK?= =?us-ascii?Q?W3SazQUTI4JeBFZJjiPWUOGl7DZn5lC4F6P928WvxA=3D=3D?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4601071-0d70-46dc-6e66-08dccb7e37be X-MS-Exchange-CrossTenant-AuthSource: CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2024 18:36:54.3816 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR84MB3784 Received-SPF: pass client-ip=2a01:111:f403:2804::810; envelope-from=morgan.j.smith@outlook.com; helo=NAM10-BN7-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -10.46 X-Migadu-Queue-Id: A6F5971575 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -10.46 X-TUID: J7fzY85dETzG --=-=-= Content-Type: text/plain I've attached an updated patch. This one has a test where we actually don't sort tags by using the `ignore' function. Ihor Radchenko writes: >> + ;; Sorting doesn't care about `org-tag-alist'. This is only >> + ;; here for later when we add sorting methods that do >> .... > > Then, please refrain from setting alist in this patch and add it later, > when testing the relevant methods. Done. Now my tag names don't really make sense but I suppose that's not a big issue. >> + (org-test-agenda-with-agenda >> + (string-join >> + '("* TODO group_a :group_a:" >> + "* TODO tag_a_1 :tag_a_1:" >> + "* TODO tag_a_2 :tag_a_2:" >> + "* TODO tag_b_1 :tag_b_1:" >> + "* TODO tag_b_2 :tag_b_2:" >> + "* TODO groupless :groupless:" >> + "* TODO lonely :lonely:") >> + "\n") >> + (dolist (org-tags-sort-function '(nil org-string< org-string>)) >> + (should >> + (string-equal >> + (progn >> + (org-agenda nil "f") >> + (substring-no-properties (buffer-string))) >> + (pcase org-tags-sort-function >> + ;; TODO: a value of `nil' sorts it! That's not what the >> + ;; customize menu of `org-tags-sort-function' says! It >> + ;; says "No sorting". > > Right. When sort function is not set agenda specifically (but not other > users of org-tags-sort-function) falls back to alphabetical sorting. As far as I can tell the only place where it doesn't fall back is in `org-set-tags'. > In fact, the docstring does not at all mention that > `org-tags-sort-function' is honored at all: > > (defcustom org-agenda-sorting-strategy ... > ... > tag-up Sort alphabetically by last tag, A-Z. > tag-down Sort alphabetically by last tag, Z-A. > > We need to fix this docstring documenting `org-tags-sort-function', I think. I don't understand what is happening in `org-entries-lessp' or how it even manages to use `org-agenda-sorting-strategy' so I'm going to refrain from trying to document things I don't understand. >> + ((or 'nil 'org-string<) >> + "group_a\ngroupless\nlonely\ntag_a_1\ntag_a_2\ntag_b_1\ntag_b_2\n") >> + ('org-string> >> + "tag_b_2\ntag_b_1\ntag_a_2\ntag_a_1\nlonely\ngroupless\ngroup_a\n")))))))) > > Nitpick: it would be more readable to use `string-join' here as well. Done --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Testing-Add-tests-for-org-tags-sort-function.patch >From 04fe8d44aba77b79a3a0f6ad332a0fb07bdb21a2 Mon Sep 17 00:00:00 2001 From: Morgan Smith Date: Sat, 15 Jun 2024 11:27:34 -0400 Subject: [PATCH] Testing: Add tests for `org-tags-sort-function' * testing/lisp/test-org-agenda.el (test-org-agenda/tags-sorting): New test. --- testing/lisp/test-org-agenda.el | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/testing/lisp/test-org-agenda.el b/testing/lisp/test-org-agenda.el index 778f91e8e..a06d02064 100644 --- a/testing/lisp/test-org-agenda.el +++ b/testing/lisp/test-org-agenda.el @@ -655,6 +655,50 @@ Sunday 7 January 2024 (buffer-string)))))) (org-test-agenda--kill-all-agendas)))) +(ert-deftest test-org-agenda/tags-sorting () + "Test if `org-agenda' sorts tags according to `org-tags-sort-function'." + (let ((org-agenda-custom-commands + '(("f" "no fluff" todo "" + ((org-agenda-todo-keyword-format "") + (org-agenda-overriding-header "") + (org-agenda-prefix-format "") + (org-agenda-remove-tags t) + (org-agenda-sorting-strategy '(tag-up))))))) + (org-test-agenda-with-agenda + (string-join + '("* TODO group_a :group_a:" + "* TODO tag_a_1 :tag_a_1:" + "* TODO tag_a_2 :tag_a_2:" + "* TODO tag_b_1 :tag_b_1:" + "* TODO tag_b_2 :tag_b_2:" + "* TODO groupless :groupless:" + "* TODO lonely :lonely:") + "\n") + (dolist (org-tags-sort-function '(nil org-string< org-string> ignore)) + (should + (string-equal + (string-trim + (progn + (org-agenda nil "f") + (substring-no-properties (buffer-string)))) + (pcase org-tags-sort-function + ;; Not sorted + ('ignore + (string-join + '("group_a" "tag_a_1" "tag_a_2" "tag_b_1" "tag_b_2" "groupless" "lonely") + "\n")) + ;; TODO: a value of `nil' sorts it! That's not what the + ;; customize menu of `org-tags-sort-function' says! It + ;; says "No sorting". + ((or 'nil 'org-string< 'always) + (string-join + '("group_a" "groupless" "lonely" "tag_a_1" "tag_a_2" "tag_b_1" "tag_b_2") + "\n")) + ('org-string> + (string-join + '("tag_b_2" "tag_b_1" "tag_a_2" "tag_a_1" "lonely" "groupless" "group_a") + "\n"))))))))) + (ert-deftest test-org-agenda/goto-date () "Test `org-agenda-goto-date'." (unwind-protect -- 2.45.2 --=-=-=--