emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Karl Fogel <kfogel@red-bean.com>
To: Org Mode <emacs-orgmode@gnu.org>
Cc: Ihor Radchenko <yantar92@gmail.com>
Subject: Re: Removing obsolete function `org-truely-invisible-p'.
Date: Thu, 31 Mar 2022 19:28:05 -0500	[thread overview]
Message-ID: <87fsmx8x62.fsf@red-bean.com> (raw)
In-Reply-To: <87h7b5rm6f.fsf@localhost> (Ihor Radchenko's message of "Sun, 19 Dec 2021 17:14:32 +0800")

[-- Attachment #1: Type: text/plain, Size: 679 bytes --]

On 19 Dec 2021, Ihor Radchenko wrote:
>Karl Fogel <kfogel@red-bean.com> writes:
>
>> Should we just remove `org-truely-invisible-p'?  Or at least 
>> correct the spelling of its name ("truely" should be "truly")?
>
>I feel slightly reluctant about removal. If nothing, this 
>function can
>be a reminder about visible-mode and keeping it has little 
>downside.
>Though if others think that removing would be better, I would 
>also be
>fine with it.
>
>Renaming sounds reasonable. Just need to define obsolete alias 
>for the
>old name in org-compat.el.
>
>Could you prepare a patch? Having a patch may encourage more 
>feedback.

Sure; please see attached.

Best regards,
-Karl


[-- Attachment #2: 0001-Mark-function-obsolete-fix-spelling-of-its-name.patch --]
[-- Type: text/plain, Size: 2621 bytes --]

From bb229b4f8f78ae52962d7bc90c8b1d4993af8263 Mon Sep 17 00:00:00 2001
From: Karl Fogel <kfogel@red-bean.com>
Date: Thu, 31 Mar 2022 19:02:38 -0500
Subject: [PATCH] Mark function obsolete & fix spelling of its name

* lisp/org-macs.el (org-truely-invisible-p): Move to...
* lisp/org-compat.el (org-truly-invisible-p): ...here, and add...
  (org-truely-invisible-p): ...this compatibility alias.

There are no callers of this function in Org Mode, nor in current
Emacs (on the 'master and 'emacs-28' branches at least).  We discussed
whether to remove it entirely, and for now seem to have tentatively
decided not to remove it.  See this thread for more details:

  From: Ihor Radchenko
  Subject: Re: Removing obsolete function `org-truely-invisible-p'.
  To: Karl Fogel
  Cc: Org Mode
  Date: Sun, 19 Dec 2021 17:14:32 +0800
  Message-ID: <87h7b5rm6f.fsf@localhost>
---
 lisp/org-compat.el | 12 ++++++++++++
 lisp/org-macs.el   |  7 -------
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git lisp/org-compat.el lisp/org-compat.el
index 38d330de6..43d44211e 100644
--- lisp/org-compat.el
+++ lisp/org-compat.el
@@ -402,6 +402,18 @@ See `org-link-parameters' for documentation on the other parameters."
 (make-obsolete 'org-add-link-type "use `org-link-set-parameters' instead." "9.0")
 
 ;;;; Functions unused in Org core.
+
+;; Not used since commit 3baf246f4f (Nicolas Goaziou, 2016-04-28)
+(defun org-truly-invisible-p ()
+  "Check if point is at a character currently not visible.
+This version does not only check the character property, but also
+`visible-mode'."
+  (unless (bound-and-true-p visible-mode)
+    (org-invisible-p)))
+(define-obsolete-function-alias 'org-truely-invisible-p
+  'org-truly-invisible-p "2022-03-31"
+  "Compatibility alias for legacy misspelling of `org-truly-invisible-p'.")
+
 (defun org-table-recognize-table.el ()
   "If there is a table.el table nearby, recognize it and move into it."
   (when (org-at-table.el-p)
diff --git lisp/org-macs.el lisp/org-macs.el
index b39af9103..fb3c441e1 100644
--- lisp/org-macs.el
+++ lisp/org-macs.el
@@ -1151,13 +1151,6 @@ fontification."
 	  (folding-only (memq value '(org-hide-block outline)))
 	  (t value))))
 
-(defun org-truely-invisible-p ()
-  "Check if point is at a character currently not visible.
-This version does not only check the character property, but also
-`visible-mode'."
-  (unless (bound-and-true-p visible-mode)
-    (org-invisible-p)))
-
 (defun org-invisible-p2 ()
   "Check if point is at a character currently not visible.
 If the point is at EOL (and not at the beginning of a buffer too),
-- 
2.35.1


  reply	other threads:[~2022-04-01  0:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-04 20:53 Removing obsolete function `org-truely-invisible-p' Karl Fogel
2021-12-04 22:19 ` Samuel Wales
2021-12-19  9:14 ` Ihor Radchenko
2022-04-01  0:28   ` Karl Fogel [this message]
2022-04-04 11:55     ` Ihor Radchenko
2022-04-04 16:20       ` Karl Fogel
2022-04-05  6:14         ` Ihor Radchenko
2022-04-05 17:08           ` Linking by Message-ID Max Nikulin
2022-04-05 18:41           ` Removing obsolete function `org-truely-invisible-p' Karl Fogel
2022-04-07  4:59             ` Ihor Radchenko
2022-04-07 16:57               ` Karl Fogel
2022-04-15  9:33                 ` [PATCH] CONTRIBUTE: Link WORG page when explaining commit message format Ihor Radchenko
2022-04-15 12:47                   ` Robert Pluim
2022-04-15 21:13                     ` Karl Fogel
2022-04-16  9:35                     ` Ihor Radchenko
2022-04-23  8:06                   ` Ihor Radchenko
2022-04-23 15:47                     ` Karl Fogel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fsmx8x62.fsf@red-bean.com \
    --to=kfogel@red-bean.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).