Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce -defun #336

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Introduce -defun #336

wants to merge 1 commit into from

Conversation

yyoncho
Copy link
Contributor

@yyoncho yyoncho commented May 18, 2020

  • I used -lambda as a base, tried several versions with extracting the common
    code but neither of them made the code more readable(IMO).

  • Removed the restrictions against doing (-lambda () ...) which does not seem
    to needed.

@ericdallo
Copy link

LGTM, maybe add some link/docs on the README on how to use?

dash.el Outdated Show resolved Hide resolved
dash.el Outdated Show resolved Hide resolved
dash.el Outdated Show resolved Hide resolved
dash.el Outdated Show resolved Hide resolved
dash.el Show resolved Hide resolved
dash.el Show resolved Hide resolved
dash.el Show resolved Hide resolved
dev/examples.el Show resolved Hide resolved
@basil-conto
Copy link
Collaborator

@ericdallo

maybe add some link/docs on the README on how to use?

For every defexamples entry in dev/examples.el, the create-docs.sh script adds the relevant function's docstring and its first few examples to README.md.

@yyoncho
Copy link
Contributor Author

yyoncho commented May 21, 2020

@basil-conto addressed comments and force-pushed.

Copy link
Collaborator

@basil-conto basil-conto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed comments and force-pushed.

Thanks, but some of the docs still contain mistakes; see below.

By the way, dash.el is now included in GNU ELPA and is copyrighted by the Free Software Foundation. Do you have a copyright assignment on file?

dash.el Outdated Show resolved Hide resolved
dash.el Outdated Show resolved Hide resolved
dash.el Outdated Show resolved Hide resolved
dash.el Outdated Show resolved Hide resolved
dash.el Outdated Show resolved Hide resolved
dash.el Show resolved Hide resolved
dash.el Outdated Show resolved Hide resolved
@yyoncho yyoncho force-pushed the defun branch 2 times, most recently from 55a2a29 to 2915dfd Compare May 21, 2020 15:27
@yyoncho
Copy link
Contributor Author

yyoncho commented May 21, 2020

addressed comments and force-pushed.

Thanks, but some of the docs still contain mistakes; see below.

Sorry about that, please check the newly force pushed version(hopefully I have fixed everything).

By the way, dash.el is now included in GNU ELPA and is copyrighted by the Free Software Foundation. Do you have a copyright assignment on file?

I don't have an assignment.

@basil-conto
Copy link
Collaborator

basil-conto commented May 21, 2020

I don't have an assignment.

Would you be willing to? You only need to do it once for all FSF-copyrighted Emacs packages, including Emacs core. It involves filling out one of the forms under http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/Copyright and emailing it to assign@gnu.org. They'll tell you what you need to do from there.

See also (info "(emacs) Copyright Assignment").

dash.el Outdated Show resolved Hide resolved
dash.el Outdated Show resolved Hide resolved
dash.el Outdated Show resolved Hide resolved
dash.el Outdated Show resolved Hide resolved
dash.el Outdated Show resolved Hide resolved
- I used `-lambda` as a base, tried several versions with extracting the common
code but neither of them made the code more readable(IMO).

- Removed the restrictions against doing `(-lambda () ...)` which does not seem
to needed.
Copy link
Collaborator

@basil-conto basil-conto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM. All that's missing is the copyright assignment.

@yyoncho
Copy link
Contributor Author

yyoncho commented May 24, 2020

Ping.

@ericdallo
Copy link

any news on that @basil-conto ?

@basil-conto
Copy link
Collaborator

any news on that @basil-conto ?

Any news on what?

I lack both the ability to check whether @yyoncho's copyright assignment is on file, and to merge this PR.

@ericdallo
Copy link

I lack both the ability to check whether @yyoncho's copyright assignment is on file, and to merge this PR.

Yeah, sorry for that :/

@basil-conto
Copy link
Collaborator

Yeah, sorry for that :/

No worries. :) Perhaps if the dash.el maintainers are looking for more help I could use it as justification to ask for access to the copyright assignment list, which would allow synchronising this repository with GNU ELPA, which I already have push rights to.

@yyoncho
Copy link
Contributor Author

yyoncho commented Jun 1, 2020

FWIW I started copyright assignment but it is not a blocker for the merge either way since I have already 2 commits with more than 15(?) lines in the repo. And generally, we need it in melpa, not sure if having a newer version in elpa will be sufficient.

@basil-conto
Copy link
Collaborator

basil-conto commented Jun 1, 2020

it is not a blocker for the merge either way since I have already 2 commits with more than 15(?) lines in the repo

There was a lot of effort put into getting dash.el on GNU ELPA, so it's unfortunate if copyright status hasn't been checked since then.

And generally, we need it in melpa, not sure if having a newer version in elpa will be sufficient.

The status of dash.el, as a widely used Emacs package, on GNU ELPA is far more important than its status on MELPA. The latter is fine for high volumes of community packages, but the former is guaranteed to always be available and maintained by core Emacs developers, which is more important for packages in which code quality and stability is critical. If a package is on GNU ELPA it is effectively a part of Emacs.

@yyoncho
Copy link
Contributor Author

yyoncho commented Jun 1, 2020

And generally, we need it in melpa, not sure if having a newer version in elpa will be sufficient.

The status of dash.el, as a widely used Emacs package, on GNU ELPA is far more important than its status on MELPA.

By "we", I meant emacs-lsp team. Having it in elpa does not work for us because the melpa version will be higher(I guess).

@basil-conto
Copy link
Collaborator

Having it in elpa does not work for us because the melpa version will be higher(I guess).

I don't see how that would be a problem.

@yyoncho
Copy link
Contributor Author

yyoncho commented Jun 1, 2020

I don't see how that would be a problem.

package.el will pick the melpa version and we will break if it does not have -defun. We will break even now if anyone was using the elpa version because AFAICT dash was not updated in elpa for like 5 years...

@basil-conto
Copy link
Collaborator

package.el will pick the melpa version and we will break if it does not have -defun.

If GNU ELPA has -defun, then MELPA will also have it.

We will break even now if anyone was using the elpa version because AFAICT dash was not updated in elpa for like 5 years...

Which is something that I would like to change.

@magnars
Copy link
Owner

magnars commented Jun 1, 2020 via email

@magnars
Copy link
Owner

magnars commented Jun 1, 2020 via email

@basil-conto
Copy link
Collaborator

Since Emacs Lisp has a global namespace, you could include the function in
your own code while waiting for this to propagate to the package repos,
perhaps?

I haven't tested this, but would (defalias 'foo (-lambda ...)) effectively do the same as (-defun foo ...)?

@basil-conto
Copy link
Collaborator

FWIW I started copyright assignment

Any updates on that?

I haven't tested this, but would (defalias 'foo (-lambda ...)) effectively do the same as (-defun foo ...)?

It seems to - so is -defun useful enough to have on its own? Or can we just use defalias+-lambda instead?

@basil-conto basil-conto added the enhancement Suggestion to improve or extend existing behavior label Aug 3, 2020
@yyoncho
Copy link
Contributor Author

yyoncho commented Aug 3, 2020

FWIW I started copyright assignment

Any updates on that?

I will try to finish that these days.

I haven't tested this, but would (defalias 'foo (-lambda ...)) effectively do the same as (-defun foo ...)?

It seems to - so is -defun useful enough to have on its own? Or can we just use defalias+-lambda instead?

I don't insist on getting this in - we already defined lsp-defun in lsp-mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Suggestion to improve or extend existing behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants