Coder Social home page Coder Social logo

Comments (4)

EFLS avatar EFLS commented on June 16, 2024

Yeah that's probably not best practice... I'll have to change that.

I didn't want to oblige people to install ace-window as it is only used for that specific function, but then again requiring inside a function might not be a good solution. Not sure what would be a good approach to avoid requiring ace-window from the start, but in the mean time I should require it similar to other packages.

from zetteldeft.

EFLS avatar EFLS commented on June 16, 2024

I tried figuring out an approach by asking /r/emacs on Reddit. Not sure which answer to follow though...

Check it here:
https://www.reddit.com/r/emacs/comments/gtbfux/question_about_best_practice_for_require_when/

The options seem to be:

  • require ace-window at the top level & list it as dependency
  • create a defcustom so that people can use a function of choice (but this seems a bit more of a hassle)
  • handle this with a soft require, for example showing a warning when ace-window isn't found, but not adding it to the dependencies

The most stable approach seems to be to simply require at the top level (thus loading ace-window even when aren't using the function).

If anyone else has opinions on how to best handle this, please share

from zetteldeft.

gklimowicz avatar gklimowicz commented on June 16, 2024

I'm fine with including it as a top-level requirement.

from zetteldeft.

EFLS avatar EFLS commented on June 16, 2024

Yeah, I guess that is the cleanest option. Fixed.

from zetteldeft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.