emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-orgmode@gnu.org
Subject: Re: Use lexical-scoping in tests
Date: Thu, 15 Sep 2022 22:22:22 +0800	[thread overview]
Message-ID: <87mtb0vhsx.fsf@localhost> (raw)
In-Reply-To: <jwvczbx1w0n.fsf-monnier+emacs@gnu.org>


Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> The fix is in preparation, but obviously I had tested my patch
>> incorrectly (i.e. I probably compiled and tested another code than the
>> one I had patched).
>
> OK, here's a better version.  As you can see, it's not nearly as simple.

Thanks!
This new version passes all the tests on my side.
However, I have a few questions about FIXME items.

> +		;; FIXME: `s' is a symbol, so (car-safe s) is always nil.
> +		;;(when (eq 'autoload (car-safe s))
> +		;;  (unintern s obarray))
> +		))))

If I understand correctly, the intended version of this code is supposed
to be

  (when (autoloadp (symbol-function s))
    (unintern s obarray))

the idea being "unloading" all the built-in org-related staff.
However, make test will be failing then with byte-compiler error.
I feel that the idea of the code is reasonable, but some detail of how
autoloads work in Emacs is missed.
  
> +	   ;; FIXME: For the rare cases where we do need to mess with windows,
> +           ;; we should let `body' take care of displaying this buffer!
>  	   (setq buffer (find-file file))

Could you please elaborate about this fixme?

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


  reply	other threads:[~2022-09-15 14:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13  0:05 Use lexical-scoping in tests Stefan Monnier
2022-09-14 12:32 ` Ihor Radchenko
2022-09-14 18:23   ` Stefan Monnier
2022-09-14 21:34     ` Stefan Monnier
2022-09-15 14:22       ` Ihor Radchenko [this message]
2022-09-15 17:29         ` Stefan Monnier
2022-09-16  3:38       ` Ihor Radchenko
2022-09-16  3:59         ` Stefan Monnier

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=87mtb0vhsx.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).