From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id CPK/Ns3Iv2L2aQAAbAwnHQ (envelope-from ) for ; Sat, 02 Jul 2022 06:25:50 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OEPMNc3Iv2JaxQAAG6o9tA (envelope-from ) for ; Sat, 02 Jul 2022 06:25:49 +0200 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 4715D305A for ; Sat, 2 Jul 2022 06:25:49 +0200 (CEST) Received: from localhost ([::1]:49612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7UhY-0005vz-GA for larch@yhetil.org; Sat, 02 Jul 2022 00:25:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7Ugu-0005va-L8 for emacs-orgmode@gnu.org; Sat, 02 Jul 2022 00:25:08 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]:39576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o7Ugs-0000J5-O4 for emacs-orgmode@gnu.org; Sat, 02 Jul 2022 00:25:08 -0400 Received: by mail-lj1-x230.google.com with SMTP id b19so4751303ljf.6 for ; Fri, 01 Jul 2022 21:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to:cc; bh=ewUNgzeJnTyAqyctWiTUUpicGCUyM8L40AzdR0o3oZQ=; b=qOpi7rbJt78t+yOWL2Z9SHkwi86/jxJcln095RwGJbZvlBAZFJcf6bmvAgtFmJo0B5 FvzgRotnHomJNDnKIgv0hP3vItEkOo8NX64cKTk55b14nB5OfT2HO70kpfPfJKKb+qrl t4AXpbwG+sYKYSak+dzGDBTcLrzdbcRVcI2I5ihtxSdkQuwS8FWWsR6rH7zHvLFLeLDH UAp0zz3LHNP1UMfN3EXy8gh13bmSB+0QGOFmqLt4jYvXwLAG8KQ4eQM/ZxCoYmi3v9aq Ejg9i5sjDLtKgO+w/R+nzAJC/H3lUqB3IHLZnZVvkyYwIf545LgJTke3rpW4ZY4ZeQ5S Yeqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=ewUNgzeJnTyAqyctWiTUUpicGCUyM8L40AzdR0o3oZQ=; b=4gNqVaiFV2HBodi8ujx6vPCpd3rux3TKr2MuU8ohlGlesz20nC20veP0uEqHd5LYOK /n6Y8b5CMEB7X732nwY2/69t0/3Ba2AGxyJOuh6gMnu5c7xcke/fymDt3Ly0QrX0j7U1 cDxS8R6ZLcG8a3wiP1r5tohPZDa/TitBW9CPcJgS6j9lxI1pUi9iLafWFpPY4i5a2Gq8 hK7aG9CqO2nTycGY9pjAWNjwVnxr6eTcrU0krUALNFX+e3GFCfoLT00mFosiW4PO2ImS MJMsVx70PVAYw/xRA1ASOUfW2u7lhUwmriwO+tgsq77KInkoFyABlKg9b+YazYhUNKDH ftiQ== X-Gm-Message-State: AJIora8eGFoHGlpTxaKZEjmuO6p/mLZvnvhuNEomTqRdB+nQyRO0GmiK jSXbxM++zxV3WNng9rGpV+JBbge4p7aD447rPaUSZrlXhDrqiQ== X-Google-Smtp-Source: AGRyM1vHkSzooypEAjqN4Oqgl2S+U3VXxleNHXEHVGjCtxePm4uPq7b1BXVchCRiIuVLgAb7amBzjn3/5PALuzh+VoA= X-Received: by 2002:a2e:8ec9:0:b0:25a:754d:db39 with SMTP id e9-20020a2e8ec9000000b0025a754ddb39mr10023724ljl.4.1656735903034; Fri, 01 Jul 2022 21:25:03 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6520:2432:b0:1f7:d9f7:61a with HTTP; Fri, 1 Jul 2022 21:25:01 -0700 (PDT) From: Samuel Wales Date: Fri, 1 Jul 2022 21:25:01 -0700 Message-ID: Subject: sorting plain list while making - equal spc [was Re: [O] About org-sort -> org-sort-list with custom sort function] To: emacs-orgmode@gnu.org Cc: Kyle Meyer , Nicolas Goaziou , Zhitao Gong Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=samologist@gmail.com; helo=mail-lj1-x230.google.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656735949; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ewUNgzeJnTyAqyctWiTUUpicGCUyM8L40AzdR0o3oZQ=; b=p0+dkesrma2fUvO4siyHj3DBwxuBNjswesWP7jUwa6aT+fcwjZTIULuojYSX7jhWq3Vhmk wrbZr2QNzJqssihmOdYdI8Izb/960JgB8cCw/gKoTfoNfPLsLHWBbP240aP8hgZ6cjWasJ PQfrg13jaMju52XPAL1XRU2jujCCQRkrRNere8ISbFSyJ+Bsi+FR4u07xz9pUaC9NlRTGF UQTy511aLTNPNcPaJIsQe1J9w7l6Ha4vGC8HUEW2rdVIi5NBbdorkkxpNpnygkd9xMhoFd kClVHf5eYyujFczdHK3ViATK+t+a2MvYPMAjG8ps+5OaPsajKAoF2EDbp3k0SQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656735949; a=rsa-sha256; cv=none; b=M6kKWCtshkN1rMeQPqQA1zlZdM1VMIYUEzbDiQzrcQ4fSZiRb/MJpvN2ssmh49aePKKHyf UO4Q4JoNlWXSxpmfyZiz+eDQnujzOAYB2Md2SZgAU/X2U+QLXam3B8MZNe2WMgknvPafT9 XKBwH3DxE/YDzktEBlb+C4xJDrz3N0CYQ7FczCPFfhaQBM0wDOac3ZGLZV9wrw/mB3F4KU INDMMa6BZhpakeIPXBd6EnD1Tmwfp9iDuFBDcC+K6pUI2JqNqP44qZ7zu2XAWGMhVh3Lhz uUcDkXjYcoF3ogxni1j4r7rwLWOkPw83xK5R8S043rw4anIU8bp3OVZ1pXFXnQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=qOpi7rbJ; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -0.95 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=qOpi7rbJ; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Queue-Id: 4715D305A X-Spam-Score: -0.95 X-Migadu-Scanner: scn1.migadu.com X-TUID: iMtVLATtvXip i am confused by the custom sorting function for plain lists. are there examples? [note: still on maint.] i want to ignore [-] for sorting by checked. it can be equal to [ ]. i don't need it to be custom but that seems available. a rationale and possible interesting solutions are below, but i'm ok with anything. current x/X is always flawed for me. rationale: suppose you have a long list like - [ ] hello + [ ] hi + [ ] greetings ... [long list] suppose you mark greetings as [X] with c-c c-c, at least with my settings, hello will become [-] to indicate "partly X". suppose hello is still high priority. but you don't notice it's there because you use very large fonts and it is not on the same page. it's in the middle. you keep your list in priority sequence. you have at the top something like - [ ] bonjour - [ ] some kind of greeting ... and most are spc like that and - is rare. suppose you mark bonjour X with c-c c-c. now it is in your face and you want to move it down. so you sort by checked. now it is out of your face. but you didn't notice that your hello moved down also. this isn't particularly a bug; it is just that - is part of sorting and it is hardcoded to be below SPC [i think]. so hello gets moved down a whoooooooooooooole lot. its place in the list is gone. you aren't even looking at the bottom of hte list because it is so long. it is as if hello has disappeared. and this is because you marked a sub-item as X. and then sorted the top level by checked. and didn't notice. so i'm thinking this is a feature that could cause unexpected results. [because it did that to me. existence proof.] and there's nothing really wrong with existing semantics, but i'd want - to be ignored in sorting, because of the above. i can think of some possible solutions. for example - have something like an x X command that makes - eqal to spc or custom variable for sorting with ability to specify '(? ?x) thus ignoring ?-. - have a command that moves all X to a sibling header so you don't need sorting to get X out of your face - have the possibility of this all working on sublists too [i kinda want all.... there are more ideas. please do not shoot me or say i am destroying the spirit and letter of org and the milky way galaxy. these are just brainstorms. possibilities to possibly consider, not analyzed to perfection.] thanks! On 5/8/17, Kyle Meyer wrote: > Kyle Meyer writes: > >> Nicolas Goaziou writes: >> >>> The we may not need `call-interactively' at all. >>> >>> WDYT? >> >> Yeah, I agree that there's no need for call-interactively here because >> the interactive forms of org-table-sort-lines, org-sort-list, >> org-sort-entries are covered by org-sort's. >> >> Switched call-interactively to funcall in c1addc825. > > Ehh, I should have looked more closely at org-table-sort-lines. Unlike > org-sort-entries and org-sort-list, it uses called-interactively-p to > determine whether it should prompt the user. I've put the > org-call-with-arg back, at least for now. > > -- > Kyle > > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com