From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aGtIIMDSVV/aJgAA0tVLHw (envelope-from ) for ; Mon, 07 Sep 2020 06:27:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id gP1HHMDSVV9VVAAAB5/wlQ (envelope-from ) for ; Mon, 07 Sep 2020 06:27:12 +0000 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 E69B094013C for ; Mon, 7 Sep 2020 06:27:11 +0000 (UTC) Received: from localhost ([::1]:56726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFAcO-00054S-2i for larch@yhetil.org; Mon, 07 Sep 2020 02:27:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFAc0-00054C-7J for emacs-orgmode@gnu.org; Mon, 07 Sep 2020 02:26:44 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:43449) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFAbw-0003Gm-Ul; Mon, 07 Sep 2020 02:26:43 -0400 Received: by mail-pf1-x442.google.com with SMTP id f18so8090598pfa.10; Sun, 06 Sep 2020 23:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=7hmt24fzII+e57bkMQpplAQIKblQ8XmPQQux2uelymM=; b=QBO3srb/wkOm2eKx4We5YFJRaHlrH3nCOuzHEpHqhY+jRogASUY/29ulzxGCpbvw43 Rl7ImXTwo60kQDtU0+bAyJSZHs0j01MQER0bkTrUHxDMVAUqi3mA3FRBnrmEz14mh1ZQ COyIRhTiyzdcSzkfKjxISWoB40ltQK1QLIvz9EeF3IVdFJWQ3idYK5S7txRKJ4B1gGCd dL88KFlymicPy6OcAefTBoWzf7pSuXxomV0v7nBmzaUdNhdL6prM+CCWdZKyXLSQMzcO fNuOyqop+L+HDLzvL48n6Kta9Co/ceyfbWxmqwnDK/qmmyb19hJ7CajrHkZPkY6vwtBP nJsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=7hmt24fzII+e57bkMQpplAQIKblQ8XmPQQux2uelymM=; b=L6+VLVuzWOkwECsZ+yrmAvxJdWPVU1Z7SgSFJZI0fqY+2uX1+pik+uTp+QGaQtOmzp OLe3J1hR38Z58AkWwyWUVv6/15jwrE60ET2MF2qLdlzONFs6bB+4KgxtVrTmFs8T2v0E xpQ9q6xblqqSo8Wc8hYlA535d+XH4sOuV0QOOukqJYMbeCnIbjXO0ObH439k0mgzNDA9 auPYpSFp3CwDDySl7Os9zmDkqyswfxgKe+UiFIMnS70/CwBgmqNGrbix53d1WhotVYKC r6UTtt8J4GcoDPUnHFSt0NdlGq13X+IlTYjp7jU3hOhvA1cgHqeOSdtslDYXk5RgFdZK FM0g== X-Gm-Message-State: AOAM533w4MPEAzk+1RTR1tAKCZICKA/hwgZr2LuW+ya9n+6CqcihzwI7 1CaRPNEmSJRedCZQ0iQupnEQqO+eGFbKI0g8 X-Google-Smtp-Source: ABdhPJwSmeMoYQ0fcQlotxqmNean8pAkJOxByweMq9mOzhlwIhQdbmPtuLQXwUIej0sjfe8kyeRGdg== X-Received: by 2002:a62:82c8:: with SMTP id w191mr18790863pfd.147.1599459998622; Sun, 06 Sep 2020 23:26:38 -0700 (PDT) Received: from localhost ([167.88.61.176]) by smtp.gmail.com with ESMTPSA id e2sm1769798pjm.27.2020.09.06.23.26.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2020 23:26:37 -0700 (PDT) From: Ihor Radchenko To: Bastien , D Subject: Re: [PATCH] Re: Re: Re: org-forward-heading-same-level and the invisible-ok argument In-Reply-To: <87h7saqiod.fsf@gnu.org> References: <87a6yi42ie.fsf@localhost> <61342cad-ed4c-59ef-d2fe-685de58df5de@posteo.net> <87tuwo2tr3.fsf@localhost> <67d953fc-3396-8038-4302-6e1ad4cde72c@posteo.net> <87tuwm7uo3.fsf@localhost> <8e63089c-ba3e-788a-f80f-c05b14d3228d@posteo.net> <87364611hw.fsf@localhost> <7365d467-2a31-85b4-4f0b-8c8871c4e180@posteo.net> <87eenfl8ey.fsf@bzg.fr> <7fc400e9-07bb-dafa-951f-56c98b170901@posteo.net> <87h7saqiod.fsf@gnu.org> Date: Mon, 07 Sep 2020 14:25:36 +0800 Message-ID: <87bliiyufz.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=yantar92@gmail.com; helo=mail-pf1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=QBO3srb/; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: RgruTNwuU/0/ > Can you try the attached patch and tell wether it fixes your issue? The patch will fail in the following headline, because of invisible last char: * [[file:test.el][test]] In general, we can only guarantee that partially visible headline is not skipped only if we check all the positions. Or we can change the docstring defining the visibility criteria. > I'd rather not add a dependency over seq.el anyway. Then, can as well use `mapcar', or even simply manual loop over line positions. Best, Ihor Bastien writes: > Hi, > > D writes: > >>> Does it fix a problem for org-superstar-mode or a more general problem >>> in Org? >> >> It mostly fixes an org-superstar-mode problem (see >> https://github.com/integral-dw/org-superstar-mode/issues/19). > > Can you try the attached patch and tell wether it fixes your issue? > >>> If you use seq* functions, the code will be incompatible with previous >>> emacsen, right? >> >> Hmm, looking at the oldest available ELPA release (seq-1.0, 2015), >> seq-every-p should be fully backwards-compatible. The current package >> itself also has a fallback option for Emacs versions <25, so that should >> be fine. > > I'd rather not add a dependency over seq.el anyway. > > Thanks, > > -- > Bastien > diff --git a/lisp/org.el b/lisp/org.el > index a5c7dcf3b..f6e04e65c 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -20529,7 +20529,7 @@ non-nil it will also look at invisible ones." > ((and (= l level) > (or invisible-ok > (not (org-invisible-p > - (line-beginning-position))))) > + (1- (line-end-position)))))) > (cl-decf count) > (when (= l level) (setq result (point))))))) > (goto-char result))