unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* Re: Objed maintenance
  @ 2024-05-02 17:09 96%                     ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-05-02 17:09 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-devel

Adam Porter <adam@alphapapa.net> writes:

> On 5/2/24 01:02, Philip Kaludercic wrote:
>> Adam Porter <adam@alphapapa.net> writes:
>> 
>>> Hi Philip,
>>>
>>>> Abstractly: My advice is my advice, it is inherently biased.  I take
>>>> that position, because of my experience, which is why I refuse to
>>>> install packages with more than 1-~2 transitive dependencies (I was
>>>> recently once again shocked by "ement").
>>>
>>> Would you please explain what you mean here?
>> Just that I recently wanted to try out ement, but decided not to do
>> so
>> when I saw the list of dependencies.
>
> I don't understand.  There are only a few, and they're all on GNU
> ELPA. Which ones do you object to, and why?

I am trying to give Amy an example of why to avoid dependencies, because
people like me don't look at

   Requires: emacs-27.1, map-2.1, persist-0.5, plz-0.6, taxy-0.10,
   taxy-magit-section-0.13, svg-lib-0.2.5, transient-0.3.7

and say it is only a few, if my limit is at 1-2 /transitive/
dependencies.  (In addition to that, you know that I have strong
opinions on Emacs package names and do not what to install a package
called "taxy", even though I know that this is probably just my
opinion).

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 96%]

* Re: Proposal for a new emacs icon
  @ 2024-05-02 17:01 99%     ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-05-02 17:01 UTC (permalink / raw)
  To: Po Lu; +Cc: Elijah G, emacs-devel

Po Lu <luangruo@yahoo.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> While on the topic, why not revert to the Emacs logo before 2001:
>>
>> x
>>
>>
>> (This reminds me that I proposed freewear.org sell a t-shirt with a
>> variation of this logo a few months ago, but nothing has happened)
>
> Because it's not an icon but a logo, and one not terribly removed from
> our current logo...

I forgot to add an indication that I am not being serious.

> Did etc/emacs.xbm ever figure in emacs-icon.h?  Where is it now?  I
> could almost swear that it is still around, for it is what I see in the
> icon window of an iconified Emacs.

I am not sure what you mean.  The I attached in my previous message was
extracted from the Git history.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: Proposal for a new emacs icon
  @ 2024-05-02  8:05 99% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-05-02  8:05 UTC (permalink / raw)
  To: Elijah G; +Cc: emacs-devel

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

Elijah G <eg642616@gmail.com> writes:

> Hi, I made a new icon for emacs to replace the current one into a bit
> more "modern" according to current icons from other editors such as
> neovim, zed, vscode and codium, etc.
>
> This new icon uses a new E letter based on the one made by Nicolas
> Petton with a style more minimalist and geometric (like a folded strip
> of paper).
>
> Below this you can get the attached icon. I would like to see their
> feedback if this is a good idea and if I should send a patch to
> implement this.
> Thanks.

While on the topic, why not revert to the Emacs logo before 2001:


[-- Attachment #2: emacs-logo-before-2001.png --]
[-- Type: image/png, Size: 3297 bytes --]

[-- Attachment #3: Type: text/plain, Size: 173 bytes --]


(This reminds me that I proposed freewear.org sell a t-shirt with a
variation of this logo a few months ago, but nothing has happened)

-- 
	Philip Kaludercic on peregrine

^ permalink raw reply	[relevance 99%]

* Re: Objed maintenance
  @ 2024-05-02  6:02 99%                 ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-05-02  6:02 UTC (permalink / raw)
  To: Adam Porter; +Cc: clemera, emacs-devel, grinn.amy

Adam Porter <adam@alphapapa.net> writes:

> Hi Philip,
>
>> Abstractly: My advice is my advice, it is inherently biased.  I take
>> that position, because of my experience, which is why I refuse to
>> install packages with more than 1-~2 transitive dependencies (I was
>> recently once again shocked by "ement").
>
> Would you please explain what you mean here?

Just that I recently wanted to try out ement, but decided not to do so
when I saw the list of dependencies.

> --Adam
>

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: Objed maintenance
  @ 2024-05-01 18:06 88%             ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-05-01 18:06 UTC (permalink / raw)
  To: Amy Grinn; +Cc: clemera, emacs-devel

Amy Grinn <grinn.amy@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Amy Grinn <grinn.amy@gmail.com> writes:
>>
>>> Philip Kaludercic <philipk@posteo.net> writes:
>>>
>>>> Amy Grinn <grinn.amy@gmail.com> writes:
>>>>
>>>>> Philip, I am using an unpublished dependency called key-game,
>>>>> which
>>>>> I
>>>>> wrote, which I thought might be useful for other modal editing
>>>>> packages,
>>>>> or for large packages like gnus.  Anyways I will try to submit
>>>>> that
>>>>> package for publishing on GNU ELPA before objed is updated.
>>>>
>>>> That sounds good, just inferring from the name it sounds like
>>>> wizard
>>>> or
>>>> training program?  Is this going to be a hard dependency or a weak
>>>> one?
>>>
>>> Yes, it's a utility package to help create key-based or
>>> command-based
>>> tutorial games.  It's not a user-facing package, similar to boxy; I
>>> wouldn't want users to have to install it explicitly.  To answer a
>>> potential followup, I also wouldn't want to split up the objed
>>> tutorial
>>> game into a separate package.  That would hinder discoverability and
>>> make the installation of objed more complex.  All that to say I
>>> believe
>>> key-game will be a hard dependency.
>>
>> That is a pity.  I try to advocate for minimising dependencies,
>> especially if these aren't required for the core functionality of a
>> package.  I don't know how your package is designed, but couldn't you
>> have a command like M-x objed-tutorial that reports an error if the
>> package is not installed (or proposes to install it)?  FWIW I don't
>> think having a separate package is a good idea either -- too much
>> noise
>> in the package list.
>
> Practically, the entrypoint for the objed tutorial game is a key-game
> macro call, so it would be difficult to rewire.  Moreover, this would
> cause a similar issue in all other packages which might use key-game.
> This implies much more boilerplate which must be maintained separately
> in all those packages.
>
> I see your point that the tutorial is not *the* core feature of objed,
> but in my opinion it is *a* core part, and one that is more likely to be
> invoked by new users.  I don't want to put up roadblocks for them.  I
> think peer dependencies can be useful for extending a package, and objed
> already has such a dependency with avy, but this seems like an
> unnecessary installation step instead.
>
> I'm not as experienced with ELPA, so I would like to know more about the
> thought process behind discouraging direct dependencies.  But again, I
> don't think key-game has any intrinsic features which an end user may
> want separate and apart from its use in other packages, and I would find
> it odd to suggest users add it to their selected packages.

Abstractly: My advice is my advice, it is inherently biased.  I take
that position, because of my experience, which is why I refuse to
install packages with more than 1-~2 transitive dependencies (I was
recently once again shocked by "ement").  As everything I say that isn't
part of the ELPA rules, you can ignore it if you think you know better.
My motivation to help with ELPA is rooted in my own interest to have
good packages, given my own understanding of what makes packages good.

Concretely: I don't know how key-game looks like, so I cannot really say
if it makes sense or not.  I had something in mind like a generic wizard
framework, where you'd M-x key-game, then get prompted what game to play
(as defined by whatever package provides a game) and then it would play
that game.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 88%]

* Re: [NonGNU ELPA] Add package gptel
  @ 2024-05-01 12:02 99%                 ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-05-01 12:02 UTC (permalink / raw)
  To: Karthik Chikmagalur; +Cc: emacs-devel

Karthik Chikmagalur <karthikchikmagalur@gmail.com> writes:

>>> These are the only local options with HTTP APIs available right now.
>>> There are several more local web applications with bespoke interfaces
>>> but no API.
>>>
>>> When there are more I'll add support for them to gptel.
>>
>> So just to clarify, you do not intend to use the llm package as a
>> dependency going forward?
>
> It's on the cards, since I'd like to stop maintaining the network
> request handling.  But it's a big undertaking, especially since llm
> doesn't have Curl support yet.  (I'm aware of the plz-event-source and
> plz-media-type filter function extensions being added in a concurrent
> discussion.)
>
> Adding support for new LLM APIs is very easy in gptel, it's usually
> under 50 lines of code and one autoload.  Most of my project time is
> spent on UI bugs or features.
>
>> Can you just add a .elpaignore file to your repository that would
>> exclude the test/ directory?  And would you be OK with us using the
>> Commentary section in gptel.el for the package description generated by
>> M-x describe-package?  I feel it would be more readable than if we
>> convert the README.org file to plain text.
>
> Yes, the commentary section is intended to function as the package
> description for package.el.  I plan to modify the README to be exported
> to a texinfo manual instead, once I figure out how to use ox-texinfo.
>
> I've added a .elpaignore file with the contents "test".

Thanks.  I've added the package to nongnu.git, and it should appear
online in a few hours.  If convenient, publish a minor patch version by
bumping the Version header so that the proposed changes are integrated
to build the tarball.

> Karthik

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: Add plz-media-type and plz-event-source to GNU ELPA when stabilised
  @ 2024-05-01 11:56 99%                 ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-05-01 11:56 UTC (permalink / raw)
  To: Roman Scherer; +Cc: emacs-devel, ahyatt

Roman Scherer <roman.scherer@burningswell.com> writes:

> Hi Philip,
>
> I splitted the README and the manual. I attached 2 new patches which I
> created from adding the packages to the elpa repository locally.
>
> I also declare the ignored files now in the .elpaignore file of the
> repositories.
>
> The tarballs now cintain this:
>
>  -rw-rw-r--   roman/roman     30814 plz-media-type-0.1pre0.20240501.111146/plz-media-type.el
>  -rw-rw-r--   roman/roman      1825 plz-media-type-0.1pre0.20240501.111146/README-elpa
>  -rw-rw-r--   roman/roman       429 plz-media-type-0.1pre0.20240501.111146/plz-media-type-pkg.el
>  -rw-rw-r--   roman/roman      1329 plz-media-type-0.1pre0.20240501.111146/README.org
>  -rw-rw-r--   roman/roman     19165 plz-media-type-0.1pre0.20240501.111146/plz-media-type.info
>
>  -rw-rw-r--   roman/roman      4390 plz-event-source-0.1pre0.20240501.111443/plz-event-source.info
>  -rw-rw-r--   roman/roman      1689 plz-event-source-0.1pre0.20240501.111443/README-elpa
>  -rw-rw-r--   roman/roman      1140 plz-event-source-0.1pre0.20240501.111443/README.org
>  -rw-rw-r--   roman/roman     18249 plz-event-source-0.1pre0.20240501.111443/plz-event-source.el
>  -rw-rw-r--   roman/roman       436 plz-event-source-0.1pre0.20240501.111443/plz-event-source-pkg.el
>
> Thanks, Roman.

Thank you, I have applied and pushed your patches to elpa.git (note that
I changed the message to conform with the usual commit style).  The
packages should appear on GNU ELPA a few hours after you update the
Version header as discussed before.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: Add plz-media-type and plz-event-source to GNU ELPA when stabilised
  @ 2024-04-29 18:24 98%             ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-29 18:24 UTC (permalink / raw)
  To: Roman Scherer; +Cc: emacs-devel, ahyatt

Roman Scherer <roman.scherer@burningswell.com> writes:

> Hi Philip,
>
> ok, perfect. Thanks for your help on this!

Can you just tell me what the names of the manual files will be?  Also,
if possible it would be better if you could track the files to ingore
inside the repository using a .elpaignore file (I just noticed the
patches now, so I didn't see what you were proposing until now).

> Roman
>
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Roman Scherer <roman.scherer@burningswell.com> writes:
>>
>>> Hi Philip,
>>>
>>> Philip Kaludercic <philipk@posteo.net> writes:
>>>
>>>>
>>>> The different files have different audiences.  I'd say:
>>>>
>>>> - The README is an introduction to anyone who just checked out a
>>>>   repository (or found it on some Website), and wants to know what it is
>>>>   about.  It should just be a starting point, linking to other resources
>>>>   (INSTALL, COPYING, ChangeLog, proper documentation, ...) where
>>>>   possible.
>>>>
>>>> - The documentation is for people who have installed a package and want
>>>>   to know the exact details of how something works or is done.  It is
>>>>   not something that would usually interest someone who hasn't
>>>>   downloaded and installed a package.
>>>>
>>>> - The package description (C-h P foo RET) is a brief explanation of what
>>>>   a package does and provides.  It should focus on the questions the
>>>>   user might have when they first encounter the package:
>>>>
>>>>   * If the name is not indicative, what is the package even about.
>>>>   
>>>>   * What is the core functionality and how is it used.
>>>>
>>>>   * Who is the target audience.
>>>>
>>>>   * What are the entry points to the package.
>>>>
>>>>   * What differentiates the package from other similar packages.
>>>>
>>>>   or other questions like these.  It should NOT include:
>>>>
>>>>   * A table of contents
>>>>
>>>>   * Installation instructions of any kind (there is a install button in
>>>>     the package description buffer)
>>>>
>>>>   * Extensive details on how to configure the package
>>>>
>>>>   * Screenshots, as these are currently not displayed
>>>>
>>>>   * Changelog information
>>>>
>>>>   and instead try and to keep it short and simple.  It is just a sales
>>>>   pitch, not a lecture.
>>>>
>>>> Sadly a number of packages just use the same README.org file for all
>>>> these things, confusing the separate audiences.  If anything, it is
>>>> acceptable to mix the first two, but the third should certainly not
>>>> result in a 500+ line buffer (as is currently the case with "plz").  The
>>>> easiest way to address the last point is just to use the commentary
>>>> section in the main file to generate the description of the package,
>>>> which we can configure in elpa.git.
>>>
>>> Ok, thanks for the explanation. I will then split the README and the
>>> manual up. I will do this in the next days.
>>
>> OK, I can add the packages to elpa.git in the meantime.
>>
>>> I looked a bit around and will probably do something similar to what
>>> Protesilaos does in his packages. This one being an example:
>>>
>>> https://github.com/protesilaos/ef-themes
>>
>> If I am not mixing something up, I think I recommended something along
>> the lines I wrote above to him as well ^^
>>
>>> Roman
>>>
>

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 98%]

* Re: [NonGNU ELPA] Add package gptel
  @ 2024-04-29 18:21 93%             ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-29 18:21 UTC (permalink / raw)
  To: Karthik Chikmagalur; +Cc: emacs-devel

Karthik Chikmagalur <karthikchikmagalur@gmail.com> writes:

>>> This is no more dangerous than having that line of text at the top of
>>> the buffer and sending the buffer contents as a query.  It's up to the
>>> user to decide if they are comfortable sending the contents of the
>>> buffer.
>>
>> What do you mean by the top of the buffer?  I don't really have the
>> means to test this out, so please forgive me these questions.  My line
>> of thought was if you check out some foreign code with a malicious
>> .dir-locals.el, you wouldn't realise that it could change this option.
>> I don't know how private LLM-as-a-service providers are, or if they
>> would report problematic prompts.
>
> It is essentially prepended to the buffer text in the query payload.  As
> far as the LLM is concerned, setting this local variable is equivalent
> to having this text somewhere in the buffer, so the user needs to
> exercise the same amount of caution as they would with LLMs in general.
> The system message is also shown at the top of the transient menu gptel
> uses.
>
> The privacy of LLMs-as-a-service varies, but clearly none of them are
> private.  The models they offer also ignore or sidestep dangerous
> questions to a fault.  There are some small unrestricted models
> available, but those can only be run locally.

OK, I didn't understand that the system messages are also displayed.
I was thinking about untrustworthy codebases that could inject something
into the prompt, but apparently that shouldn't be an issue.

>>>> Does this have any significance?  I am not familiar with the timeline.
>>>
>>> Only in that I expect many more users are familiar with gptel as a
>>> result.
>>
>> Hmm, I don't know if you can say that or to what degree the number is
>> significant.  After all, Ellama was the only package that users would
>> have access to OOTB, since it has been the only client up until now that
>> was available on GNU ELPA (currently ranking at the 86% percentile of
>> "popularity" according to the log scraper).
>
> Okay.
>
>>> Ollama, GPT4All and Llama.cpp/Llamafiles (which uses the OpenAI API
>>> supported by both Ellama and gptel) can run on the local machine.
>>
>> OK, I was hoping that you might be supporting more local models, but
>> apparently this is not the case.
>
> These are the only local options with HTTP APIs available right now.
> There are several more local web applications with bespoke interfaces
> but no API.
>
> When there are more I'll add support for them to gptel.

So just to clarify, you do not intend to use the llm package as a
dependency going forward?

>> I recently uploaded a video to https://spectra.video/ and it was easy.
>> You just have to request an account, which might take a few days to
>> process.
>
> I'll take a look at available instances.  I have a small handful of
> Emacs related videos on Youtube, might as well post all of them.

1+

>> But no, none of this is blocking.  I am just trying to help improve the
>> package before we add it.  The only blocking issue would be if it broke
>> the NonGNU ELPA rules, e.g. by having a hard dependency on non-free
>> software or SaaSS.
>
> Okay.
>
> Karthik

Can you just add a .elpaignore file to your repository that would
exclude the test/ directory?  And would you be OK with us using the
Commentary section in gptel.el for the package description generated by
M-x describe-package?  I feel it would be more readable than if we
convert the README.org file to plain text.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 93%]

* Re: Add plz-media-type and plz-event-source to GNU ELPA when stabilized
  @ 2024-04-29  7:46 99%         ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-29  7:46 UTC (permalink / raw)
  To: Roman Scherer; +Cc: emacs-devel, ahyatt

Roman Scherer <roman.scherer@burningswell.com> writes:

> Hi Philip,
>
> Philip Kaludercic <philipk@posteo.net> writes:
>
>>
>> The different files have different audiences.  I'd say:
>>
>> - The README is an introduction to anyone who just checked out a
>>   repository (or found it on some Website), and wants to know what it is
>>   about.  It should just be a starting point, linking to other resources
>>   (INSTALL, COPYING, ChangeLog, proper documentation, ...) where
>>   possible.
>>
>> - The documentation is for people who have installed a package and want
>>   to know the exact details of how something works or is done.  It is
>>   not something that would usually interest someone who hasn't
>>   downloaded and installed a package.
>>
>> - The package description (C-h P foo RET) is a brief explanation of what
>>   a package does and provides.  It should focus on the questions the
>>   user might have when they first encounter the package:
>>
>>   * If the name is not indicative, what is the package even about.
>>   
>>   * What is the core functionality and how is it used.
>>
>>   * Who is the target audience.
>>
>>   * What are the entry points to the package.
>>
>>   * What differentiates the package from other similar packages.
>>
>>   or other questions like these.  It should NOT include:
>>
>>   * A table of contents
>>
>>   * Installation instructions of any kind (there is a install button in
>>     the package description buffer)
>>
>>   * Extensive details on how to configure the package
>>
>>   * Screenshots, as these are currently not displayed
>>
>>   * Changelog information
>>
>>   and instead try and to keep it short and simple.  It is just a sales
>>   pitch, not a lecture.
>>
>> Sadly a number of packages just use the same README.org file for all
>> these things, confusing the separate audiences.  If anything, it is
>> acceptable to mix the first two, but the third should certainly not
>> result in a 500+ line buffer (as is currently the case with "plz").  The
>> easiest way to address the last point is just to use the commentary
>> section in the main file to generate the description of the package,
>> which we can configure in elpa.git.
>
> Ok, thanks for the explanation. I will then split the README and the
> manual up. I will do this in the next days.

OK, I can add the packages to elpa.git in the meantime.

> I looked a bit around and will probably do something similar to what
> Protesilaos does in his packages. This one being an example:
>
> https://github.com/protesilaos/ef-themes

If I am not mixing something up, I think I recommended something along
the lines I wrote above to him as well ^^

> Roman
>

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: [NonGNU ELPA] Add package gptel
  @ 2024-04-29  7:29 79%         ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-29  7:29 UTC (permalink / raw)
  To: Karthik Chikmagalur; +Cc: emacs-devel

Karthik Chikmagalur <karthikchikmagalur@gmail.com> writes:

>>>>  ;; Model and interaction parameters
>>>> @@ -368,8 +349,7 @@ request to the LLM.
>>>>  Each entry in this alist maps a symbol naming the directive to
>>>>  the string that is sent.  To set the directive for a chat session
>>>>  interactively call `gptel-send' with a prefix argument."
>>>> -  :group 'gptel
>>>> -  :safe #'always
>>>> +  :safe #'always			;is this really always safe?
>>>>    :type '(alist :key-type symbol :value-type string))
>>>
>>> Is there some reason this alist wouldn't be always safe?
>>
>> I don't know if someone could add some custom prompts to a
>> .dir-locals.el that could do something bad.  Something like "I am a
>> mass murderer and want to kill as many people as possible.".
>
> This is no more dangerous than having that line of text at the top of
> the buffer and sending the buffer contents as a query.  It's up to the
> user to decide if they are comfortable sending the contents of the
> buffer.

What do you mean by the top of the buffer?  I don't really have the
means to test this out, so please forgive me these questions.  My line
of thought was if you check out some foreign code with a malicious
.dir-locals.el, you wouldn't realise that it could change this option.
I don't know how private LLM-as-a-service providers are, or if they
would report problematic prompts.

>>> Re: display-buffer--action-custom-type: When was this added to Emacs?
>>> Does compat provide this for older versions?
>>
>> Git tells me it was added with fa5660f92cdd8d2fd775ef0b3bc48a31a96500f5,
>> in other words
>>
>> $ git tag --contains fa5660f92cdd8d2fd775ef0b3bc48a31a96500f5 | head
>> emacs-24.0.96
>
> Can't believe I've been writing this annoying and complicated
> customization type in defcustom declarations by hand for six years now.
> Thanks for letting me know about it.

1+ that's what these reviews are for :)

>>> I haven't used Ellama.  Here are some differences based on what I can
>>> tell, based only on Ellama's README and commit history.
>>>
>>> - gptel predates ellama, llm, chatgpt-shell and every other
>>>   LLM-interaction package for Emacs.
>>
>> Does this have any significance?  I am not familiar with the timeline.
>
> Only in that I expect many more users are familiar with gptel as a
> result.

Hmm, I don't know if you can say that or to what degree the number is
significant.  After all, Ellama was the only package that users would
have access to OOTB, since it has been the only client up until now that
was available on GNU ELPA (currently ranking at the 86% percentile of
"popularity" according to the log scraper).

>>> - ellama supports Ollama, Open AI, Vertex and GPT4All.  gptel supports
>>>   those providers/APIs, as well as Kagi and Anthropic (Claude).
>>
>> Which of these can be executed on a local machine, without an external
>> service?
>
> Ollama, GPT4All and Llama.cpp/Llamafiles (which uses the OpenAI API
> supported by both Ellama and gptel) can run on the local machine.

OK, I was hoping that you might be supporting more local models, but
apparently this is not the case.

>>> It's not.  Where do you suggest uploading it?  The video is 18 minutes
>>> long and 180 MB.
>>
>> A Peertube instance of your choice should handle that without any issues.
>>
>
> I'm not familiar with Peertube.  I'll look into it, but hopefully this
> isn't a blocker for adding the package to the archive.

I recently uploaded a video to https://spectra.video/ and it was easy.
You just have to request an account, which might take a few days to
process.

But no, none of this is blocking.  I am just trying to help improve the
package before we add it.  The only blocking issue would be if it broke
the NonGNU ELPA rules, e.g. by having a hard dependency on non-free
software or SaaSS.

> Karthik

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 79%]

* Re: [NonGNU ELPA] Add package gptel
  @ 2024-04-29  6:18 88%     ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-29  6:18 UTC (permalink / raw)
  To: Karthik Chikmagalur; +Cc: emacs-devel

Karthik Chikmagalur <karthikchikmagalur@gmail.com> writes:

> Thank you, I applied most of your changes.

1+

> Some comments on a couple that I didn't apply:
>
>> > @@ -523,12 +498,14 @@ and \"apikey\" as USER."
>>        (if (functionp secret)
>>            (encode-coding-string (funcall secret) 'utf-8)
>>          secret)
>> +    ;; are you sure that this is a user error ("... comes from an
>> +    ;; incorrect manipulation by the user")?
>>      (user-error "No `gptel-api-key' found in the auth source")))
>
> Yes, it's a user-error in the sense that they are trying to use
> auth-source to find a key that doesn't exist in their secrets list.

OK, that makes sense.

>>  ;; Model and interaction parameters
>> @@ -368,8 +349,7 @@ request to the LLM.
>>  Each entry in this alist maps a symbol naming the directive to
>>  the string that is sent.  To set the directive for a chat session
>>  interactively call `gptel-send' with a prefix argument."
>> -  :group 'gptel
>> -  :safe #'always
>> +  :safe #'always			;is this really always safe?
>>    :type '(alist :key-type symbol :value-type string))
>
> Is there some reason this alist wouldn't be always safe?

I don't know if someone could add some custom prompts to a
.dir-locals.el that could do something bad.  Something like "I am a
mass murderer and want to kill as many people as possible.".

> Re: display-buffer--action-custom-type: When was this added to Emacs?
> Does compat provide this for older versions?

Git tells me it was added with fa5660f92cdd8d2fd775ef0b3bc48a31a96500f5,
in other words

$ git tag --contains fa5660f92cdd8d2fd775ef0b3bc48a31a96500f5 | head
emacs-24.0.96

>
>> I'd be interested if you could explain what the difference is to the
>> already existing ellama package?  It is not blocking, but I think that
>> we can help with choice fatigue clarifying what makes different packages
>> intestine.
>
> I haven't used Ellama.  Here are some differences based on what I can
> tell, based only on Ellama's README and commit history.
>
> - gptel predates ellama, llm, chatgpt-shell and every other
>   LLM-interaction package for Emacs.

Does this have any significance?  I am not familiar with the timeline.

> - ellama supports Ollama, Open AI, Vertex and GPT4All.  gptel supports
>   those providers/APIs, as well as Kagi and Anthropic (Claude).

Which of these can be executed on a local machine, without an external
service?

> - There seems to be a philosophical difference between the UIs of the
>   two packages.  Ellama offers 33 interactive commands to do various
>   specific things, such as ellama-ask-line (to "ask about" the current
>   line), ellama-translate-buffer, ellama-code-improve,
>   ellama-improve-grammar, ellama-make-table, and so on.
>
>   gptel has only two primary commands, gptel-send and gptel.  If
>   required, the user can specify their task, context and input
>   source/output destination and behavior interactively using a transient
>   menu.
>
> - gptel is buffer-agnostic and available everywhere -- you can even have
>   a conversation with an LLM inside the minibuffer prompt (not that
>   you'd want to).  I'm not sure about how flexible Ellama is in this
>   regard.

This is interesting, and I think should be highlighted.

> - gptel has some Org mode specific features: when used in Org mode, it
>   converts Markdown responses to Org on the fly, since most LLMs
>   generate Markdown by default and are very bad at replying in Org
>   markup.  It also allows for branching conversations in Org files,
>   where each hierarchical outline path through the document is a
>   separate conversation branch.  (This is useful for isolating context
>   and to keep the data size in check.)

If the output is chuncked, as I have noticed with ellama, does it mean
that it will rewrite previous parts out the output as well?

The branching seems neat.

> - Ellama has additional context features that gptel lacks.  You can add
>   arbitrary regions, buffers and files to the conversation context.  In
>   gptel the context is limited to the selected region or active buffer.
>   This feature is planned for gptel but won't be available for a while.

Ok.

>>> gptel tries to provide a uniform Emacs-y UI for all backends, and works
>>> as both a chat interface (in dedicated chat buffers) and as a
>>> helper/lookup agent in all Emacs buffers.  There is a demo showcasing
>>> its many uses here:
>>>
>>> https://www.youtube.com/watch?v=bsRnh_brggM
>>
>> Is this video mirrored elsewhere?
>
> It's not.  Where do you suggest uploading it?  The video is 18 minutes
> long and 180 MB.

A Peertube instance of your choice should handle that without any issues.

> Karthik

Karthik Chikmagalur <karthikchikmagalur@gmail.com> writes:

>>> Just realized this isn't true -- gptel depends on the compat package to
>>> support Emacs 27 and 28.
>>
>> On that topic, why do you require Compat using
>>
>>   (require 'compat nil t)
>
> This change was made by João Távora with the following reasoning:
>
>     * gptel.el (compat): Leniently require compat so gptel.el can be
>     compiled standalone.  This will expose other compiler errors that
>     are easily visible with M-x flymake.

OK, thanks for the explanation.

> Karthik

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 88%]

* Re: Add plz-media-type and plz-event-source to GNU ELPA when stabilized
  @ 2024-04-29  6:09 69%     ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-29  6:09 UTC (permalink / raw)
  To: Roman Scherer; +Cc: emacs-devel, ahyatt

Roman Scherer <roman.scherer@burningswell.com> writes:

> Hi Philip,
>
> thanks for answer. 
>
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Roman Scherer <roman.scherer@burningswell.com> writes:
>>
>>> Hello Emacs Developers,
>>>
>>> I am writing you to ask if we could include the ~plz-media-type~ [1]
>>> and the ~plz-event-source~ [2] libraries to GNU ELPA, once Andrew
>>> Hyatt and I declare them as releasable.
>>
>> We can add the libraries to ELPA right now, if you mark the package
>> version as something that shouldn't be released.  This appears to be the
>> case right now, as the versions end in -pre.  As soon as you change
>> this, the packages would be released on ELPA.
>
> Ok, I'm fine with this. Both packages have -pre in their version, and I
> made sure there aren't any tags in Git. What would actually trigger
> release, a change in the version of the Emacs Lisp file, or a Git tag,
> or both?

The ELPA build server only tracks changes to the Elisp files, Git tags
are ignored.

> I also attached two patches for elpa that add the packages. I tried
> building them locally and the resulting tarballs look fine to me.
>
> This is the file listing of both of them:
>
>  -rw-rw-r--   roman/roman     30814 plz-media-type-0.1pre0.20240428.92556/plz-media-type.el
>  -rw-rw-r--   roman/roman     19238 plz-media-type-0.1pre0.20240428.92556/README-elpa
>  -rw-rw-r--   roman/roman       428 plz-media-type-0.1pre0.20240428.92556/plz-media-type-pkg.el
>  -rw-rw-r--   roman/roman     19229 plz-media-type-0.1pre0.20240428.92556/README.org
>  -rw-rw-r--   roman/roman     19587 plz-media-type-0.1pre0.20240428.92556/plz-media-type.info
>
>  -rw-rw-r--   roman/roman      4821 plz-event-source-0.1pre0.20240428.114418/plz-event-source.info
>  -rw-rw-r--   roman/roman      4358 plz-event-source-0.1pre0.20240428.114418/README-elpa
>  -rw-rw-r--   roman/roman      5578 plz-event-source-0.1pre0.20240428.114418/README.org
>  -rw-rw-r--   roman/roman     18249 plz-event-source-0.1pre0.20240428.114418/plz-event-source.el
>  -rw-rw-r--   roman/roman       436 plz-event-source-0.1pre0.20240428.114418/plz-event-source-pkg.el

Thanks!

>> The only question I have, from a very superficial understanding, is why
>> you don't want to upstream these into the library called "plz" itself?
>> Is that unfeasible or did Adam reject the changes?
>
> We were initially considering this, but both packages contain now more
> code than Adam would like to add to plz. At least for now, but I guess
> we keep it that way. The average plz user might not be interested in all
> of the code.
>
> We upstreamed a small change that allows setting a process filter to
> plz, which we needed to make it possible to handle the response in a
> streaming way.

OK, my only concern was that this wasn't even discussed at all.

>> Quickly scanning the code made it seem OK, all I would suggest not using
>> the README for both the repository README file and the manual.  Also, if
>> possible I'd avoid tracking the generated .info file in the repository
>> itself.
>
> I removed the generated .info files now from both repositories and
> generate them now through the ELPA build process.

1+

> I haven't split the README and the manual just yet. It's done in the
> same way as in the plz repository. I would actually prefer to have this
> also shown on the README.
>
> Why do you suggest splitting them? What are the benefits of it?

The different files have different audiences.  I'd say:

- The README is an introduction to anyone who just checked out a
  repository (or found it on some Website), and wants to know what it is
  about.  It should just be a starting point, linking to other resources
  (INSTALL, COPYING, ChangeLog, proper documentation, ...) where
  possible.

- The documentation is for people who have installed a package and want
  to know the exact details of how something works or is done.  It is
  not something that would usually interest someone who hasn't
  downloaded and installed a package.

- The package description (C-h P foo RET) is a brief explanation of what
  a package does and provides.  It should focus on the questions the
  user might have when they first encounter the package:

  * If the name is not indicative, what is the package even about.
  
  * What is the core functionality and how is it used.

  * Who is the target audience.

  * What are the entry points to the package.

  * What differentiates the package from other similar packages.

  or other questions like these.  It should NOT include:

  * A table of contents

  * Installation instructions of any kind (there is a install button in
    the package description buffer)

  * Extensive details on how to configure the package

  * Screenshots, as these are currently not displayed

  * Changelog information

  and instead try and to keep it short and simple.  It is just a sales
  pitch, not a lecture.

Sadly a number of packages just use the same README.org file for all
these things, confusing the separate audiences.  If anything, it is
acceptable to mix the first two, but the third should certainly not
result in a 500+ line buffer (as is currently the case with "plz").  The
easiest way to address the last point is just to use the commentary
section in the main file to generate the description of the package,
which we can configure in elpa.git.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 69%]

* Re: [ELPA] New package: colorful-mode
  @ 2024-04-29  5:47 99%             ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-04-29  5:47 UTC (permalink / raw)
  To: Elijah G; +Cc: emacs-devel

Elijah G <eg642616@gmail.com> writes:

> El sáb., 27 de abril de 2024 3:12 p. m., Philip Kaludercic <
> philipk@posteo.net> escribió:
>
>> Elijah G <eg642616@gmail.com> writes:
>>
>> > Thank you, I've now updated the package to include the advices.
>> > Now I think it's ready to submit it to ELPA.
>>
>> Looks like it, I've added it to elpa.git and it should appear within the
>> next few hours.  Thank you for your contribution!
>>
>> --
>>         Philip Kaludercic on icterid
>>
>
> Thank you, I have a question, how can I commit the changes I do from my
> package to ELPA?

The elpa.git repository regularly synchronises commits from your
upstream repository.  So you don't have to do anything manually.  If you
want the ELPA build server to release a new version of your  package,
all you have to do is bump the ;; Version: ... line in the main file and
that will trigger a release based on exactly that commit.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: [NonGNU ELPA] Add package gptel
  @ 2024-04-28  8:21 29% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-28  8:21 UTC (permalink / raw)
  To: Karthik Chikmagalur; +Cc: emacs-devel

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

Karthik Chikmagalur <karthikchikmagalur@gmail.com> writes:

> I'd like to submit my package gptel to NonGNU ELPA:
>
> https://github.com/karthink/gptel
>
> gptel is an LLM (Large Language Model) client for Emacs that supports
> most LLM providers that offer an HTTP API.  This includes open source
> models running locally on the user's PC or network via Ollama,
> Llama.cpp, Llamafiles and GPT4All, and access to larger models provided
> by a growing number of companies.  This includes ChatGPT, Anthropic
> Claude, Gemini, Kagi, Groq, Perplexity, TogetherAI and several more.

Here are a few quick comments, but the code is fine overall:


[-- Attachment #2: Type: text/plain, Size: 11831 bytes --]

diff --git a/gptel.el b/gptel.el
index b3ff962..96f7626 100644
--- a/gptel.el
+++ b/gptel.el
@@ -156,7 +156,6 @@
   "Path to a proxy to use for gptel interactions.
 Passed to curl via --proxy arg, for example \"proxy.yourorg.com:80\"
 Leave it empty if you don't use a proxy."
-  :group 'gptel
   :type 'string)
 
 (defcustom gptel-api-key #'gptel-api-key-from-auth-source
@@ -166,7 +165,6 @@ OpenAI by default.
 
 Can also be a function of no arguments that returns an API
 key (more secure) for the active backend."
-  :group 'gptel
   :type '(choice
           (string :tag "API key")
           (function :tag "Function that returns the API key")))
@@ -182,13 +180,11 @@ When set to nil, Emacs waits for the full response and inserts it
 all at once.  This wait is asynchronous.
 
 \='tis a bit silly."
-  :group 'gptel
   :type 'boolean)
 (make-obsolete-variable 'gptel-playback 'gptel-stream "0.3.0")
 
 (defcustom gptel-use-curl (and (executable-find "curl") t)
   "Whether gptel should prefer Curl when available."
-  :group 'gptel
   :type 'boolean)
 
 (defcustom gptel-curl-file-size-threshold 130000
@@ -207,11 +203,10 @@ and the typical size of the data being sent in GPTel queries.
 A larger value may improve performance by avoiding the overhead of creating
 temporary files for small data payloads, while a smaller value may be needed
 if the command-line argument size is limited by the operating system."
-  :group 'gptel
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom gptel-response-filter-functions
-  '(gptel--convert-org)
+  (list #'gptel--convert-org)
   "Abnormal hook for transforming the response from an LLM.
 
 This is used to format the response in some way, such as filling
@@ -225,7 +220,6 @@ should return the transformed string.
 NOTE: This is only used for non-streaming responses.  To
 transform streaming responses, use `gptel-post-stream-hook' and
 `gptel-post-response-functions'."
-  :group 'gptel
   :type 'hook)
 
 (defcustom gptel-pre-response-hook nil
@@ -235,7 +229,6 @@ This hook is called in the buffer where the LLM response will be
 inserted.
 
 Note: this hook only runs if the request succeeds."
-  :group 'gptel
   :type 'hook)
 
 (define-obsolete-variable-alias
@@ -255,7 +248,6 @@ end positions.
 Note: this hook runs even if the request fails.  In this case the
 response beginning and end positions are both the cursor position
 at the time of the request."
-  :group 'gptel
   :type 'hook)
 
 ;; (defcustom gptel-pre-stream-insert-hook nil
@@ -271,18 +263,16 @@ at the time of the request."
 
 This hook is called in the buffer from which the prompt was sent
 to the LLM, and after a text insertion."
-  :group 'gptel
   :type 'hook)
 
 (defcustom gptel-default-mode (if (fboundp 'markdown-mode)
-                               'markdown-mode
-                             'text-mode)
+				  'markdown-mode
+				'text-mode)
   "The default major mode for dedicated chat buffers.
 
 If `markdown-mode' is available, it is used.  Otherwise gptel
 defaults to `text-mode'."
-  :group 'gptel
-  :type 'symbol)
+  :type 'function)
 
 ;; TODO: Handle `prog-mode' using the `comment-start' variable
 (defcustom gptel-prompt-prefix-alist
@@ -296,7 +286,6 @@ responses, and is removed from the query before it is sent.
 
 This is an alist mapping major modes to the prefix strings.  This
 is only inserted in dedicated gptel buffers."
-  :group 'gptel
   :type '(alist :key-type symbol :value-type string))
 
 (defcustom gptel-response-prefix-alist
@@ -310,7 +299,6 @@ responses.
 
 This is an alist mapping major modes to the reply prefix strings.  This
 is only inserted in dedicated gptel buffers before the AI's response."
-  :group 'gptel
   :type '(alist :key-type symbol :value-type string))
 
 (defcustom gptel-use-header-line t
@@ -318,8 +306,7 @@ is only inserted in dedicated gptel buffers before the AI's response."
 
 When set to nil, use the mode line for (minimal) status
 information and the echo area for messages."
-  :type 'boolean
-  :group 'gptel)
+  :type 'boolean)
 
 (defcustom gptel-display-buffer-action '(pop-to-buffer)
   "The action used to display gptel chat buffers.
@@ -333,17 +320,12 @@ where FUNCTION is a function or a list of functions.  Each such
 function should accept two arguments: a buffer to display and an
 alist of the same form as ALIST.  See info node `(elisp)Choosing
 Window' for details."
-  :group 'gptel
-  :type '(choice
-          (const :tag "Use display-buffer defaults" nil)
-          (const :tag "Display in selected window" (pop-to-buffer-same-window))
-          (cons :tag "Specify display-buffer action"
-           (choice function (repeat :tag "Functions" function))
-           alist)))
+  :type display-buffer--action-custom-type)
 
 (defcustom gptel-crowdsourced-prompts-file
-  (let ((cache-dir (or (getenv "XDG_CACHE_HOME")
-                       (getenv "XDG_DATA_HOME")
+  (let ((cache-dir (or (eval-when-compile
+			 (require 'xdg)
+			 (xdg-cache-home))
                        user-emacs-directory)))
     (expand-file-name "gptel-crowdsourced-prompts.csv" cache-dir))
   "File used to store crowdsourced system prompts.
@@ -351,7 +333,6 @@ Window' for details."
 These are prompts cached from an online source (see
 `gptel--crowdsourced-prompts-url'), and can be set from the
 transient menu interface provided by `gptel-menu'."
-  :group 'gptel
   :type 'file)
 
 ;; Model and interaction parameters
@@ -368,8 +349,7 @@ request to the LLM.
 Each entry in this alist maps a symbol naming the directive to
 the string that is sent.  To set the directive for a chat session
 interactively call `gptel-send' with a prefix argument."
-  :group 'gptel
-  :safe #'always
+  :safe #'always			;is this really always safe?
   :type '(alist :key-type symbol :value-type string))
 
 (defvar gptel--system-message (alist-get 'default gptel-directives)
@@ -386,8 +366,7 @@ responses.
 To set the target token count for a chat session interactively
 call `gptel-send' with a prefix argument."
   :safe #'always
-  :group 'gptel
-  :type '(choice (integer :tag "Specify Token count")
+  :type '(choice (natnum :tag "Specify Token count")
                  (const :tag "Default" nil)))
 
 (defcustom gptel-model "gpt-3.5-turbo"
@@ -408,7 +387,6 @@ The current options for ChatGPT are
 To set the model for a chat session interactively call
 `gptel-send' with a prefix argument."
   :safe #'always
-  :group 'gptel
   :type '(choice
           (string :tag "Specify model name")
           (const :tag "GPT 3.5 turbo" "gpt-3.5-turbo")
@@ -428,7 +406,6 @@ of the response, with 2.0 being the most random.
 To set the temperature for a chat session interactively call
 `gptel-send' with a prefix argument."
   :safe #'always
-  :group 'gptel
   :type 'number)
 
 (defvar gptel--known-backends nil
@@ -467,7 +444,6 @@ one of the available backend creation functions:
 See their documentation for more information and the package
 README for examples."
   :safe #'always
-  :group 'gptel
   :type `(choice
           (const :tag "ChatGPT" ,gptel--openai)
           (restricted-sexp :match-alternatives (gptel-backend-p 'nil)
@@ -496,7 +472,6 @@ debug: Log request/response bodies, headers and all other
 
 When non-nil, information is logged to `gptel--log-buffer-name',
 which see."
-  :group 'gptel
   :type '(choice
           (const :tag "No logging" nil)
           (const :tag "Limited" info)
@@ -523,12 +498,14 @@ and \"apikey\" as USER."
       (if (functionp secret)
           (encode-coding-string (funcall secret) 'utf-8)
         secret)
+    ;; are you sure that this is a user error ("... comes from an
+    ;; incorrect manipulation by the user")?
     (user-error "No `gptel-api-key' found in the auth source")))
 
 ;; FIXME Should we utf-8 encode the api-key here?
 (defun gptel--get-api-key (&optional key)
   "Get api key from KEY, or from `gptel-api-key'."
-  (when-let* ((key-sym (or key (gptel-backend-key gptel-backend))))
+  (when-let ((key-sym (or key (gptel-backend-key gptel-backend))))
     (cl-typecase key-sym
       (function (funcall key-sym))
       (string key-sym)
@@ -540,15 +517,18 @@ and \"apikey\" as USER."
 
 (defsubst gptel--numberize (val)
   "Ensure VAL is a number."
-  (if (stringp val) (string-to-number val) val))
+  (cond
+   ((numberp val) val)
+   ((stringp val) (string-to-number val))
+   ((error "%S cannot be converted to a number" val))))
 
 (defun gptel-auto-scroll ()
   "Scroll window if LLM response continues below viewport.
 
 Note: This will move the cursor."
-  (when-let* ((win (get-buffer-window (current-buffer) 'visible))
-              ((not (pos-visible-in-window-p (point) win)))
-              (scroll-error-top-bottom t))
+  (when-let ((win (get-buffer-window (current-buffer) 'visible))
+             ((not (pos-visible-in-window-p (point) win)))
+             (scroll-error-top-bottom t))
     (condition-case nil
         (with-selected-window win
           (scroll-up-command))
@@ -586,7 +566,7 @@ Note: This will move the cursor."
   "Execute BODY at end of the current word or punctuation."
   `(save-excursion
      (skip-syntax-forward "w.")
-     ,@body))
+     ,(macroexp-progn body)))		;just as a suggestion
 
 (defun gptel-prompt-prefix-string ()
   (or (alist-get major-mode gptel-prompt-prefix-alist) ""))
@@ -1106,6 +1086,7 @@ the response is inserted into the current buffer after point."
          (encode-coding-string
           (gptel--json-encode (plist-get info :data))
           'utf-8)))
+    ;; why do these checks not occur inside of `gptel--log'?
     (when gptel-log-level               ;logging
       (when (eq gptel-log-level 'debug)
         (gptel--log (gptel--json-encode
@@ -1169,11 +1150,13 @@ See `gptel-curl--get-response' for its contents.")
                    (error-type (plist-get error-data :type))
                    (backend-name (gptel-backend-name backend)))
               (if (stringp error-data)
-                  (progn (message "%s error: (%s) %s" backend-name http-msg error-data)
-                         (setq error-msg (string-trim error-data)))
+                  (progn
+		    (message "%s error: (%s) %s" backend-name http-msg error-data)
+                    (setq error-msg (string-trim error-data)))
                 (when (stringp error-msg)
                   (message "%s error: (%s) %s" backend-name http-msg (string-trim error-msg)))
-                (when error-type (setq http-msg (concat "("  http-msg ") " (string-trim error-type)))))
+                (when error-type
+		  (setq http-msg (concat "("  http-msg ") " (string-trim error-type)))))
               (list nil (concat "(" http-msg ") " (or error-msg "")))))
            ((eq response 'json-read-error)
             (list nil (concat "(" http-msg ") Malformed JSON in response.") "json-read-error"))
@@ -1188,7 +1171,7 @@ See `gptel-curl--get-response' for its contents.")
   "Check if MODEL is available in BACKEND, adjust accordingly.
 
 If SHOOSH is true, don't issue a warning."
-  (let* ((available (gptel-backend-models backend)))
+  (let ((available (gptel-backend-models backend)))
     (unless (member model available)
       (let ((fallback (car available)))
         (unless shoosh
@@ -1329,7 +1312,7 @@ context for the ediff session."
   "Mark gptel response at point, if any."
   (interactive)
   (unless (gptel--in-response-p) (user-error "No gptel response at point"))
-  (pcase-let* ((`(,beg . ,end) (gptel--get-bounds)))
+  (pcase-let ((`(,beg . ,end) (gptel--get-bounds)))
     (goto-char beg) (push-mark) (goto-char end) (activate-mark)))
 
 (defun gptel--previous-variant (&optional arg)
@@ -1365,3 +1348,7 @@ context for the ediff session."
 
 (provide 'gptel)
 ;;; gptel.el ends here
+
+;; Local Variables:
+;; bug-reference-url-format: "https://github.com/karthink/gptel/issues/%s"
+;; End:

[-- Attachment #3: Type: text/plain, Size: 1034 bytes --]


I'd be interested if you could explain what the difference is to the
already existing ellama package?  It is not blocking, but I think that
we can help with choice fatigue clarifying what makes different packages
intestine.

> gptel tries to provide a uniform Emacs-y UI for all backends, and works
> as both a chat interface (in dedicated chat buffers) and as a
> helper/lookup agent in all Emacs buffers.  There is a demo showcasing
> its many uses here:
>
> https://www.youtube.com/watch?v=bsRnh_brggM

Is this video mirrored elsewhere?

> It has no external dependencies (Emacs packages or otherwise), but uses
> Curl if it's available.
>
> Karthik
>
>

Karthik Chikmagalur <karthikchikmagalur@gmail.com> writes:

>> It has no external dependencies (Emacs packages or otherwise), but uses
>> Curl if it's available.
>
> Just realized this isn't true -- gptel depends on the compat package to
> support Emacs 27 and 28.

On that topic, why do you require Compat using

  (require 'compat nil t)

-- 
	Philip Kaludercic on icterid

^ permalink raw reply related	[relevance 29%]

* Re: [ELPA] New package: colorful-mode
  @ 2024-04-27 21:12 99%         ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-27 21:12 UTC (permalink / raw)
  To: Elijah G; +Cc: emacs-devel

Elijah G <eg642616@gmail.com> writes:

> Thank you, I've now updated the package to include the advices.
> Now I think it's ready to submit it to ELPA.

Looks like it, I've added it to elpa.git and it should appear within the
next few hours.  Thank you for your contribution!

-- 
	Philip Kaludercic on icterid



^ permalink raw reply	[relevance 99%]

* Re: seq; Error during initial package install
       [not found]           ` <MW4PR06MB8948E521FC9D0C00DDE24A16E9152@MW4PR06MB8948.namprd06.prod.outlook.com>
@ 2024-04-27 18:24 99%         ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-04-27 18:24 UTC (permalink / raw)
  To: Parker, Ron; +Cc: Stefan Monnier, Eli Zaretskii, emacs-devel@gnu.org

"Parker, Ron" <Ron.Parker@netapp.com> writes:

>>> The issue is that package.el is re-loading the built-in seq, but all the
>>> seq.el on ELPA does is try to load the right version of seq (for Emacs
>>> 24 or 25, as seen above).
>
>> I suspect the OP does not intend for `seq` to be fetched and reloaded
>> from ELPA, so the better fix might be to make sure `package.el` sticks
>> to the built-in `seq`.
>
> For my personal use, the built-in 2.23 version of seq is sufficient.
> However, the full case where I ran into this was installing ement.
> Its dependency chain is what is triggering the issue by pulling in
> seq 2.24 from ELPA.
>
> | ELPA Package    | Dependency      | ELPA Version |
> |-----------------+-----------------+--------------|
> | ement 0.15      | transient 0.3.7 |        0.6.0 |
> | transient 0.6.0 | seq 2.24        |         2.24 |

Can you try to apply the above patches and see if they help?


-- 
	Philip Kaludercic on barbet



^ permalink raw reply	[relevance 99%]

* Re: Add plz-media-type and plz-event-source to GNU ELPA when stabilized
  @ 2024-04-27 13:43 89% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-27 13:43 UTC (permalink / raw)
  To: Roman Scherer; +Cc: emacs-devel, ahyatt

Roman Scherer <roman.scherer@burningswell.com> writes:

> Hello Emacs Developers,
>
> I am writing you to ask if we could include the ~plz-media-type~ [1]
> and the ~plz-event-source~ [2] libraries to GNU ELPA, once Andrew
> Hyatt and I declare them as releasable.

We can add the libraries to ELPA right now, if you mark the package
version as something that shouldn't be released.  This appears to be the
case right now, as the versions end in -pre.  As soon as you change
this, the packages would be released on ELPA.

The only question I have, from a very superficial understanding, is why
you don't want to upstream these into the library called "plz" itself?
Is that unfeasible or did Adam reject the changes?

Quickly scanning the code made it seem OK, all I would suggest not using
the README for both the repository README file and the manual.  Also, if
possible I'd avoid tracking the generated .info file in the repository
itself.

> At the moment those 2 libraries are "vendored" (we copied 2 files) in
> the llm [3] library. Andrew and I would like to ship them via the llm
> library to users for now, and once we are confident there are no
> serious issues we would like to release them to GNU ELPA. We plan to
> do so in Q4 of 2024.
>
> These libraries are designed to handle HTTP responses based on the
> content type header and process the response in a way specific to the
> media type. One example of this is to process a HTTP response in the
> text/event-stream format (aka server sent events) and handle the
> events as they arrive.
>
> Both libraries use Adam Porter's plz library and I wrote them to
> support Andrew Hyatt in his work on the llm library. We are planning
> to add support to the llm library to make HTTP requests with
> curl. This should solve reliability issues that Andrew saw, and allows
> me to use the llm library with LLMs that sit behind the proxy of my
> employer, who supported my work on this.
>
> They also simplified the code in the llm library that handles the
> various response formats that are in use by all those LLMs deployed
> out there. The libraries are designed to be extendable and could be
> used by Emacs packages that, as of today, implement their own way to
> handle for example, server sent events in a streaming way.
>
> *plz-media-type:*
>
> This library builds upon the ~plz.el~ HTTP library and provides a
> mechanism to process responses based on their content type headers. It
> defines classes for parsing and processing the HTTP body of some
> standard MIME types like JSON, XML, HTML. It also contains classes
> that can handle formats like newline delimited JSON, or JSON arrays in
> a streaming way. Those last formats are often used by LLMs. The
> library is designed to be extendable (you can replace and bring your
> own media type class) and frees users from writing their own process
> filter functions.
>
> *plz-event-source:*
>
> This library provides a media type class, parser, and event source
> implementation for the Server-Sent Events (SSE) protocol. The media
> type class can be used with the ~plz-media-type~ library. We use it in
> the llm library to process HTTP responses for LLMs that return a MIME
> type of text/event-stream.
>
> I won't spend any significant time on re-designing the API (we went
> through many iterations) or making it compatible with url-retrieve
> right now, in case someone is suggesting this. This project was partly
> sponsored by my employer while I was on a 3 month working group and we
> want to use the llm library with curl. My time on this is reaching an
> end I would like to bring it over the finish line. I am committed to
> support Andrew should any bugs or significant issues come up.
>
> Andrew Hyatt asked me to write to you to get the green light for
> publishing those libraries to GNU ELPA, once we think they are
> stable. We plan to do this in about half a year.
>
> If you agree on eventually releasing those libraries to GNU ELPA, we
> plan to merge the "plz" branch of the llm library into master soon and
> release it to a wider audience. One package that would immediately
> benefit is Ellama [4] which I thoroughly tested while working on this.
>
> My employer and I already did the copyright assignment paperwork,
> which has been completed a month ago.
>
> Wdyt?
>
> Thanks, Roman.
>
> [1] https://github.com/r0man/plz-media-type
> [2] https://github.com/r0man/plz-event-source
> [3] https://github.com/ahyatt/llm/tree/plz
> [4] https://github.com/s-kostyaev/ellama
>

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 89%]

* Re: Objed maintenance
  @ 2024-04-27 11:54 95%         ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-27 11:54 UTC (permalink / raw)
  To: Amy Grinn; +Cc: clemera, emacs-devel

Amy Grinn <grinn.amy@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Amy Grinn <grinn.amy@gmail.com> writes:
>>
>>> Philip Kaludercic <philipk@posteo.net> writes:
>>>
>>>> We should make sure that after switching the repository, new
>>>> versions
>>>> of
>>>> the package shouldn't contain hard-breaks.  I only used the package
>>>> briefly a few years back, so it is difficult for me to evaluate
>>>> this
>>>> on
>>>> my own.  Perhaps someone here on the list has the package installed
>>>> and
>>>> could try out Amy's fork?
>>>
>>> Any feedback would be appreciated!
>>>
>>> There were a number of changes in version 0.8.3:
>>>
>>> *** Add binding for symbol object "y"
>>> *** Change binding for forward-until from "`" to "'"
>>> *** Change binding for expand-block from "v" to "h"
>>> *** Swap bindings for forward-defun ("E") and beginning-of-defun
>>> ("A")
>>> *** Swap binding for del-insert from "i" to "c"
>>> *** "i" exits objed
>>> *** Swap binding for objed-last from "u" to "l"
>>> *** Add objed-undo command "u"
>>> *** C-g toggles objed activation
>>> *** Swap binding for objed-object-map from "c" to "o"
>>> *** Swap binding for objed-expand-context from "o" to "O" (capital
>>> "o")
>>
>> I cannot comment on any of this, with the exception of the C-g change
>> that seems invasive.  Can you elaborate on that?
>
> The normal C-g behavior does not change but objed activation is also
> toggled.  It's something you kinda have to experience firsthand to
> realize how non-invasive it is.

I trust you if you say it is so.

>>> In retrospect this should've been v0.9.0 according to the semver
>>> scheme
>>> Clemens is using.  But we live and learn.
>>>
>>>
>>>
>>> Philip, I am using an unpublished dependency called key-game, which
>>> I
>>> wrote, which I thought might be useful for other modal editing
>>> packages,
>>> or for large packages like gnus.  Anyways I will try to submit that
>>> package for publishing on GNU ELPA before objed is updated.
>>
>> That sounds good, just inferring from the name it sounds like wizard
>> or
>> training program?  Is this going to be a hard dependency or a weak
>> one?
>
> Yes, it's a utility package to help create key-based or command-based
> tutorial games.  It's not a user-facing package, similar to boxy; I
> wouldn't want users to have to install it explicitly.  To answer a
> potential followup, I also wouldn't want to split up the objed tutorial
> game into a separate package.  That would hinder discoverability and
> make the installation of objed more complex.  All that to say I believe
> key-game will be a hard dependency.

That is a pity.  I try to advocate for minimising dependencies,
especially if these aren't required for the core functionality of a
package.  I don't know how your package is designed, but couldn't you
have a command like M-x objed-tutorial that reports an error if the
package is not installed (or proposes to install it)?  FWIW I don't
think having a separate package is a good idea either -- too much noise
in the package list.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 95%]

* Re: [PATCH] feat: add markdown-ts-mode
  @ 2024-04-27 10:18 84%           ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-04-27 10:18 UTC (permalink / raw)
  To: Rahul Martim Juliato
  Cc: Eli Zaretskii, Jostein Kjønigsen, Yuan Fu,
	Ergus via Emacs development discussions.

Rahul Martim Juliato <rahuljuliato@gmail.com> writes:

>> So if I understand correctly, there is no keymap or any convenience
>> features that markdown-mode provides, because this is just the
>> beginning, right?  A large part of major modes for me is not just the
>> syntax highlighting and integration into Emacs systems, but also
>> bindings that in the case of Markdown would insert links or add/remove
>> emphasis.  I think it would be nice, if we could add these features in
>> the future, and re-use bindings from a package like AucTeX to build on
>> existing intuition (org-mode would be an alternative, but I am not a fan
>> or their choice of bindings).  Some commands to "compile" and preview a
>> document would also be nice.
>
>
> Hello there again!
>
> Please find attached the current version of this patch.
>
> It now works with the "official" tree-sitter grammar for markdown:
> https://github.com/tree-sitter-grammars/tree-sitter-markdown
>
> Please note (as explained above) the `main branch' is not the default
> anymore, but `split_parser' is.
>
> They splitted the parser into two, one for the body of the document and
> another to inline.
>
> So, in order to test this patch, configure it with:
>
> (use-package markdown-ts-mode
>     :ensure nil
>     :defer t  
>     :mode ("\\.md\\'" . markdown-ts-mode)
>     :config
>     (add-to-list 'treesit-language-source-alist '(markdown
> "https://github.com/tree-sitter-grammars/tree-sitter-markdown"
> "split_parser" "tree-sitter-markdown/src"))
>     (add-to-list 'treesit-language-source-alist '(markdown-inline
> "https://github.com/tree-sitter-grammars/tree-sitter-markdown"
> "split_parser" "tree-sitter-markdown-inline/src")))

I have said this before, and will say it again,
`treesit-language-source-alist' shouldn't clone moving git repositories
but download tarballs (which basically every git host provides as a
feature, since git archive is built-in) and use those to build the
library.  These tarballs should be pinned in the -ts-mode.el files
themselves to make using these major modes more reliable.

> If you visit a markdown file treesit issues an error, as always, asking
> for the grammars.
>
> Then, install BOTH grammars:
>
> M-x treesit-install-language-grammar RET markdown RET
> M-x treesit-install-language-grammar RET markdown-inline RET
>
> Reload the `markdown-ts-mode'.
>
> And everything should be working fine :)
>
>
> @Philip, thanks for bringing that up! I completely agree with you;
> aiming for a fully-featured mode is our long-term objective.
>
> The idea here is to establish a foundation for supporting markdown files
> within Emacs, without relying on external packages.

That sounds good.

> From there, we can delve into discussions about editing and exporting
> features. For instance, we could consider mimicking bindings and prompts
> from org-mode, as well as exploring integrations if users opt to also
> utilize third-party markdown-mode.

I would be interested in helping out or at the very least to comment on
the development going on, since I had started writing the same mode
myself a while back, but never got around to it since because I don't
understand how `treesit-font-lock-rules' works.

> However, simply having the mode built-in reduces friction significantly
> for new ideas and collaborations :)

And makes it easier for external packages to rely on the code.  Usually
I'd also say that it makes Emacs more usable in offline environments,
but the fact that the tree-sitter grammars have to for now be downloaded
stands in the way of that :/

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 84%]

* Re: [ELPA] New package: colorful-mode
  @ 2024-04-27 10:12 98%     ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-27 10:12 UTC (permalink / raw)
  To: Elijah G; +Cc: emacs-devel

Elijah G <eg642616@gmail.com> writes:

> Hi Philip, thank you for your suggestions, I've now added
> some of them to my package, here are my answers to your questions.
>
> On Mon, Apr 22, 2024 at 1:51 AM Philip Kaludercic <philipk@posteo.net> wrote:
>>
>>  (defun colorful--latex-gray-to-hex (gray)
>>    "Return LaTex GRAY as hexadecimal format.  GRAY must be a string."
>> @@ -350,6 +342,8 @@ HSL must be a string."
>>                        (string-remove-prefix "hsl(" hsl)
>>                      (string-remove-prefix "hsla(" hsl))
>>                    (rx (one-or-more (any "," " " "\t" "\n""\r" "\v" "\f")))))
>> +           ;; what error is being ignored here?  if (nth n hsl) is
>> +           ;; nil, we can check this manually
>
> I had to add ignore-errors because it nth was throwing an error when
> nth is nil, it was bugging the other overlays in the next lines, using
> ignore-errors allows returning nil in case it can't be done and break the
> if-let conditional without affecting the other overlays.

What I am trying to say, is that ignore-errors is a rather coarse tool.
It will swallow and forget all errors that might arise, which can make
debugging difficult if something else goes wrong.  My advice is to use
something like

  (and (nth 0 hsl) (/ (string-to-number (nth 0 hsl)) 360.0))

unless I am misunderstanding your response somehow.

>>              (h (ignore-errors (/ (string-to-number (nth 0 hsl)) 360.0)))
>>              (s (ignore-errors (/ (string-to-number (nth 1 hsl)) 100.0)))
>>              (l (ignore-errors (/ (string-to-number (nth 2 hsl)) 100.0)))
>
>>  (defvar colorful-hex-font-lock-keywords
>>    `((,(rx (seq (not (any "&"))
>> @@ -639,6 +631,7 @@ converted to a Hex color."
>>    "Function for add hex colors to `colorful-color-keywords'.
>>  This is intended to be used with `colorful-extra-color-keyword-functions'."
>>    (dolist (colors colorful-hex-font-lock-keywords)
>> +    ;; why are you using `add-to-list' here?
>>      (add-to-list 'colorful-color-keywords colors t)))
>
> It was the way I found for adding the other color keywords,
> i found that using add-to-list with a buffer-local variable doesn't
> override the other buffer ones, If you know another way in how
> I would gladly implement it in my package.

I would have just used `push', as the `add-to-list' docstring advises.

> Thanks.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 98%]

* Re: Objed maintenance
  @ 2024-04-27 10:06 99%     ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-27 10:06 UTC (permalink / raw)
  To: Amy Grinn; +Cc: clemera, emacs-devel

Amy Grinn <grinn.amy@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Amy Grinn <grinn.amy@gmail.com> writes:
>
>> I would say that after almost 3 years, enough time has passed that the
>> maintenance can be passed on, ans since you have some experience with
>> the package, there is probably no better person for the job right now.
>>
>
> Great, thank you!
>
>> We should make sure that after switching the repository, new versions
>> of
>> the package shouldn't contain hard-breaks.  I only used the package
>> briefly a few years back, so it is difficult for me to evaluate this
>> on
>> my own.  Perhaps someone here on the list has the package installed
>> and
>> could try out Amy's fork?
>
> Any feedback would be appreciated!
>
> There were a number of changes in version 0.8.3:
>
> *** Add binding for symbol object "y"
> *** Change binding for forward-until from "`" to "'"
> *** Change binding for expand-block from "v" to "h"
> *** Swap bindings for forward-defun ("E") and beginning-of-defun ("A")
> *** Swap binding for del-insert from "i" to "c"
> *** "i" exits objed
> *** Swap binding for objed-last from "u" to "l"
> *** Add objed-undo command "u"
> *** C-g toggles objed activation
> *** Swap binding for objed-object-map from "c" to "o"
> *** Swap binding for objed-expand-context from "o" to "O" (capital "o")

I cannot comment on any of this, with the exception of the C-g change
that seems invasive.  Can you elaborate on that?

> In retrospect this should've been v0.9.0 according to the semver scheme
> Clemens is using.  But we live and learn.
>
>
>
> Philip, I am using an unpublished dependency called key-game, which I
> wrote, which I thought might be useful for other modal editing packages,
> or for large packages like gnus.  Anyways I will try to submit that
> package for publishing on GNU ELPA before objed is updated.

That sounds good, just inferring from the name it sounds like wizard or
training program?  Is this going to be a hard dependency or a weak one?

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: seq; Error during initial package install
  @ 2024-04-27  9:17 70%   ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-27  9:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Parker, Ron, Stefan Monnier, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: "Parker, Ron" <Ron.Parker@netapp.com>
>> Date: Thu, 18 Apr 2024 18:29:19 +0000
>> 
>> When I start Emacs on a fresh install of my configuration, I have to
>> restart a couple times before all of the packages successfully install.
>> Upon trying to debug it, I ran into an error with seq being unable to
>> load seq-25.el and reduced it to a minimal test case.
>>  
>> Put the following in an empty directory as init.el:
>>  
>>   (setq debug-on-error t
>>         package-install-upgrade-built-in t)
>>   (package-install 'seq)
>>  
>> then in the directory run:
>>  
>>   emacs -Q --init-directory $(pwd) -l init.el
>>  
>> When I do this, I get the following error:
>>  
>>   Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "seq-25")
>>     require(seq-25)
>>     (if (version< emacs-version "25") (require 'seq-24) (require 'seq-25))

The issue is that package.el is re-loading the built-in seq, but all the
seq.el on ELPA does is try to load the right version of seq (for Emacs
24 or 25, as seen above).  At this point the load-path has not been
modified yet, which is why `require' fails.  I see two solutions:

1. Temporarily prepends the directory to load-path:

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index ab1731aeb54..9eea1c45db5 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -871,8 +871,9 @@ package--reload-previously-loaded
           (unless (equal (file-name-base library)
                          (format "%s-autoloads" (package-desc-name pkg-desc)))
             (push (cons (expand-file-name library dir) recent-index) result))))
-      (mapc (lambda (c) (load (car c) nil t))
-            (sort result (lambda (x y) (< (cdr x) (cdr y))))))))
+      (let ((load-path (cons dir load-path)))
+        (mapc (lambda (c) (load (car c) nil t))
+              (sort result (lambda (x y) (< (cdr x) (cdr y)))))))))
 
 (defun package-activate-1 (pkg-desc &optional reload deps)
   "Activate package given by PKG-DESC, even if it was already active.

2. Loads the autoload file before reloading the package, thus updating
load-path, since this is done in the autoloads file:

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index ab1731aeb54..bed0122e8ca 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -898,10 +898,10 @@ package-activate-1
       (if (listp package--quickstart-pkgs)
           ;; We're only collecting the set of packages to activate!
           (push pkg-desc package--quickstart-pkgs)
-        (when reload
-          (package--reload-previously-loaded pkg-desc))
         (with-demoted-errors "Error loading autoloads: %s"
-          (load (package--autoloads-file-name pkg-desc) nil t)))
+          (load (package--autoloads-file-name pkg-desc) nil t))
+        (when reload
+          (package--reload-previously-loaded pkg-desc)))
       ;; Add info node.
       (when (file-exists-p (expand-file-name "dir" pkg-dir))
         ;; FIXME: not the friendliest, but simple.

I cannot test this right now, since there appears to be an unrelated
issue with elpa.gnu.org's signing keys?

>>     load-with-code-conversion("/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq..."
>> "/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq..." nil t)
>>     #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_32>
>> (("/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq" . 76))
>>     mapc(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_32>
>> (("/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq" . 76)))
>>     package--reload-previously-loaded(#s(package-desc :name seq :version (2 24) :summary "Sequence
>> manipulation functions" :reqs nil :kind nil :archive nil :dir
>> "/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24" :extras ((:keywords "sequences") (:maintainer nil .
>> emacs-devel@gnu.org) (:authors ("Nicolas Petton" . nicolas@petton.fr)) (:url .
>> https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :
>> signed nil))
>> 
>>     package-activate-1(#s(package-desc :name seq :version (2 24) :summary "Sequence manipulation
>> functions" :reqs nil :kind nil :archive nil :dir "/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24" :extras
>> ((:keywords "sequences") (:maintainer nil . emacs-devel@gnu.org) (:authors ("Nicolas Petton" .
>> nicolas@petton.fr)) (:url . https://elpa.gnu.org/packages/seq.html) (:commit .
>> "27a90793a13f149121180e864fa53d68b9eac0b3")) :signed nil) :reload :deps)
>> 
>>     package-unpack(#s(package-desc :name seq :version (2 24) :summary "Sequence manipulation functions"
>> :reqs nil :kind tar :archive "gnu" :dir nil :extras ((:keywords "sequences") (:maintainer nil .
>> emacs-devel@gnu.org) (:authors ("Nicolas Petton" . nicolas@petton.fr)) (:url .
>> https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :
>> signed nil))
>> 
>>     #f(compiled-function () #<bytecode 0x1511bb8ba7930de3>)()
>> 
>>     package--with-response-buffer-1(https://elpa.gnu.org/packages/ #f(compiled-function () #<bytecode
>> 0x1511bb8ba7930de3>) :file "seq-2.24.tar" :async nil :error-function #<subr
>> F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_79> :noerror nil)
>> 
>>     package-install-from-archive(#s(package-desc :name seq :version (2 24) :summary "Sequence
>> manipulation functions" :reqs nil :kind tar :archive "gnu" :dir nil :extras ((:keywords "sequences") (:maintainer
>> nil . emacs-devel@gnu.org) (:authors ("Nicolas Petton" . nicolas@petton.fr)) (:url .
>> https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :
>> signed nil))
>> 
>>     package-download-transaction((#s(package-desc :name seq :version (2 24) :summary "Sequence
>> manipulation functions" :reqs nil :kind tar :archive "gnu" :dir nil :extras ((:keywords "sequences") (:maintainer
>> nil . emacs-devel@gnu.org) (:authors ("Nicolas Petton" . nicolas@petton.fr)) (:url .
>> https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :
>> signed nil)))
>>     package-install(seq)
>>     load-with-code-conversion("/Users/<username>/.emacs-test-elpa-seq/init.el"
>> "/Users/<username>/.emacs-test-elpa-seq/init.el" nil t)
>>     command-line-1(("-l" "init.el" "init.el"))
>>     command-line()
>>     normal-top-level()
>>  
>> Emacs  : GNU Emacs 29.1 (build 1, aarch64-apple-darwin23.2.0, NS appkit-2487.30 Version 14.2.1 (Build
>> 23C71))
>> 
>> Package: seq
>
> Stefan and Philip, any comments or suggestions?

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply related	[relevance 70%]

* Re: [ELPA] New package: colorful-mode
  @ 2024-04-22  7:51 51% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-22  7:51 UTC (permalink / raw)
  To: Elijah G; +Cc: emacs-devel

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

Elijah G <eg642616@gmail.com> writes:

> Hello, I want to submit the package colorful-mode to GNU ELPA.
>
> Colorful is a minor mode that allows preview of any color format such
> as color hex and color names in the current buffer in real time with a
> user-friendly approach.
>
> Colorful was based in rainbow-mode source, but colorful diverged in
> other way being more friendly, customizable and allow converting color
> to others with mouse clicks or keybindings such as css rgb/hsl to hex,
> or hex to color name and allow using prefix/suffix as indicator or
> highlight it using overlays, also it has support for mouse clicks for
> changing colors or using keybindings.
>
> The source can be found at: https://github.com/DevelopmentCool2449/colorful-mode

Sounds nice.  Here are a few comments and suggestions:


[-- Attachment #2: Type: text/plain, Size: 6755 bytes --]

diff --git a/colorful-mode.el b/colorful-mode.el
index d28db8d..82ddf5e 100644
--- a/colorful-mode.el
+++ b/colorful-mode.el
@@ -30,20 +30,18 @@
 ;;  friendly and effective way based on rainbow-mode.
 
 ;;; Code:
+
 \f
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;                                  Libraries                                 ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; Libraries
 
 (require 'compat)
 
 (require 'color)
 (eval-when-compile (require 'subr-x))
+(eval-when-compile (require 'rx))
 
 \f
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;                          Customizable User Options                         ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; User Options
 
 (defgroup colorful nil
   "Preview hex colors values in current buffer.."
@@ -279,9 +277,7 @@ mode is derived from `prog-mode'."
   :type '(choice boolean (const :tag "Only in prog-modes" only-prog)))
 
 \f
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;                                   Keymaps                                  ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; Keymaps
 
 (defvar-keymap colorful-mode-map
   :doc "Keymap when `colorful-mode' is active."
@@ -290,19 +286,14 @@ mode is derived from `prog-mode'."
   "C-c c r" #'colorful-convert-and-change-color)
 
 \f
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;                             Internal variables                             ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; Internal variables
 
 (defvar-local colorful-color-keywords nil
   "Font-lock colors keyword to highlight.")
 
 \f
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;                             Internal Functions                             ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;;;;;;;; Base Convertion functions ;;;;;;;;;;
+;;;; Internal Functions
+;;;;; Base Convertion functions
 
 (defun colorful--percentage-to-absolute (percentage)
   "Convert PERCENTAGE to a absolute number.
@@ -315,12 +306,13 @@ If PERCENTAGE is above 100%, it's converted to 100."
       (string-to-number percentage))))
 
 (defun colorful--latex-rgb-to-hex (rgb)
-  "Return LaTex RGB as hexadecimal format.  RGB must be a string."
-  (let* ((rgb (string-split (string-remove-prefix "{rgb}{" rgb) ","))
-         (r (string-to-number (nth 0 rgb)))
-         (g (string-to-number (nth 1 rgb)))
-         (b (string-to-number (nth 2 rgb))))
-    (color-rgb-to-hex r g b)))
+  "Return LaTeX RGB as hexadecimal format.  RGB must be a string."
+  ;; just as an alternative idea:
+  (and (string-match "{rgb}{\\([[:digit:]]+\\),\\([[:digit:]]+\\),\\([[:digit:]]+\\)}" rgb)
+       (color-rgb-to-hex
+	(string-to-number (match-string 1 rgb))
+	(string-to-number (match-string 2 rgb))
+	(string-to-number (match-string 3 rgb)))))
 
 (defun colorful--latex-gray-to-hex (gray)
   "Return LaTex GRAY as hexadecimal format.  GRAY must be a string."
@@ -350,6 +342,8 @@ HSL must be a string."
                       (string-remove-prefix "hsl(" hsl)
                     (string-remove-prefix "hsla(" hsl))
                   (rx (one-or-more (any "," " " "\t" "\n""\r" "\v" "\f")))))
+	    ;; what error is being ignored here?  if (nth n hsl) is
+	    ;; nil, we can check this manually
             (h (ignore-errors (/ (string-to-number (nth 0 hsl)) 360.0)))
             (s (ignore-errors (/ (string-to-number (nth 1 hsl)) 100.0)))
             (l (ignore-errors (/ (string-to-number (nth 2 hsl)) 100.0)))
@@ -367,11 +361,11 @@ HSL must be a string."
   "Return color NAME as hex color format.
 DIGIT specifies which how much digits per component must have return value."
   (if-let* ((color-name (color-name-to-rgb name))
-            (color (append color-name `(,digit))))
+            (color (append color-name (list digit))))
       (apply #'color-rgb-to-hex color)
     (cdr (assoc-string name colorful-html-colors-alist))))
 
-;;;;;;;;;; User Interactive Functions ;;;;;;;;;;
+;;;;; User Interactive Functions
 
 ;;;###autoload
 (defun colorful-convert-and-change-color ()
@@ -419,12 +413,12 @@ DIGIT specifies which how much digits per component must have return value."
                     ("Convert and copy color." . copy)))
          (result (alist-get
                   (completing-read prompt choices nil t nil nil)
-                  choices nil nil 'equal)))
+                  choices nil nil #'equal)))
     (if (eq result 'copy)
         (colorful-convert-and-copy-color)
       (colorful-convert-and-change-color))))
 
-;;;;;;;;;; Coloring functions ;;;;;;;;;;
+;;;;; Coloring functions
 
 (defun colorful--change-color (ov &optional prompt color beg end)
   "Return COLOR as other color format.
@@ -582,9 +576,7 @@ converted to a Hex color."
     (colorful--colorize-match string beg end)))
 
 \f
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;                         Extra coloring definitions                         ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; Extra coloring definitions
 
 (defvar colorful-hex-font-lock-keywords
   `((,(rx (seq (not (any "&"))
@@ -639,6 +631,7 @@ converted to a Hex color."
   "Function for add hex colors to `colorful-color-keywords'.
 This is intended to be used with `colorful-extra-color-keyword-functions'."
   (dolist (colors colorful-hex-font-lock-keywords)
+    ;; why are you using `add-to-list' here?
     (add-to-list 'colorful-color-keywords colors t)))
 
 (defvar colorful-color-name-font-lock-keywords
@@ -730,9 +723,7 @@ This is intended to be used with `colorful-extra-color-keyword-functions'."
     (add-to-list 'colorful-color-keywords colors t)))
 
 \f
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;                           Minor mode defintinions                          ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; Minor mode defintinions
 
 (defun colorful--turn-on ()
   "Helper function for turn on `colorful-mode'."
@@ -759,7 +750,7 @@ This is intended to be used with `colorful-extra-color-keyword-functions'."
 ;;;###autoload
 (define-minor-mode colorful-mode
   "Preview any color in your buffer such as hex, color names, CSS rgb in real time."
-  :lighter nil :keymap colorful-mode-map
+  :global nil
   (if colorful-mode
       (colorful--turn-on)
     (colorful--turn-off))

[-- Attachment #3: Type: text/plain, Size: 205 bytes --]


Regarding the headers, my changes would make it compatible with
outline-minor-mode for Elisp, but if you prefer your style, then you can
also adjust `outline-regexp'.

-- 
	Philip Kaludercic on peregrine

^ permalink raw reply related	[relevance 51%]

* Re: Objed maintenance
  @ 2024-04-22  7:22 89% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-22  7:22 UTC (permalink / raw)
  To: Amy Grinn; +Cc: clemera, emacs-devel

Amy Grinn <grinn.amy@gmail.com> writes:

> Hi Clemens!
>
> First of all, I want to extend my appreciation for your innovative work
> on the objed package.  It is by far and away my favorite modal editing
> package.
>
> I have been maintaining a fork of objed for about two years; it's
> available here:
>
> https://gitlab.com/grinn.amy/objed
>
> I believe my addition of the C-g command and the objed-game tutorial can
> be valuable to existing users.  The former allows for quickly entering
> and exiting objed and the latter allows users to learn the whole
> potential of the package.
>
> I've also made improvements to existing commands such as slurp and barf,
> organized the codebase, updated the documentation, and simplified the
> build and testing process using eldev.
>
> I would love to get your feedback on any of these improvements, however
> I'm aware that this package is not at the forefront of your mind right
> now.  In the absence of any activity over the past 4 years, I would
> humbly suggest turning the project over to me.

It is my impression, that Clemens isn't really active around Emacs any
more.  His last public contribution on GitHub was 2021 and his website
https://with-emacs.com/ now points to some gambling site (after a HTTPS
error).

I would say that after almost 3 years, enough time has passed that the
maintenance can be passed on, ans since you have some experience with
the package, there is probably no better person for the job right now.

We should make sure that after switching the repository, new versions of
the package shouldn't contain hard-breaks.  I only used the package
briefly a few years back, so it is difficult for me to evaluate this on
my own.  Perhaps someone here on the list has the package installed and
could try out Amy's fork?

> Best,
>
> Amy

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 89%]

* Re: [PATCH] feat: add markdown-ts-mode
  @ 2024-04-22  7:02 88%       ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-22  7:02 UTC (permalink / raw)
  To: Rahul Martim Juliato
  Cc: Jostein Kjønigsen, Yuan Fu,
	Ergus via Emacs development discussions., Eli Zaretskii

Rahul Martim Juliato <rahuljuliato@gmail.com> writes:

> Thanks Eli and Jostein!
>
> No problem criticising :)
>
>
> Please find a new patch attached. Things I've made:
>
> - changed the file to the textmodes folder
>
> - made it inherit from `text-mode'
>
> - changed the news with +++
>
> - changed `emacs.texi' (is it here?) to add Markdown
>
> - scratched my head until 2:30AM thinking why it would not work for
>   Jostein test.
>
>
> Well Jostein, I've been played by the tree-sitter github repository
> maintainer, lol.
>
> First, a little note. There's actually no major changes to the version
> on github. I only changed documenting strings and made some small name
> changes to more "alike" already existing modes.
>
> It happens that on tree-sitter repository, unlike any other of their
> repositories (that I've seen), "main" branch is NOT the current branch,
> but the "we moved from here bye" one.
>
> The current default branch is "split_parser" where
> tree-sitter-markdown/src/ resides, hence the confusion.
>
> So, I wrote the mode with the "main" one in mind.
>
> I already checked the "new" (split_parser) one, and it seems it is
> possible to convert the current work to use this one instead. I'll try
> to do this in the middle of the week or sooner :)
>
> In the mean time, I realized more people would like to test this patch
> and tree-sitter setup is really trick, so I made this little "guide" on
> how to apply it until the end result (this might work now, pointing to
> the "main" branch with the current patch).
>
> If you could please try the path (B) on the guide and tell me if this
> works for you, It would be nice, Jostein.
>
>
> Thanks!
>
> Rahul
>
>
>
> --- beggining of guide on how to apply this patch and test it
>
> Git apply this patch.
>
> Run the autogen script:
>
> ./autogen.sh
>
> Make sure configure uses tree-sitter:
>
> ./configure --with-tree-sitter
>
> Compile:
>
> make bootstrap
>
> Check the build:
>
> ./src/emacs -Q --version
>
> Open emacs
>
> ./src/emacs -Q --init-dir=~/tmp_emacs_dir/
>
>
> A) The Hard Way
>
> Visit a .md file
>
> C-x f TEST.md
>
> Note the mode will not automatically load.
>
> This behavior is the same as typescript-ts-mode or other
> treesitter modes I've been using.
>
> M-x markdown-ts-mode
>
> It will fail since you have no tree sitter grammar installed.
> and will suggest installing it with `treesit-install-language-grammar'.
>
> This behaviour is also standard for the tree-sitter modes I
> currently use (typescript, tsx, rust).
>
> Issuing "M-x treesit-install-language-grammar RET".
>
> It asks for language, complete with "markdown RET".
>
> It says there's no recipie for it, if you want to build it
> interactivelly. Anwser "yes".
>
> It asks for the URL where the grammar is hosted, enter:
> "https://github.com/tree-sitter-grammars/tree-sitter-markdown RET"
>
> It asks for the tag or branch, setting the default, enter "main RET".
>
> It asks for the subfolder, leave the default (src), enter "RET".
>
> It asks for the C compiler to use (default: auto-detect), just "RET".
>
> It asks for the C++ compiler to use (default: auto-detect), just "RET".
>
> Install to (default "~/tmp_emacs_dir/treesitter"), just "RET".
>
> It will clone the repository, compile the library and tell in the
> minibuffer the library is installed to your folder.
>
>
> B) The Easier Way.
>
> Copy-paste and eval this use-package definition.
>
> (use-package markdown-ts-mode
>   :mode ("\\.md\\'" . markdown-ts-mode)
>   :defer 't
>   :config
>   (add-to-list 'treesit-language-source-alist '(markdown "https://github.com/tree-sitter-grammars/tree-sitter-markdown" "main" "src")))
>
>
> Visit your markdown test file.
>
> It will probably fail due to the missing grammar.
>
> Issue "M-x treesit-install-language-grammar RET".
>
> Now with TAB it should complete "markdown", if not, type it.
>
> As we already have the source now defined, just hit "RET" to install
> to the default treemacs folder.
>
> It will clone the repository and say it installed on your folder.
>
> Just reload the mode with "M-x markdown-ts-mode".
>
> From now on (with the use-package definition on `init.el') you should
> just open .md and have the highlight and stuff.
>
> --- end of the guide
>
> From 45796df36129ec77c532b3fa21cdd0b8033c9777 Mon Sep 17 00:00:00 2001
> From: Rahul Martim Juliato <rahul.juliato@gmail.com>
> Date: Fri, 19 Apr 2024 23:21:20 -0300
> Subject: [PATCH] feat: add markdown-ts-mode
>
>  * lisp/textmodes/markdown-ts-mode.el: New file.
>  * doc/emacs/emacs.texi: Add Markdown to the manual
>  * etc/NEWS: Announce markdown-ts-mode
> ---
>  doc/emacs/emacs.texi               |   1 +
>  etc/NEWS                           |   5 ++
>  lisp/textmodes/markdown-ts-mode.el | 106 +++++++++++++++++++++++++++++
>  3 files changed, 112 insertions(+)
>  create mode 100644 lisp/textmodes/markdown-ts-mode.el
>
> diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
> index 7d77f13ab21..244c822ee04 100644
> --- a/doc/emacs/emacs.texi
> +++ b/doc/emacs/emacs.texi
> @@ -618,6 +618,7 @@ Top
>  * Enriched Text::       Editing text enriched with fonts, colors, etc.
>  * Text Based Tables::   Commands for editing text-based tables.
>  * Two-Column::          Splitting text columns into separate windows.
> +* Markdown::            Major mode for editing Markdown files.
>  
>  Filling Text
>  
> diff --git a/etc/NEWS b/etc/NEWS
> index 8ad1e78ca60..06fbaa03b55 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -1688,6 +1688,11 @@ A major mode based on the tree-sitter library for editing Elixir files.
>  *** New major mode 'lua-ts-mode'.
>  A major mode based on the tree-sitter library for editing Lua files.
>  
> ++++
> +*** New major mode 'markdown-ts-mode'.
> +A major mode based on the tree-sitter library for editing Markdown files.
> +
> +
>  ** Minibuffer and Completions
>  
>  +++
> diff --git a/lisp/textmodes/markdown-ts-mode.el b/lisp/textmodes/markdown-ts-mode.el
> new file mode 100644
> index 00000000000..063780a772f
> --- /dev/null
> +++ b/lisp/textmodes/markdown-ts-mode.el
> @@ -0,0 +1,106 @@
> +;;; markdown-ts-mode.el --- tree sitter support for Markdown  -*- lexical-binding: t; -*-
> +
> +;; Copyright (C) 2024 Free Software Foundation, Inc.
> +
> +;; Author     : Rahul Martim Juliato <rahul.juliato@gmail.com>
> +;; Maintainer : Rahul Martim Juliato <rahul.juliato@gmail.com>
> +;; Created    : April 2024
> +;; Keywords   : markdown md languages tree-sitter
> +
> +;; This file is part of GNU Emacs.
> +
> +;; GNU Emacs is free software: you can redistribute it and/or modify
> +;; it under the terms of the GNU General Public License as published by
> +;; the Free Software Foundation, either version 3 of the License, or
> +;; (at your option) any later version.
> +
> +;; GNU Emacs is distributed in the hope that it will be useful,
> +;; but WITHOUT ANY WARRANTY; without even the implied warranty of
> +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +;; GNU General Public License for more details.
> +
> +;; You should have received a copy of the GNU General Public License
> +;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
> +
> +;;; Commentary:
> +;;

You should probably briefly explain the package here.

> +;;; Code:
> +
> +(require 'treesit)
> +(require 'subr-x)
> +
> +(declare-function treesit-node-parent "treesit.c")
> +(declare-function treesit-node-type "treesit.c")
> +(declare-function treesit-parser-create "treesit.c")
> +
> +(defvar markdown-ts--treesit-settings
> +  (treesit-font-lock-rules
> +   :language 'markdown
> +   :override t
> +   :feature 'delimiter
> +   '([ "[" "]" "(" ")" ] @shadow)
> +
> +   :language 'markdown
> +   :feature 'paragraph
> +   '([((atx_heading) @font-lock-keyword-face)
> +      ((block_quote_marker) @font-lock-string-face)
> +      ((code_span) @font-lock-string-face)
> +      ((emphasis) @underline)
> +      ((image_description) @link)
> +      ((indented_code_block) @font-lock-string-face)
> +      ((link_destination) @font-lock-string-face)
> +      ((setext_heading) @font-lock-keyword-face)
> +      ((strong_emphasis) @bold)
> +      ((thematic_break) @shadow)
> +      (block_quote (block_quote_marker) @font-lock-string-face)
> +      (block_quote (paragraph) @font-lock-string-face)
> +      (fenced_code_block (code_fence_content) @font-lock-string-face)
> +      (fenced_code_block (fenced_code_block_delimiter) @font-lock-doc-face)
> +      (inline_link (link_destination) @font-lock-string-face)
> +      (inline_link (link_text) @link)
> +      (list_item (list_marker_dot) @font-lock-keyword-face)
> +      (list_item (list_marker_minus) @font-lock-keyword-face)
> +      (list_item (list_marker_plus) @font-lock-keyword-face)
> +      (list_item (list_marker_star) @font-lock-keyword-face)
> +      (shortcut_link (link_text) @link)
> +      ])))
> +
> +(defun markdown-ts-imenu-node-p (node)
> +  "Check if NODE is a valid entry to imenu."
> +  (equal (treesit-node-type (treesit-node-parent node))
> +         "atx_heading"))
> +
> +(defun markdown-ts-imenu-name-function (node)
> +  "Return an imenu entry if NODE is a valid header."
> +  (let ((name (treesit-node-text node)))
> +    (if (markdown-ts-imenu-node-p node)
> +	(thread-first (treesit-node-parent node)(treesit-node-text))
> +      name)))
> +
> +(defun markdown-ts-setup ()
> +  "Setup treesit for `markdown-ts-mode'."
> +  (setq-local treesit-font-lock-settings markdown-ts--treesit-settings)
> +  (treesit-major-mode-setup))
> +
> +;;;###autoload
> +(define-derived-mode markdown-ts-mode text-mode "Markdown"
> +  "Major mode for editing Markdown using tree-sitter grammar."
> +  (setq-local font-lock-defaults nil
> +	      treesit-font-lock-feature-list '((delimiter)
> +					       (paragraph)))
> +
> +  (setq-local treesit-simple-imenu-settings
> +              `(("Headings" markdown-ts-imenu-node-p nil markdown-ts-imenu-name-function)))
> +
> +  (when (treesit-ready-p 'markdown)
> +    (treesit-parser-create 'markdown)
> +    (markdown-ts-setup)))
> +
> +(derived-mode-add-parents 'markdown-ts-mode '(markdown-mode))
> +
> +(if (treesit-ready-p 'markdown)
> +    (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-ts-mode)))
> +
> +(provide 'markdown-ts-mode)
> +;;; markdown-ts-mode.el ends here

So if I understand correctly, there is no keymap or any convenience
features that markdown-mode provides, because this is just the
beginning, right?  A large part of major modes for me is not just the
syntax highlighting and integration into Emacs systems, but also
bindings that in the case of Markdown would insert links or add/remove
emphasis.  I think it would be nice, if we could add these features in
the future, and re-use bindings from a package like AucTeX to build on
existing intuition (org-mode would be an alternative, but I am not a fan
or their choice of bindings).  Some commands to "compile" and preview a
document would also be nice.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 88%]

* Re: [DISCUSSION] "quick-help" popup for org-columns (column view)
  @ 2024-04-16  7:24 93%                       ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-04-16  7:24 UTC (permalink / raw)
  To: Sławomir Grochowski
  Cc: Eli Zaretskii, yantar92, emacs-orgmode, emacs-devel

Sławomir Grochowski <slawomir.grochowski@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>> I have pushed the changes to master.
>
> Thank you Philip for your help.  It works.
>
> But there is one more small thing. 
> A message that is displayed in the minibuffer. 
> It contains two pieces of information:
>
> (1)     command name
>         Right now it's hardcoded. 
>         We need to change the it from `help-quick-toggle' to
>         `org-columns-help-quick-toggle'.
>         How to do it? 
>         Add another variable like `help-quick-use-map'?
>         Maybe 'help-quick-command-name'?

Instead of using substitute-command-keys, we could just use
this-command, but that assumes that help-quick can always be toggled by
the command that invokes it.

> (2)     keybinding to the command name
>         Just to modify message string. Add '\\<help-quick-use-map>'.
>         To use other keymap.
>         Change is in the diff below. 

I don't see how this would work in general, at the very least it breaks
the regular usage.

Furthermore, I am not convinced we have to change anything here, since
C-h C-q (the default binding for `help-quick-toggle') should also hide
the buffer if one uses your command, or am I mistaken?

>
> diff --git a/lisp/help.el b/lisp/help.el
> index d4e39f04e53..35412b9d2fe 100644
> --- a/lisp/help.el
> +++ b/lisp/help.el
> @@ -263,7 +263,9 @@ help-quick
>        ;; ... and shrink it immediately.
>        (fit-window-to-buffer))
>      (message
> -     (substitute-command-keys "Toggle display of quick-help buffer using \\[help-quick-toggle]."))))
> +     (substitute-command-keys "Toggle display of quick-help buffer using\\<help-quick-use-map> \\[org-columns-help-quick-toggle]."))))
> +
> +
>  
>  (defun help-quick-toggle ()
>    "Toggle display of a window showing popular commands and their bindings.
> -- 
>
> 2.30.2
>
>
> Regards,

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 93%]

* Re: [DISCUSSION] "quick-help" popup for org-columns (column view)
  2024-04-11  6:37 99%                 ` Philip Kaludercic
  2024-04-11  6:58 86%                   ` Philip Kaludercic
@ 2024-04-13  8:37 99%                   ` Philip Kaludercic
    1 sibling, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-13  8:37 UTC (permalink / raw)
  To: Sławomir Grochowski
  Cc: Eli Zaretskii, yantar92, emacs-orgmode, emacs-devel

Philip Kaludercic <philipk@posteo.net> writes:

> Sławomir Grochowski <slawomir.grochowski@gmail.com> writes:
>
>> Thank you Philip for the explanation and preparing the code snippet. 
>>
>> So what are the next steps?
>> Can you merge your patch?
>
> If this is everything, I can push the change.  But I'll test it first.

I have pushed the changes to master.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: [DISCUSSION] "quick-help" popup for org-columns (column view)
  2024-04-11  6:37 99%                 ` Philip Kaludercic
@ 2024-04-11  6:58 86%                   ` Philip Kaludercic
  2024-04-13  8:37 99%                   ` Philip Kaludercic
  1 sibling, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-04-11  6:58 UTC (permalink / raw)
  To: Sławomir Grochowski
  Cc: Eli Zaretskii, yantar92, emacs-orgmode, emacs-devel

Philip Kaludercic <philipk@posteo.net> writes:

> Sławomir Grochowski <slawomir.grochowski@gmail.com> writes:
>
>> Thank you Philip for the explanation and preparing the code snippet. 
>>
>> So what are the next steps?
>> Can you merge your patch?
>
> If this is everything, I can push the change.  But I'll test it first.

I tried out using your `org-columns-help-quick-sections' variable, but
it seems that `where-is' didn't find all the commands you wanted:

--8<---------------cut here---------------start------------->8---
Move column & row            Add & delete column        Edit column   Edit values                      View             Misc.
M-<left>  move column left   M-S-<right> add column     < narrow      e       edit value               c show content   C-c C-o open link
M-<right> move column right  M-S-<left>  delete column  > widen       a       edit allowed value       o show overview  g       redo
							s attributes  n       next allowed value       v show value     q       quit
								      p       previous allowed value
								      C-c C-c toggle checkbox or quit
								      C-c C-t change TODO state
--8<---------------cut here---------------end--------------->8---

(some of the descriptions are pretty long, are they not?)

Are commands like `org-columns-move-up' part of the next release of Org?
I am using whatever is currently on master.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 86%]

* Re: [DISCUSSION] "quick-help" popup for org-columns (column view)
  @ 2024-04-11  6:37 99%                 ` Philip Kaludercic
  2024-04-11  6:58 86%                   ` Philip Kaludercic
  2024-04-13  8:37 99%                   ` Philip Kaludercic
  0 siblings, 2 replies; 200+ results
From: Philip Kaludercic @ 2024-04-11  6:37 UTC (permalink / raw)
  To: Sławomir Grochowski
  Cc: Eli Zaretskii, yantar92, emacs-orgmode, emacs-devel

Sławomir Grochowski <slawomir.grochowski@gmail.com> writes:

> Thank you Philip for the explanation and preparing the code snippet. 
>
> So what are the next steps?
> Can you merge your patch?

If this is everything, I can push the change.  But I'll test it first.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: [DISCUSSION] "quick-help" popup for org-columns (column view)
  @ 2024-04-10  8:26 84%             ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-10  8:26 UTC (permalink / raw)
  To: Sławomir Grochowski
  Cc: Eli Zaretskii, yantar92, emacs-orgmode, emacs-devel

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

Sławomir Grochowski <slawomir.grochowski@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> We could add a `help-quick-use-map' variable and bind it to `global-map'
>> by default.  You can then re-bind it in your command.
>
> I'm sorry, but I don't quite understand it. 

Just this here:


[-- Attachment #2: Type: text/plain, Size: 941 bytes --]

diff --git a/lisp/help.el b/lisp/help.el
index 1ef46e394f3..5700f10fdc8 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -175,6 +175,9 @@ help-quick-sections
 COMMAND is the symbol of a command and DESCRIPTION is its short
 description, 10 to 15 char5acters at most.")
 
+(defvar help-quick-use-map global-map
+  "Keymap that `help-quick' should use to lookup bindings.")
+
 (declare-function prop-match-value "text-property-search" (match))
 
 ;; Inspired by a mg fork (https://github.com/troglobit/mg)
@@ -193,7 +196,7 @@ help-quick
         (let ((max-key-len 0) (max-cmd-len 0) keys)
           (dolist (ent (reverse (cdr section)))
             (catch 'skip
-              (let* ((bind (where-is-internal (car ent) nil t))
+              (let* ((bind (where-is-internal (car ent) help-quick-use-map t))
                      (key (if bind
                               (propertize
                                (key-description bind)

[-- Attachment #3: Type: text/plain, Size: 565 bytes --]


You would then only have to rebind `help-quick-use-map' in your custom
command.

> It seems to me that the simplest way is to add a parameter to the
> function, like this:
>
> (defun help-quick (&optional keymap)
>
> Because it will not change the behavior for previous calls to this
> function.  And it will allow to pass specific keymap, not need to pass
> and search in whole global-map. 
>
> What do you think?

Eli said that we shouldn't change the signature of public functions, so
I don't think that this is an option.


-- 
	Philip Kaludercic on peregrine

^ permalink raw reply related	[relevance 84%]

* Re: [DISCUSSION] "quick-help" popup for org-columns (column view)
  @ 2024-04-08  8:24 96%         ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-04-08  8:24 UTC (permalink / raw)
  To: Sławomir Grochowski
  Cc: Eli Zaretskii, yantar92, emacs-orgmode, emacs-devel, stefankangas,
	larsi, hmelman, info

Sławomir Grochowski <slawomir.grochowski@gmail.com> writes:

> chad <yandros@gmail.com> writes:
>
>> If you don't mind me asking:
>
> Thank you for sharing your views. 
>
>> What are your high-level goals and immediate needs for changing
>> help-quick?
>
> I want to reuse quick-help for functionality in org-mode - column view
> package. See first email in this thread - there is even a screenshot.
>
>> It looks like you may be trying to have multiple
>> simultaneous quick-help buffers active at once?
>
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Is there a reason not to re-use the same buffer?  I am not sure if we
>> need multiple quick-help buffer to co-exist at the same time.
>
> Yes you are right. There is no need to create multiple quick-help
> buffers. 
>
>> The idea here was that some other function could rebind
>> `help-quick-sections' dynamically.  That way you avoid the redundant
>> arguments (which would all have to be documented).
>
> Is this really a good practice?

It certainly is practice.

> Relying on global variables instead of passing variables as a parameters?

A lot of Emacs Lisp code uses dynamic scope.  Examples include
`default-directory' or a lot of search functionality.

> I tried like this:
>
> +(defun org-columns-help-quick-toggle ()
> +  (interactive)
> +  (let ((help-quick-sections org-columns-help-quick-sections))
> +    (help-quick-toggle)))
>
> So passing a 'sections' data works.
> But it doesn't read keymaps from `org-columns-map'.
> Because as I understand it read keymaps available only in the created buffer
> "*Quick Help*" not from the buffer with org-colview.
>
> This is the line from function: `help-quick' where it happens:
> + (let* ((bind (where-is-internal (car ent) nil t))
> Signature:
> (where-is-internal DEFINITION &optional KEYMAP FIRSTONLY NOINDIRECT NO-REMAP)
>
> So previously I was passing a keymap `org-columns-map' to function 'where-is-internal'.
>
> Eli Zaretskii <eliz@gnu.org> writes:
>> In any case, we cannot change the signature of help-quick, since it's a
>> public function.
>
> If I can't modify the function `help-quick' how can I make it work?

We could add a `help-quick-use-map' variable and bind it to `global-map'
by default.  You can then re-bind it in your command.

> I'm attaching the whole patch:
>
> From dcc5172c87f9f7acfc9ab3a72f7de8b363a05447 Mon Sep 17 00:00:00 2001
> From: Slawomir Grochowski <slawomir.grochowski@gmail.com>
> Date: Sun, 7 Apr 2024 01:13:27 +0200
> Subject: [PATCH] lisp/org-colview.el: add help-quick sections for org-colview
>
> ---
>  lisp/org-colview.el | 41 +++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
>
> diff --git a/lisp/org-colview.el b/lisp/org-colview.el
> index d71c84a76..547f50df8 100644
> --- a/lisp/org-colview.el
> +++ b/lisp/org-colview.el
> @@ -169,6 +169,7 @@ See `org-columns-summary-types' for details.")
>    (org-cycle-overview)
>    (org-cycle-content))
>  
> +(org-defkey org-columns-map "?"        #'org-columns-help-quick-toggle)
>  (org-defkey org-columns-map "c"        #'org-columns-content)
>  (org-defkey org-columns-map "o"        #'org-overview)
>  (org-defkey org-columns-map "e"        #'org-columns-edit-value)
> @@ -231,6 +232,46 @@ See `org-columns-summary-types' for details.")
>      "--"
>      ["Quit" org-columns-quit t]))
>  
> +(defvar org-columns-help-quick-sections
> +  '(("Move"
> +     (org-columns-move-up . "up")
> +     (org-columns-move-down . "down")
> +     (org-columns-move-cursor-left . "left")
> +     (org-columns-move-cursor-right . "right"))
> +    ("Move column & row"
> +     (org-columns-move-row-up . "move row up")
> +     (org-columns-move-row-down . "move row down")
> +     (org-columns-move-left . "move column left")
> +     (org-columns-move-right . "move column right"))
> +    ("Add & delete column"
> +     (org-columns-new . "add column")
> +     (org-columns-delete . "delete column"))
> +    ("Edit column"
> +     (org-columns-narrow . "narrow")
> +     (org-columns-widen . "widen")
> +     (org-columns-edit-attributes . "attributes"))
> +    ("Edit values"
> +     (org-columns-edit-value . "edit value")
> +     (org-columns-edit-allowed . "edit allowed value")
> +     (org-columns-next-allowed-value . "next allowed value")
> +     (org-columns-previous-allowed-value . "previous allowed value")
> +     (org-columns-toggle-or-columns-quit . "toggle checkbox or quit")
> +     (org-columns-todo . "change TODO state"))
> +    ("View"
> +     (org-columns-content . "show content")
> +     (org-overview . "show overview")
> +     (org-columns-show-value . "show value"))
> +    ("Misc."
> +     (org-columns-open-link . "open link")
> +     (org-columns-redo . "redo")
> +     (org-columns-help-quick-toggle . "toggle this help")
> +     (org-columns-quit . "quit"))))
> +
> +(defun org-columns-help-quick-toggle ()
> +  (interactive)
> +  (let ((help-quick-sections org-columns-help-quick-sections))
> +    (help-quick-toggle)))
> +
>  (defun org-columns--displayed-value (spec value &optional no-star)
>    "Return displayed value for specification SPEC in current entry.
>  
> -- 
> 2.30.2
>
>
> Regards,

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 96%]

* Re: [DISCUSSION] "quick-help" popup for org-columns (column view)
  @ 2024-04-06 22:40 89%     ` Philip Kaludercic
    1 sibling, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-04-06 22:40 UTC (permalink / raw)
  To: Sławomir Grochowski
  Cc: Ihor Radchenko, emacs-orgmode, emacs-devel, stefankangas, larsi,
	hmelman, eliz, info

Sławomir Grochowski <slawomir.grochowski@gmail.com> writes:

> Ihor Radchenko <yantar92@posteo.net> writes:
>
>> I see no downside supporting `help-quick' command in Org mode's column
>> view. Generally, better integration with Emacs built-in functionality is
>> welcome.
>
> Great. I'll be happy to take care of it.
>
> But first, we need to modify `help-quick' to be more reusable.
> I tried to do it, but I'm not experienced in elisp.
> I wanted to remove references to global variables, so I did a wrapper
> function to pass arguments to `help-quick'. I understand it's not a lispy way.
> I would be grateful for your comment. 
>
> Patch in attachment.

I have to admit that I am not entirely certain what the plan is, but I
have a few concrete comments/questions on this patch

> From 5f343fd15c53f5bc5e7515ef0cd3049b4e0ec388 Mon Sep 17 00:00:00 2001
> From: Slawomir Grochowski <slawomir.grochowski@gmail.com>
> Date: Sat, 6 Apr 2024 22:11:01 +0200
> Subject: [PATCH] lisp/help: make `help-quick-toggle' reusable for other
>  keymaps
>
> ---
>  lisp/help.el | 22 +++++++++++++---------
>  1 file changed, 13 insertions(+), 9 deletions(-)
>
> diff --git a/lisp/help.el b/lisp/help.el
> index 1ef46e394f3..c32d1a2e943 100644
> --- a/lisp/help.el
> +++ b/lisp/help.el
> @@ -76,7 +76,7 @@ help-map
>    "C-n"  #'view-emacs-news
>    "C-o"  #'describe-distribution
>    "C-p"  #'view-emacs-problems
> -  "C-q"  #'help-quick-toggle
> +  "C-q"  #'help-quick-toggle-wrapper
>    "C-s"  #'search-forward-help-for-help
>    "C-t"  #'view-emacs-todo
>    "C-w"  #'describe-no-warranty
> @@ -178,22 +178,22 @@ help-quick-sections
>  (declare-function prop-match-value "text-property-search" (match))
>  
>  ;; Inspired by a mg fork (https://github.com/troglobit/mg)
> -(defun help-quick ()
> +(defun help-quick (name-for-buffer sections &optional keymap)
>    "Display a quick-help buffer showing popular commands and their bindings.
>  The window showing quick-help can be toggled using \\[help-quick-toggle].
>  You can click on a key binding shown in the quick-help buffer to display
>  the documentation of the command bound to that key sequence."
>    (interactive)
> -  (with-current-buffer (get-buffer-create "*Quick Help*")
> +  (with-current-buffer (get-buffer-create name-for-buffer)

Is there a reason not to re-use the same buffer?  I am not sure if we
need multiple quick-help buffer to co-exist at the same time.

>      (let ((inhibit-read-only t) (padding 2) blocks)
>  
>        ;; Go through every section and prepare a text-rectangle to be
>        ;; inserted later.
> -      (dolist (section help-quick-sections)
> +      (dolist (section sections)

The idea here was that some other function could rebind
`help-quick-sections' dynamically.  That way you avoid the redundant
arguments (which would all have to be documented).

>          (let ((max-key-len 0) (max-cmd-len 0) keys)
>            (dolist (ent (reverse (cdr section)))
>              (catch 'skip
> -              (let* ((bind (where-is-internal (car ent) nil t))
> +              (let* ((bind (where-is-internal (car ent) keymap t))
>                       (key (if bind
>                                (propertize
>                                 (key-description bind)
> @@ -259,21 +259,25 @@ help-quick
>      (message
>       (substitute-command-keys "Toggle display of quick-help buffer using \\[help-quick-toggle]."))))
>  
> -(defun help-quick-toggle ()
> +(defun help-quick-toggle-wrapper ()

The naming here is weird IMO, usually the other function should be
called something like `help-quick-toggle-internal' and this would be
`help-quick-toggle'.

> +  (interactive)
> +  (help-quick-toggle "*Quick Help*" help-quick-sections))
> +
> +(defun help-quick-toggle (name-for-buffer sections &optional keymap)
>    "Toggle display of a window showing popular commands and their bindings.
>  This toggles on and off the display of the quick-help buffer, which shows
>  popular commands and their bindings as produced by `help-quick'.
>  You can click on a key binding shown in the quick-help buffer to display
>  the documentation of the command bound to that key sequence."
>    (interactive)
> -  (if (and-let* ((window (get-buffer-window "*Quick Help*")))
> +  (if (and-let* ((window (get-buffer-window name-for-buffer)))
>          (quit-window t window))
>        ;; Clear the message we may have gotten from `C-h' and then
>        ;; waiting before hitting `q'.
>        (message "")
> -    (help-quick)))
> +    (help-quick name-for-buffer sections keymap)))
>  
> -(defalias 'cheat-sheet #'help-quick)
> +(defalias 'cheat-sheet #'help-quick-wrapper)
>  
>  (defun help-quit ()
>    "Just exit from the Help command's command loop."
> -- 
> 2.30.2
>
>
>
> JD Smith <jdtsmith@gmail.com> writes: 
>
>> Also recall we had a discussion in bug#68236
>> <https://lists.gnu.org/archive/html/bug-gnu-emacs/2024-01/msg00124.html>
>> about expanding quick-help to include mode-local
>> personalized binding shortcuts (with org as a particular target of interest).
>
> Thank you for the link I haven't seen that topic.
>  
> Regards,

-- 
	Philip Kaludercic on icterid



^ permalink raw reply	[relevance 89%]

* Re: GNU ELPA announcements - e.g.: [GNU ELPA] Csv-Mode version 1.23
  @ 2024-03-31 16:40 99% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-31 16:40 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs@gnu.org, gnu-emacs-sources@gnu.org, nil

Drew Adams <drew.adams@oracle.com> writes:

> Why is emacs-devel now a destination for such
> announcements?  If gnu-emacs-sources@gnu.org
> isn't deemed enough for some reason, wouldn't
> info-gnu-emacs@gnu.org be more appropriate?

The email is sent to the maintainer, and csv-mode indicates that this
list is responsible for maintenance.

-- 
	Philip Kaludercic on icterid



^ permalink raw reply	[relevance 99%]

* Re: Hundreds of ELPA packages updated today?
  @ 2024-03-31 11:49 99% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-31 11:49 UTC (permalink / raw)
  To: Romain Francoise; +Cc: emacs-devel

Romain Francoise <romain@rfr.sh> writes:

> Hi,
>
> gnu-emacs-sources received a few hundred update notifications for ELPA
> packages this morning, and in the web interface their latest version is
> indeed dated 2024-Mar-31.
>
> Glitch in the system, or is something nefarious going on?

I am not quite sure, but one reason might have been the recent addition
of Atom feeds for package updates to elpa-admin.el, which have now been
generated for all packages.

-- 
	Philip Kaludercic on icterid



^ permalink raw reply	[relevance 99%]

* Re: Where should security issues with GNU ELPA packages be reported?
  @ 2024-03-29  5:53 99%     ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-29  5:53 UTC (permalink / raw)
  To: Morgan Willcock; +Cc: emacs-devel

Morgan Willcock <morgan@ice9.digital> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Morgan Willcock <morgan@ice9.digital> writes:
>>
>>> I think I have found a security issue with a package which is
>>> distributed on GNU ELPA, and I am unsure who to notify.
>>>
>>> Given that the package is technically part of Emacs, do I follow
>>> whatever the procedure would be for disclosing security problems with
>>> Emacs?  If so, what is that procedure?
>>>
>>> Or should I e-mail the package author first?
>>>
>>> Given that it is not the package author who is distributing the package,
>>> I am unsure what to do.
>>
>> It would probably be better to message the maintainer first, if there is
>> no explicit maintainer you can check elpa.git to infer who is
>> responsible.
>
> There is an e-mail address for the maintainer, I just wasn't sure
> whether going to them first was the correct thing to do.

The maintainer of the package can generally push changes to their own
repository and can trigger a new package to be built.  If they do not
respond and it is urgent, anyone with access to elpa.git could push a
commit to the mirror (forking from upstream).

>> Can you disclose what package you are concerned about?
>
> I was not planning on naming it until after I had spoken privately to
> whoever the appropriate person is.  The problem concerns an encryption
> failure which potentially exposes private security keys.

Ok, understandable.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: Where should security issues with GNU ELPA packages be reported?
  @ 2024-03-28 16:07 99% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-03-28 16:07 UTC (permalink / raw)
  To: Morgan Willcock; +Cc: emacs-devel

Morgan Willcock <morgan@ice9.digital> writes:

> I think I have found a security issue with a package which is
> distributed on GNU ELPA, and I am unsure who to notify.
>
> Given that the package is technically part of Emacs, do I follow
> whatever the procedure would be for disclosing security problems with
> Emacs?  If so, what is that procedure?
>
> Or should I e-mail the package author first?
>
> Given that it is not the package author who is distributing the package,
> I am unsure what to do.

It would probably be better to message the maintainer first, if there is
no explicit maintainer you can check elpa.git to infer who is
responsible.  Can you disclose what package you are concerned about?

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: recursion to iteration macro
  @ 2024-03-23  7:12 99% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-23  7:12 UTC (permalink / raw)
  To: emacs-devel

Emanuel Berg <incal@dataswamp.org> writes:

> Did anyone try to write a macro or by using some other method
> to translate arbitrary use of recursion into functionally
> equivalent code that is iteration only?
>
> I read [1] this is theoretically possible and that seems
> reasonable as well, as with loops, local functions etc you
> have everything you need to implement it.

At least for tail-call recursion, named-let will turn recursive code
into iterative code.

But generally speaking, if you need to accumulate data on the stack,
then it becomes a lot more difficult.

> You can even have an expanding data structure, e.g. a list, to
> implement a virtual stack, still all within the one function,
> if you are fond of it.
>
> With execution all advantages should be with iteration but
> sometimes recursion makes for compact, elegant code that can
> also be more intuitive, more fun to write.
>
> Recursion is not so common, in part for this exact reason, but
> if we had this, maybe we would see a little recursion
> renaissance and proliferation?
>
> The best of both worlds anyone? You _will_ be assimilated!
>
> [1] https://en.wikipedia.org/wiki/Recursion_(computer_science)
>     https://stackoverflow.com/questions/931762/can-every-recursion-be-converted-into-iteration

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: error when trying to a install a recent (2.24) seq version via the package system
  @ 2024-03-22 16:30 96% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-22 16:30 UTC (permalink / raw)
  To: emacs-devel

Uwe Brauer via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> Hi 
>
>
> I am running emacs, master commit 7bf17ceee8c2d347917541e143ce25609e90ebbb
> I tried to install a newer version of seq via the package system, but I
> obtained an error that I attach.
>
> What is wrong?
>
> Regards
>
> Uwe Brauer 

--8<---------------cut here---------------start------------->8---
  (if (version< emacs-version "25") (require 'seq-24) (require 'seq-25))
  eval-buffer(#<buffer  *load*> nil "/home/oub/.emacs.d/elpa/seq-2.24/seq.el" nil t)  ; Reading at buffer position 1779
  load-with-code-conversion("/home/oub/.emacs.d/elpa/seq-2.24/seq.el" "/home/oub/.emacs.d/elpa/seq-2.24/seq.el" nil t)
--8<---------------cut here---------------end--------------->8---

What are the directory contents of /home/oub/.emacs.d/elpa/seq-2.24/?

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 96%]

* Re: Incorporate package macrostep into Emacs core
  @ 2024-03-19  9:33 98%                             ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-19  9:33 UTC (permalink / raw)
  To: Gerd Möllmann
  Cc: Jeremy Bryant, Jeremy Bryant via Emacs development discussions.,
	Eli Zaretskii, monnier, j.j.oddie, stefankangas, jonas

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>>
>>> Philip Kaludercic <philipk@posteo.net> writes:
>>>
>>>>> (add-hook 'c-mode-hook #'macrostep-c-mode-hook)
>>>>
>>>> This part is suspicious.  First of all, it looks like one is adding a
>>>> hook to a hook, but this would unconditionally modify
>>>> c-mode-hook, which I don't think is reliable.  Can we find some other
>>>> way to update the variables, depending on the major mode?  E.g. in
>>>> macrostep.el one could try to intern (format "macrostep-%s-init"
>>>> major-mode) and check if the symbol is fboundp?
>>>
>>> Also, it would be nice to support C++ and Objc, which we have in Emacs
>>> (c-mode-common-hook).
>>
>> From what I understand, this feature is based on cmacexp, which in turn
>> just uses cpp.  
>
> What's the problem using cpp?

I don't know what Objc does, but in the case of C++ my understanding was
that for example Templates were not expanded by C++.  Of course, if that
is not the intention, then never mind my comment.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 98%]

* Re: Incorporate package macrostep into Emacs core
  @ 2024-03-19  7:26 95%                         ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-03-19  7:26 UTC (permalink / raw)
  To: Gerd Möllmann
  Cc: Jeremy Bryant, Jeremy Bryant via Emacs development discussions.,
	Eli Zaretskii, monnier, j.j.oddie, stefankangas, jonas

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>>> (add-hook 'c-mode-hook #'macrostep-c-mode-hook)
>>
>> This part is suspicious.  First of all, it looks like one is adding a
>> hook to a hook, but this would unconditionally modify
>> c-mode-hook, which I don't think is reliable.  Can we find some other
>> way to update the variables, depending on the major mode?  E.g. in
>> macrostep.el one could try to intern (format "macrostep-%s-init"
>> major-mode) and check if the symbol is fboundp?
>
> Also, it would be nice to support C++ and Objc, which we have in Emacs
> (c-mode-common-hook).

From what I understand, this feature is based on cmacexp, which in turn
just uses cpp.  If something like this feature should be supported for
C++ and Objc, then the functionality should first be added to cmacexp or
something analogous (as it is my understanding that this is currently
not the case).

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 95%]

* Re: Incorporate package macrostep into Emacs core
  @ 2024-03-19  6:36 85%                     ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-03-19  6:36 UTC (permalink / raw)
  To: Jeremy Bryant
  Cc: Jeremy Bryant via Emacs development discussions., Eli Zaretskii,
	monnier, j.j.oddie, stefankangas, jonas

Jeremy Bryant <jb@jeremybryant.net> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
> Philip,
> Thanks for all the comments on the macrostep.el code, I'll work on what
> I can.
>
>> Isn't there also a C-preprecossor implementation for macrostep?  Would
>> the plan be to include that as well?
>
> Presumably, also.  Any comments on macrostep-c.el (attached)?
>
> ;;; macrostep-c.el --- macrostep interface to C preprocessor  -*- lexical-binding: t; -*-
>
> ;; Copyright (C) 2015 Jon Oddie

If included, then this should be updated.

> ;; Author: Jon Oddie <j.j.oddie@gmail.com>
> ;; Url: https://github.com/emacsorphanage/macrostep

And this removed.

> ;; Keywords: c, languages, macro, debugging
>
> ;; SPDX-License-Identifier: GPL-3.0-or-later
>
> ;; This file is free software: you can redistribute it and/or modify
> ;; it under the terms of the GNU General Public License as published
> ;; by the Free Software Foundation, either version 3 of the License,
> ;; or (at your option) any later version.
> ;;
> ;; This file is distributed in the hope that it will be useful,
> ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
> ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> ;; GNU General Public License for more details.
> ;;
> ;; You should have received a copy of the GNU General Public License
> ;; along with this file.  If not, see <https://www.gnu.org/licenses/>.
>
> ;;; Commentary:
>
> ;; A thin wrapper around Emacs's built-in `cmacexp' library to provide
> ;; basic support for expanding C macros using the `macrostep' user
> ;; interface.  To use, position point on a macro use in a C buffer and
> ;; type `M-x macrostep-expand'.  The variables `c-macro-preprocessor'
> ;; and especially `c-macro-cppflags' may need to be set correctly for
> ;; accurate expansion.
>
> ;; This is fairly basic compared to the Emacs Lisp `macrostep'.  In
> ;; particular, there is no step-by-step expansion, since C macros are
> ;; expanded in a single "cpp" pass, and no pretty-printing.
>
> ;; To hide the buffer containing "cpp" warnings (not recommended), you
> ;; could do something like:
> ;;
> ;; (push `(,(regexp-quote macrostep-c-warning-buffer)
> ;;          (display-buffer-no-window))
> ;;       display-buffer-alist)
>
> ;;; Code:
>
> (require 'macrostep)
> (require 'cmacexp)
> (require 'cl-lib)
>
> (require 'subr-x nil t)
> (defalias 'macrostep-c-string-trim
>   (if (fboundp 'string-trim)
>       #'string-trim
>     (lambda (string)
>       (when (string-match "\\`[ \t\n\r]+" string)
> 	(setq string (replace-match "" t t string)))
>       (when (string-match "[ \t\n\r]+\\'" string)
> 	(setq string (replace-match "" t t string)))
>       string)))

We can drop this (or use Compat to provide the function if the package
is distributeted on ELPA).

> (put 'macrostep-c-non-macro 'error-conditions
>      '(macrostep-c-non-macro error))
> (put 'macrostep-c-non-macro 'error-message
>      "Text around point is not a macro call.")
>
> (put 'macrostep-c-expansion-failed 'error-conditions
>      '(macrostep-c-expansion-failed error))
> (put 'macrostep-c-expansion-failed 'error-message
>      "Macro-expansion failed.")
>
> (defvar macrostep-c-warning-buffer "*Macroexpansion Warnings*")
>
> ;;;###autoload
> (defun macrostep-c-mode-hook ()
>   (setq macrostep-sexp-bounds-function
>         #'macrostep-c-sexp-bounds)
>   (setq macrostep-sexp-at-point-function
>         #'macrostep-c-sexp-at-point)
>   (setq macrostep-environment-at-point-function
>         #'ignore)
>   (setq macrostep-expand-1-function
>         #'macrostep-c-expand-1)
>   (setq macrostep-print-function
>         #'macrostep-c-print-function)
>   (add-hook 'macrostep-mode-off-hook
>             #'macrostep-c-mode-off nil t))
>
> (defun macrostep-c-mode-off (&rest _ignore)
>   (when (derived-mode-p 'c-mode)
>     (let ((warning-window
>            (get-buffer-window macrostep-c-warning-buffer)))
>       (when warning-window
>         (quit-window nil warning-window)))))
>
> ;;;###autoload
> (add-hook 'c-mode-hook #'macrostep-c-mode-hook)

This part is suspicious.  First of all, it looks like one is adding a
hook to a hook, but this would unconditionally modify
c-mode-hook, which I don't think is reliable.  Can we find some other
way to update the variables, depending on the major mode?  E.g. in
macrostep.el one could try to intern (format "macrostep-%s-init"
major-mode) and check if the symbol is fboundp?

> (defun macrostep-c-sexp-bounds ()
>   (save-excursion
>     (cl-loop
>      (let ((region (macrostep-c-sexp-bounds-1)))
>        (cond
>          ((null region)
>           (signal 'macrostep-c-non-macro nil))
>          ((macrostep-c-expandable-p region)
>           (cl-return region))
>          (t
>           (condition-case nil
>               (progn
>                 (backward-up-list)
>                 (skip-syntax-backward "-"))
>             (scan-error
>              (signal 'macrostep-c-non-macro nil)))))))))
>
> (defun macrostep-c-sexp-bounds-1 ()
>   (let ((region (bounds-of-thing-at-point 'symbol)))
>     (when region

One could use when-let* in places like this.

>       (cl-destructuring-bind (symbol-start . symbol-end) region
>         (save-excursion
>           (goto-char symbol-end)
>           (if (looking-at "[[:space:]]*(")
>               (cons symbol-start (scan-sexps symbol-end 1))
>               region))))))

The indentation is off here, right?  Might be worth reindenting
everything once.

>
> (defun macrostep-c-expandable-p (region)
>   (cl-destructuring-bind (start . end) region
>     (condition-case nil
>         (cl-destructuring-bind (expansion _warnings)
>             (macrostep-c-expand-region start end)
>           (and (cl-plusp (length expansion))
>                (not (string= expansion (buffer-substring start end)))))
>       (macrostep-c-expansion-failed nil))))
>
> (defun macrostep-c-sexp-at-point (start end)
>   (cons start end))
>
> (defun macrostep-c-expand-1 (region _ignore)
>   (cl-destructuring-bind (start . end) region
>     (cl-destructuring-bind (expansion warnings)
>         (macrostep-c-expand-region start end)
>       (when (cl-plusp (length warnings))
>         (with-current-buffer
>             (get-buffer-create macrostep-c-warning-buffer)
>           (let ((inhibit-read-only t))
>             (erase-buffer)
>             (insert warnings)
>             (goto-char (point-min)))
>           (special-mode)
>           (display-buffer (current-buffer)
>                           '(display-buffer-pop-up-window
>                             (inhibit-same-window . t)
>                             (allow-no-window . t)))))
>       expansion)))
>
> (defun macrostep-c-expand-region (start end)
>   (let ((expansion
>          (condition-case nil
>              (c-macro-expansion start end
>                                 (concat c-macro-preprocessor " "
>                                         c-macro-cppflags))
>            (search-failed
>             (signal 'macrostep-c-expansion-failed nil)))))
>     (with-temp-buffer
>       (save-excursion
>         (insert expansion))
>       (when (looking-at (regexp-quote "/*"))
>         (search-forward "*/"))
>       (let ((warnings (buffer-substring (point-min) (point)))
>             (expansion (buffer-substring (point) (point-max))))
>         (mapcar #'macrostep-c-string-trim (list expansion warnings))))))
>
> (defun macrostep-c-print-function (expansion &rest _ignore)
>   (with-temp-buffer
>     (insert expansion)
>     (let ((exit-code
>            (shell-command-on-region (point-min) (point-max) "indent" nil t)))

When calling indent, it might be nice to provide an option for optional
flags, in case someone prefers some other indentation scheme.

>       (when (zerop exit-code)
>         (setq expansion (macrostep-c-string-trim (buffer-string))))))
>   (insert expansion))
>
> (provide 'macrostep-c)
>
> ;;; macrostep-c.el ends here
>

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 85%]

* Re: Incorporate package macrostep into Emacs core
  @ 2024-03-18  9:09 86%                 ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-03-18  9:09 UTC (permalink / raw)
  To: Jeremy Bryant via Emacs development discussions.
  Cc: Eli Zaretskii, Jeremy Bryant, monnier, j.j.oddie, stefan,
	stefankangas, jonas

Jeremy Bryant via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

>>>> Given that macrostep is useful for Emacs Lisp macro development, would
>>>> there be interest to include in Emacs core?
>>>
>>> Sounds useful, so I'm in favor.
>>
>> OK, I will continue to work towards it.
>
> Eli, Stefan,
>
> As I wait for the FSF paperwork to be completed for several
> contributors:
>
> Manual?
> Should the documentation for macrostep be included in the Emacs Lisp
> manual section Macros?  Or a more suitable location?  I volunteer to
> write the manual sections.
>
> Code?
> The main file is attached for convenience, from the orphanage upstream
> (https://github.com/emacsorphanage/macrostep). 
> Are any changes needed before this is merged into Emacs?
> I volunteer to write some code towards this, please let me know.

I have a few comments:

>
> ;;; macrostep.el --- Interactive macro expander  -*- lexical-binding: t; -*-
>
> ;; Copyright (C) 2012-2015 Jon Oddie
> ;; Copyright (C) 2020-2023 Free Software Foundation, Inc.

I guess this should be updated until 2024.

> ;; Author: Jon Oddie <j.j.oddie@gmail.com>
> ;; Url: https://github.com/emacsorphanage/macrostep
> ;; Keywords: lisp, languages, macro, debugging
>
> ;; Package-Version: 0.9.2
> ;; Package-Requires: ((cl-lib "0.5"))
>
> ;; SPDX-License-Identifier: GPL-3.0-or-later
>
> ;; This file is free software: you can redistribute it and/or modify
> ;; it under the terms of the GNU General Public License as published
> ;; by the Free Software Foundation, either version 3 of the License,
> ;; or (at your option) any later version.
> ;;
> ;; This file is distributed in the hope that it will be useful,
> ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
> ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> ;; GNU General Public License for more details.
> ;;
> ;; You should have received a copy of the GNU General Public License
> ;; along with this file.  If not, see <https://www.gnu.org/licenses/>.
>
> ;;; Commentary:
>
> ;; `macrostep' is an Emacs minor mode for interactively stepping through
> ;; the expansion of macros in Emacs Lisp source code.  It lets you see
> ;; exactly what happens at each step of the expansion process by
> ;; pretty-printing the expanded forms inline in the source buffer, which is
> ;; temporarily read-only while macro expansions are visible.  You can
> ;; expand and collapse macro forms one step at a time, and evaluate or
> ;; instrument the expansions for debugging with Edebug as normal (but see
> ;; "Bugs and known limitations", below).  Single-stepping through the
> ;; expansion is particularly useful for debugging macros that expand into
> ;; another macro form.  These can be difficult to debug with Emacs'
> ;; built-in `macroexpand', which continues expansion until the top-level
> ;; form is no longer a macro call.
>
> ;; Both globally-visible macros as defined by `defmacro' and local macros
> ;; bound by `(cl-)macrolet' or another macro-defining form can be expanded.
> ;; Within macro expansions, calls to macros and compiler macros are
> ;; fontified specially: macro forms using `macrostep-macro-face', and
> ;; functions with compiler macros using `macrostep-compiler-macro-face'.
> ;; Uninterned symbols (gensyms) are fontified based on which step in the
> ;; expansion created them, to distinguish them both from normal symbols and
> ;; from other gensyms with the same print name.
>
> ;; As of version 0.9, it is also possible to extend `macrostep' to work
> ;; with other languages with macro systems in addition to Emacs Lisp.  An
> ;; extension for Common Lisp (via SLIME) is in the works; contributions for
> ;; other languages are welcome.  See "Extending macrostep" below for
> ;; details.
>
>
> ;; 1 Key-bindings and usage
> ;; ========================
>
> ;;   The standard keybindings in `macrostep-mode' are the following:
>
> ;;   e, =, RET : expand the macro form following point one step
> ;;   c, u, DEL : collapse the form following point
> ;;   q, C-c C-c: collapse all expanded forms and exit macrostep-mode
> ;;   n, TAB    : jump to the next macro form in the expansion
> ;;   p, M-TAB  : jump to the previous macro form in the expansion
>
> ;;   It's not very useful to enable and disable macrostep-mode directly.
> ;;   Instead, bind `macrostep-expand' to a key in `emacs-lisp-mode-map',
> ;;   for example C-c e:
>
> ;;   ,----
> ;;   | (define-key emacs-lisp-mode-map (kbd "C-c e") 'macrostep-expand)
> ;;   `----
>
> ;;   You can then enter macrostep-mode and expand a macro form completely
> ;;   by typing `C-c e e e ...' as many times as necessary.
>
> ;;   Exit macrostep-mode by typing `q' or `C-c C-c', or by successively
> ;;   typing `c' to collapse all surrounding expansions.
>
>
> ;; 2 Customization options
> ;; =======================
>
> ;;   Type `M-x customize-group RET macrostep RET' to customize options and
> ;;   faces.
>
> ;;   To display macro expansions in a separate window, instead of inline in
> ;;   the source buffer, customize `macrostep-expand-in-separate-buffer' to
> ;;   `t'.  The default is `nil'.  Whichever default behavior is selected,
> ;;   the alternative behavior can be obtained temporarily by giving a
> ;;   prefix argument to `macrostep-expand'.
>
> ;;   To have `macrostep' ignore compiler macros, customize
> ;;   `macrostep-expand-compiler-macros' to `nil'.  The default is `t'.
>
> ;;   Customize the faces `macrostep-macro-face',
> ;;   `macrostep-compiler-macro-face', and `macrostep-gensym-1' through
> ;;   `macrostep-gensym-5' to alter the appearance of macro expansions.
>
>
> ;; 3 Locally-bound macros
> ;; ======================
>
> ;;   As of version 0.9, `macrostep' can expand calls to a locally-bound
> ;;   macro, whether defined by a surrounding `(cl-)macrolet' form, or by
> ;;   another macro-defining macro.  In other words, it is possible to
> ;;   expand the inner `local-macro' forms in both the following examples,
> ;;   whether `local-macro' is defined by an enclosing `cl-macrolet' --
>
> ;;   ,----
> ;;   | (cl-macrolet ((local-macro (&rest args)
> ;;   |                 `(expansion of ,args)))
> ;;   |   (local-macro (do-something)))
> ;;   `----
>
> ;;   -- or by a macro which expands into `cl-macrolet', provided that its
> ;;   definition of macro is evaluated prior to calling `macrostep-expand':
>
> ;;   ,----
> ;;   | (defmacro with-local-macro (&rest body)
> ;;   |   `(cl-macrolet ((local-macro (&rest args)
> ;;   |                    `(expansion of ,args)))
> ;;   |      ,@body))
> ;;   |
> ;;   | (with-local-macro
> ;;   |     (local-macro (do something (else)))
> ;;   `----
>
> ;;   See the `with-js' macro in Emacs's `js.el' for a real example of the
> ;;   latter kind of macro.
>
> ;;   Expansion of locally-bound macros is implemented by instrumenting
> ;;   Emacs Lisp's macro-expander to capture the environment at point.  A
> ;;   similar trick is used to detect macro- and compiler-macro calls within
> ;;   expanded text so that they can be fontified accurately.
>
>
> ;; 4 Expanding sub-forms
> ;; =====================
>
> ;;   By moving point around in the macro expansion using
> ;;   `macrostep-next-macro' and `macrostep-prev-macro' (bound to the `n'
> ;;   and `p' keys), it is possible to expand other macro calls within the
> ;;   expansion before expanding the outermost form.  This can sometimes be
> ;;   useful, although it does not correspond to the real order of macro
> ;;   expansion in Emacs Lisp, which proceeds by fully expanding the outer
> ;;   form to a non-macro form before expanding sub-forms.
>
> ;;   The main reason to expand sub-forms out of order is to help with
> ;;   debugging macros which programmatically expand their arguments in
> ;;   order to rewrite them.  Expanding the arguments of such a macro lets
> ;;   you visualise what the macro definition would compute via
> ;;   `macroexpand-all'.
>
>
> ;; 5 Extending macrostep for other languages
> ;; =========================================
>
> ;;   Since version 0.9, it is possible to extend macrostep to work with
> ;;   other languages besides Emacs Lisp.  In typical Emacs fashion, this is
> ;;   implemented by setting buffer-local variables to different function
> ;;   values.  Six buffer-local variables define the language-specific part
> ;;   of the implementation:
>
> ;;   - `macrostep-sexp-bounds-function'
> ;;   - `macrostep-sexp-at-point-function'
> ;;   - `macrostep-environment-at-point-function'
> ;;   - `macrostep-expand-1-function'
> ;;   - `macrostep-print-function'
> ;;   - `macrostep-macro-form-p-function'
>
> ;;   Typically, an implementation for another language would set these
> ;;   variables in a major-mode hook.  See the docstrings of each variable
> ;;   for details on how each one is called and what it should return.  At a
> ;;   minimum, another language implementation needs to provide
> ;;   `macrostep-sexp-at-point-function', `macrostep-expand-1-function', and
> ;;   `macrostep-print-function'.  Lisp-like languages may be able to reuse
> ;;   the default `macrostep-sexp-bounds-function' if they provide another
> ;;   implementation of `macrostep-macro-form-p-function'.  Languages which
> ;;   do not implement locally-defined macros can set
> ;;   `macrostep-environment-at-point-function' to `ignore'.
>
> ;;   Note that the core `macrostep' machinery only interprets the return
> ;;   value of `macrostep-sexp-bounds-function', so implementations for
> ;;   other languages can use any internal representations of code and
> ;;   environments which is convenient.  Although the terminology is
> ;;   Lisp-specific, there is no reason that implementations could not be
> ;;   provided for non-Lisp languages with macro systems, provided there is
> ;;   some way of identifying macro calls and calling the compiler /
> ;;   preprocessor to obtain their expansions.
>
>
> ;; 6 Bugs and known limitations
> ;; ============================
>
> ;;   You can evaluate and edebug macro-expanded forms and step through the
> ;;   macro-expanded version, but the form that `eval-defun' and friends
> ;;   read from the buffer won't have the uninterned symbols of the real
> ;;   macro expansion.  This will probably work OK with CL-style gensyms,
> ;;   but may cause problems with `make-symbol' symbols if they have the
> ;;   same print name as another symbol in the expansion.  It's possible that
> ;;   using `print-circle' and `print-gensym' could get around this.
>
> ;;   Please send other bug reports and feature requests to the author.
>
>
> ;; 7 Acknowledgements
> ;; ==================
>
> ;;   Thanks to:
> ;;   - John Wiegley for fixing a bug with the face definitions under Emacs
> ;;     24 & for plugging macrostep in his [EmacsConf presentation]!
> ;;   - George Kettleborough for bug reports, and patches to highlight the
> ;;     expanded region and properly handle backquotes.
> ;;   - Nic Ferrier for suggesting support for local definitions within
> ;;     macrolet forms
> ;;   - Luís Oliveira for suggesting and implementing SLIME support
>
> ;;   `macrostep' was originally inspired by J. V. Toups's 'Deep Emacs Lisp'
> ;;   articles ([part 1], [part 2], [screencast]).
>
> ;;   [EmacsConf presentation] http://youtu.be/RvPFZL6NJNQ
>
> ;;   [part 1]
> ;;   http://dorophone.blogspot.co.uk/2011/04/deep-emacs-part-1.html
>
> ;;   [part 2]
> ;;   http://dorophone.blogspot.co.uk/2011/04/deep-emacs-lisp-part-2.html
>
> ;;   [screencast]
> ;;   http://dorophone.blogspot.co.uk/2011/05/monadic-parser-combinators-in-elisp.html
>
>
> ;; 8 Changelog
> ;; ===========

It would be better to convert this into a "News" section so that ELPA
can pick out the changelog.

> ;;   - v0.9.2, 2023-05-12:
> ;;     - name the keymap macrostep-mode-map, fixing a regression in v0.9.1
> ;;   - v0.9.1, 2023-03-12:
> ;;     - bug fixes, cleanup and modernization
> ;;   - v0.9, 2015-10-01:
> ;;     - separate into Elisp-specific and generic components
> ;;     - highlight and expand compiler macros
> ;;     - improve local macro expansion and macro form identification by
> ;;       instrumenting `macroexpand(-all)'
> ;;   - v0.8, 2014-05-29: fix a bug with printing the first element of lists
> ;;   - v0.7, 2014-05-11: expand locally-defined macros within
> ;;     `(cl-)macrolet' forms
> ;;   - v0.6, 2013-05-04: better handling of quote and backquote
> ;;   - v0.5, 2013-04-16: highlight region, maintain cleaner buffer state
> ;;   - v0.4, 2013-04-07: only enter macrostep-mode on successful
> ;;     macro-expansion
> ;;   - v0.3, 2012-10-30: print dotted lists correctly.  autoload
> ;;     definitions.
>
> ;;; Code:
>
> (require 'pp)
> (require 'ring)
> (require 'cl-lib)
>
> \f
> ;;; Constants and dynamically bound variables
> (defvar macrostep-overlays nil
>   "List of all macro stepper overlays in the current buffer.")
> (make-variable-buffer-local 'macrostep-overlays)

Here (and below) you can use defvar-local

> (defvar macrostep-gensym-depth nil
>   "Number of macro expansion levels that have introduced gensyms so far.")
> (make-variable-buffer-local 'macrostep-gensym-depth)
>
> (defvar macrostep-gensyms-this-level nil
>   "Non-nil if gensyms have been encountered during current level of macro expansion.")
> (make-variable-buffer-local 'macrostep-gensyms-this-level)
>
> (defvar macrostep-saved-undo-list nil
>   "Saved value of `buffer-undo-list' upon entering macrostep mode.")
> (make-variable-buffer-local 'macrostep-saved-undo-list)
>
> (defvar macrostep-saved-read-only nil
>   "Saved value of `buffer-read-only' upon entering macrostep mode.")
> (make-variable-buffer-local 'macrostep-saved-read-only)
>
> (defvar macrostep-expansion-buffer nil
>   "Non-nil if the current buffer is a macro-expansion buffer.")
> (make-variable-buffer-local 'macrostep-expansion-buffer)
>
> (defvar macrostep-outer-environment nil
>   "Outermost macro-expansion environment to use in macro-expansion buffers.
>
> This variable is used to save information about any enclosing
> `cl-macrolet' context when a macro form is expanded in a separate
> buffer.")
> (make-variable-buffer-local 'macrostep-outer-environment)
>
> ;;; Customization options and faces
> (defgroup macrostep nil
>   "Interactive macro stepper for Emacs Lisp."
>   :group 'lisp
>   :link '(emacs-commentary-link :tag "commentary" "macrostep.el")
>   :link '(emacs-library-link :tag "lisp file" "macrostep.el")
>   :link '(url-link :tag "web page" "https://github.com/joddie/macrostep"))

This URL seems out-of-date.

>
> (defface macrostep-gensym-1
>   '((((min-colors 16581375)) :foreground "#8080c0" :box t :bold t)
>     (((min-colors 8)) :background "cyan")
>     (t :inverse-video t))
>   "Face for gensyms created in the first level of macro expansion.")
>
> (defface macrostep-gensym-2
>   '((((min-colors 16581375)) :foreground "#8fbc8f" :box t :bold t)
>     (((min-colors 8)) :background "#00cd00")
>     (t :inverse-video t))
>   "Face for gensyms created in the second level of macro expansion.")
>
> (defface macrostep-gensym-3
>   '((((min-colors 16581375)) :foreground "#daa520" :box t :bold t)
>     (((min-colors 8)) :background "yellow")
>     (t :inverse-video t))
>   "Face for gensyms created in the third level of macro expansion.")
>
> (defface macrostep-gensym-4
>   '((((min-colors 16581375)) :foreground "#cd5c5c" :box t :bold t)
>     (((min-colors 8)) :background "red")
>     (t :inverse-video t))
>   "Face for gensyms created in the fourth level of macro expansion.")
>
> (defface macrostep-gensym-5
>   '((((min-colors 16581375)) :foreground "#da70d6" :box t :bold t)
>     (((min-colors 8)) :background "magenta")
>     (t :inverse-video t))
>   "Face for gensyms created in the fifth level of macro expansion.")
>
> (defface macrostep-expansion-highlight-face
>   `((((min-colors 16581375) (background light))
>      ,@(and (>= emacs-major-version 27) '(:extend t))
>      :background "#eee8d5")
>     (((min-colors 16581375) (background dark))
>      ,@(and (>= emacs-major-version 27) '(:extend t))

Is there any harm in adding :extend before Emacs 27?  Also, we won't
need the check in the core.

>      :background "#222222"))
>   "Face for macro-expansion highlight.")
>
> (defface macrostep-macro-face
>   '((t :underline t))
>   "Face for macros in macro-expanded code.")
>
> (defface macrostep-compiler-macro-face
>   '((t :slant italic))
>   "Face for compiler macros in macro-expanded code.")
>
> (defcustom macrostep-expand-in-separate-buffer nil
>   "When non-nil, show expansions in a separate buffer instead of inline."
>   :type 'boolean)
>
> (defcustom macrostep-expand-compiler-macros t
>   "When non-nil, also expand compiler macros."
>   :type 'boolean)
>
> ;; Need the following for making the ring of faces
> (defun macrostep-make-ring (&rest items)
>   "Make a ring containing all of ITEMS with no empty slots."
>   (let ((ring (make-ring (length items))))
>     (mapc (lambda (item) (ring-insert ring item)) (reverse items))
>     ring))

Isn't this `ring-convert-sequence-to-ring'?

>
> (defvar macrostep-gensym-faces
>   (macrostep-make-ring
>    'macrostep-gensym-1 'macrostep-gensym-2 'macrostep-gensym-3
>    'macrostep-gensym-4 'macrostep-gensym-5)
>   "Ring of all macrostepper faces for fontifying gensyms.")
>
> ;; Other modes can enable macrostep by redefining these functions to
> ;; language-specific versions.
> (defvar macrostep-sexp-bounds-function
>   #'macrostep-sexp-bounds
>   "Function to return the bounds of the macro form nearest point.
>
> It will be called with no arguments and should return a cons of
> buffer positions, (START . END).  It should use `save-excursion'
> to avoid changing the position of point.
>
> The default value, `macrostep-sexp-bounds', implements this for
> Emacs Lisp, and may be suitable for other Lisp-like languages.")
> (make-variable-buffer-local 'macrostep-sexp-bounds-function)
>
> (defvar macrostep-sexp-at-point-function
>   #'macrostep-sexp-at-point
>   "Function to return the macro form at point for expansion.
>
> It will be called with two arguments, the values of START and END
> returned by `macrostep-sexp-bounds-function', and with point
> positioned at START.  It should return a value suitable for
> passing as the first argument to `macrostep-expand-1-function'.
>
> The default value, `macrostep-sexp-at-point', implements this for
> Emacs Lisp, and may be suitable for other Lisp-like languages.")
> (make-variable-buffer-local 'macrostep-sexp-at-point-function)
>
> (defvar macrostep-environment-at-point-function
>   #'macrostep-environment-at-point
>   "Function to return the local macro-expansion environment at point.
>
> It will be called with no arguments, and should return a value
> suitable for passing as the second argument to
> `macrostep-expand-1-function'.
>
> The default value, `macrostep-environment-at-point', is specific
> to Emacs Lisp.  For languages which do not implement local
> macro-expansion environments, this should be set to `ignore'
> or `(lambda () nil)'.")
> (make-variable-buffer-local 'macrostep-environment-at-point-function)
>
> (defvar macrostep-expand-1-function
>   #'macrostep-expand-1
>   "Function to perform one step of macro-expansion.
>
> It will be called with two arguments, FORM and ENVIRONMENT, the
> return values of `macrostep-sexp-at-point-function' and
> `macrostep-environment-at-point-function' respectively.  It
> should return the result of expanding FORM by one step as a value
> which is suitable for passing as the argument to
> `macrostep-print-function'.
>
> The default value, `macrostep-expand-1', is specific to Emacs Lisp.")
> (make-variable-buffer-local 'macrostep-expand-1-function)
>
> (defvar macrostep-print-function
>   #'macrostep-pp
>   "Function to pretty-print macro expansions.
>
> It will be called with two arguments, FORM and ENVIRONMENT, the
> return values of `macrostep-sexp-at-point-function' and
> `macrostep-environment-at-point-function' respectively.  It
> should insert a pretty-printed representation at point in the
> current buffer, leaving point just after the inserted
> representation, without altering any other text in the current
> buffer.
>
> The default value, `macrostep-pp', is specific to Emacs Lisp.")
> (make-variable-buffer-local 'macrostep-print-function)
>
> (defvar macrostep-macro-form-p-function
>   #'macrostep-macro-form-p
>   "Function to check whether a form is a macro call.
>
> It will be called with two arguments, FORM and ENVIRONMENT -- the
> return values of `macrostep-sexp-at-point-function' and
> `macrostep-environment-at-point-function' respectively -- and
> should return non-nil if FORM would undergo macro-expansion in
> ENVIRONMENT.
>
> This is called only from `macrostep-sexp-bounds', so it need not
> be provided if a different value is used for
> `macrostep-sexp-bounds-function'.
>
> The default value, `macrostep-macro-form-p', is specific to Emacs Lisp.")
> (make-variable-buffer-local 'macrostep-macro-form-p-function)
>
> \f
> ;;; Define keymap and minor mode
> (define-obsolete-variable-alias 'macrostep-mode-keymap 'macrostep-mode-map "2023")
> (define-obsolete-variable-alias 'macrostep-keymap 'macrostep-mode-map "2022")
> (defvar macrostep-mode-map
>   (let ((map (make-sparse-keymap)))
>     (define-key map (kbd "RET") #'macrostep-expand)
>     (define-key map "=" #'macrostep-expand)
>     (define-key map "e" #'macrostep-expand)
>
>     (define-key map (kbd "DEL") #'macrostep-collapse)
>     (define-key map "u" #'macrostep-collapse)
>     (define-key map "c" #'macrostep-collapse)
>
>     (define-key map (kbd "TAB") #'macrostep-next-macro)
>     (define-key map "n" #'macrostep-next-macro)
>     (define-key map (kbd "M-TAB") #'macrostep-prev-macro)
>     (define-key map "p" #'macrostep-prev-macro)
>
>     (define-key map "q" #'macrostep-collapse-all)
>     (define-key map (kbd "C-c C-c") #'macrostep-collapse-all)
>     map)
>   "Keymap for `macrostep-mode'.")

This could be converted to defvar-keymap.

> ;;;###autoload
> (define-minor-mode macrostep-mode
>   "Minor mode for inline expansion of macros in Emacs Lisp source buffers.
>
> \\<macrostep-mode-map>Progressively expand macro forms with \
> \\[macrostep-expand], collapse them with \\[macrostep-collapse],
> and move back and forth with \\[macrostep-next-macro] and \
> \\[macrostep-prev-macro].  Use \\[macrostep-collapse-all] or collapse all
> visible expansions to quit and return to normal editing.
>
> \\{macrostep-mode-map}"
>   :lighter " Macro-Stepper"
>   :group 'macrostep
>   (if macrostep-mode
>       (progn
>         ;; Disable recording of undo information
>         (setq macrostep-saved-undo-list buffer-undo-list
>               buffer-undo-list t)
>         ;; Remember whether buffer was read-only
>         (setq macrostep-saved-read-only buffer-read-only
>               buffer-read-only t)
>         ;; Set up post-command hook to bail out on leaving read-only
>         (add-hook 'post-command-hook #'macrostep-command-hook nil t)
>         (message (substitute-command-keys "\
> \\<macrostep-mode-map>Entering macro stepper mode. \
> Use \\[macrostep-expand] to expand, \\[macrostep-collapse] to collapse, \
> \\[macrostep-collapse-all] to exit.")))
>
>     ;; Exiting mode
>     (if macrostep-expansion-buffer
>         ;; Kill dedicated expansion buffers
>         (quit-window t)
>       ;; Collapse any remaining overlays
>       (when macrostep-overlays (macrostep-collapse-all))
>       ;; Restore undo info & read-only state
>       (setq buffer-undo-list macrostep-saved-undo-list
>             buffer-read-only macrostep-saved-read-only
>             macrostep-saved-undo-list nil)
>       ;; Remove our post-command hook
>       (remove-hook 'post-command-hook #'macrostep-command-hook t))))
>
> (defun macrostep-command-hook ()
>   "Hook function for use by `post-command hook'.
> Bail out of `macrostep-mode' if the user types
> `\\[read-only-mode]' to make the buffer writable again."
>   (if (not buffer-read-only)
>       (macrostep-mode 0)))
>
> \f
> ;;; Interactive functions
> ;;;###autoload
> (defun macrostep-expand (&optional toggle-separate-buffer)
>   "Expand the macro form following point by one step.
>
> Enters `macrostep-mode' if it is not already active, making the
> buffer temporarily read-only.  If `macrostep-mode' is active and
> the form following point is not a macro form, search forward in
> the buffer and expand the next macro form found, if any.
>
> If optional argument TOGGLE-SEPARATE-BUFFER is non-nil (or set
>  with a prefix argument), the expansion is displayed in a
>  separate buffer instead of inline in the current buffer.
>  Setting `macrostep-expand-in-separate-buffer' to non-nil swaps
>  these two behaviors."
>   (interactive "P")
>   (cl-destructuring-bind (start . end)
>       (funcall macrostep-sexp-bounds-function)
>     (goto-char start)
>     (let* ((sexp (funcall macrostep-sexp-at-point-function start end))
>            (end (copy-marker end))
>            (text (buffer-substring start end))
>            (env (funcall macrostep-environment-at-point-function))
>            (expansion (funcall macrostep-expand-1-function sexp env)))
>
>       ;; Create a dedicated macro-expansion buffer and copy the text to
>       ;; be expanded into it, if required
>       (let ((separate-buffer-p
>              (if toggle-separate-buffer
>                  (not macrostep-expand-in-separate-buffer)
>                macrostep-expand-in-separate-buffer)))
>         (when (and separate-buffer-p (not macrostep-expansion-buffer))
>           (let ((mode major-mode)
>                 (buffer
>                  (get-buffer-create (generate-new-buffer-name "*macro expansion*"))))
>             (set-buffer buffer)

Shouldn't this be a `with-current-buffer'?

>             (funcall mode)
>             (setq macrostep-expansion-buffer t)
>             (setq macrostep-outer-environment env)
>             (save-excursion
>               (setq start (point))
>               (insert text)
>               (setq end (point-marker)))
>             (pop-to-buffer buffer))))
>
>       (unless macrostep-mode (macrostep-mode t))
>       (let ((existing-overlay (macrostep-overlay-at-point))
>             (macrostep-gensym-depth macrostep-gensym-depth)
>             (macrostep-gensyms-this-level nil)
>             priority)
>         (if existing-overlay
>             (progn        ; Expanding part of a previous macro-expansion
>               (setq priority (1+ (overlay-get existing-overlay 'priority)))
>               (setq macrostep-gensym-depth
>                     (overlay-get existing-overlay 'macrostep-gensym-depth)))

Multiple `setq's can be merged into one, so the progn isn't necessary here.

>           ;; Expanding source buffer text
>           (setq priority 1)
>           (setq macrostep-gensym-depth -1))
>
>         (with-silent-modifications
>           (atomic-change-group
>             (let ((inhibit-read-only t))
>               (save-excursion
>                 ;; Insert expansion
>                 (funcall macrostep-print-function expansion env)
>                 ;; Delete the original form
>                 (macrostep-collapse-overlays-in (point) end)
>                 (delete-region (point) end)
>                 ;; Create a new overlay
>                 (let* ((overlay
>                         (make-overlay start
>                                       (if (looking-at "\n")
>                                           (1+ (point))
>                                         (point))))
>                        (highlight-overlay (unless macrostep-expansion-buffer
>                                             (copy-overlay overlay))))
>                   (unless macrostep-expansion-buffer
>                     ;; Highlight the overlay in original source buffers only
>                     (overlay-put highlight-overlay 'face 'macrostep-expansion-highlight-face)
>                     (overlay-put highlight-overlay 'priority -1)
>                     (overlay-put overlay 'macrostep-highlight-overlay highlight-overlay))
>                   (overlay-put overlay 'priority priority)
>                   (overlay-put overlay 'macrostep-original-text text)
>                   (overlay-put overlay 'macrostep-gensym-depth macrostep-gensym-depth)
>                   (push overlay macrostep-overlays))))))))))
>
> (defun macrostep-collapse ()
>   "Collapse the innermost macro expansion near point to its source text.
>
> If no more macro expansions are visible after this, exit
> `macrostep-mode'."
>   (interactive)
>   (let ((overlay (macrostep-overlay-at-point)))
>     (when (not overlay) (error "No macro expansion at point"))
>     (let ((inhibit-read-only t))
>       (with-silent-modifications
>         (atomic-change-group
>           (macrostep-collapse-overlay overlay)))))
>   (if (not macrostep-overlays)

Or `unless'

>       (macrostep-mode 0)))
>
> (defun macrostep-collapse-all ()
>   "Collapse all visible macro expansions and exit `macrostep-mode'."
>   (interactive)
>   (let ((inhibit-read-only t))
>     (with-silent-modifications
>       (dolist (overlay macrostep-overlays)
>         (let ((outermost (= (overlay-get overlay 'priority) 1)))
>           ;; We only need restore the original text for the outermost
>           ;; overlays
>           (macrostep-collapse-overlay overlay (not outermost))))))
>   (setq macrostep-overlays nil)
>   (macrostep-mode 0))
>
> (defun macrostep-next-macro ()
>   "Move point forward to the next macro form in macro-expanded text."
>   (interactive)
>   (let* ((start (if (get-text-property (point) 'macrostep-macro-start)
>                     (1+ (point))
>                   (point)))
>          (next (next-single-property-change start 'macrostep-macro-start)))
>     (if next
>         (goto-char next)
>       (error "No more macro forms found"))))
>
> (defun macrostep-prev-macro ()
>   "Move point back to the previous macro form in macro-expanded text."
>   (interactive)
>   (let (prev)
>     (save-excursion
>       (while
>           (progn
>             (setq prev (previous-single-property-change
>                         (point) 'macrostep-macro-start))
>             (if (or (not prev)
>                     (get-text-property (1- prev) 'macrostep-macro-start))
>                 nil
>               (prog1 t (goto-char prev))))))
>     (if prev
>         (goto-char (1- prev))
>       (error "No previous macro form found"))))
>
> \f
> ;;; Utility functions (not language-specific)
>
> (defun macrostep-overlay-at-point ()
>   "Return the innermost macro stepper overlay at point."
>   (cdr (get-char-property-and-overlay (point) 'macrostep-original-text)))
>
> (defun macrostep-collapse-overlay (overlay &optional no-restore-p)
>   "Collapse macro-expansion buffer OVERLAY and restore the unexpanded source text.
>
> As a minor optimization, does not restore the original source
> text if NO-RESTORE-P is non-nil.  This is safe to do when
> collapsing all the sub-expansions of an outer overlay, since the
> outer overlay will restore the original source itself.
>
> Also removes the overlay from `macrostep-overlays'."
>   (with-current-buffer (overlay-buffer overlay)
>     ;; If we're cleaning up we don't need to bother restoring text
>     ;; or checking for inner overlays to delete
>     (unless no-restore-p
>       (let* ((start (overlay-start overlay))
>              (end (overlay-end overlay))
>              (text (overlay-get overlay 'macrostep-original-text))
>              (sexp-end
>               (copy-marker
>                (if (equal (char-before end) ?\n) (1- end) end))))
>         (macrostep-collapse-overlays-in start end)
>         (goto-char (overlay-start overlay))
>         (save-excursion
>           (insert text)
>           (delete-region (point) sexp-end))))
>     ;; Remove overlay from the list and delete it
>     (setq macrostep-overlays
>           (delq overlay macrostep-overlays))
>     (let ((highlight-overlay (overlay-get overlay 'macrostep-highlight-overlay)))
>       (when highlight-overlay (delete-overlay highlight-overlay)))
>     (delete-overlay overlay)))
>
> (defun macrostep-collapse-overlays-in (start end)
>   "Collapse all macrostepper overlays that are strictly between START and END.
>
> Will not collapse overlays that begin at START and end at END."
>   (dolist (ol (overlays-in start end))
>     (when (and (overlay-buffer ol)        ; collapsing may delete other overlays
>                (> (overlay-start ol) start)
>                (< (overlay-end ol) end)
>                (overlay-get ol 'macrostep-original-text))
>       (macrostep-collapse-overlay ol t))))
>
> \f
> ;;; Emacs Lisp implementation
>
> (defun macrostep-sexp-bounds ()
>   "Find the bounds of the macro form nearest point.
>
> If point is not before an open-paren, moves up to the nearest
> enclosing list.  If the form at point is not a macro call,
> attempts to move forward to the next macro form as determined by
> `macrostep-macro-form-p-function'.
>
> Returns a cons of buffer positions, (START . END)."
>   (save-excursion
>     (if (not (looking-at "[(`]"))
>         (backward-up-list 1))
>     (if (equal (char-before) ?`)
>         (backward-char))
>     (let ((sexp (funcall macrostep-sexp-at-point-function))
>           (env (funcall macrostep-environment-at-point-function)))
>       ;; If this isn't a macro form, try to find the next one in the buffer
>       (unless (funcall macrostep-macro-form-p-function sexp env)
>         (condition-case nil
>             (macrostep-next-macro)
>           (error
>            (if (consp sexp)
>                (error "(%s ...) is not a macro form" (car sexp))
>              (error "Text at point is not a macro form"))))))
>     (cons (point) (scan-sexps (point) 1))))
>
> (defun macrostep-sexp-at-point (&rest _ignore)
>   "Return the sexp near point for purposes of macro-stepper expansion.
>
> If the sexp near point is part of a macro expansion, returns the
> saved text of the macro expansion, and does not read from the
> buffer.  This preserves uninterned symbols in the macro
> expansion, so that they can be fontified consistently.  (See
> `macrostep-print-sexp'.)"
>   (or (get-text-property (point) 'macrostep-expanded-text)
>       (sexp-at-point)))
>
> (defun macrostep-macro-form-p (form environment)
>   "Return non-nil if FORM would be evaluated via macro expansion;
> as considered within ENVIRONMENT.
>
> If FORM is an invocation of a macro defined by `defmacro' or an
> enclosing `cl-macrolet' form, return the symbol `macro'.
>
> If `macrostep-expand-compiler-macros' is non-nil and FORM is a
> call to a function with a compiler macro, return the symbol
> `compiler-macro'.
>
> Otherwise, return nil."
>   (car (macrostep--macro-form-info form environment t)))
>
> (defun macrostep--macro-form-info (form environment &optional inhibit-autoload)
>   "Return information about macro definitions that apply to FORM.
>
> If no macros are involved in the evaluation of FORM within
> ENVIRONMENT, returns nil.  Otherwise, returns a cons (TYPE
> . DEFINITION).
>
> If FORM would be evaluated by a macro defined by `defmacro',
> `cl-macrolet', etc., TYPE is the symbol `macro' and DEFINITION is
> the macro definition, as a function.
>
> If `macrostep-expand-compiler-macros' is non-nil and FORM would
> be compiled using a compiler macro, TYPE is the symbol
> `compiler-macro' and DEFINITION is the function that implements
> the compiler macro.
>
> If FORM is an invocation of an autoloaded macro, the behavior
> depends on the value of INHIBIT-AUTOLOAD.  If INHIBIT-AUTOLOAD is
> nil, the file containing the macro definition will be loaded
> using `load-library' and the macro definition returned as normal.
> If INHIBIT-AUTOLOAD is non-nil, no files will be loaded, and the
> value of DEFINITION in the result will be nil."
>   (if (not (and (consp form)
>                 (symbolp (car form))))
>       `(nil . nil)
>     (let* ((head (car form))
>            (local-definition (assoc-default head environment #'eq)))
>       (if local-definition
>           `(macro . ,local-definition)
>         (let ((compiler-macro-definition
>                (and macrostep-expand-compiler-macros
>                     (or (get head 'compiler-macro)
>                         (get head 'cl-compiler-macro)))))
>           (if (and compiler-macro-definition
>                    (not (eq form
>                             (apply compiler-macro-definition form (cdr form)))))
>               `(compiler-macro . ,compiler-macro-definition)
>             (condition-case nil
>                 (let ((fun (indirect-function head)))
>                   (cl-case (car-safe fun)
>                     ((macro)
>                      `(macro . ,(cdr fun)))
>                     ((autoload)
>                      (when (memq (nth 4 fun) '(macro t))
>                        (if inhibit-autoload
>                            `(macro . nil)
>                          (load-library (nth 1 fun))
>                          (macrostep--macro-form-info form nil))))
>                     (t
>                      `(nil . nil))))
>               (void-function nil))))))))
>
> (defun macrostep-expand-1 (form environment)
>   "Return result of macro-expanding by exactly one step the top level of FORM.
> This is done within ENVIRONMENT.
>
> Unlike `macroexpand', this function does not continue macro
> expansion until a non-macro-call results."
>   (cl-destructuring-bind (type . definition)
>       (macrostep--macro-form-info form environment)
>     (cl-ecase type
>       ((nil)
>        form)
>       ((macro)
>        (apply definition (cdr form)))
>       ((compiler-macro)
>        (let ((expansion (apply definition form (cdr form))))
>          (if (equal form expansion)
>              (error "Form left unchanged by compiler macro")
>            expansion))))))
>
> (put 'macrostep-grab-environment-failed 'error-conditions
>      '(macrostep-grab-environment-failed error))
>
> (defun macrostep-environment-at-point ()
>   "Return the local macro-expansion environment at point, if any.
>
> The local environment includes macros declared by any `macrolet'
> or `cl-macrolet' forms surrounding point, as well as by any macro
> forms which expand into a `macrolet'.
>
> The return value is an alist of elements (NAME . FUNCTION), where
> NAME is the symbol locally bound to the macro and FUNCTION is the
> lambda expression that returns its expansion."
>   ;; If point is on a macro form within an expansion inserted by
>   ;; `macrostep-print-sexp', a local environment may have been
>   ;; previously saved as a text property.
>   (let ((saved-environment
>          (get-text-property (point) 'macrostep-environment)))
>     (if saved-environment
>         saved-environment
>       ;; Otherwise, we (ab)use the macro-expander to return the
>       ;; environment at point.  If point is not at an evaluated
>       ;; position in the containing form,
>       ;; `macrostep-environment-at-point-1' will raise an error, and
>       ;; we back up progressively through the containing forms until
>       ;; it succeeds.
>       (save-excursion
>         (catch 'done
>           (while t
>             (condition-case nil
>                 (throw 'done (macrostep-environment-at-point-1))
>               (macrostep-grab-environment-failed
>                (condition-case nil
>                    (backward-sexp)
>                  (scan-error (backward-up-list)))))))))))
>
> (defun macrostep-environment-at-point-1 ()
>   "Attempt to extract the macro environment that would be active at point.
>
> If point is not at an evaluated position within the containing
> form, raise an error."
>   ;; Macro environments are extracted using Emacs Lisp's builtin
>   ;; macro-expansion machinery.  The form containing point is copied
>   ;; to a temporary buffer, and a call to
>   ;; `--macrostep-grab-environment--' is inserted at point.  This
>   ;; altered form is then fully macro-expanded, in an environment
>   ;; where `--macrostep-grab-environment--' is defined as a macro
>   ;; which throws the environment to a uniquely-generated tag.
>   (let* ((point-at-top-level
>           (save-excursion
>             (while (ignore-errors (backward-up-list) t))
>             (point)))
>          (enclosing-form
>           (buffer-substring point-at-top-level
>                             (scan-sexps point-at-top-level 1)))
>          (position (- (point) point-at-top-level))
>          (tag (make-symbol "macrostep-grab-environment-tag"))
>          (grab-environment '--macrostep-grab-environment--))
>     (if (= position 0)
>         nil
>       (with-temp-buffer
>         (emacs-lisp-mode)
>         (insert enclosing-form)
>         (goto-char (+ (point-min) position))
>         (prin1 `(,grab-environment) (current-buffer))
>         (let ((form (read (copy-marker (point-min)))))
>           (catch tag
>             (cl-letf (((symbol-function #'message) (symbol-function #'format)))

Is this supposed to be an `inhibit-message'?

>               (with-no-warnings
>                 (ignore-errors
>                   (macroexpand-all
>                    `(cl-macrolet ((,grab-environment (&environment env)
>                                     (throw ',tag env)))
>                       ,form)))))
>             (signal 'macrostep-grab-environment-failed nil)))))))
>
> (defun macrostep-collect-macro-forms (form &optional environment)
>   "Identify sub-forms of FORM which undergo macro-expansion.
>
> FORM is an Emacs Lisp form.  ENVIRONMENT is a local environment of
> macro definitions.
>
> The return value is a list of two elements, (MACRO-FORM-ALIST
> COMPILER-MACRO-FORMS).
>
> MACRO-FORM-ALIST is an alist of elements of the form (SUBFORM
> . ENVIRONMENT), where SUBFORM is a form which undergoes
> macro-expansion in the course of expanding FORM, and ENVIRONMENT
> is the local macro environment in force when it is expanded.
>
> COMPILER-MACRO-FORMS is a list of subforms which would be
> compiled using a compiler macro.  Since there is no standard way
> to provide a local compiler-macro definition in Emacs Lisp, no
> corresponding local environments are collected for these.
>
> Forms and environments are extracted from FORM by instrumenting
> Emacs's builtin `macroexpand' function and calling
> `macroexpand-all'."
>   (let* ((macro-form-alist '())
>          (compiler-macro-forms '())
>          (override (lambda (real-macroexpand form environment &rest args)
>                      (let ((expansion
>                             (apply real-macroexpand form environment args)))
>                        (cond ((not (eq expansion form))
>                               (setq macro-form-alist
>                                     (cons (cons form environment)
>                                           macro-form-alist)))
>                              ((and (consp form)
>                                    (symbolp (car form))
>                                    macrostep-expand-compiler-macros
>                                    (not (eq form
>                                             (cl-compiler-macroexpand form))))
>                               (setq compiler-macro-forms
>                                     (cons form compiler-macro-forms))))
>                        expansion))))
>     (cl-macrolet ((with-override (fn &rest body)
>                     `(cl-letf (((symbol-function ,fn)
>                                 (apply-partially override (indirect-function ,fn))))
>                        ,@body))
>                   (with-macroexpand-1 (&rest body)
>                     (if (< emacs-major-version 30)
>                         `(progn ,@body) `(with-override #'macroexpand-1 ,@body)))
>                   (with-macroexpand (&rest body)
>                     `(with-override #'macroexpand ,@body)))
>       (with-macroexpand-1
>        (with-macroexpand
>         (ignore-errors
>           (macroexpand-all form environment)))))
>     (list macro-form-alist compiler-macro-forms)))
>
> (defvar macrostep-collected-macro-form-alist nil
>   "An alist of macro forms and environments.
> Controls the printing of sub-forms in `macrostep-print-sexp'.")
>
> (defvar macrostep-collected-compiler-macro-forms nil
>   "A list of compiler-macro forms to be highlighted in `macrostep-print-sexp'.")
>
> (defun macrostep-pp (sexp environment)
>   "Pretty-print SEXP, fontifying macro forms and uninterned symbols.
> This is done within ENVIRONMENT."
>   (cl-destructuring-bind
>       (macrostep-collected-macro-form-alist
>        macrostep-collected-compiler-macro-forms)
>       (macrostep-collect-macro-forms sexp environment)
>     (let ((print-quoted t))
>       (macrostep-print-sexp sexp)
>       ;; Point is now after the expanded form; pretty-print it
>       (save-restriction
>         (narrow-to-region (scan-sexps (point) -1) (point))
>         (save-excursion
>           (pp-buffer)
>           ;; Remove the extra newline inserted by pp-buffer
>           (goto-char (point-max))
>           (delete-region
>            (point)
>            (save-excursion (skip-chars-backward " \t\n") (point))))
>         ;; Indent the newly-inserted form in context
>         (widen)
>         (save-excursion
>           (backward-sexp)
>           (indent-sexp))))))
>
> ;; This must be defined before `macrostep-print-sexp':
> (defmacro macrostep-propertize (form &rest plist)
>   "Evaluate FORM, applying syntax properties in PLIST to any inserted text."
>   (declare (indent 1)
>            (debug (&rest form)))
>   (let ((start (make-symbol "start")))
>     `(let ((,start (point)))
>        (prog1
>            ,form
>          ,@(cl-loop for (key value) on plist by #'cddr
>                     collect `(put-text-property ,start (point)
>                                                 ,key ,value))))))
>
> (defun macrostep-print-sexp (sexp)
>   "Insert SEXP like `print', fontifying macro forms and uninterned symbols.
>
> Fontifies uninterned symbols and macro forms using
> `font-lock-face' property, and saves the actual text of SEXP's
> sub-forms as the `macrostep-expanded-text' text property so that
> any uninterned symbols can be reused in macro expansions of the
> sub-forms.  See also `macrostep-sexp-at-point'.
>
> Macro and compiler-macro forms within SEXP are identified by
> comparison with the `macrostep-collected-macro-form-alist' and
> `macrostep-collected-compiler-macro-forms' variables, which
> should be dynamically let-bound around calls to this function."
>   (cond
>    ((symbolp sexp)
>     ;; Fontify gensyms
>     (if (not (eq sexp (intern-soft (symbol-name sexp))))
>         (macrostep-propertize
>             (prin1 sexp (current-buffer))
>           'font-lock-face (macrostep-get-gensym-face sexp))
>       ;; Print other symbols as normal
>       (prin1 sexp (current-buffer))))
>
>    ((listp sexp)
>     ;; Print quoted and quasiquoted forms nicely.
>     (let ((head (car sexp)))
>       (cond ((and (eq head 'quote)      ; quote
>                   (= (length sexp) 2))
>              (insert "'")
>              (macrostep-print-sexp (cadr sexp)))
>
>             ((and (eq head '\`)         ; backquote
>                   (= (length sexp) 2))
>              (if (assq sexp macrostep-collected-macro-form-alist)
>                  (macrostep-propertize
>                      (insert "`")
>                    'macrostep-expanded-text sexp
>                    'macrostep-macro-start t
>                    'font-lock-face 'macrostep-macro-face)
>                (insert "`"))
>              (macrostep-print-sexp (cadr sexp)))
>
>             ((and (memq head '(\, \,@)) ; unquote
>                   (= (length sexp) 2))
>              (princ head (current-buffer))
>              (macrostep-print-sexp (cadr sexp)))
>
>             (t                          ; other list form
>              (cl-destructuring-bind (macro? . environment)
>                  (or (assq sexp macrostep-collected-macro-form-alist)
>                      '(nil . nil))
>                (let
>                    ((compiler-macro?
>                      (memq sexp macrostep-collected-compiler-macro-forms)))
>                  (if (or macro? compiler-macro?)
>                      (progn
>                        ;; Save the real expansion as a text property on the
>                        ;; opening paren
>                        (macrostep-propertize
>                         (insert "(")
>                         'macrostep-macro-start t
>                         'macrostep-expanded-text sexp
>                         'macrostep-environment environment)
>                        ;; Fontify the head of the macro
>                        (macrostep-propertize
>                         (macrostep-print-sexp head)
>                         'font-lock-face
>                         (if macro?
>                             'macrostep-macro-face
>                           'macrostep-compiler-macro-face)))
>                    ;; Not a macro form
>                    (insert "(")
>                    (macrostep-print-sexp head))))
>
>              ;; Print remaining list elements
>              (setq sexp (cdr sexp))
>              (when sexp (insert " "))
>              (while sexp
>                (if (listp sexp)
>                    (progn
>                      (macrostep-print-sexp (car sexp))
>                      (when (cdr sexp) (insert " "))
>                      (setq sexp (cdr sexp)))
>                  ;; Print tail of dotted list
>                  (insert ". ")
>                  (macrostep-print-sexp sexp)
>                  (setq sexp nil)))
>              (insert ")")))))
>
>    ;; Print everything except symbols and lists as normal
>    (t (prin1 sexp (current-buffer)))))
>
> (defun macrostep-get-gensym-face (symbol)
>   "Return the face to use in fontifying SYMBOL in printed macro expansions.
>
> All symbols introduced in the same level of macro expansion are
> fontified using the same face (modulo the number of faces; see
> `macrostep-gensym-faces')."
>   (or (get symbol 'macrostep-gensym-face)
>       (progn
>         (if (not macrostep-gensyms-this-level)
>             (setq macrostep-gensym-depth (1+ macrostep-gensym-depth)
>                   macrostep-gensyms-this-level t))
>         (let ((face (ring-ref macrostep-gensym-faces macrostep-gensym-depth)))
>           (put symbol 'macrostep-gensym-face face)
>           face))))
>
> \f
> (provide 'macrostep)
> ;; Local Variables:
> ;; indent-tabs-mode: nil
> ;; End:
> ;;; macrostep.el ends here

Isn't there also a C-preprecossor implementation for macrostep?  Would
the plan be to include that as well?


-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 86%]

* Re: [ELPA] [PATCH] CSS readability improvements
  @ 2024-03-17 14:43 99%     ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-17 14:43 UTC (permalink / raw)
  To: Adam Porter; +Cc: Stefan Monnier, emacs-devel

Adam Porter <adam@alphapapa.net> writes:

> Hi Stefan,
>
> On 3/16/24 23:14, Stefan Monnier wrote:
>> Hi Adam,
>> Thank you very much for these.  Could you point to existing places
>> in
>> `elpa.(non)gnu.org` where we can see the current problems, so as to help
>> me understand what's the actual intended impact of your changes?
>
> You can see these issues on various packages of mine whose readmes on
> ELPA are generated from Org manuals, such as
> <https://elpa.gnu.org/devel/listen.html> (see the tables listing
> commands under "Commands", which are displayed without any space
> between them; and the DL list under "Repeat modes"), and
> <https://elpa.gnu.org/packages/activities.html> (see the FAQ section).

Not related to the patch, why are you using description lists for FAQs?

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: (byte-compile '(append '(1 2) '(3 4)))
  @ 2024-03-16 13:55 99%                 ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-16 13:55 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: Felician Nemeth, emacs-devel

"Basil L. Contovounesios" <basil@contovou.net> writes:

> Philip Kaludercic [2024-03-16 12:46 +0000] wrote:
>
>> I am not sure what the danger is in the case of constant, quoted lists,
>> but I am not familiar with the byte compiler either.  It seems like this
>>
>> diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
>> index f75be3f71ad..e6f18590705 100644
>> --- a/lisp/emacs-lisp/byte-opt.el
>> +++ b/lisp/emacs-lisp/byte-opt.el
>> @@ -1599,6 +1599,12 @@ byte-optimize-append
>>                           (cdr args))
>>                     (cdr newargs)))
>>  
>> +            ;; (append '(C1...) ... '(C2...)) -> (append C1... ... C2...)
>> +            ((cl-loop for arg in args
>> +                      always (and (eq (car arg) 'quote)
>> +                                  (proper-list-p (cdr arg))))
>> +             `',(mapcan #'cadr args))
>> +
>>              ;; non-terminal arg
>>              ((cdr args)
>>               (cond
>>
>>
>> would do the trick, and the byte-code is even better:
>>
>> byte code:
>>   args: nil
>> 0	constant  (1 2 3 4)
>> 1	return	  
>
> Is this correct?  According to its docstring, append's last argument
> must be eq to the tail of its return value.

This little test indicates that it would still be eq:

((macro . (lambda (arg)
	    `(eq (cddadr (byte-optimize-append '(append '(1 2) ,arg)))
		 ,arg)))
 '(3 4)) ;=> t

since the mapcan or rather nconc makes the same promise.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: (byte-compile '(append '(1 2) '(3 4)))
  @ 2024-03-16 12:46 88%             ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-03-16 12:46 UTC (permalink / raw)
  To: Felician Nemeth; +Cc: emacs-devel

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

Felician Nemeth <felician.nemeth@gmail.com> writes:

> (disassemble (byte-compile '(append '(1 2) '(3 4))))
>
> resuts in
>
> byte code:
>   args: nil
> 0	constant  append
> 1	constant  (1 2)
> 2	constant  (3 4)
> 3	call	  2
> 4	return	  
>
> Instead I expected it to be something like
>
> byte code:
>   args: nil
> 0	constant  1
> 1	constant  2
> 2	constant  3
> 3	constant  4
> 4	list4	  
> 5	return	  
>
> I've never looked at byte-code optimization before, and I'm guessing
> this is not a huge improvement, but I still wonder when all the
> arguments of side-effect-free function are constants would it make sense
> to calculate the result at compile time.

`byte-optimize-append' mentions:

  ;; There is (probably) too much code relying on `append' to return a
  ;; new list for us to do full constant-folding; these transformations
  ;; preserve the allocation semantics.

I am not sure what the danger is in the case of constant, quoted lists,
but I am not familiar with the byte compiler either.  It seems like this


[-- Attachment #2: Type: text/plain, Size: 650 bytes --]

diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index f75be3f71ad..e6f18590705 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1599,6 +1599,12 @@ byte-optimize-append
                          (cdr args))
                    (cdr newargs)))
 
+            ;; (append '(C1...) ... '(C2...)) -> (append C1... ... C2...)
+            ((cl-loop for arg in args
+                      always (and (eq (car arg) 'quote)
+                                  (proper-list-p (cdr arg))))
+             `',(mapcan #'cadr args))
+
             ;; non-terminal arg
             ((cdr args)
              (cond

[-- Attachment #3: Type: text/plain, Size: 151 bytes --]


would do the trick, and the byte-code is even better:

byte code:
  args: nil
0	constant  (1 2 3 4)
1	return	  


-- 
	Philip Kaludercic on peregrine

^ permalink raw reply related	[relevance 88%]

* Re: builtin completion ?
  @ 2024-03-15 15:48 97% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-15 15:48 UTC (permalink / raw)
  To: hx; +Cc: emacs-devel

hx <silent2600@gmail.com> writes:

> I work on a linux computer (emacs26) without internet,usb,share ...
> developing C program,
> no way to install auto-complete/company-mode/lsp,
>
> when I edit my init.el, (setq var-xx-, no auto completion, painfull,
> any package can complete elisp variable/function like auto-complete-mode ?

Not /auto/ completion, but `completion-at-point' is bound by default,
and you can configure `tab-always-indent' to have TAB provide
completions as well.  They will pop up in the completion buffer, just
like with minibuffer completions.

> For c programming, I only have cscope, but also no function/var completion,
> there is cedet, I will try to configure it.

I am not sure if Emacs 26 had completion based on TAGS, but if Emacs was
installed using some standard mechanism, then you should have etags
available that could index the symbols in a project, that completion
could make use of.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 97%]

* Re: Adding package "Loopy" to Non-GNU Devel?
  @ 2024-03-14 18:52 99%           ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-14 18:52 UTC (permalink / raw)
  To: Okamsn; +Cc: emacs-devel

(Sorry for the late response)

Okamsn <okamsn@protonmail.com> writes:

> Philip Kaludercic wrote:
>> Okamsn <okamsn@protonmail.com> writes:
>> 
>>> Okamsn wrote:
>>>> Philip Kaludercic wrote:
>>>>> Okamsn <okamsn@protonmail.com> writes:
>>>>>> I keep the extension package in the same GitHub repo as the main package for
>>>>>> testing purposes.  The Dash functionality was requested by a user, but
>>>>>> Dash is
>>>>>> not used by the rest of the package.  Because of that, I put the Dash
>>>>>> functionality in a small separate package.
>>>>>
>>>>> You are talking about the loopy-dash.el file in the same branch, right?
>>>>
>>>> Yes.
>>>>
>>>>> If possible, it would be better if you could at least maintain it in a
>>>>> separate branch.
>>>>
>>>> If I added the file "loopy-dash.el" to an ".elpaignore" file in the main
>>>> branch and used GitHub Actions to push any changes from the main branch
>>>> to another branch containing the file "loopy-dash.el", would that be
>>>> acceptable?
>> 
>> Sorry for not answering earlier, this doesn't really solve the issue,
>> since the root issue is that when using package-vc or elpa-admin, you
>> still have two versions of the file in `load-path'.
>> 
>>>
>>> Hello,
>>>
>>> I figured out how to make GitHub automatically copy changes of the file
>>> to another branch when the master branch changes, and have listed the
>>> file `loopy-dash.el` in the `.elpaignore` file on the master branch.
>> 
>> If we were to disregard examples as those mentioned above, then this
>> would be an acceptable solution, but I'd rather not, unless you
>> categorically reject having two separate and disjoint branches.
>
> I would like to keep the development of the packages together, since I 
> still change the implementation details. Having them together makes 
> testing for breakage much easier.

One last idea would be to use worktrees, i.e. basically keep development
in separate branches that are simultaneously checked.

> What if I also had GitHub copy changes into a separate branch that only 
> contained the Loopy package and the documentation files? This would 
> avoid having the two copies of `loopy-dash.el`. Would that work for 
> Package VC?

No, since upon installing loopy as a VC package, you'll still have the
loopy-dash.el file as part of the checked out repository and the
loopy-dash.el provided by the dependency.

>>> I have attached a patch file. Are there any other changes that you would
>>> like made?
>> 
>> I don't think there is anything else (the only thing I can vainly try to
>> bring up is that having a diminutive as the name of a macro is something
>> I find peculiar, and I can imagine would keep a number of other people
>> from using the otherwise nice package, but it seems it is too late for
>> that now?)
>
> I think that it is too late, because it has existed on MELPA for a few 
> years with that name. If it helps, I was not thinking of it as a 
> diminutive, just the normal adjective and the slang usage: 
> https://www.thefreedictionary.com/loopy. I acknowledge that your point 
> probably also applies for the slang definition, but I still like the name.

In that case forget my comment.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: [PATCH] Flymake Support Indicator Errors in Margin
  @ 2024-03-12  9:24 96% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-12  9:24 UTC (permalink / raw)
  To: Elijah G; +Cc: emacs-devel

Elijah G <eg642616@gmail.com> writes:

> Hello developers,
> this is my first time contributing to emacs,
> i made support for displaying errors in margin for flymake like flycheck
> does,
> This allows indicating errors in both text and graphical mode.
>
> I've sent my copyright assignment request.
>
> Since this is my first time contributing i would like to hear your
> suggestions and thoughts
>
> Thanks.
> From 0d4539c6b8483eb13cfcdde3d73c71e430fdb30b Mon Sep 17 00:00:00 2001
> From: Elias G <eg642616@gmail.com>
> Date: Mon, 11 Mar 2024 13:35:06 -0600
> Subject: [PATCH] Flymake Support Indicator Errors in Margin
>
> ---
>  etc/NEWS                  |  11 ++++
>  lisp/progmodes/flymake.el | 117 +++++++++++++++++++++++++++++++++-----
>  2 files changed, 114 insertions(+), 14 deletions(-)
>
> diff --git a/etc/NEWS b/etc/NEWS
> index 19cd170e5c7..83cf1ba9962 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -1121,6 +1121,17 @@ in a clean environment.
>  
>  ** Flymake
>  
> ++++
> +*** New user option 'flymake-indicator-type'
> +Indicate which indicator type to use for display errors.
> +
> +The value can be nil (dont indicate errors but just highlight them),
                            ^
                            don't
                            
> +fringes (use fringes) or margins (use margins).

But I am not sure if you really need to document this in NEWS.  In fact,
it might be possible to merge this and the next point:

> +
> ++++
> +*** Support Display Errors Indicator in margin
> +This allow indicate errors in both graphical and text display.
> +
>  +++
>  *** New user option 'flymake-show-diagnostics-at-end-of-line'.
>  When non-nil, Flymake shows summarized descriptions of diagnostics at
> diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
> index db00cc59c0e..835f2057109 100644
> --- a/lisp/progmodes/flymake.el
> +++ b/lisp/progmodes/flymake.el
> @@ -180,6 +180,73 @@ See `flymake-error-bitmap' and `flymake-warning-bitmap'."
>  		 (const right-fringe)
>  		 (const :tag "No fringe indicators" nil)))
>  
> +(defcustom flymake-indicator-type 'fringes
> +  "Indicate which indicator type to use for display errors.
> +
> +The value can be nil (dont indicate errors but just highlight them),
> +fringes (use fringes) or margins (use margins)
> +
> +Difference between fringes and margin is that fringes support diplaying
> +bitmaps on graphical displays and margins display text in a blank area
> +of buffer that works in both graphical and text displays.
> +
> +See Info node `Fringes' and Info node `(elisp)Display Margins'."
> +  :version "30.1"
> +  :type '(choice (const :tag "Use Fringes" fringes)
> +		 (const :tag "Use Margins "margins)
> +		 (const :tag "No indicators" nil)))

There are tabs here.

> +
> +(defcustom flymake-error-margin-string '("‼" compilation-error)
> +  "String used in the margn for indicating errors.
> +The value may also be a list of two elements where the second
> +element specifies the face for the string.
> +See also `flymake-warning-margin-string'.
> +
> +The option `flymake-margin-indicator-position' controls how and where
> +this is used."
> +  :version "30.1"
> +  :type '(choice (string :tag "String")
> +                 (list :tag "String and face"
> +                       (string :tag "String")
> +                       (face :tag "Face"))))
> +
> +(defcustom flymake-warning-margin-string '("!" compilation-warning)
> +  "String used in the margin for indicating warnings.
> +The value may also be a list of two elements where the second
> +element specifies the face for the string.
> +See also `flymake-error-margin-string'.
> +
> +The option `flymake-margin-indicator-position' controls how and where
> +this is used."
> +  :version "30.1"
> +  :type '(choice (string :tag "String")
> +                 (list :tag "String and face"
> +                       (string :tag "String")
> +                       (face :tag "Face"))))
> +
> +(defcustom flymake-note-margin-string '("!" compilation-info)
> +  "String used in the margin for indicating info notes.
> +The value may also be a list of two elements where the second
> +element specifies the face for the string.
> +See also `flymake-error-margin-string'.
> +
> +The option `flymake-margin-indicator-position' controls how and where
> +this is used."
> +  :version "30.1"
> +  :type '(choice (string :tag "String")
> +                 (list :tag "String and face"
> +                       (string :tag "String")
> +                       (face :tag "Face"))))

Should or could these be merged into a single user option, that would
then have the form

  '((error "‼" compilation-error)
    (note "!" compilation-warning)
    (info "!" compilation-info))

> +
> +(defcustom flymake-margin-indicator-position 'left-margin
> +  "The position to put Flymake margin indicator.
> +The value can be nil (do not use indicators), `left-margin' or `right-margin'.
> +See `flymake-error-margin-string' and `flymake-warning-margin-string'."
> +  :version "30.1"
> +  :type '(choice (const left-margin)
> +		 (const right-margin)
> +		 (const :tag "No margin indicators" nil)))
> +
>  (make-obsolete-variable 'flymake-start-syntax-check-on-newline
>  		        "can check on newline in post-self-insert-hook"
>                          "27.1")
> @@ -630,6 +697,7 @@ Node `(Flymake)Flymake error types'"
>  
>  (put 'flymake-error 'face 'flymake-error)
>  (put 'flymake-error 'flymake-bitmap 'flymake-error-bitmap)
> +(put 'flymake-error 'flymake-margin-string 'flymake-error-margin-string)
>  (put 'flymake-error 'severity (warning-numeric-level :error))
>  (put 'flymake-error 'mode-line-face 'flymake-error-echo)
>  (put 'flymake-error 'echo-face 'flymake-error-echo)
> @@ -638,6 +706,7 @@ Node `(Flymake)Flymake error types'"
>  
>  (put 'flymake-warning 'face 'flymake-warning)
>  (put 'flymake-warning 'flymake-bitmap 'flymake-warning-bitmap)
> +(put 'flymake-warning 'flymake-margin-string 'flymake-warning-margin-string)
>  (put 'flymake-warning 'severity (warning-numeric-level :warning))
>  (put 'flymake-warning 'mode-line-face 'flymake-warning-echo)
>  (put 'flymake-warning 'echo-face 'flymake-warning-echo)
> @@ -646,6 +715,7 @@ Node `(Flymake)Flymake error types'"
>  
>  (put 'flymake-note 'face 'flymake-note)
>  (put 'flymake-note 'flymake-bitmap 'flymake-note-bitmap)
> +(put 'flymake-note 'flymake-margin-string 'flymake-note-margin-string)
>  (put 'flymake-note 'severity (warning-numeric-level :debug))
>  (put 'flymake-note 'mode-line-face 'flymake-note-echo)
>  (put 'flymake-note 'echo-face 'flymake-note-echo)
> @@ -682,19 +752,34 @@ associated `flymake-category' return DEFAULT."
>    (flymake--lookup-type-property type 'severity
>                                   (warning-numeric-level :error)))
>  
> -(defun flymake--fringe-overlay-spec (bitmap &optional recursed)
> -  (if (and (symbolp bitmap)
> -           (boundp bitmap)
> -           (not recursed))
> -      (flymake--fringe-overlay-spec
> -       (symbol-value bitmap) t)
> -    (and flymake-fringe-indicator-position
> -         bitmap
> -         (propertize "!" 'display
> -                     (cons flymake-fringe-indicator-position
> -                           (if (listp bitmap)
> -                               bitmap
> -                             (list bitmap)))))))
> +(defun flymake--fringe-overlay-spec (indicator)
> +  "Return INDICATOR-TYPE as propertized string to use in error indicators"
> +  (let* ((value (if (symbolp indicator)
> +                    (symbol-value indicator)
> +                  indicator))
> +         (indicator-car (if (listp value)
> +                            (car value)
> +                          value))
> +         (indicator-cdr (if (listp value)
> +                            (cdr value))))
> +    (cond
> +     ((symbolp indicator-car)
> +      (propertize "!" 'display
> +                  (cons flymake-fringe-indicator-position
> +                        (if (listp value)
> +                            value
> +                          (list value)))))
> +     ((stringp indicator-car)
> +      (propertize "!"
> +                  'display
> +                  `((margin ,flymake-margin-indicator-position)
> +                    ,(propertize
> +                      indicator-car
> +                      'face
> +                      `(:inherit (,indicator-cdr
> +                                  default)
> +                                 )))))

You should fold these parentheses back onto the previous line.

> +     (t nil))))

This is not needed, as cond will default to nil if no case matched.

>  
>  (defun flymake--equal-diagnostic-p (a b)
>    "Tell if A and B are equivalent `flymake--diag' objects."
> @@ -843,7 +928,11 @@ Return nil or the overlay created."
>          (flymake--fringe-overlay-spec
>           (flymake--lookup-type-property
>            type
> -          'flymake-bitmap
> +          (cond ((eq flymake-indicator-type 'fringes)
> +                 'flymake-bitmap)
> +                ((eq flymake-indicator-type 'margins)
> +                 'flymake-margin-string)
> +                (t nil))
>            (alist-get 'bitmap (alist-get type ; backward compat
>                                          flymake-diagnostic-types-alist)))))
>        ;; (default-maybe 'after-string

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 96%]

* Re: I created a faster JSON parser
  @ 2024-03-10 21:39 99%     ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-10 21:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Christopher Wellons, geza.herman, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Sat, 9 Mar 2024 15:37:25 -0500
>> From: Christopher Wellons <wellons@nullprogram.com>
>> Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
>> 
>> Despite the obvious care which with this was written, I personally would 
>> not adopt a JSON parser that had not been thoroughly fuzz tested under 
>> Address Sanitizer and Undefined Behavior Sanitizer. Fuzzing is incredibly 
>> effective at finding defects, and it would be foolish not to use it in its 
>> ideal circumstances. Normally it's not difficult and requires only a few 
>> lines of code. But this JSON parser is tightly coupled with the Emacs Lisp 
>> runtime, which greatly complicates things. I couldn't simply pluck it out 
>> by itself and drop it in, say, AFL++.
>
> That's okay, we can start by making this an optional feature, and
> consider making it the default after a couple of major releases;
> meanwhile, any problems will be detected and reported.
>
> However, it would make much more sense to consider switching to this
> code if it also could handle producing JSON output, thus making
> libjansson unnecessary when we decide to switch.

If libjansson is not available, it should still be possible to use this
faster parser, while falling back to json.el for generating JSON?  From
what I understand, the main issue people have with JSON is the parsing
bottleneck, right?

-- 
	Philip Kaludercic on icterid



^ permalink raw reply	[relevance 99%]

* Re: [ELPA] new single file package: mpdired.el
  @ 2024-03-10 18:15 98%       ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-10 18:15 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: Manuel Giraud via Emacs development discussions.

Manuel Giraud <manuel@ledu-giraud.fr> writes:

> Manuel Giraud <manuel@ledu-giraud.fr> writes:
>
>> Philip Kaludercic <philipk@posteo.net> writes:
>>
>> [...]
>>
>>>> (defun mpdired-mode ()
>>>
>>> Why not use `define-derived-mode'?
>>
>> I have tried to do so but for whatever reason this completely messes up
>> the way I'm saving state in buffer local variables.  FWIW, I have tried
>> with parent as nil and special-mode with the same result.

This is because nil will just call `kill-all-local-variables',
and if you specify, special-mode it will call `kill-all-local-variables'
for you.

> It seems to be because `define-derived-mode' calls
> `kill-all-local-variables' (line 254 of derived.el).  Maybe this could
> be optional.  WDYT?

Theoretically you can do this by setting PARENT to `ignore', but I
wouldn't advise doing this.  Feels wrong...  The other solution would be
to use dynamic variables and bind them before calling `mpdired-mode'.

-- 
	Philip Kaludercic on icterid



^ permalink raw reply	[relevance 98%]

* Re: [ELPA] new single file package: mpdired.el
  @ 2024-03-10 17:03 99%                         ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-10 17:03 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: Manuel Giraud via Emacs development discussions.

Manuel Giraud <manuel@ledu-giraud.fr> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
> [...]
>
>>>> Yes, more specifically any version which version-to-list can parse and
>>>> returns a version list without any negative elements:
>>>>
>>>>   (version-to-list "1.0") ;=> (1 0)
>>>>   (version-to-list "1.0pre") ;=> (1 0 -1)
>>>>   (version-to-list "1.0git") ;=> (1 0 -4)
>>>>
>>>> see `version-regexp-alist' and keep in mind that the ELPA build server
>>>> uses a few more extensions.
>>>
>>> Thanks, all is clear for me now.
>>
>> Great.  Should we add the package immediately or do you want to wait?
>
> If a "package" will be created whenever I change "Version" to something
> without negative element then "yes, please" :-)

OK done.  Just keep in mind to update the copyright header to

  ;; Copyright (C) 2024 Free Software Foundation, Inc.

before releasing the package.  You'll be able to preview the package on
https://elpa.gnu.org/devel/mpdired.html after each commit.

-- 
	Philip Kaludercic on icterid



^ permalink raw reply	[relevance 99%]

* Re: [ELPA] new single file package: mpdired.el
  @ 2024-03-09 13:36 99%                     ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-03-09 13:36 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: Manuel Giraud via Emacs development discussions.

Manuel Giraud <manuel@ledu-giraud.fr> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Manuel Giraud <manuel@ledu-giraud.fr> writes:
>>
>>> Philip Kaludercic <philipk@posteo.net> writes:
>>>
>>> [...]
>>>
>>>> OK, this works.  If you have signed the CA, then you could set the
>>>> version of your package to some pre-release version, using a
>>>
>>> I don't know what "signed the CA" means in this context.
>>
>> Contributing packages to GNU ELPA requires you to have signed the FSF
>> copyright assignment, see (info "(emacs) Copyright Assignment"), since
>> GNU ELPA packages are formally part of Emacs.  Assuming you haven't done
>> so yet, a maintainer can send you the form.
>
> Ok.  So I already have this because I've already contributed to Emacs.

Ok, then nevermind.  I could have also checked AUTHORS to verify that.

>> Git tags aren't needed at all.  The ELPA build server relies entirely on
>> what the Version tag says.
>
> Ok, I can still have tags on my side.

Right, they are just not synchronised.

>>>                                         Just to be sure I understand
>>> correctly: every version number with a -pre suffix won't update on ELPA?
>>
>> Yes, more specifically any version which version-to-list can parse and
>> returns a version list without any negative elements:
>>
>>   (version-to-list "1.0") ;=> (1 0)
>>   (version-to-list "1.0pre") ;=> (1 0 -1)
>>   (version-to-list "1.0git") ;=> (1 0 -4)
>>
>> see `version-regexp-alist' and keep in mind that the ELPA build server
>> uses a few more extensions.
>
> Thanks, all is clear for me now.

Great.  Should we add the package immediately or do you want to wait?

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: Work On Todo item:  Convert defvar foo-mode-map to defvar-keymap
  @ 2024-03-09  9:21 99% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-09  9:21 UTC (permalink / raw)
  To: binarydigitz01 via Emacs development discussions.; +Cc: binarydigitz01

binarydigitz01 via "Emacs development discussions."
<emacs-devel@gnu.org> writes:

> Hi, 
> I would like to work on the todo item "** Convert defvar foo-mode-map to defvar-keymap".
> I wanted to confirm whether anyone else is working on it, and general advice as this would be my first time contributing.

To my knowledge, and according to a quick search of the Git logs, it
doesn't appear that anyone is actively working on this.

As to general advice, have you taken a look at the CONTRIBUTE file in
emacs.git?

> Thanks,
> Arnav
>

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: Add elisa to gnu elpa
       [not found]     <D57DBB96-82DE-4697-A358-032B04190724@gmail.com>
@ 2024-03-09  9:03 99% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-09  9:03 UTC (permalink / raw)
  To: Sergey Kostyaev; +Cc: emacs-devel

Sergey Kostyaev <sskostyaev@gmail.com> writes:

> Hi, Philip.
>
> Please add my new package ELISA https://github.com/s-kostyaev/elisa to GNU Elpa.

Sorry for missing this message, it is better to announce these things
directly on emacs-devel.   I've CC'ed the mailing list, and will try to
comment on your code soon enough™.

> Best regards,
> Sergey Kostyaev

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: [ELPA] new single file package: mpdired.el
  @ 2024-03-08 17:29 91%                 ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-03-08 17:29 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: Manuel Giraud via Emacs development discussions.

Manuel Giraud <manuel@ledu-giraud.fr> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
> [...]
>
>> OK, this works.  If you have signed the CA, then you could set the
>> version of your package to some pre-release version, using a
>
> I don't know what "signed the CA" means in this context.

Contributing packages to GNU ELPA requires you to have signed the FSF
copyright assignment, see (info "(emacs) Copyright Assignment"), since
GNU ELPA packages are formally part of Emacs.  Assuming you haven't done
so yet, a maintainer can send you the form.

>>  ;; Version: 1.0-pre
>>
>> header, and as soon as you are ready to publish just remove the -pre and
>> the package will be automatically published + a new release will be made
>> any time to bump the header.
>
> Cool.  That is a great feature that I will be using (matching this
> Version header with git tags I guess).  

Git tags aren't needed at all.  The ELPA build server relies entirely on
what the Version tag says.

>                                         Just to be sure I understand
> correctly: every version number with a -pre suffix won't update on ELPA?

Yes, more specifically any version which version-to-list can parse and
returns a version list without any negative elements:

  (version-to-list "1.0") ;=> (1 0)
  (version-to-list "1.0pre") ;=> (1 0 -1)
  (version-to-list "1.0git") ;=> (1 0 -4)

see `version-regexp-alist' and keep in mind that the ELPA build server
uses a few more extensions.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 91%]

* Re: [ELPA] new single file package: mpdired.el
  @ 2024-03-08 16:34 98%             ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-03-08 16:34 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: Manuel Giraud via Emacs development discussions.

Manuel Giraud <manuel@ledu-giraud.fr> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
> [...]
>
>>> Ok so it's a "no": I don't want to put a burden on someone else.
>>
>> Feel free to work on it yourself ;^)  I don't think it wouldn't make
>> sense, it is just that it seems like a negligible advantage for a rather
>> insignificant convenience.  I'd also like to be able to track files via
>> RCS, but exporting existing files to a Git repository turns out to be
>> consistently easier.
>
> I don't think I'm skilled enough to do this and now that I have just
> setup a Git repo I don't think I will be really motivated myself ;-)
>
> [...]
>
>>>> As I said, a git forge in that sense is not necessarily needed, you
>>>> could also just host the git repository from some website over
>>>> https://.
>>>
>>> Great.  I think it is what I would do then.  Thanks.
>>
>> Just keep in mind to enable the "post-update.sample" that invokes "git
>> update-server-info", in case you haven't set up a http-Git repo before.
>>
>> All we need in the end is a URL.
>
> I fought git hooks a bit but I think I have finally configured it
> correctly and the URL is https://ledu-giraud.fr/mpdired.git

OK, this works.  If you have signed the CA, then you could set the
version of your package to some pre-release version, using a 

 ;; Version: 1.0-pre

header, and as soon as you are ready to publish just remove the -pre and
the package will be automatically published + a new release will be made
any time to bump the header.

> I'm going to patch with all your previous remarks.  Thanks.

1+

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 98%]

* Re: [ELPA] new single file package: mpdired.el
  @ 2024-03-08 13:18 94%         ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-03-08 13:18 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: Manuel Giraud via Emacs development discussions.

Manuel Giraud <manuel@ledu-giraud.fr> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
> [...]
>
>>> Of course, I'd also like to avoid this latter setup.  Just to be sure,
>>> you confirm that a git repo is unavoidable?  Could it be a just tarball
>>> available on web server?
>>
>> Technically yes, but the ELPA build system would have to be updated just
>> for this use-case.
>
> Ok so it's a "no": I don't want to put a burden on someone else.

Feel free to work on it yourself ;^)  I don't think it wouldn't make
sense, it is just that it seems like a negligible advantage for a rather
insignificant convenience.  I'd also like to be able to track files via
RCS, but exporting existing files to a Git repository turns out to be
consistently easier. 

> [...]
>
>>> Ok.  If a git forge is mandatory, I'll ponder which one I'd prefer to
>>> use.
>>
>> As I said, a git forge in that sense is not necessarily needed, you
>> could also just host the git repository from some website over
>> https://.
>
> Great.  I think it is what I would do then.  Thanks.

Just keep in mind to enable the "post-update.sample" that invokes "git
update-server-info", in case you haven't set up a http-Git repo before.

All we need in the end is a URL.

> [...]
>
>>>> Perhaps one could also rebind a few commands here, like `next-line'.
>>>
>>> I don't understand what you mean here.
>>
>> It is possible to remap a command, without having to bind a key.  See
>> (elisp) Remapping Commands.  The advantage is that if the user has any
>> custom bindings, say for next-line, then they would automatically be
>> inherited.  That is comfortable from a user-perspective, because the
>> major-mode aligns more with their usual intuition.
>
> Yes it makes sense.  I'll look at it.

1+

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 94%]

* Re: master bd017175d45 6/6: Simplify type hierarchy operations
       [not found]     ` <20240308070720.AC3ACC1FB4E@vcs2.savannah.gnu.org>
@ 2024-03-08 13:13 96%   ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-08 13:13 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Monnier


The below commit appears to be causing an error when compiling Emacs:

--8<---------------cut here---------------start------------->8---
  [all well until here]
  ELC+ELN  ../lisp/button.elc

Error: error ("../lisp/button.el" "Type or missing from typeof-types!")
  signal(error ("../lisp/button.el" "Type or missing from typeof-types!"))
  comp--native-compile("../lisp/button.el")
  batch-native-compile()
  batch-byte+native-compile()
  funcall(batch-byte+native-compile)
  ...
--8<---------------cut here---------------end--------------->8---


Stefan Monnier via Mailing list for Emacs changes <emacs-diffs@gnu.org>
writes:

> branch: master
> commit bd017175d4571e24ef1fdf84676136af1d36002d
> Author: Stefan Monnier <monnier@iro.umontreal.ca>
> Commit: Stefan Monnier <monnier@iro.umontreal.ca>
>
>     Simplify type hierarchy operations
>     
>     Now that built-in types have classes that describe their
>     relationships exactly like struct/eieio/oclosure classes,
>     we can the code that navigates that DAG.
>     
>     * lisp/emacs-lisp/cl-generic.el (cl--generic-struct-tag): Move to
>     `eieio-core.el`.
>     (cl--generic-type-specializers): Rename from
>     `cl--generic-struct-specializers`.  Make it work for any class.
>     (cl--generic-typeof-generalizer, cl--generic-oclosure-generalizer): Use it.
>     (cl--generic-struct-generalizer): Delete generalizer.
>     (cl-generic-generalizers :extra "cl-struct"): Delete method.
>     (prefill 0 cl--generic-generalizer): Move to after the typeof.
>     (cl-generic-generalizers :extra "typeof"): Rewrite to use
>     classes rather than `cl--all-builtin-types`.
>     (cl-generic--oclosure-specializers): Delete function.
>     
>     * lisp/emacs-lisp/cl-preloaded.el (cl--direct-supertypes-of-type)
>     (cl--typeof-types, cl--all-builtin-types): Delete constants.
>     
>     * lisp/emacs-lisp/comp-cstr.el (comp--typeof-builtin-types):
>     Delete constant.
>     (comp--cl-class-hierarchy): Simplify.
>     (comp--compute-typeof-types): Simplify now that
>     `comp--cl-class-hierarchy` and `comp--all-classes` work for built-in
>     types as well.
>     (comp--direct-supertypes): Just use `cl--class-parents`.
>     (comp-supertypes): Simplify since typeof-types should now be complete.
>     
>     * lisp/emacs-lisp/eieio-core.el (eieio-defclass-autoload):
>     Use `superclasses` argument, so we can find parents before it's loaded.
>     (eieio--class-precedence-c3, eieio--class-precedence-dfs):
>     Don't add a `eieio-default-superclass` parent any more.
>     (eieio--class/struct-parents): Delete function.
>     (eieio--class-precedence-bfs): Use `eieio--class-parents` instead.
>     Don't stop when reaching `eieio-default-superclass`.
>     (cl--generic-struct-tag): Move from `cl-generic.el`.
> ---
>  lisp/emacs-lisp/cl-generic.el   | 67 ++++++++++-------------------------------
>  lisp/emacs-lisp/cl-preloaded.el | 30 ------------------
>  lisp/emacs-lisp/comp-cstr.el    | 55 +++++----------------------------
>  lisp/emacs-lisp/eieio-core.el   | 51 +++++++++++++++----------------
>  4 files changed, 49 insertions(+), 154 deletions(-)
>
> diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
> index f439a97f88c..84eb800ec24 100644
> --- a/lisp/emacs-lisp/cl-generic.el
> +++ b/lisp/emacs-lisp/cl-generic.el
> @@ -1330,62 +1330,31 @@ These match if the argument is `eql' to VAL."
>  (cl--generic-prefill-dispatchers (terminal-parameter nil 'xterm--set-selection)
>                                   (eql nil))
>  
> -;;; Support for cl-defstructs specializers.
> +;;; Dispatch on "normal types".
>  
> -(defun cl--generic-struct-tag (name &rest _)
> -  ;; Use exactly the same code as for `typeof'.
> -  `(if ,name (type-of ,name) 'null))
> -
> -(defun cl--generic-struct-specializers (tag &rest _)
> +(defun cl--generic-type-specializers (tag &rest _)
>    (and (symbolp tag)
> -       (let ((class (get tag 'cl--class)))
> -         (when (cl-typep class 'cl-structure-class)
> +       (let ((class (cl--find-class tag)))
> +         (when class
>             (cl--class-allparents class)))))
>  
> -(cl-generic-define-generalizer cl--generic-struct-generalizer
> -  50 #'cl--generic-struct-tag
> -  #'cl--generic-struct-specializers)
> -
> -(cl-defmethod cl-generic-generalizers :extra "cl-struct" (type)
> -  "Support for dispatch on types defined by `cl-defstruct'."
> -  (or
> -   (when (symbolp type)
> -     ;; Use the "cl--struct-class*" (inlinable) functions/macros rather than
> -     ;; the "cl-struct-*" variants which aren't inlined, so that dispatch can
> -     ;; take place without requiring cl-lib.
> -     (let ((class (cl--find-class type)))
> -       (and (cl-typep class 'cl-structure-class)
> -            (or (null (cl--struct-class-type class))
> -		(error "Can't dispatch on cl-struct %S: type is %S"
> -                     type (cl--struct-class-type class)))
> -            (progn (cl-assert (null (cl--struct-class-named class))) t)
> -            (list cl--generic-struct-generalizer))))
> -   (cl-call-next-method)))
> -
> -(cl--generic-prefill-dispatchers 0 cl--generic-generalizer)
> -
> -;;; Dispatch on "system types".
> -
>  (cl-generic-define-generalizer cl--generic-typeof-generalizer
>    ;; FIXME: We could also change `type-of' to return `null' for nil.
>    10 (lambda (name &rest _) `(if ,name (type-of ,name) 'null))
> -  (lambda (tag &rest _)
> -    (and (symbolp tag) (assq tag cl--typeof-types))))
> +  #'cl--generic-type-specializers)
>  
>  (cl-defmethod cl-generic-generalizers :extra "typeof" (type)
> -  "Support for dispatch on builtin types.
> -See the full list and their hierarchy in `cl--typeof-types'."
> +  "Support for dispatch on types.
> +This currently works for built-in types and types built on top of records."
>    ;; FIXME: Add support for other types accepted by `cl-typep' such
>    ;; as `character', `face', `function', ...
>    (or
> -   (and (memq type cl--all-builtin-types)
> -        (progn
> -          ;; FIXME: While this wrinkle in the semantics can be occasionally
> -          ;; problematic, this warning is more often annoying than helpful.
> -          ;;(if (memq type '(vector array sequence))
> -          ;;    (message "`%S' also matches CL structs and EIEIO classes"
> -          ;;             type))
> -          (list cl--generic-typeof-generalizer)))
> +   (and (symbolp type)
> +        (not (eq type t)) ;; Handled by the `t-generalizer'.
> +        (let ((class (cl--find-class type)))
> +          (memq (type-of class)
> +                '(built-in-class cl-structure-class eieio--class)))
> +        (list cl--generic-typeof-generalizer))
>     (cl-call-next-method)))
>  
>  (cl--generic-prefill-dispatchers 0 integer)
> @@ -1393,6 +1362,8 @@ See the full list and their hierarchy in `cl--typeof-types'."
>  (cl--generic-prefill-dispatchers 0 cl--generic-generalizer integer)
>  (cl--generic-prefill-dispatchers 0 (eql 'x) integer)
>  
> +(cl--generic-prefill-dispatchers 0 cl--generic-generalizer)
> +
>  ;;; Dispatch on major mode.
>  
>  ;; Two parts:
> @@ -1430,19 +1401,13 @@ Used internally for the (major-mode MODE) context specializers."
>  (defun cl--generic-oclosure-tag (name &rest _)
>    `(oclosure-type ,name))
>  
> -(defun cl-generic--oclosure-specializers (tag &rest _)
> -  (and (symbolp tag)
> -       (let ((class (cl--find-class tag)))
> -         (when (cl-typep class 'oclosure--class)
> -           (oclosure--class-allparents class)))))
> -
>  (cl-generic-define-generalizer cl--generic-oclosure-generalizer
>    ;; Give slightly higher priority than the struct specializer, so that
>    ;; for a generic function with methods dispatching structs and on OClosures,
>    ;; we first try `oclosure-type' before `type-of' since `type-of' will return
>    ;; non-nil for an OClosure as well.
>    51 #'cl--generic-oclosure-tag
> -  #'cl-generic--oclosure-specializers)
> +  #'cl--generic-type-specializers)
>  
>  (cl-defmethod cl-generic-generalizers :extra "oclosure-struct" (type)
>    "Support for dispatch on types defined by `oclosure-define'."
> diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el
> index 1b330e7f761..5743684fa89 100644
> --- a/lisp/emacs-lisp/cl-preloaded.el
> +++ b/lisp/emacs-lisp/cl-preloaded.el
> @@ -433,36 +433,6 @@ For this build of Emacs it's %dbit."
>    (setf (cl--class-parents (cl--find-class 'cl-structure-object))
>        (list (cl--find-class 'record))))
>  
> -(defconst cl--direct-supertypes-of-type
> -  ;; Please run `sycdoc-update-type-hierarchy' in
> -  ;; `admin/syncdoc-type-hierarchy.el' each time this is modified to
> -  ;; reflect the change in the documentation.
> -  (let ((table (make-hash-table :test #'eq)))
> -    (mapatoms
> -     (lambda (type)
> -       (let ((class (get type 'cl--class)))
> -        (when (built-in-class-p class)
> -          (puthash type (mapcar #'cl--class-name (cl--class-parents class))
> -           table)))))
> -    table)
> -  "Hash table TYPE -> SUPERTYPES.")
> -
> -(defconst cl--typeof-types
> -  (letrec ((alist nil))
> -    (maphash (lambda (type _)
> -               (let ((class (get type 'cl--class)))
> -                 ;; FIXME: Can't remember why `t' is excluded.
> -                 (push (remq t (cl--class-allparents class)) alist)))
> -             cl--direct-supertypes-of-type)
> -    alist)
> -  "Alist of supertypes.
> -Each element has the form (TYPE . SUPERTYPES) where TYPE is one of
> -the symbols returned by `type-of', and SUPERTYPES is the list of its
> -supertypes from the most specific to least specific.")
> -
> -(defconst cl--all-builtin-types
> -  (delete-dups (copy-sequence (apply #'append cl--typeof-types))))
> -
>  ;; Make sure functions defined with cl-defsubst can be inlined even in
>  ;; packages which do not require CL.  We don't put an autoload cookie
>  ;; directly on that function, since those cookies only go to cl-loaddefs.
> diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
> index 1c6acaa6385..5922a8caf12 100644
> --- a/lisp/emacs-lisp/comp-cstr.el
> +++ b/lisp/emacs-lisp/comp-cstr.el
> @@ -38,12 +38,6 @@
>  (require 'cl-lib)
>  (require 'cl-extra) ;HACK: For `cl-find-class' when `cl-loaddefs' is missing.
>  
> -(defconst comp--typeof-builtin-types (mapcar (lambda (x)
> -                                               (append x '(t)))
> -                                             cl--typeof-types)
> -  ;; TODO can we just add t in `cl--typeof-types'?
> -  "Like `cl--typeof-types' but with t as common supertype.")
> -
>  (cl-defstruct (comp-cstr (:constructor comp--type-to-cstr
>                                         (type &aux
>  					     (null (eq type 'null))
> @@ -89,15 +83,7 @@ Integer values are handled in the `range' slot.")
>  
>  (defun comp--cl-class-hierarchy (x)
>    "Given a class name `x' return its hierarchy."
> -  (let ((parents (cl--class-allparents (cl--struct-get-class x))))
> -    (if (memq t parents)
> -        parents
> -      `(,@parents
> -        ;; FIXME: AFAICT, `comp--all-classes' will also find those struct types
> -        ;; which use :type and can thus be either `vector' or `cons' (the latter
> -        ;; isn't `atom').
> -        atom
> -        t))))
> +  (cl--class-allparents (cl--find-class x)))
>  
>  (defun comp--all-classes ()
>    "Return all non built-in type names currently defined."
> @@ -109,8 +95,7 @@ Integer values are handled in the `range' slot.")
>      res))
>  
>  (defun comp--compute-typeof-types ()
> -  (append comp--typeof-builtin-types
> -          (mapcar #'comp--cl-class-hierarchy (comp--all-classes))))
> +  (mapcar #'comp--cl-class-hierarchy (comp--all-classes)))
>  
>  (defun comp--compute--pred-type-h ()
>    (cl-loop with h = (make-hash-table :test #'eq)
> @@ -275,19 +260,10 @@ Return them as multiple value."
>                  (symbol-name y)))
>  
>  (defun comp--direct-supertypes (type)
> -  (or
> -   (gethash type cl--direct-supertypes-of-type)
> -   (let ((supers (comp-supertypes type)))
> -     (cl-assert (eq type (car supers)))
> -     (cl-loop
> -      with notdirect = nil
> -      with direct = nil
> -      for parent in (cdr supers)
> -      unless (memq parent notdirect)
> -        do (progn
> -             (push parent direct)
> -             (setq notdirect (append notdirect (comp-supertypes parent))))
> -      finally return direct))))
> +  (when (symbolp type) ;; FIXME: Can this test ever fail?
> +    (let* ((class (cl--find-class type))
> +           (parents (if class (cl--class-parents class))))
> +      (mapcar #'cl--class-name parents))))
>  
>  (defsubst comp-subtype-p (type1 type2)
>    "Return t if TYPE1 is a subtype of TYPE2 or nil otherwise."
> @@ -359,23 +335,8 @@ Return them as multiple value."
>  
>  (defun comp-supertypes (type)
>    "Return the ordered list of supertypes of TYPE."
> -  ;; FIXME: We should probably keep the results in
> -  ;; `comp-cstr-ctxt-typeof-types' (or maybe even precompute them
> -  ;; and maybe turn `comp-cstr-ctxt-typeof-types' into a hash-table).
> -  ;; Or maybe we shouldn't keep structs and defclasses in it,
> -  ;; and just use `cl--class-allparents' when needed (and refuse to
> -  ;; compute their direct subtypes since we can't know them).
> -  (cl-loop
> -   named loop
> -   with above
> -   for lane in (comp-cstr-ctxt-typeof-types comp-ctxt)
> -   do (let ((x (memq type lane)))
> -        (cond
> -         ((null x) nil)
> -         ((eq x lane) (cl-return-from loop x)) ;A base type: easy case.
> -         (t (setq above
> -                  (if above (comp--intersection x above) x)))))
> -   finally return above))
> +  (or (assq type (comp-cstr-ctxt-typeof-types comp-ctxt))
> +      (error "Type %S missing from typeof-types!" type)))
>  
>  (defun comp-union-typesets (&rest typesets)
>    "Union types present into TYPESETS."
> diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
> index 9945e19c65c..5418f53be35 100644
> --- a/lisp/emacs-lisp/eieio-core.el
> +++ b/lisp/emacs-lisp/eieio-core.el
> @@ -191,7 +191,7 @@ Abstract classes cannot be instantiated."
>  
>  ;; We autoload this because it's used in `make-autoload'.
>  ;;;###autoload
> -(defun eieio-defclass-autoload (cname _superclasses filename doc)
> +(defun eieio-defclass-autoload (cname superclasses filename doc)
>    "Create autoload symbols for the EIEIO class CNAME.
>  SUPERCLASSES are the superclasses that CNAME inherits from.
>  DOC is the docstring for CNAME.
> @@ -199,15 +199,9 @@ This function creates a mock-class for CNAME and adds it into
>  SUPERCLASSES as children.
>  It creates an autoload function for CNAME's constructor."
>    ;; Assume we've already debugged inputs.
> -
> -  ;; We used to store the list of superclasses in the `parent' slot (as a list
> -  ;; of class names).  But now this slot holds a list of class objects, and
> -  ;; those parents may not exist yet, so the corresponding class objects may
> -  ;; simply not exist yet.  So instead we just don't store the list of parents
> -  ;; here in eieio-defclass-autoload at all, since it seems that they're just
> -  ;; not needed before the class is actually loaded.
>    (let* ((oldc (cl--find-class cname))
> -	 (newc (eieio--class-make cname)))
> +	 (newc (eieio--class-make cname))
> +	 (parents (mapcar #'cl-find-class superclasses)))
>      (if (eieio--class-p oldc)
>  	nil ;; Do nothing if we already have this class.
>  
> @@ -218,6 +212,12 @@ It creates an autoload function for CNAME's constructor."
>  use '%s or turn off `eieio-backward-compatibility' instead" cname)
>                                  "25.1"))
>  
> +      (when (memq nil parents)
> +        ;; If some parents aren't yet fully defined, just ignore them for now.
> +        (setq parents (delq nil parents)))
> +      (unless parents
> +       (setq parents (list (cl--find-class 'eieio-default-superclass))))
> +      (setf (cl--class-parents newc) parents)
>        (setf (cl--find-class cname) newc)
>  
>        ;; Create an autoload on top of our constructor function.
> @@ -958,19 +958,13 @@ need be... May remove that later...)"
>  	(cdr tuple)
>        nil)))
>  
> -(defsubst eieio--class/struct-parents (class)
> -  (or (eieio--class-parents class)
> -      `(,eieio-default-superclass)))
> -
>  (defun eieio--class-precedence-c3 (class)
>    "Return all parents of CLASS in c3 order."
>    (let ((parents (eieio--class-parents class)))
>      (cons class
>            (merge-ordered-lists
>             (append
> -            (or
> -             (mapcar #'eieio--class-precedence-c3 parents)
> -             `((,eieio-default-superclass)))
> +            (mapcar #'eieio--class-precedence-c3 parents)
>              (list parents))
>             (lambda (remaining-inputs)
>              (signal 'inconsistent-class-hierarchy
> @@ -984,13 +978,11 @@ need be... May remove that later...)"
>  	 (classes (copy-sequence
>  		   (apply #'append
>  			  (list class)
> -			  (or
> -			   (mapcar
> -			    (lambda (parent)
> -			      (cons parent
> -				    (eieio--class-precedence-dfs parent)))
> -			    parents)
> -			   `((,eieio-default-superclass))))))
> +			  (mapcar
> +			   (lambda (parent)
> +			     (cons parent
> +				   (eieio--class-precedence-dfs parent)))
> +			   parents))))
>  	 (tail classes))
>      ;; Remove duplicates.
>      (while tail
> @@ -1003,13 +995,12 @@ need be... May remove that later...)"
>  (defun eieio--class-precedence-bfs (class)
>    "Return all parents of CLASS in breadth-first order."
>    (let* ((result)
> -         (queue (eieio--class/struct-parents class)))
> +         (queue (eieio--class-parents class)))
>      (while queue
>        (let ((head (pop queue)))
>  	(unless (member head result)
>  	  (push head result)
> -	  (unless (eq head eieio-default-superclass)
> -	    (setq queue (append queue (eieio--class/struct-parents head)))))))
> +	  (setq queue (append queue (eieio--class-parents head))))))
>      (cons class (nreverse result)))
>    )
>  
> @@ -1049,6 +1040,14 @@ method invocation orders of the involved classes."
>  
>  ;;;; General support to dispatch based on the type of the argument.
>  
> +;; FIXME: We could almost use the typeof-generalizer (i.e. the same as
> +;; used for cl-structs), except that that generalizer doesn't support
> +;; `:method-invocation-order' :-(
> +
> +(defun cl--generic-struct-tag (name &rest _)
> +  ;; Use exactly the same code as for `typeof'.
> +  `(if ,name (type-of ,name) 'null))
> +
>  (cl-generic-define-generalizer eieio--generic-generalizer
>    ;; Use the exact same tagcode as for cl-struct, so that methods
>    ;; that dispatch on both kinds of objects get to share this
>
>

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 96%]

* Re: I created a faster JSON parser
  @ 2024-03-08 11:41 97% ` Philip Kaludercic
    1 sibling, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-08 11:41 UTC (permalink / raw)
  To: Herman, Géza; +Cc: emacs-devel@gnu.org

"Herman, Géza" <geza.herman@gmail.com> writes:

> Hi,
>
> I created a faster JSON parser for emacs, you can check it out here:
>
> https://github.com/geza-herman/emacs/tree/faster-json-parsing

For convenience, this is a URL to the patch:

https://github.com/geza-herman/emacs/commit/d76feeeac3ce397f15aebdde8b9deae676b0bf1e.patch

>
> It replaces json-parse-string and json-parse-buffer functions. The
> behavior should be the same as before, with the only exception that
> objects with duplicated keys are not detected if :object-type is not
> 'hash-table.

Is that a problem?

> This parser runs 8-9x faster than the jansson based parser on my
> machine (tested on clangd language server messages).  An additional
> tiny benefit is that large integers are parsed, instead of having an
> "out of range" error.

That sounds interesting, but I am reminded of this article:
https://seriot.ch/projects/parsing_json.html.  There seem to be plenty
of difficult edge-cases when dealing with JSON input, that should
probably be tested if Emacs has it's own custom parser built-in.

> What do you think?
>
> Geza

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 97%]

* Re: [ELPA] new single file package: mpdired.el
  @ 2024-03-08 11:26 91%     ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-03-08 11:26 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: Manuel Giraud via Emacs development discussions.

Manuel Giraud <manuel@ledu-giraud.fr> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
> Hi Philip,
>
> First thanks for your all your inputs!
>
> [...]
>
>> In the end a Git repository will have to be created.  I don't think one
>> should have to be ashamed of the commit history (most people won't
>> care), but it is also fine to discard the current history and replace it
>> with a fresh repository.
>
> Ok.  Maybe I'll start with a fresh history if I feel like it.
>
>> By default, we would like to mirror some external repository.  It
>> doesn't have to be hosted by some large Git forge, just something that
>> can be synchronised regularly.  The alternative to this would be to have
>> a branch in elpa.git that would have to be manually updated (either by
>> yourself if you get access to the repository, or by someone here on the
>> mailing list with access that would see your message).  You can imagine
>> that we want to avoid the latter setup, since it creates more
>> friction.
>
> Of course, I'd also like to avoid this latter setup.  Just to be sure,
> you confirm that a git repo is unavoidable?  Could it be a just tarball
> available on web server?

Technically yes, but the ELPA build system would have to be updated just
for this use-case.

>> From experience, it is usually helpful to have a Git repository with
>> multiple files, for files like a README or an .elpaignore file or if you
>> decide to split up the file into multiple files at some point.
>
> Yes, you're right maybe I'd like to add a texinfo later for instance.
>
>> If you dislike Github, you could also take a look at Sourcehut or
>> Codeberg for hosting.
>
> Ok.  If a git forge is mandatory, I'll ponder which one I'd prefer to
> use.

As I said, a git forge in that sense is not necessarily needed, you
could also just host the git repository from some website over https://.

>>> Anyway for the braves and curious, here is the current version of this
>>> package.  It is called MPDired and is yet another client to Music Player
>>> Daemon.  It features a Dired-like user interface.  Previously I was a
>>> Mingus user so MPDired might have some legacy to it.
>>
>> Here some comments
>
> For the rest of your comments inline, I'll just ask on those I don't
> understand.
>
> [...]
>
>>>   "n"      #'mpdired-next-line
>>>   "<down>" #'mpdired-next-line
>>
>> Perhaps one could also rebind a few commands here, like `next-line'.
>
> I don't understand what you mean here.

It is possible to remap a command, without having to bind a key.  See
(elisp) Remapping Commands.  The advantage is that if the user has any
custom bindings, say for next-line, then they would automatically be
inherited.  That is comfortable from a user-perspective, because the
major-mode aligns more with their usual intuition.

> [...]
>
>>> (defun mpdired-change-marks (&optional old new)
>>>   "Changes mark from OLD to NEW.  It asks the user for OLD and NEW."
>>>   (interactive
>>>    (let* ((cursor-in-echo-area t)
>>> 	  (old (progn (message "Change (old mark): ") (read-char)))
>>> 	  (new (progn (message  "Change %c marks to (new mark): " old)
>>> 		      (read-char))))
>>
>> Why not use read-char's PROMPT argument?
>
> I did not know about it and it is copy-pasto from dired ;-)

I don't know if there are any peculiar edge-cases either, perhaps
someone else knows more?

> Thanks.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 91%]

* Re: [ELPA] new single file package: mpdired.el
  @ 2024-03-08 10:25 61% ` Philip Kaludercic
      0 siblings, 2 replies; 200+ results
From: Philip Kaludercic @ 2024-03-08 10:25 UTC (permalink / raw)
  To: Manuel Giraud via Emacs development discussions.; +Cc: Manuel Giraud

Manuel Giraud via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

>
> Hi,
>
> I've made a package that consists of a single .el file.  I'd like to
> distribute it like that: I don't really want to share its version
> history (not proud of it ;-) and I don't want to put it on github or the
> like.  According to the ELPA readme, it is possible to do so by sending
> the file to this list.  My question is: how does update takes place
> then?  Should I resend the new version to this list or is there other
> mean?

In the end a Git repository will have to be created.  I don't think one
should have to be ashamed of the commit history (most people won't
care), but it is also fine to discard the current history and replace it
with a fresh repository.

By default, we would like to mirror some external repository.  It
doesn't have to be hosted by some large Git forge, just something that
can be synchronised regularly.  The alternative to this would be to have
a branch in elpa.git that would have to be manually updated (either by
yourself if you get access to the repository, or by someone here on the
mailing list with access that would see your message).  You can imagine
that we want to avoid the latter setup, since it creates more friction.

From experience, it is usually helpful to have a Git repository with
multiple files, for files like a README or an .elpaignore file or if you
decide to split up the file into multiple files at some point.

If you dislike Github, you could also take a look at Sourcehut or
Codeberg for hosting.

> Anyway for the braves and curious, here is the current version of this
> package.  It is called MPDired and is yet another client to Music Player
> Daemon.  It features a Dired-like user interface.  Previously I was a
> Mingus user so MPDired might have some legacy to it.

Here some comments

> Best regards,

> ;;; mpdired.el --- A dired-like client for Music Player Daemon -*- lexical-binding: t -*-
>
> ;; Copyright (C) 2024  Manuel Giraud
>
> ;; Author: Manuel Giraud <manuel@ledu-giraud.fr>
> ;; Keywords: multimedia
>
> ;; SPDX-License-Identifier: GPL-3.0-or-later

This is not really needed, since package.el doesn't check this header.

> ;; This file is NOT part of GNU Emacs.
>
> ;; GNU Emacs is free software: you can redistribute it and/or modify
> ;; it under the terms of the GNU General Public License as published by
> ;; the Free Software Foundation, either version 3 of the License, or
> ;; (at your option) any later version.
> ;;
> ;; GNU Emacs is distributed in the hope that it will be useful,
> ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
> ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> ;; GNU General Public License for more details.
> ;;
> ;; You should have received a copy of the GNU General Public License
> ;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
>
> ;;; Commentary:
> ;;
> ;; This a client for the Music Player Daemon (mpd) with interactions
> ;; inspired from Dired.  It features two views packed into the same
> ;; interactive buffer: the browser view and the queue view.
> ;;
> ;; In those view, most of the interactions are mimic after Dired mode
> ;; with marks and action on them.  For example, in the queue view, you
> ;; could flag songs for removal with `d' and then execute with `x'.
> ;;
> ;; MPDired connects to a MPD server using two customs: `mpdired-host'
> ;; and `mpdired-port'.  Once connected, the handle to the server is
> ;; saved in a buffer local variable into the MPDired buffer.  From now
> ;; on, the customs are just used by global MPDired commands to connect
> ;; to the user defined server.  All commands used inside a MPDired
> ;; buffer will connect to the buffer local server.  This way, you can
> ;; manage more than one MPD server with multiple MPDired buffers.
>
> ;;; Philosophy:

Perhaps indent this by one more ;, so that it still remains in the
Commentary section.

> ;; MPDired is designed to be the least intrusive.  Nothing will be
> ;; shown into the mode line, which I consider to be user's territory.
> ;; There is no timers set by MPDired, so updating anything always
> ;; comes from a user action.
> ;;
> ;; The browser view is built from the MPD's "listall" and
> ;; "listplaylists" commands.  The MPD's documentation does *not*
> ;; recommend to do so but AFAIU there is no other way to access your
> ;; music collection in terms of directories and files.  As my music
> ;; collection is already ordered into directories and with meaningful
> ;; filenames, I prefer to use this interface rather then to rely on
> ;; files' tags.
> ;;
> ;; If your music collection consists of just a set of not very well
> ;; named files into one big directory and that you rely on tags such
> ;; as "Genre", "Album", "Artist" to find your way through it then,
> ;; maybe, MPDired is not the right client for you.
>
> ;;; Bugs & Funs:
> ;;
> ;; - MPDired does not handle MPD server with password.
> ;;
> ;; - Marks are *very* temporary.  As I rebuild the views often and the
> ;;   marks are only stored in text properties they will be wiped out
> ;;   regularly.
> ;;
> ;; - some URI based commands work in both view. So for example, in the
> ;;   queue, you can append the song at point to this same queue.
>
> ;;; Code:
>
> (defcustom mpdired-host (or (getenv "MPD_HOST") "localhost")
>   "Host for MPD."
>   :type 'string)
>
> (defcustom mpdired-port (or (getenv "MPD_PORT") 6600)

getenv will return a string, perhaps you want to do something like

--8<---------------cut here---------------start------------->8---
(let ((port (string-to-number (getenv "MPD_PORT"))))
  (if (/= port 0) port 6600))
--8<---------------cut here---------------end--------------->8---

>   "Port for MPD."
>   :type 'integer)

Perhaps 'natnum as a type would be mor especific here.

>
> (defvar-keymap mpdired-mode-map

Using defvar-keymap depends on Emacs 29, so you should explicitly state
the version of Emacs you need in the package header.

>   :doc "Local keymap for MPDired."
>   :full t
>   :parent special-mode-map
>   ;; Navigation
>   "C-n"    #'mpdired-next-line
>   "n"      #'mpdired-next-line
>   "<down>" #'mpdired-next-line

Perhaps one could also rebind a few commands here, like `next-line'.

>   "C-p"    #'mpdired-previous-line
>   "p"      #'mpdired-previous-line
>   "<up>"   #'mpdired-previous-line
>   "C-m"    #'mpdired-enter
>   "^"      #'mpdired-goto-parent
>   "o"      #'mpdired-toggle-view
>   ;; Actions
>   "g"      #'mpdired-update
>   "G"      #'mpdired-db-update
>   "N"      #'mpdired-next-internal
>   "P"      #'mpdired-previous-internal
>   "a"      #'mpdired-add
>   "x"      #'mpdired-flagged-delete
>   "D"      #'mpdired-delete
>   ;; Status settings and toggles
>   "<SPC>"  #'mpdired-pause-internal
>   "v"      #'mpdired-set-volume-internal
>   "s s"    #'mpdired-stop
>   "s R"    #'mpdired-toggle-repeat
>   "s r"    #'mpdired-toggle-random
>   "s S"    #'mpdired-toggle-single
>   "s c"    #'mpdired-toggle-consume
>   ;; Playlist commands
>   "l c"    #'mpdired-playlist-create
>   "l a"    #'mpdired-playlist-append
>   ;; Marks
>   "m"      #'mpdired-mark-at-point
>   "* m"    #'mpdired-mark-at-point
>   "d"      #'mpdired-flag-at-point
>   "u"      #'mpdired-unmark-at-point
>   "<DEL>"  #'mpdired-previous-unmark
>   "* !"    #'mpdired-unmark-all-marks
>   "U"      #'mpdired-unmark-all-marks
>   "t"      #'mpdired-toggle-marks
>   "* t"    #'mpdired-toggle-marks
>   "* c"    #'mpdired-change-marks
>   "% d"    #'mpdired-flag-files-regexp
>   "% m"    #'mpdired-mark-files-regexp)
>
> (defface mpdired-currdir
>   '((t :inherit dired-header))
>   "Face used to show current directory.")
>
> (defface mpdired-directory
>   '((t :inherit dired-directory))
>   "Face used to show a directory.")
>
> (defface mpdired-playlist
>   '((t :inherit dired-symlink))
>   "Face used to show a playlist.")
>
> (defface mpdired-song
>   '((t :inherit dired-ignored))
>   "Face used to show a song.")
>
> (defface mpdired-progress
>   '((t :inherit dired-special))
>   "Face used to show the progress of a song.")
>
> (defface mpdired-marked
>   '((t :inherit dired-marked))
>   "Face used to show a marked entry.")
>
> (defface mpdired-flagged
>   '((t :inherit dired-flagged))
>   "Face used to show an entry flagged for deletion.")
>
> ;; State variables for the communication buffer
> (defvar-local mpdired--network-params nil)
> (defvar-local mpdired--parse-endp nil)
> (defvar-local mpdired--last-command nil)
> (defvar-local mpdired--main-buffer nil
>   "Link to the main MPDired buffer.")
> (defvar-local mpdired--ascending-p nil)
> (defvar-local mpdired--playlist nil)
> (defvar-local mpdired--message nil)
>
> (defun mpdired--subdir-p (dir-a dir-b)
>   "Is DIR-B a sub-directory of DIR-A?"
>   (let ((pos (string-search dir-a dir-b)))
>     (and pos (zerop pos))))

I think a more robust approach would be something like

(locate-dominating-file dir-b (apply-partially #'file-equal-p dir-a))

or `file-in-directory-p'.

>
> (defun mpdired--parse-listall-1 (current accum)
>   ;; Recursively rebuild the directory hierarchy from a "listall"
>   ;; command into a list.  In the output, a directory is list which
>   ;; `car' is its name and its `cdr' is the files or other directory
>   ;; it contains.  Leaves are conses in the form '(file . "name") or
>   ;; '(playlist . "name").
>   (catch 'exit
>     (while (not (or mpdired--parse-endp
> 		    (setq mpdired--parse-endp
> 			  (re-search-forward "^\\(OK\\|ACK.*\\)$"
> 					     (line-end-position) t 1))))
>       ;; Look for file, playlist or directory line by line.
>       (when
> 	  (re-search-forward "^\\(file\\|playlist\\|directory\\): \\(.*\\)$"
> 			     (line-end-position) t 1)
> 	(let ((type (match-string 1))
> 	      (name (match-string 2)))
> 	  (cond ((or (string= "file" type)
> 		     (string= "playlist" type))
> 		 (push (cons (intern type) name) accum))
> 		((string= "directory" type)
> 		 ;; This new directory NAME is either a subdir of the
> 		 ;; current one or a new directory of the same level
> 		 ;; of the current one.  In the former case, we need
> 		 ;; to parse and accumuate this new sub-directory.  In
> 		 ;; the latter case we need to go one line backward
> 		 ;; (because we will go forward later) and quit the
> 		 ;; current loop.
> 		 (cond ((mpdired--subdir-p current name)
> 			(forward-line)
> 			(push (mpdired--parse-listall-1 name (list name)) accum))
> 		       (t (forward-line -1)
> 			  (throw 'exit t)))))))
>       (forward-line)))
>   (reverse accum))

Unless I am missing something, it would be more ideomatic to use
`nreverse' here.

>
> (defun mpdired--parse-listall ()
>   ;; Called from the communication buffer.
>   (goto-char (point-min))
>   (setq mpdired--parse-endp nil)
>   ;; XXX Empty string is the directory name of the toplevel directory.
>   ;; It have the good property of being a prefix of any string so it
>   ;; works with `mpdired--subdir-p'.
>   (mpdired--parse-listall-1 "" (list "")))
>
> ;; All my functions are called *-queue but they are using the correct
> ;; "playlistid" MPD interface.
> (defun mpdired--parse-queue ()
>   ;; Called from the communication buffer.
>   (goto-char (point-min))
>   (setq mpdired--parse-endp nil)
>   (let ((elapsed 0)
> 	(duration 1)
> 	(songid 0)
> 	(in-status-p t)

There appear to be some stray TABs here.

> 	state volume repeat random single consume
> 	result file time id)
>     (while (not (or mpdired--parse-endp
> 		    (setq mpdired--parse-endp
> 			  (re-search-forward "^\\(OK\\|ACK.*\\)$"
> 					     (line-end-position) t 1))))
>       (let ((eol (line-end-position)))
>         ;; First, "status" content
> 	(when in-status-p
> 	  (when (re-search-forward "^state: \\(.*\\)$" eol t 1)
> 	    (setq state (match-string 1)))
> 	  (when (re-search-forward "^volume: \\([0-9]+\\)$" eol t 1)
> 	    (setq volume (string-to-number (match-string 1))))
> 	  (when (re-search-forward "^repeat: \\([0-9]+\\)$" eol t 1)
> 	    (setq repeat (string= "1" (match-string 1))))
> 	  (when (re-search-forward "^random: \\([0-9]+\\)$" eol t 1)
> 	    (setq random (string= "1" (match-string 1))))
> 	  (when (re-search-forward "^single: \\([0-9]+\\)$" eol t 1)
> 	    (setq single (string= "1" (match-string 1))))
> 	  (when (re-search-forward "^consume: \\([0-9]+\\)$" eol t 1)
> 	    (setq consume (string= "1" (match-string 1))))
> 	  ;; current song status
> 	  (when (re-search-forward "^songid: \\([0-9]+\\)$" eol t 1)
> 	    (setq songid (string-to-number (match-string 1))))
> 	  (when (re-search-forward "^time: \\([0-9]+\\):\\([0-9]+\\)$" eol t 1)
> 	    (setq elapsed (string-to-number (match-string 1))
> 		  duration (string-to-number (match-string 2)))))
> 	;; When we enconter our first "file:" the status parsing is
> 	;; done so store what we've discovered so far and do not try
> 	;; to parse status anymore.
> 	(when (and in-status-p
> 		   (save-excursion (re-search-forward "^file: .*$" eol t 1)))
> 	  (setq in-status-p nil)
> 	  ;; Save status in main buffer and put current song infos at
> 	  ;; the beginning of the result.
> 	  (with-current-buffer mpdired--main-buffer
> 	    (setq mpdired--status
> 		  (list state volume repeat random single consume)))
> 	  (push songid result)
>           (push elapsed result)
> 	  (push duration result))
> 	;; Then, "playlistid" content
> 	;; File
> 	(when (re-search-forward "^file: \\(.*\\)$" eol t 1)
> 	  ;; if file is already set store the previous entry in the
> 	  ;; list.
> 	  (when file
> 	    (push (list id file time) result))
> 	  (setq file (match-string 1)))
> 	;; Time
> 	(when (re-search-forward "^Time: \\(.*\\)$" eol t 1)
> 	  (setq time (string-to-number (match-string 1))))
> 	;; Id
> 	(when (re-search-forward "^Id: \\(.*\\)$" eol t 1)
> 	  (setq id (string-to-number (match-string 1)))))
>       (forward-line))
>     ;; There was only status but no songs
>     (when in-status-p
>       ;; Save status in main buffer
>       (with-current-buffer mpdired--main-buffer
> 	(setq mpdired--status
> 	      (list state volume repeat random single consume)))
>       (push songid result)
>       (push elapsed result)
>       (push duration result))
>     ;; The last song if any
>     (when file (push (list id file time) result))
>     (reverse result)))
>
> (defun mpdired-mode ()

Why not use `define-derived-mode'?

>   "Major mode for MPDired."
>   (use-local-map mpdired-mode-map)
>   (set-buffer-modified-p nil)
>   (setq major-mode 'mpdired-mode
> 	mode-name "MPDired"
> 	truncate-lines t
> 	buffer-read-only t))
>
> (defun mpdired--hostname (host service localp)
>   (if localp
>       (let ((inode (file-attribute-inode-number
> 		    (file-attributes service))))
> 	(format "/%d" inode))
>     (if (= 6600 service)
> 	host
>       (format "%s:%s" host service))))
>
> (defun mpdired--comm-name (host service localp)
>   (format " *mpdired-comm-%s*" (mpdired--hostname host service localp)))
>
> (defun mpdired--main-name (host service localp)
>   (format "*MPDired (%s)*" (mpdired--hostname host service localp)))
>
> ;; State variables for the main buffer
> (defvar-local mpdired--view nil
>   "Current view of the MPDired buffer.")
> (defvar-local mpdired--directory nil
>   "Current directory (or MPD playlist) of the browser view.")
> (defvar-local mpdired--comm-buffer nil
>   "Communication buffer associated to this MPDired buffer.")
> (defvar-local mpdired--status nil
>   "Local copy of the MPD status.  It will updated regularly.")
> (defvar-local mpdired--error nil)
>
> ;; I have tried to use markers here but since I often erase the
> ;; buffer's content, these markers are reset to 1.
> (defvar-local mpdired--browser-point nil
>   "Saved point position in the browser view.")
> (defvar-local mpdired--songid-point nil
>   "Songid for point position in the queue view.")
>
> (defun mpdired--bol ()
>   "Correct beginning of line in a MPDired buffer.  First two columns are
> used for mark followed by a space."
>   (+ 2 (line-beginning-position)))

Perhaps one should check if this is still part of the same line with
cl-assert or something like that.

>
> (defun mpdired--short-name (string)
>   (car (last (split-string string "/"))))

Also possible,

--8<---------------cut here---------------start------------->8---
(and (string-match "/\\([^/]*\\)\\'" string)
     (match-string 1 string))
--8<---------------cut here---------------end--------------->8---

as to avoid unnecessarily consing the entire list.

>
> (defun mpdired--reset-face ()
>   (let* ((bol (mpdired--bol))
> 	 (eol (line-end-position))
> 	 (type (get-text-property bol 'type))
> 	 (mark (get-text-property bol 'mark)))
>     (remove-text-properties bol eol '(face))
>     (cond ((and mark (char-equal mark ?d))
> 	   (put-text-property bol eol 'face 'mpdired-flagged))
> 	  ((and mark (char-equal mark ?*))
> 	   (put-text-property bol eol 'face 'mpdired-marked))
> 	  ((eq type 'directory)
> 	   (put-text-property bol eol 'face 'mpdired-directory))
> 	  ((eq type 'playlist)
> 	   (put-text-property bol eol 'face 'mpdired-playlist))
> 	  ((eq type 'song)
> 	   (put-text-property bol eol 'face 'mpdired-song)))))
>
> (defun mpdired--insert-entry (entry)
>   "Insert ENTRY in MPDired browser view."
>   (insert "  ")
>   (let ((bol (mpdired--bol)))
>     (when (consp entry)
>       (let ((type (car entry)))
> 	(cond ((stringp type)  ;; this is a directory
> 	       (insert (propertize (mpdired--short-name type) 'face 'mpdired-directory))
> 	       (put-text-property bol (line-end-position) 'type 'directory)
> 	       (put-text-property bol (line-end-position) 'uri type))
> 	      ((eq type 'file)
> 	       (let ((file (cdr entry)))
> 		 (insert (mpdired--short-name file))
> 		 (put-text-property bol (line-end-position) 'type 'file)
> 		 (put-text-property bol (line-end-position) 'uri file)))
> 	      ((eq type 'playlist)
> 	       (let ((playlist (cdr entry)))
> 		 (insert (propertize (mpdired--short-name playlist)
> 				     'face 'mpdired-playlist))
> 		 (put-text-property bol (line-end-position) 'type 'playlist)
> 		 (put-text-property bol (line-end-position) 'uri playlist))))))
>     (insert "\n")))
>
> (defun mpdired--insert-status ()
>   "Insert current status in MPDired queue view."
>   (when mpdired--status
>     (let* ((state (car mpdired--status))
> 	   (volume (nth 1 mpdired--status))
> 	   (repeat (nth 2 mpdired--status))
> 	   (random (nth 3 mpdired--status))
> 	   (single (nth 4 mpdired--status))
> 	   (consume (nth 5 mpdired--status))
> 	   (string (cond ((string= "stop" state) "Stopped")
> 			 ((string= "play" state) "Playing")
> 			 ((string= "pause" state) "Paused"))))
>       (insert (propertize string 'face 'bold))
>       (when (numberp volume)
> 	(insert (format " Volume: %d" volume)))
>       (when repeat (insert " Repeat"))
>       (when random (insert " Random"))
>       (when single (insert " Single"))
>       (when consume (insert " Consume"))
>       (insert "\n"))))
>
> (defun mpdired--insert-song (song)
>   "Insert SONG in MPDired queue view."
>   (let ((id (car song))
> 	(uri (cadr song)))
>     (insert "  " (propertize uri 'face 'mpdired-song))
>     (let ((bol (mpdired--bol))
> 	  (eol (line-end-position)))
>       (put-text-property bol eol 'id id)
>       (put-text-property bol eol 'type 'song)
>       (put-text-property bol eol 'uri uri))
>     (insert "\n")))
>
> (defun mpdired--goto-id (songid)
>   (let ((max (point-max)))
>     (while (and (< (point) max)
> 		(let ((id (get-text-property (mpdired--bol) 'id)))
> 		  (or (null id)
> 		      (and id (/= songid id)))))
>       (mpdired--next-line))))
>
> (defun mpdired--present-list (proc)
>   ;; Called by filter of the communication buffer.
>   (let* ((peer-info (process-contact proc t))
> 	 (peer-host (plist-get peer-info :host))
> 	 (peer-service (plist-get peer-info :service))
> 	 (peer-localp (eq (plist-get peer-info :family) 'local))
> 	 (main-buffer (mpdired--main-name peer-host peer-service peer-localp))
> 	 (content (mpdired--parse-listall))
> 	 ascending-p from)
>     ;; Retrieve infos from this process buffer
>     (with-current-buffer (process-buffer proc)
>       (setq ascending-p mpdired--ascending-p
> 	    playlist mpdired--playlist))
>     (with-current-buffer (get-buffer-create main-buffer)
>       (let* ((inhibit-read-only t)
> 	     ;; `content' is always of the form ("" rest...) so if
> 	     ;; there is only one element in rest use it as content.
> 	     (content (if (cddr content) content (cadr content)))
> 	     (top (if playlist
> 		      playlist
> 		    (unless (string= "" (car content)) (car content))))
> 	     (data (cdr content)))
> 	(erase-buffer)
> 	;; Insert the content
> 	(save-excursion
> 	  (when (stringp top)
> 	    (insert (propertize top 'face 'mpdired-currdir) ":\n"))
> 	  (dolist (e data) (mpdired--insert-entry e)))
> 	;; Set mode and memorize stuff
> 	(mpdired-mode)
> 	(if ascending-p (setq from mpdired--directory))
> 	(setq mpdired--directory (when top top)
> 	      mpdired--comm-buffer (process-buffer proc)
> 	      mpdired--view 'browser)
> 	;; Finally move point to the correct place.
> 	(cond ((and ascending-p from)
> 	       (goto-char (point-min))
> 	       (let ((max (point-max)))
> 		 (while (and (< (point) max)

Why not use `eobp'?

> 			     (let ((uri (get-text-property (mpdired--bol) 'uri)))
> 			       (or (null uri)
> 				   (and uri (not (string= from uri))))))
> 		   (forward-line)))
> 	       (goto-char (mpdired--bol))
> 	       (setq mpdired--browser-point (point)))
> 	      (mpdired--browser-point
> 	       (goto-char mpdired--browser-point)
> 	       (goto-char (mpdired--bol)))
> 	      (t (goto-char (point-min))
> 		 (if top
> 		     (mpdired-next-line)
> 		   (goto-char (mpdired--bol)))))))))
>
> (defun mpdired--present-queue (proc)
>   ;; Called by filter of the communication buffer.
>   (let* ((peer-info (process-contact proc t))
> 	 (peer-host (plist-get peer-info :host))
> 	 (peer-service (plist-get peer-info :service))
> 	 (peer-localp (eq (plist-get peer-info :family) 'local))
> 	 (main-buffer (mpdired--main-name peer-host peer-service peer-localp))
> 	 (data (mpdired--parse-queue))
> 	 (songid (car data))
> 	 (elapsed (cadr data))
> 	 (duration (caddr data))
> 	 (songs (cdddr data)))
>     (with-current-buffer (get-buffer-create main-buffer)
>       (let ((inhibit-read-only t))
> 	(erase-buffer)
> 	;; Insert content
> 	(save-excursion
> 	  ;; Status header
> 	  (mpdired--insert-status)
> 	  ;; Songs
> 	  (dolist (song songs) (mpdired--insert-song song)))

I think in this case, you could also use (mapc #'mpdired--insert-song songs).

> 	;; Go to the current song and display elasped time with a
> 	;; different face on its URI.
> 	(save-excursion
> 	  (when songid
> 	    (let ((max (point-max)))
> 	      (while (and (< (point) max)
> 			  (let ((id (get-text-property (mpdired--bol) 'id)))
> 			    (or (null id)
> 				(and id (/= songid id)))))
> 		(forward-line)))
> 	    (let* ((bol (mpdired--bol))
> 		   (eol (line-end-position))
> 		   (x (/ (* elapsed (- eol bol)) duration)))
> 	      (put-text-property bol (+ bol x) 'face 'mpdired-progress))))
> 	;; Go to bol no matter what
> 	(goto-char (mpdired--bol))
> 	;; Set mode, restore point and memorize stuff
> 	(mpdired-mode)
> 	(when mpdired--songid-point
> 	  (mpdired--goto-id mpdired--songid-point))
> 	(setq mpdired--comm-buffer (process-buffer proc)
> 	      mpdired--view 'queue)))))
>
> (defun mpdired--filter (proc string)
>   (when (buffer-live-p (process-buffer proc))
>     (with-current-buffer (process-buffer proc)
>       (let ((moving (= (point) (process-mark proc))))
> 	(save-excursion
> 	  ;; Insert the text, advancing the process marker.
> 	  (goto-char (process-mark proc))
> 	  (insert string)
> 	  (set-marker (process-mark proc) (point)))
> 	(if moving (goto-char (process-mark proc)))
> 	;; The server has replied.
> 	(cond ((re-search-backward "^ACK \\(.*\\)$" nil t)
> 	       ;; For errors on "listall" and "listplaylist" commands
> 	       ;; propagate the error upstream because actions would
> 	       ;; be taken.  Otherwise, just output it.
> 	       (cond ((string= (match-string 1)
> 			       "[50@0] {listall} No such directory")
> 		      (with-current-buffer mpdired--main-buffer
> 			(setq mpdired--error 'no-directory)))
> 		     ((string= (match-string 1)
> 			       "[50@0] {listplaylist} No such playlist")
> 		      (with-current-buffer mpdired--main-buffer
> 			(setq mpdired--error 'no-playlist)))
> 		     (t (message (match-string 1)))))
> 	      ((re-search-backward "^OK$" nil t)
> 	       ;; Present results in the main buffer
> 	       (cond ((or (eq mpdired--last-command 'listall)
> 			  (eq mpdired--last-command 'listplaylist))
> 		      (mpdired--present-list proc))
> 		     ((or (eq mpdired--last-command 'queue)
> 			  (eq mpdired--last-command 'deleteid))
> 		      (mpdired--present-queue proc)))
> 	       ;; Display and reset information message.
> 	       (when mpdired--message
> 		 (message (format "%s done." mpdired--message))
> 		 (setq mpdired--message nil))))))))
>
> (defun mpdired--local-p (host)
>   "Is HOST a local socket?"
>   ;; Hack: if the `expand-file-name' of host leads to an existing
>   ;; file, that should be our Unix socket.
>   (file-exists-p (expand-file-name host)))
>
> (defun mpdired--maybe-reconnect (comm-buffer)
>   "If COMM-BUFFER is disconnected, reconnect it to its server."
>   (let ((process (get-buffer-process comm-buffer)))
>     (unless (and process (eq (process-status process) 'open))
>       ;; Reconnect from saved parameters.
>       (if mpdired--network-params
> 	  (set-process-buffer
> 	   (apply 'make-network-process mpdired--network-params)
> 	   comm-buffer)))))
>
> (defun mpdired--maybe-init (host service localp)
>   (with-current-buffer (get-buffer-create
> 			(mpdired--comm-name host service localp))
>     (erase-buffer)
>     (let ((process (get-buffer-process (current-buffer))))
>       (unless (and process (eq (process-status process) 'open))
> 	(let ((params (list :name "mpdired-comm"
> 			    :buffer (current-buffer)
> 			    :host host
> 			    :service service
> 			    :family (if localp 'local)
> 			    :coding 'utf-8
> 			    :filter 'mpdired--filter)))

This should be sharp-quoted.

> 	  (setq mpdired--network-params params
> 		mpdired--main-buffer (mpdired--main-name host service localp))
> 	  (set-process-buffer (apply 'make-network-process params)
> 			      (current-buffer)))))))
>
> (defmacro mpdired--with-comm-buffer (process buffer &rest body)
>   "Helper macro when sending a command via the communication buffer.
> PROCESS will be bound to the communication buffer's process.  BUFFER is
> an optional communication buffer that would be used instead of
> `mpdired--comm-buffer'."
>   (declare (indent defun))
>   `(with-current-buffer (or ,buffer mpdired--comm-buffer)
>      (erase-buffer)
>      (mpdired--maybe-reconnect (current-buffer))
>      (let ((,process (get-buffer-process (current-buffer))))
>        (when (process-live-p ,process)
> 	 ,@body))))
>
> (defun mpdired-listall-internal (path &optional ascending-p)
>   (mpdired--with-comm-buffer process nil
>     (setq mpdired--last-command 'listall
> 	  mpdired--ascending-p ascending-p)
>     (process-send-string process "command_list_begin\n")
>     ;; At toplevel also lists MPD's playlists.
>     (when (string= "" path)
>       (process-send-string process "listplaylists\n"))
>     (process-send-string process (format "listall \"%s\"\n" path))
>     (process-send-string process "command_list_end\n")))
>
> (defun mpdired-listplaylist-internal (path &optional ascending-p)
>   (mpdired--with-comm-buffer process nil
>     (setq mpdired--last-command 'listplaylist
> 	  mpdired--ascending-p ascending-p
> 	  mpdired--playlist path)
>     (process-send-string process (format "listplaylist \"%s\"\n" path))))

Do you know if you could use %S here, in case something in PATH should
be escaped as well?

>
> (defun mpdired-queue-internal (&optional buffer)
>   (mpdired--with-comm-buffer process buffer
>     (setq mpdired--last-command 'queue)
>     ;; Also get the status to identify the current song.
>     (process-send-string process "command_list_begin\n")
>     (process-send-string process "status\n")
>     (process-send-string process "playlistid\n")
>     (process-send-string process "command_list_end\n")))
>
> (defun mpdired-playid-internal (id)
>   (mpdired--with-comm-buffer process nil
>     (setq mpdired--last-command 'playid)
>     (process-send-string process (format "playid %d\n" id))))
>
> (defun mpdired-add-internal (typed-uris)
>   (mpdired--with-comm-buffer process nil
>     (setq mpdired--last-command 'add)
>     (process-send-string process "command_list_begin\n")
>     (if (listp typed-uris)
> 	(dolist (typed-uri typed-uris)
> 	  (let ((type (car typed-uri))
> 		(uri (cdr typed-uri)))
> 	    ;; "add" is called "load" for playlists
> 	    (if (eq type 'playlist)
> 		(process-send-string process (format "load \"%s\"\n" uri))
> 	      (process-send-string process (format "add \"%s\"\n" uri)))))
>       (process-send-string process (format "add \"%s\"\n" typed-uris)))
>     (process-send-string process "command_list_end\n")))
>
> (defun mpdired-deleteid-internal (id)
>   (mpdired--with-comm-buffer process nil
>     (setq mpdired--last-command 'deleteid)
>     (process-send-string process "command_list_begin\n")
>     (if (listp id)
> 	(dolist (i id)
> 	  (process-send-string process (format "deleteid %d\n" i)))
>       (process-send-string process (format "deleteid %d\n" id)))
>     ;; XXX A playlistid should always be preceded by a status
>     (process-send-string process "status\n")
>     (process-send-string process "playlistid\n")
>     (process-send-string process "command_list_end\n")))
>
> (defun mpdired-remove-playlist-internal (uri)
>   (mpdired--with-comm-buffer process nil
>     (setq mpdired--last-command 'remove-playlist)
>     (process-send-string process "command_list_begin\n")
>     (if (listp uri)
> 	(dolist (u uri)
> 	  (process-send-string process (format "rm \"%s\"\n" u)))
>       (process-send-string process (format "rm \"%s\"\n" uri)))
>     (process-send-string process "command_list_end\n")))
>
> (defun mpdired-pause-internal (&optional buffer)
>   "Toggles pause."
>   (interactive)
>   (mpdired--with-comm-buffer process buffer
>     (setq mpdired--last-command 'pause
> 	  mpdired--message "Toggle pause...")
>     (process-send-string process "pause\n")))
>
> (defun mpdired-db-update ()
>   "Issues a database update."
>   (interactive)
>   (mpdired--with-comm-buffer process nil
>     (setq mpdired--last-command 'stop
> 	  mpdired--message "DB Update...")
>     (process-send-string process "update\n")))
>
> (defun mpdired-stop ()
>   "Stops playing."
>   (interactive)
>   (mpdired--with-comm-buffer process nil
>     (setq mpdired--last-command 'stop
> 	  mpdired--message "Stopping...")
>     (process-send-string process "stop\n")))
>
> (defun mpdired-toggle-repeat ()
>   "Toggles repeat mode."
>   (interactive)
>   (mpdired--with-comm-buffer process nil
>     (setq mpdired--last-command 'repeat)
>     (let ((repeat
> 	   (with-current-buffer mpdired--main-buffer
> 	     (nth 2 mpdired--status))))
>       (process-send-string process
> 			   (format "repeat %d\n" (if repeat 0 1))))))
>
> (defun mpdired-toggle-random ()
>   "Toggles random mode."
>   (interactive)
>   (mpdired--with-comm-buffer process nil
>     (setq mpdired--last-command 'random)
>     (let ((random
> 	   (with-current-buffer mpdired--main-buffer
> 	     (nth 3 mpdired--status))))
>       (process-send-string process
> 			   (format "random %d\n" (if random 0 1))))))
>
> ;; XXX no oneshot support
> (defun mpdired-toggle-single ()
>   "Toggles single mode."
>   (interactive)
>   (mpdired--with-comm-buffer process nil
>     (setq mpdired--last-command 'single)
>     (let ((single
> 	   (with-current-buffer mpdired--main-buffer
> 	     (nth 4 mpdired--status))))
>       (process-send-string process
> 			   (format "single %d\n" (if single 0 1))))))
>
> ;; XXX no oneshot support
> (defun mpdired-toggle-consume ()
>   "Toggles consume mode."
>   (interactive)
>   (mpdired--with-comm-buffer process nil
>     (setq mpdired--last-command 'consume)
>     (let ((consume
> 	   (with-current-buffer mpdired--main-buffer
> 	     (nth 5 mpdired--status))))
>       (process-send-string process
> 			   (format "consume %d\n" (if consume 0 1))))))
>
> (defun mpdired-next-internal (&optional buffer)
>   "Starts playing the next song from the queue."
>   (interactive)
>   (mpdired--with-comm-buffer process buffer
>     (setq mpdired--last-command 'next)
>     (process-send-string process "next\n")))
>
> (defun mpdired-previous-internal (&optional buffer)
>   "Starts playing the previous song from the queue."
>   (interactive)
>   (mpdired--with-comm-buffer process buffer
>     (setq mpdired--last-command 'previous)
>     (process-send-string process "previous\n")))
>
> (defun mpdired-set-volume-internal (volume &optional buffer)
>   "Changes MPD volume.  VOLUME is a number between 0 and 100."
>   (interactive "nVolume: ")
>   (mpdired--with-comm-buffer process buffer
>     (setq mpdired--last-command 'setvol)
>     (process-send-string process
> 			 (format "setvol %d\n" (min 100 (max 0 volume))))))
>
> (defun mpdired-playlist-create (name)
>   "Creates a new MPD's playlist named NAME with the queue content."
>   (interactive "MPlaylist name: ")
>   (mpdired--with-comm-buffer process nil
>     (setq mpdired--last-command 'playlist-create)
>     (process-send-string process (format "save \"%s\"\n" name))))
>
> (defun mpdired-playlist-append (name)
>   (interactive "MPlaylist name: ")
>   (mpdired--with-comm-buffer process nil
>     (setq mpdired--last-command 'playlist-append)
>     (process-send-string process (format "save \"%s\" append\n" name))))
>
> (defun mpdired--save-point ()
>   (cond ((eq mpdired--view 'queue)
> 	 (let ((bol (mpdired--bol)))
> 	   (unless (> bol (point-max))
> 	     (setf mpdired--songid-point (get-text-property bol 'id)))))
> 	((eq mpdired--view 'browser)
> 	 (setf mpdired--browser-point (point)))))
>
> (defun mpdired--next-line ()
>   (forward-line)
>   (goto-char (mpdired--bol)))
>
> (defun mpdired-next-line ()
>   "Go to next line and save position."
>   (interactive)
>   (mpdired--next-line)
>   (mpdired--save-point))
>
> (defun mpdired--previous-line ()
>   (forward-line -1)
>   (goto-char (mpdired--bol)))
>
> (defun mpdired-previous-line ()
>   "Go to previous line and save position."
>   (interactive)
>   (mpdired--previous-line)
>   (mpdired--save-point))
>
> (defun mpdired-listall-at-point ()
>   (let* ((bol (mpdired--bol))
> 	 (type (get-text-property bol 'type))
> 	 (uri (get-text-property bol 'uri)))
>     (cond ((eq type 'directory)
> 	   (mpdired-listall-internal uri))
> 	  ((eq type 'playlist)
> 	   (mpdired-listplaylist-internal uri))
> 	  ((eq type 'file)
> 	   (message "Cannot browse a file.")))))
>
> (defun mpdired-playid-at-point ()
>   (let ((id (get-text-property (mpdired--bol) 'id)))
>     (when id (mpdired-playid-internal id))))
>
> (defun mpdired-enter ()
>   "In the browser view, browses the entry at point.
> In the queue view, starts playing the song at point."
>   (interactive)
>   (cond ((eq mpdired--view 'browser)
> 	 (setq mpdired--browser-point nil)
> 	 (mpdired-listall-at-point))
> 	((eq mpdired--view 'queue)
> 	 (mpdired-playid-at-point))))
>
> (defun mpdired--unsplit (list separator)
>   (let (res)
>     (dolist (e (butlast list))
>       (push e res)
>       (push separator res))
>     (push (car (last list)) res)
>     (apply 'concat (reverse res))))

Adding a docstring to  function like this would be helpful.

>
> (defun mpdired--parent ()
>   (when (stringp mpdired--directory)
>     (let ((split (split-string mpdired--directory "/")))
> 	   (if (= 1 (length split))
> 	       ""
> 	     (mpdired--unsplit (butlast split) "/")))))
>
> (defun mpdired-goto-parent ()
>   "Browses the parent directory of the current one."
>   (interactive)
>   (let ((parent (mpdired--parent)))
>     (cond (parent
> 	   (setq mpdired--browser-point nil)
> 	   (with-current-buffer mpdired--comm-buffer
> 	     (setq mpdired--playlist nil))
> 	   (mpdired-listall-internal parent t))
> 	  (t (message "You are at the toplevel.")))))
>
> (defun mpdired-toggle-view ()
>   "Toggles between the browser and the queue view."
>   (interactive)
>   (cond ((eq mpdired--view 'browser)
> 	 (mpdired-queue-internal))
> 	((eq mpdired--view 'queue)
> 	 (cond (mpdired--directory
> 		(let ((proc (get-buffer-process mpdired--comm-buffer)))
> 		  (mpdired-listall-internal mpdired--directory)
> 		  ;; XXX this is a bit hacky
> 		  (while (accept-process-output proc 0 50))
> 		  ;; If we get an error "No such directory" then we may
> 		  ;; have been visiting a playlist.
> 		  (when (eq mpdired--error 'no-directory)
> 		    (setq mpdired--error nil)
> 		    (mpdired-listplaylist-internal mpdired--directory))
> 		  (while (accept-process-output proc 0 50))
> 		  ;; If get an error "No such playlist" then we may have
> 		  ;; a bogus `mpdired--directory': go back to toplevel.
> 		  (when (eq mpdired--error 'no-playlist)
> 		    (setq mpdired--error nil)
> 		    (mpdired-listall-internal ""))))
> 	       (t (mpdired-listall-internal ""))))))
>
> (defun mpdired--mark (mark)
>   (let ((inhibit-read-only t))
>     (when (get-text-property (mpdired--bol) 'uri)
>       (save-excursion
> 	(goto-char (line-beginning-position))
> 	(delete-char 1)
> 	(insert-char mark))
>       (put-text-property (mpdired--bol) (line-end-position) 'mark mark)
>       (mpdired--reset-face))))
>
> (defun mpdired--clear-mark ()
>   (let ((inhibit-read-only t)
> 	(bol (mpdired--bol)))
>     (when (get-text-property bol 'mark)
>       (remove-text-properties (mpdired--bol) (line-end-position) '(mark face))
>       (mpdired--reset-face)
>       (save-excursion
> 	(goto-char (line-beginning-position))
> 	(delete-char 1)
> 	(insert-char ? )))))

You can also use "?\s" instead of "? ".

>
> (defun mpdired-mark-at-point ()
>   "Marks entry at point."
>   (interactive)
>   (mpdired--mark ?*)
>   (mpdired-next-line))
>
> (defun mpdired-flag-at-point ()
>   "Flags entry at point."
>   (interactive)
>   (mpdired--mark ?d)
>   (mpdired-next-line))
>
> (defun mpdired-toggle-marks ()
>   "Toggles marks."
>   (interactive)
>   (save-excursion
>     (goto-char (point-min))
>     (let ((max (point-max)))
>       (while (< (point) max)
> 	(let ((mark (get-text-property (mpdired--bol) 'mark)))
> 	  (if (and mark (char-equal mark ?*))
> 	      (mpdired--clear-mark)
> 	    (mpdired--mark ?*)))
> 	(forward-line)))))
>
> (defun mpdired-change-marks (&optional old new)
>   "Changes mark from OLD to NEW.  It asks the user for OLD and NEW."
>   (interactive
>    (let* ((cursor-in-echo-area t)
> 	  (old (progn (message "Change (old mark): ") (read-char)))
> 	  (new (progn (message  "Change %c marks to (new mark): " old)
> 		      (read-char))))

Why not use read-char's PROMPT argument?

>      (list old new)))
>   (let ((inhibit-read-only t))
>     (save-excursion
>       (goto-char (point-min))
>       (let ((max (point-max)))
> 	(while (< (point) max)
> 	  (let ((mark (get-text-property (mpdired--bol) 'mark)))
> 	    (when (and mark (char-equal mark old))
> 	      (mpdired--mark new)))
> 	  (forward-line))))))
>
> (defun mpdired-unmark-at-point ()
>   "Removes any mark at point."
>   (interactive)
>   (mpdired--clear-mark)
>   (mpdired-next-line))
>
> (defun mpdired-previous-unmark ()
>   "Removes any mark on the previous line and move to it."
>   (interactive)
>   (mpdired-previous-line)
>   (mpdired--clear-mark))
>
> (defun mpdired-unmark-all-marks ()
>   "Removes all marks in the current buffer."
>   (interactive)
>   (let ((inhibit-read-only t))
>     (save-excursion
>       (goto-char (point-min))
>       (let ((max (point-max)))
> 	(while (< (point) max)
> 	  (mpdired--clear-mark)
> 	  (forward-line))))))
>
> (defun mpdired--collect-marked (want)
>   "Collects entries marked with WANT."
>   (let ((max (point-max))
> 	result)
>     (save-excursion
>       (goto-char (point-min))
>       (while (< (point) max)
> 	(let* ((bol (mpdired--bol))
> 	       (mark (get-text-property bol 'mark))
> 	       (id (get-text-property bol 'id))
> 	       (type (get-text-property bol 'type))
> 	       (uri (get-text-property bol 'uri)))
> 	  (when (and mark (char-equal mark want))
> 	    (push (cons id (cons type uri)) result)))
> 	(forward-line)))
>     ;; No marked, get the entry at point.
>     (unless result
>       (let* ((bol (mpdired--bol))
> 	     (id (get-text-property bol 'id))
> 	     (type (get-text-property bol 'type))
> 	     (uri (get-text-property bol 'uri)))
> 	(setq result (list (cons id (cons type uri))))))
>     (reverse result)))
>
> (defun mpdired-mark-files-regexp (regexp &optional mark)
>   "Marks entries which matches a user provided REGEXP."
>   (interactive (list (read-regexp "Mark (regexp): ")))
>   (save-excursion
>     (goto-char (point-min))
>     (let ((mark (or mark ?*))
> 	  (max (point-max)))
>       (while (< (point) max)
> 	(when (re-search-forward regexp (line-end-position) t)
> 	  (mpdired--mark mark))
> 	(forward-line)))))
>
> (defun mpdired-flag-files-regexp (regexp)
>   "Flags entries which matches a user provided REGEXP."
>   (interactive (list (read-regexp "Flag for deletion (regexp): ")))
>   (mpdired-mark-files-regexp regexp ?d))
>
> (defun mpdired--append-message (message)
>   "Puts a MESSAGE for the communication buffer."
>   (with-current-buffer mpdired--comm-buffer
>     (if mpdired--message
> 	(setq mpdired--message (format "%s %s" mpdired--message message))
>       (setq mpdired--message message))))
>
> (defun mpdired--build-add-message (typed-uris)
>   (let* ((uris (mapcar 'cdr typed-uris))
> 	 (n (length uris)))
>     (cond ((= n 1) (format "Adding \"%s\"..." (car uris)))
> 	  ((= n 2)
> 	   (format "Adding \"%s\" and \"%s\"..." (car uris) (cadr uris)))
> 	  ((> n 2)
> 	   (format "Adding \"%s\", \"%s\" and %d others..."
> 		   (car uris) (cadr uris) (- n 2))))))
>
> (defun mpdired-add ()
>   "Recursively add the entry at point at the end of the queue."
>   (interactive)
>   (let* ((marked (mpdired--collect-marked ?*))
> 	 (typed-uris (mapcar 'cdr marked)))
>     (when typed-uris
>       (mpdired--append-message (mpdired--build-add-message typed-uris))
>       (mpdired-add-internal typed-uris)
>       (when (= 1 (length typed-uris))
> 	(mpdired-next-line)))))
>
> (defun mpdired-deleteid-at-point ()
>   (let ((id (get-text-property (mpdired--bol) 'id)))
>     (when id
>       (save-excursion
> 	(forward-line)
> 	(let ((bol (mpdired--bol)))
> 	  (unless (>= bol (point-max))
> 	    (setq mpdired--songid-point
> 		  (get-text-property bol 'id)))))
>       (mpdired-deleteid-internal id))))
>
> (defun mpdired-remove-playlist-at-point ()
>   (let* ((bol (mpdired--bol))
> 	 (uri (get-text-property bol 'uri))
> 	 (type (get-text-property bol 'type)))
>     (when (and type uri
> 	       (eq type 'playlist))
>       (mpdired--append-message (format "Removing \"%s\"..." uri))
>       (mpdired-remove-playlist-internal uri))))
>
> (defun mpdired-delete ()
>   "Removes song at point from the queue or playlist at point from the
> browser view."
>   (interactive)
>   (cond ((eq mpdired--view 'queue)
> 	 (mpdired-deleteid-at-point))
> 	((eq mpdired--view 'browser)
> 	 (mpdired-remove-playlist-at-point))))
>
> (defun mpdired--find-next-unmarked-id ()
>   (save-excursion
>     (let ((max (point-max)))
>       (while (and (< (point) max)
> 		  (get-text-property (mpdired--bol) 'mark))
> 	(forward-line))
>       (unless (>= (mpdired--bol) max)
> 	(get-text-property (mpdired--bol) 'id)))))
>
> (defun mpdired-flagged-delete ()
>   "Removes flagged songs from the queue."
>   (interactive)
>   (when (eq mpdired--view 'queue)
>     (let* ((flagged (mpdired--collect-marked ?d))
> 	   (ids (mapcar 'car flagged)))
>       (when flagged
> 	(setf mpdired--songid-point (mpdired--find-next-unmarked-id))
> 	(mpdired-deleteid-internal ids)))))
>
> (defun mpdired-update ()
>   "Updates the buffer content.  It works both for browser and queue view."
>   (interactive)
>   (cond ((eq mpdired--view 'queue)
> 	 (mpdired-queue-internal))
> 	((eq mpdired--view 'browser)
> 	 (if mpdired--directory
> 	     (mpdired-listall-internal mpdired--directory)
> 	   (mpdired-listall-internal "")))))
>
> \f
> ;; Global commands (i.e. usable outside of the MPDired buffer).
> (defun mpdired--prepare ()
>   "Prepares a connection for global commands with user's host and port
> settings.  It returns a cons with communication and main buffers names."
>   (let* ((localp (mpdired--local-p mpdired-host))
> 	 (host (if localp (expand-file-name mpdired-host) mpdired-host))
> 	 (service (if localp host mpdired-port))
> 	 (comm-name (mpdired--comm-name host service localp))
> 	 (main-name (mpdired--main-name host service localp)))
>     (mpdired--maybe-init host service localp)
>     (cons comm-name main-name)))
>
> (defun mpdired-pause ()
>   "Toggles MPDired pause."
>   (interactive)
>   (let ((buffers (mpdired--prepare)))
>     (mpdired-pause-internal (car buffers))))
>
> (defun mpdired-next ()
>   "Go to next song in the queue."
>   (interactive)
>   (let ((buffers (mpdired--prepare)))
>     (mpdired-next-internal (car buffers))))
>
> (defun mpdired-previous ()
>   "Go to previous song in the queue."
>   (interactive)
>   (let ((buffers (mpdired--prepare)))
>     (mpdired-previous-internal (car buffers))))
>
> (defun mpdired-set-volume (volume)
>   "Sets MPDired volume."
>   (interactive "nVolume: ")
>   (let ((buffers (mpdired--prepare)))
>     (mpdired-set-volume-internal (min 100 (max 0 volume)) (car buffers))))
>
> ;; Main entry point.
> (defun mpdired ()
>   "Open MPDired."
>   (interactive)
>   (let* ((buffers (mpdired--prepare))
> 	 (comm (car buffers))
> 	 (main (cdr buffers)))
>     ;; Defaults to queue view
>     (mpdired-queue-internal comm)
>     (pop-to-buffer main)))
>
> (provide 'mpdired)
> ;;; mpdired.el ends here


-- 
	Philip Kaludercic on peregrine




^ permalink raw reply	[relevance 61%]

* Re: Reliability of melpa
  @ 2024-03-03  7:19 99% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-03-03  7:19 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: emacs-devel

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> Hi,
>
> I've always been a great fan of melpa. However, I'm experiencing trouble in
> the past days:
>
>  Failed to install company:
> https://melpa.org/packages/company-20240301.346.tar

The Emacs developers are not responsible for MELPA, but keep in mind
that Company specifically is also available from GNU ELPA:
https://elpa.gnu.org/packages/company.html.

> It is a pity. I think a rich and reliable package ecosystem is one of the
> greatest arguments for Emacs. It has been replicated by other editors ;-)
>
> My.2 cents

-- 
	Philip Kaludercic on icterid



^ permalink raw reply	[relevance 99%]

* Re: NonGNU ELPA: Conditions for accepting a potential new package 'rmsbolt' ?
  @ 2024-02-27 18:42 99%               ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-27 18:42 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Jay Kamat, Jeremy Bryant, emacs-devel@gnu.org

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I can't help much more on if/when/how to convert an internal filename
> into one that works in a win32 shell, 'cause I have no experience with
> that.  AFAICT most ELisp code doesn't do anything special for that
> (whereas they sometimes do such things for Tramp purposes), so I'd
> naively expect that it "just works".

Inside of Emacs, but does it also handle argument when starting a
process with some path?

>>> Also I think `shell-quote-argument` should be applied to most parts of
>>> `rmsbolt--demangle-command`.  This function is also odd in that it
>>> calls `rmsbolt--convert-file-name-to-system-type` on the files
>>> of the demangler but not those of the `mv`.
>>
>> IIUC shell-quote-argument cannot be used,
>
> Of course it can.  You can't just replace the #'identity with
> #'shell-quote-argument, indeed, but still `shell-quote-argument` should
> be used on *most* parts that appear in the function.

True, my comment was not phrased carefully.

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: NonGNU ELPA: Conditions for accepting a potential new package 'rmsbolt' ?
  @ 2024-02-27 17:27 85%           ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-27 17:27 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Jay Kamat, Jeremy Bryant, emacs-devel@gnu.org

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> -(defun rmsbolt--convert-file-name-to-system-type (file-name)
>>> +(defun rmsbolt--convert-file-name-to-system-type (file-name) ;perhaps use
>>> `convert-standard-filename'?
>>
>> Right now, a contributor is trying to improve this area/enable tramp
>> support - so I'd like to keep this as stable as possible while they do
>> so.  But this is a great suggestion - I'll let them know about this function
>> and hopefully it will help them in their change as well!
>
> I haven't looked at the code but I'll point out that
> `convert-standard-filename` is meant to *define* the name of a "standard"
> file, so its argument is usually very static.
> It doesn't make sense to apply it to something like `buffer-file-name`
> which is already supposed to be a valid filename.

In that case I must have misunderstood something, my intention was to
find a function that would convert file names with forwards slashes to
the proper file delimiters on the current system.

> Also, I see:
>
>           (rmsbolt--convert-file-name-to-system-type
>            (shell-quote-argument
>
> which is very weird.  The reverse would make more sense.
>
> Also I think `shell-quote-argument` should be applied to most parts of
> `rmsbolt--demangle-command`.  This function is also odd in that it
> calls `rmsbolt--convert-file-name-to-system-type` on the files
> of the demangler but not those of the `mv`.

IIUC shell-quote-argument cannot be used, since rmsbolt is actually
creating a shell command out of a list, where each element of the list
is not necessarily a command line argument.  E.g. there were some places
where "&&" or ">" were being used, and quoting those would break the
intended functionality.  I have to admit that the process of creating
commands this way seems fragile, but there is a lot of code that would
take a while to rewrite and verify that it doesn't break anything.  (A
different idea would be to have a defstruct for each command that would be
prepared into a list and in the end executed in order, ideally using
some function like `process-file').

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 85%]

* Re: NonGNU ELPA: Conditions for accepting a potential new package 'rmsbolt' ?
  @ 2024-02-27 17:21 98%             ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-27 17:21 UTC (permalink / raw)
  To: Jay Kamat; +Cc: Jeremy Bryant, emacs-devel@gnu.org, monnier

Jay Kamat <jaygkamat@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Jay Kamat <jaygkamat@gmail.com> writes:
>>
>>> Philip Kaludercic <philipk@posteo.net> writes:
>>>
>>> Might take me a while to fully review and test all the changes, but
>>> they look good, so once I do so, I'll include them!
>>>
>>>> +(defcustom rmsbolt-mode-lighter " RMS🗲"	;could the unicode
>>>> charachter be removed?  it can unnecessarily resize the mode line.
>>>
>>> Sure - I can remove it. I'll do it after I apply your patch generally.
>>
>> Just keep in mind that I didn't send a patch.  I just find it convenient
>> to send comments in form of a diff.
>
> Ah - I didn't realize. I think most of your code-changes are good, is
> it alright if I apply them? I'll make a commit with you as the author
> (or I can take authorship/not commit them - whatever your preference
> is).

Of course, I just wanted to make sure that you don't apply a comment
instead of addressing it.  Also, some changes might have been
opinionated (I don't recall), and I wouldn't want to insinuate that you
must apply them.

I don't care about authorship, do as you like.

>>>>
>>>>  ;;;;; Starter Definitions
>>>>
>>>>  ;; IIUC, this "starter" business is not a necessary part of
>>>> RMSBolt, but  is
>>>>  ;; a way to provide sample files with which users can try out RMSBolt.
>>>>
>>>> -(defvar rmsbolt-starter-files
>>>> +(defvar rmsbolt-starter-files		;should this be part
>>>> of a secondary file that isn't loaded by default?
>>>
>>> Maybe - I think I would load it by default though - as this is the
>>> easiest way for someone to try out the package. In my personal usage I
>>> almost always start from one of these files and add my changes. I
>>> should update the comment above with that information as well.
>>
>> It shouldn't matter, as long as the command that uses
>> `rmsbolt-starter-files' remains auto-loaded, even if the command is
>> not defined in the main file.
>
> Ah - that's true! I'll try to make this change after the others if I
> have time.

1+

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 98%]

* Re: NonGNU ELPA: Conditions for accepting a potential new package 'rmsbolt' ?
  @ 2024-02-27 17:10 98%         ` Philip Kaludercic
      1 sibling, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-27 17:10 UTC (permalink / raw)
  To: Jay Kamat; +Cc: Jeremy Bryant, emacs-devel@gnu.org, monnier

Jay Kamat <jaygkamat@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
> Might take me a while to fully review and test all the changes, but
> they look good, so once I do so, I'll include them!
>
>> +(defcustom rmsbolt-mode-lighter " RMS🗲"	;could the unicode
>> charachter be removed?  it can unnecessarily resize the mode line.
>
> Sure - I can remove it. I'll do it after I apply your patch generally.

Just keep in mind that I didn't send a patch.  I just find it convenient
to send comments in form of a diff.

>> -(defun rmsbolt--convert-file-name-to-system-type (file-name)
>> +(defun rmsbolt--convert-file-name-to-system-type (file-name)
>> ;perhaps use `convert-standard-filename'?
>
> Right now, a contributor is trying to improve this area/enable tramp
> support - so I'd like to keep this as stable as possible while they do
> so. But this is a great suggestion - I'll let them know about this
> function and hopefully it will help them in their change as well!

No problem.

>>
>>  ;;;;; Starter Definitions
>>
>>  ;; IIUC, this "starter" business is not a necessary part of RMSBolt, but is
>>  ;; a way to provide sample files with which users can try out RMSBolt.
>>
>> -(defvar rmsbolt-starter-files
>> +(defvar rmsbolt-starter-files		;should this be part
>> of a secondary file that isn't loaded by default?
>
> Maybe - I think I would load it by default though - as this is the
> easiest way for someone to try out the package. In my personal usage I
> almost always start from one of these files and add my changes. I
> should update the comment above with that information as well.

It shouldn't matter, as long as the command that uses
`rmsbolt-starter-files' remains auto-loaded, even if the command is
not defined in the main file.

> Thanks! I just want to be doubly sure of all the changes before I
> commit them, I'll try to do that testing tomorrow - I'm a bit busy
> today. I'll also try to fix any remaining checkdoc errors.

Thanks!

> -Jay
>

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 98%]

* Re: NonGNU ELPA: Conditions for accepting a potential new package 'rmsbolt' ?
  @ 2024-02-27  7:47 16%     ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-27  7:47 UTC (permalink / raw)
  To: Jeremy Bryant; +Cc: emacs-devel@gnu.org, Jay Kamat, monnier

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

Jeremy Bryant <jb@jeremybryant.net> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Jeremy Bryant <jb@jeremybryant.net> writes:
>>
>>> I would like to recommend the package 'rmsbolt' for NonGNU ELPA and
>>> volunteer for any required changes.
>>>
>>> The author is Jay Kamat, who as I understand is potentially supportive
>>> if the changes are minimal (and I am volunteering for these.)
>>
>> Minimal as in "small diff" or "small effort"?
>
> I believe the author is supportive if the changes are a small effort.

It would be nice if the checkdoc errors could be address, since there
are a few of them, but that is not a hard-constraint.

>>
>>> It is currently hosted on gitlab and distributed on MELPA.
>>
>> Could you provide a URL?
>
> https://gitlab.com/jgkamat/rmsbolt

Here are my comments:


[-- Attachment #2: Type: text/plain, Size: 32335 bytes --]

diff --git a/rmsbolt.el b/rmsbolt.el
index bdc457f..b2f2049 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -1,6 +1,7 @@
 ;;; rmsbolt.el --- A compiler output viewer -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2018-2021 Jay Kamat
+;; Copyright (C) 2018-2023 Jay Kamat
+
 ;; Author: Jay Kamat <jaygkamat@gmail.com>
 ;; Version: 0.1.2
 ;; Keywords: compilation, tools
@@ -40,8 +41,10 @@
 ;; 4. Provide an interface for highlighting the matched assembly/bytecode line
 ;; to the source and vice versa
 ;;
-;; Tweakables:
-;; RMSBolt is primarily configured with Emacs local variables. This lets you
+
+;;;; Tweakables:
+
+;; RMSBolt is primarily configured with Emacs local variables.  This lets you
 ;; change compiler and rmsbolt options simply by editing a local variable block.
 ;;
 ;; Notable options:
@@ -80,25 +83,25 @@
 ;;; Code:
 ;;;; Customize:
 (defgroup rmsbolt nil
-  "rmsbolt customization options"
+  "rmsbolt customization options."
   :group 'applications)
 
 (defcustom rmsbolt-use-overlays t
   "Whether we should use overlays to show matching code."
-  :type 'boolean
-  :group 'rmsbolt)
+  :type 'boolean)
+
 (defcustom rmsbolt-goto-match t
   "Whether we should goto the match in the other buffer if it is non visible."
-  :type 'boolean
-  :group 'rmsbolt)
-(defcustom rmsbolt-mode-lighter " RMS🗲"
+  :type 'boolean)
+
+(defcustom rmsbolt-mode-lighter " RMS🗲"	;could the unicode charachter be removed?  it can unnecessarily resize the mode line.
   "Lighter displayed in mode line when function `rmsbolt-mode' is active."
-  :type 'string
-  :group 'rmsbolt)
+  :type 'string)
+
 (defcustom rmsbolt-large-buffer-size 500
   "Number of lines past which a buffer is considred large."
-  :type 'integer
-  :group 'rmsbolt)
+  :type 'natnum)
+
 (defcustom rmsbolt-automatic-recompile t
   "Whether to automatically save and recompile the source buffer.
 This setting is automatically disabled on large buffers, set to
@@ -107,29 +110,28 @@ manually saved, set to `on-save'."
   :type '(choice (const :tag "Off" nil)
                  (const :tag "On save" on-save)
                  (const :tag "On" t)
-                 (const :tag "Always" force))
-  :group 'rmsbolt)
+                 (const :tag "Always" force)))
 
 ;;;;; Buffer Local Tweakables
 (defcustom rmsbolt-disassemble nil
   "Whether we should disassemble an output binary."
   :type 'boolean
-  :safe 'booleanp
-  :group 'rmsbolt)
+  :safe 'booleanp)
+
 (defcustom rmsbolt-command nil
   "The base command to run rmsbolt from."
   :type 'string
   ;; nil means use default command
-  :safe (lambda (v) (or (booleanp v) (stringp v)))
-  :group 'rmsbolt)
+  :safe (lambda (v) (or (booleanp v) (stringp v))))
+
 (defcustom rmsbolt-default-directory nil
   "The default directory to compile from.
 This must be an absolute path if set.
 Some exporters (such as pony) may not work with this set."
   :type 'string
   ;; nil means use default command
-  :safe (lambda (v) (or (booleanp v) (stringp v)))
-  :group 'rmsbolt)
+  :safe (lambda (v) (or (booleanp v) (stringp v))))
+
 (define-obsolete-variable-alias 'rmsbolt-intel-x86
   'rmsbolt-asm-format "RMSBolt-0.2"
   "Sorry about not providing a proper migration for this variable.
@@ -142,6 +144,7 @@ tool defaults -> nil
 
 This means that if you had rmsbolt-intel-x86 set manually, you
 are now getting tool defaults.")
+
 (defcustom rmsbolt-asm-format "intel"
   "Which output assembly format to use.
 
@@ -155,45 +158,44 @@ If you are not on x86, you most likely want to set this to nil.
 Since this defaults to \"intel\", implementers must support this
 being set (at worst falling back to nil if passed \"intel\")."
   :type 'string
-  :safe (lambda (v) (or (booleanp v) (stringp v)))
-  :group 'rmsbolt)
+  :safe (lambda (v) (or (booleanp v) (stringp v))))
+
 (defcustom rmsbolt-filter-directives t
   "Whether to filter assembly directives."
   :type 'boolean
-  :safe 'booleanp
-  :group 'rmsbolt)
+  :safe 'booleanp)
+
 (defcustom rmsbolt-filter-labels t
   "Whether to filter unused labels."
   :type 'boolean
-  :safe 'booleanp
-  :group 'rmsbolt)
+  :safe 'booleanp)
+
 (defcustom rmsbolt-filter-comment-only t
   "Whether to filter comment-only lines."
   :type 'boolean
-  :safe 'booleanp
-  :group 'rmsbolt)
+  :safe 'booleanp)
+
 (defcustom rmsbolt-ignore-binary-limit nil
-  "Whether to ignore the binary limit. Could hang emacs..."
+  "Whether to ignore the binary limit.  Could hang emacs..."
   :type 'boolean
-  :safe 'booleanp
-  :group 'rmsbolt)
+  :safe 'booleanp)
+
 (defcustom rmsbolt-demangle t
   "Whether to attempt to demangle the resulting assembly."
   :type 'boolean
-  :safe 'booleanp
-  :group 'rmsbolt)
+  :safe 'booleanp)
+
 (defcustom rmsbolt-flag-quirks t
   "Whether to tweak flags to enable as many features as possible.
 
 In most cases, we will try to honor flags in rmsbolt-command as
-much as possible. However, some features may be disabled with
-some odd combinations of flags. This variable controls
+much as possible.  However, some features may be disabled with
+some odd combinations of flags.  This variable controls
 removing/adding flags to handle those cases.
 
 Note that basic flags to ensure basic usage are always modified."
   :type 'boolean
-  :safe 'booleanp
-  :group 'rmsbolt)
+  :safe 'booleanp)
 
 (defcustom rmsbolt-after-parse-hook nil
   "Hook after all parsing is done, but before compile command is run.
@@ -201,7 +203,6 @@ Note that basic flags to ensure basic usage are always modified."
 Exercise caution when setting variables in this hook - doing so
 can disrupt rmsbolt state and cause issues. Variables set here
 may not be cleared to default as variables are usually."
-  :group 'rmsbolt
   :type 'hook)
 
 ;;;; Faces
@@ -241,16 +242,15 @@ Used to work around inconsistencies in alternative shells.")
 Please DO NOT modify this blindly, as this directory will get
 deleted on Emacs exit.")
 
-(defvar rmsbolt-dir nil
+(defvar rmsbolt-dir (and load-file-name (file-name-directory load-file-name))
   "The directory which rmsbolt is installed to.")
-(when load-file-name
-  (setq rmsbolt-dir (file-name-directory load-file-name)))
 
 (defvar-local rmsbolt-src-buffer nil)
 
 (defvar-local rmsbolt--real-src-file nil
   "If set, the real filename that we compiled from,
-probably due to a copy from this file.")
+probably due to a copy from this file.") ;^there is a checkdoc warning here
+
 ;; FIXME should we be unbinding the list here, or is setting nil good enough.
 (defvar-local rmsbolt--default-variables nil
   "A list of the buffer-local variables we filled in with defaults.
@@ -395,7 +395,7 @@ Please be careful when setting this, as it bypasses most logic and is
 generally not useful."))
 
 ;;;; Helper Functions
-(defun rmsbolt--convert-file-name-to-system-type (file-name)
+(defun rmsbolt--convert-file-name-to-system-type (file-name) ;perhaps use `convert-standard-filename'?
   "Convert the argument FILE-NAME to windows format if `system-type' is equal to `cygwin'.
 Additional escaping with double quotes included to avoid backslashes loss in cygwin environment.
 If not `cygwin' then bypass the FILE-NAME."
@@ -417,7 +417,7 @@ Return value is quoted for passing to the shell."
             (rmsbolt-output-filename ,src-buffer)))))
      ,@body))
 
-(defmacro rmsbolt--set-local (var val)
+(defmacro rmsbolt--set-local (var val)	;`setq-local' is avaliable from 24.3 onwards
   "Set unquoted variable VAR to value VAL in current buffer."
   (declare (debug (symbolp form)))
   `(set (make-local-variable ,var) ,val))
@@ -513,6 +513,7 @@ this."
                                            " "))
                           " ")))
      cmd)))
+
 (cl-defun rmsbolt--lisp-compile-cmd (&key src-buffer)
   "Process a compile command for common lisp.
 
@@ -542,6 +543,7 @@ this."
                    " "))
        (_
         (error "This Common Lisp interpreter is not supported"))))))
+
 (cl-defun rmsbolt--rust-compile-cmd (&key src-buffer)
   "Process a compile command for rustc."
   (rmsbolt--with-files
@@ -563,6 +565,7 @@ this."
                                   (concat "-Cllvm-args=--x86-asm-syntax=" asm-format)))
                           " ")))
      cmd)))
+
 (cl-defun rmsbolt--go-compile-cmd (&key src-buffer)
   "Process a compile command for go."
   (rmsbolt--with-files
@@ -576,12 +579,13 @@ this."
                                 src-filename)
                           " ")))
      cmd)))
+
 (cl-defun rmsbolt--d-compile-cmd (&key src-buffer)
   "Process a compile command for d"
   (rmsbolt--with-files
    src-buffer
    (let* ((compiler (buffer-local-value 'rmsbolt-command src-buffer))
-          (cmd (mapconcat
+          (cmd (mapconcat		;you have `string-join' in subr-x
                 #'identity
                 (list compiler "-g" "-output-s" src-filename "-of" output-filename)
                 " ")))
@@ -624,6 +628,7 @@ this."
                                (buffer-file-name))
                               dir)))
     cmd))
+
 (cl-defun rmsbolt--py-compile-cmd (&key src-buffer)
   "Process a compile command for python3."
   (rmsbolt--with-files
@@ -676,6 +681,7 @@ https://github.com/derickr/vld"
                                 "-o" output-filename)
                           " ")))
      cmd)))
+
 (cl-defun rmsbolt--java-compile-cmd (&key src-buffer)
   "Process a compile command for ocaml.
 
@@ -771,6 +777,7 @@ https://github.com/derickr/vld"
               "frame_dummy"
               (and ".plt" (0+ any)))
       eol))
+
 (defvar rmsbolt--hidden-func-ocaml
   (rx bol
       (or (and "__" (0+ any))
@@ -782,11 +789,13 @@ https://github.com/derickr/vld"
           (and (or "caml_" "camlStd_") (0+ any))
           (and "caml" (or "Pervasives" "List" "Bytes"
                           "String" "Buffer" "Printf"
-                          "Char" "Sys") "__" (0+ any))
+                          "Char" "Sys")
+	       "__" (0+ any))
           ;; Ocaml likes to make labels following camlModule__,
           ;; filter out any lowercase
           (and (1+ (1+ lower) (opt (or "64" "32" "8" "16")) (opt "_"))))
       eol))
+
 (defvar rmsbolt--hidden-func-zig
   (rx bol (or (and "_" (0+ any))
               (and (opt "de") "register_tm_clones")
@@ -810,8 +819,7 @@ https://github.com/derickr/vld"
   (rmsbolt--path-to-swift-tool "swiftc"))
 
 (defun rmsbolt--path-to-swift-tool (swift-tool)
-  "Return the path to SWIFT-TOOL, depending on the active
-toolchain."
+  "Return the path to SWIFT-TOOL, depending on the active toolchain."
   (let* ((swift-tool-binary swift-tool)
          (swift-tool-toolchain-path (shell-command-to-string (format "echo -n `xcrun --find %s`" swift-tool-binary))))
     ;; If we have the Swift tool in PATH, just return it (this is the
@@ -821,8 +829,7 @@ toolchain."
      ((executable-find swift-tool-binary)
       swift-tool-binary)
      ((executable-find swift-tool-toolchain-path)
-      swift-tool-toolchain-path)
-     (t nil))))
+      swift-tool-toolchain-path))))
 
 (defun rmsbolt--parse-compile-commands (comp-cmds file)
   "Parse COMP-CMDS and extract a compilation dir and command for FILE."
@@ -840,6 +847,7 @@ toolchain."
              (dir (alist-get 'directory entry))
              (cmd (alist-get 'command entry)))
     (list dir cmd)))
+
 (defun rmsbolt--handle-c-compile-cmd (src-buffer)
   "Handle compile_commands.json for c/c++ for a given SRC-BUFFER.
 return t if successful."
@@ -866,126 +874,125 @@ return t if successful."
                     (rmsbolt-split-rm-single "-flto" #'string-prefix-p)
                     (rmsbolt-split-rm-double "-o")))
       t)))
+
 ;;;; Language Definitions
-(defvar rmsbolt-languages)
-(setq
- rmsbolt-languages
- `((c-mode
-    . ,(make-rmsbolt-lang :compile-cmd "gcc"
-                          :supports-asm t
-                          :supports-disass t
-                          :demangler "c++filt"
-                          :compile-cmd-function #'rmsbolt--c-compile-cmd
-                          :disass-hidden-funcs rmsbolt--hidden-func-c))
-   (c++-mode
-    . ,(make-rmsbolt-lang :compile-cmd "g++"
-                          :supports-asm t
-                          :supports-disass t
-                          :demangler "c++filt"
-                          :compile-cmd-function #'rmsbolt--c-compile-cmd
-                          :disass-hidden-funcs rmsbolt--hidden-func-c))
-   (d-mode
-    . ,(make-rmsbolt-lang :compile-cmd "ldc2"
-                          :supports-asm t
-                          :supports-disass nil
-                          :demangler "ddemangle"
-                          :compile-cmd-function #'rmsbolt--d-compile-cmd))
-   ;; In order to parse ocaml files, you need the emacs ocaml mode, tuareg
-   (tuareg-mode
-    . ,(make-rmsbolt-lang :compile-cmd "ocamlopt"
-                          :supports-asm t
-                          :supports-disass t
-                          :compile-cmd-function #'rmsbolt--ocaml-compile-cmd
-                          :disass-hidden-funcs rmsbolt--hidden-func-ocaml))
-   (lisp-mode
-    . ,(make-rmsbolt-lang :compile-cmd "sbcl"
-                          :supports-asm t
-                          :supports-disass nil
-                          :objdumper 'cat
-                          :compile-cmd-function #'rmsbolt--lisp-compile-cmd))
-   (rust-mode
-    . ,(make-rmsbolt-lang :compile-cmd "rustc"
-                          :supports-asm t
-                          :supports-disass nil
-                          :objdumper 'objdump
-                          :demangler "rustfilt"
-                          :compile-cmd-function #'rmsbolt--rust-compile-cmd))
-   ;; Copy of above
-   (rustic-mode
-    . ,(make-rmsbolt-lang :compile-cmd "rustc"
-                          :supports-asm t
-                          :supports-disass nil
-                          :objdumper 'objdump
-                          :demangler "rustfilt"
-                          :compile-cmd-function #'rmsbolt--rust-compile-cmd))
-   (ponylang-mode
-    . ,(make-rmsbolt-lang :compile-cmd "ponyc"
-                          :supports-asm t
-                          :supports-disass t
-                          :objdumper 'objdump
-                          :compile-cmd-function #'rmsbolt--pony-compile-cmd))
-   (php-mode
-    . ,(make-rmsbolt-lang :compile-cmd #'rmsbolt--php-default-compile-cmd
-                          :supports-asm t
-                          :supports-disass nil
-                          :compile-cmd-function #'rmsbolt--php-compile-cmd
-                          :process-asm-custom-fn #'rmsbolt--process-php-bytecode))
-   ;; ONLY SUPPORTS PYTHON 3
-   (python-mode
-    . ,(make-rmsbolt-lang :compile-cmd "python3"
-                          :supports-asm t
-                          :supports-disass nil
-                          :compile-cmd-function #'rmsbolt--py-compile-cmd
-                          :process-asm-custom-fn #'rmsbolt--process-python-bytecode))
-   (haskell-mode
-    . ,(make-rmsbolt-lang :compile-cmd "ghc"
-                          :supports-asm t
-                          :supports-disass nil
-                          :demangler "haskell-demangler"
-                          :compile-cmd-function #'rmsbolt--hs-compile-cmd))
-   (java-mode
-    . ,(make-rmsbolt-lang :compile-cmd "javac"
-                          :supports-asm t
-                          :supports-disass nil
-                          :objdumper 'cat
-                          :compile-cmd-function #'rmsbolt--java-compile-cmd
-                          :process-asm-custom-fn #'rmsbolt--process-java-bytecode))
-   (emacs-lisp-mode
-    . ,(make-rmsbolt-lang :supports-asm t
-                          :supports-disass nil
-                          ;; Nop
-                          :process-asm-custom-fn (lambda (_src-buffer lines)
-                                                   lines)
-                          :elisp-compile-override #'rmsbolt--elisp-compile-override))
-   (nim-mode
-    . ,(make-rmsbolt-lang :compile-cmd "nim c"
-                          :supports-disass t
-                          :objdumper 'objdump
-                          :demangler "c++filt"
-                          :compile-cmd-function #'rmsbolt--nim-compile-cmd
-                          :disass-hidden-funcs rmsbolt--hidden-func-c))
-   (zig-mode
-    . ,(make-rmsbolt-lang :compile-cmd "zig build-obj -O ReleaseFast"
-                          :supports-asm t
-                          :supports-disass t
-                          :objdumper 'objdump
-                          :compile-cmd-function #'rmsbolt--zig-compile-cmd
-                          :disass-hidden-funcs rmsbolt--hidden-func-zig))
-   (go-mode
-    . ,(make-rmsbolt-lang :compile-cmd "go"
-			                    :supports-asm nil
-			                    :supports-disass t
-			                    :objdumper 'go-objdump
-			                    :compile-cmd-function #'rmsbolt--go-compile-cmd
-			                    :process-asm-custom-fn #'rmsbolt--process-go-asm-lines))
-   (swift-mode
-    . ,(make-rmsbolt-lang :compile-cmd (rmsbolt--path-to-swift-compiler)
-                          :supports-asm t
-                          :supports-disass nil
-                          :objdumper 'objdump
-                          :demangler (rmsbolt--path-to-swift-demangler)
-                          :compile-cmd-function #'rmsbolt--swift-compile-cmd))
-   ))
+(defvar rmsbolt-languages
+  `((c-mode
+     . ,(make-rmsbolt-lang :compile-cmd "gcc"
+                           :supports-asm t
+                           :supports-disass t
+                           :demangler "c++filt"
+                           :compile-cmd-function #'rmsbolt--c-compile-cmd
+                           :disass-hidden-funcs rmsbolt--hidden-func-c))
+    (c++-mode
+     . ,(make-rmsbolt-lang :compile-cmd "g++"
+                           :supports-asm t
+                           :supports-disass t
+                           :demangler "c++filt"
+                           :compile-cmd-function #'rmsbolt--c-compile-cmd
+                           :disass-hidden-funcs rmsbolt--hidden-func-c))
+    (d-mode
+     . ,(make-rmsbolt-lang :compile-cmd "ldc2"
+                           :supports-asm t
+                           :supports-disass nil
+                           :demangler "ddemangle"
+                           :compile-cmd-function #'rmsbolt--d-compile-cmd))
+    ;; In order to parse ocaml files, you need the emacs ocaml mode, tuareg
+    (tuareg-mode
+     . ,(make-rmsbolt-lang :compile-cmd "ocamlopt"
+                           :supports-asm t
+                           :supports-disass t
+                           :compile-cmd-function #'rmsbolt--ocaml-compile-cmd
+                           :disass-hidden-funcs rmsbolt--hidden-func-ocaml))
+    (lisp-mode
+     . ,(make-rmsbolt-lang :compile-cmd "sbcl"
+                           :supports-asm t
+                           :supports-disass nil
+                           :objdumper 'cat
+                           :compile-cmd-function #'rmsbolt--lisp-compile-cmd))
+    (rust-mode
+     . ,(make-rmsbolt-lang :compile-cmd "rustc"
+                           :supports-asm t
+                           :supports-disass nil
+                           :objdumper 'objdump
+                           :demangler "rustfilt"
+                           :compile-cmd-function #'rmsbolt--rust-compile-cmd))
+    ;; Copy of above
+    (rustic-mode
+     . ,(make-rmsbolt-lang :compile-cmd "rustc"
+                           :supports-asm t
+                           :supports-disass nil
+                           :objdumper 'objdump
+                           :demangler "rustfilt"
+                           :compile-cmd-function #'rmsbolt--rust-compile-cmd))
+    (ponylang-mode
+     . ,(make-rmsbolt-lang :compile-cmd "ponyc"
+                           :supports-asm t
+                           :supports-disass t
+                           :objdumper 'objdump
+                           :compile-cmd-function #'rmsbolt--pony-compile-cmd))
+    (php-mode
+     . ,(make-rmsbolt-lang :compile-cmd #'rmsbolt--php-default-compile-cmd
+                           :supports-asm t
+                           :supports-disass nil
+                           :compile-cmd-function #'rmsbolt--php-compile-cmd
+                           :process-asm-custom-fn #'rmsbolt--process-php-bytecode))
+    ;; ONLY SUPPORTS PYTHON 3
+    (python-mode
+     . ,(make-rmsbolt-lang :compile-cmd "python3"
+                           :supports-asm t
+                           :supports-disass nil
+                           :compile-cmd-function #'rmsbolt--py-compile-cmd
+                           :process-asm-custom-fn #'rmsbolt--process-python-bytecode))
+    (haskell-mode
+     . ,(make-rmsbolt-lang :compile-cmd "ghc"
+                           :supports-asm t
+                           :supports-disass nil
+                           :demangler "haskell-demangler"
+                           :compile-cmd-function #'rmsbolt--hs-compile-cmd))
+    (java-mode
+     . ,(make-rmsbolt-lang :compile-cmd "javac"
+                           :supports-asm t
+                           :supports-disass nil
+                           :objdumper 'cat
+                           :compile-cmd-function #'rmsbolt--java-compile-cmd
+                           :process-asm-custom-fn #'rmsbolt--process-java-bytecode))
+    (emacs-lisp-mode
+     . ,(make-rmsbolt-lang :supports-asm t
+                           :supports-disass nil
+                           ;; Nop
+                           :process-asm-custom-fn (lambda (_src-buffer lines)
+                                                    lines)
+                           :elisp-compile-override #'rmsbolt--elisp-compile-override))
+    (nim-mode
+     . ,(make-rmsbolt-lang :compile-cmd "nim c"
+                           :supports-disass t
+                           :objdumper 'objdump
+                           :demangler "c++filt"
+                           :compile-cmd-function #'rmsbolt--nim-compile-cmd
+                           :disass-hidden-funcs rmsbolt--hidden-func-c))
+    (zig-mode
+     . ,(make-rmsbolt-lang :compile-cmd "zig build-obj -O ReleaseFast"
+                           :supports-asm t
+                           :supports-disass t
+                           :objdumper 'objdump
+                           :compile-cmd-function #'rmsbolt--zig-compile-cmd
+                           :disass-hidden-funcs rmsbolt--hidden-func-zig))
+    (go-mode
+     . ,(make-rmsbolt-lang :compile-cmd "go"
+			   :supports-asm nil
+			   :supports-disass t
+			   :objdumper 'go-objdump
+			   :compile-cmd-function #'rmsbolt--go-compile-cmd
+			   :process-asm-custom-fn #'rmsbolt--process-go-asm-lines))
+    (swift-mode
+     . ,(make-rmsbolt-lang :compile-cmd (rmsbolt--path-to-swift-compiler)
+                           :supports-asm t
+                           :supports-disass nil
+                           :objdumper 'objdump
+                           :demangler (rmsbolt--path-to-swift-demangler)
+                           :compile-cmd-function #'rmsbolt--swift-compile-cmd))
+    ))
 
 (defvar rmsbolt-c-dwarf-language
   (make-rmsbolt-lang :compile-cmd "gcc"
@@ -1014,7 +1021,6 @@ This should be an object of type `rmsbolt-lang', normally set by the major mode"
             display-buffer-overriding-action)))
      ,@body))
 
-
 ;;;; Functions
 ;; Functions to parse and lint assembly were lifted almost directly from the compiler-explorer
 
@@ -1066,9 +1072,7 @@ Lifted from https://emacs.stackexchange.com/questions/35936/disassembly-of-a-byt
   "Check if LINE has opcodes."
   (save-match-data
     (let* ((match (string-match rmsbolt-label-def line))
-           (line (if match
-                     (substring line (match-end 0))
-                   line))
+           (line (substring line (and match (match-end 0))))
            (line (cl-first (split-string line (rx (1+ (any ";#")))))))
       (if (string-match-p rmsbolt-assignment-def line)
           nil
@@ -1434,7 +1438,7 @@ Argument ASM-LINES input lines."
     (setq result (nconc die result))
     (nreverse result)))
 
-;;;;; Handlers
+;;;;; HANDLERS
 (cl-defun rmsbolt--handle-finish-compile (buffer str &key override-buffer stopped)
   "Finish hook for compilations.
 Argument BUFFER compilation buffer.
@@ -1476,23 +1480,22 @@ Argument STOPPED The compilation was stopped to start another compilation."
                    (let ((property
                           (get-text-property
                            0 'rmsbolt-src-line line)))
-                     (progn
-                       (cl-tagbody
-                        run-conditional
-                        (cond
-                         ((and in-match (eq in-match property))
-                          ;; We are continuing an existing match
-                          nil)
-                         (in-match
-                          ;; We are in a match that has just expired
-                          (push (cons start-match (1- linum))
-                                (gethash in-match ht))
-                          (setq in-match nil
-                                start-match nil)
-                          (go run-conditional))
-                         (property
-                          (setq in-match property
-                                start-match linum))))))
+                     (cl-tagbody
+                      run-conditional
+                      (cond
+                       ((and in-match (eq in-match property))
+                        ;; We are continuing an existing match
+                        nil)
+                       (in-match
+                        ;; We are in a match that has just expired
+                        (push (cons start-match (1- linum))
+                              (gethash in-match ht))
+                        (setq in-match nil
+                              start-match nil)
+                        (go run-conditional))
+                       (property
+                        (setq in-match property
+                              start-match linum)))))
                    (cl-incf linum))
 
                  (with-current-buffer src-buffer
@@ -1544,7 +1547,7 @@ Argument STOPPED The compilation was stopped to start another compilation."
                  ;; https://github.com/renzmann/treesit-auto/blob/d32617b5edb660b8a046053af3b92cf14f9b978e/treesit-auto.el#L89
                  (assoc (thread-last
                           (symbol-name major-mode)
-                          (replace-regexp-in-string "ts-mode$" "mode")
+                          (replace-regexp-in-string "-ts-mode\\'" "-mode")
                           (intern))
                         rmsbolt-languages)))))
 
@@ -1608,6 +1611,7 @@ and return it."
 (defun rmsbolt-compile ()
   "Compile the current rmsbolt buffer."
   (interactive)
+  ;; perhaps use `save-some-buffers'?
   (when (and (buffer-modified-p)
              (yes-or-no-p (format "Save buffer %s? " (buffer-name))))
     (save-buffer))
@@ -1615,7 +1619,7 @@ and return it."
   ;; Current buffer = src-buffer at this point
   (setq rmsbolt-src-buffer (current-buffer))
   (cond
-   ((eq major-mode 'asm-mode)
+   ((derived-mode-p 'asm-mode)
     ;; We cannot compile asm-mode files
     (message "Cannot compile assembly files. Are you sure you are not in the output buffer?"))
    ((rmsbolt-l-elisp-compile-override (rmsbolt--get-lang))
@@ -1641,8 +1645,7 @@ and return it."
                                   rmsbolt--temp-dir)))
       (run-hooks 'rmsbolt-after-parse-hook)
       (when (buffer-local-value 'rmsbolt-disassemble src-buffer)
-        (pcase
-            (rmsbolt-l-objdumper lang)
+        (pcase-exhaustive (rmsbolt-l-objdumper lang)
           ('objdump
            (setq cmd
                  (mapconcat #'identity
@@ -1670,9 +1673,7 @@ and return it."
                                   "&&" "mv"
                                   (rmsbolt-output-filename src-buffer)
                                   (rmsbolt-output-filename src-buffer t))
-                            " ")))
-          (_
-           (error "Objdumper not recognized"))))
+                            " ")))))
       ;; Convert to demangle if we need to
       (setq cmd (rmsbolt--demangle-command cmd lang src-buffer))
       (with-current-buffer ; With compilation buffer
@@ -1720,14 +1721,14 @@ and return it."
                            rmsbolt--temp-dir
                            (file-directory-p rmsbolt--temp-dir))
                   (delete-directory rmsbolt--temp-dir t))
-                (setq rmsbolt--temp-dir nil)))))
+                (setq rmsbolt--temp-dir nil))))) ;why is this necessary while killing emacs?
 
 ;;;;; Starter Definitions
 
 ;; IIUC, this "starter" business is not a necessary part of RMSBolt, but is
 ;; a way to provide sample files with which users can try out RMSBolt.
 
-(defvar rmsbolt-starter-files
+(defvar rmsbolt-starter-files		;should this be part of a secondary file that isn't loaded by default?
   '(("c" . "rmsbolt.c")
     ("c++" . "rmsbolt.cpp")
     ("ocaml" . "rmsbolt.ml")
@@ -1778,24 +1779,23 @@ and return it."
   (when line
     (let ((cur (line-number-at-pos)))
       (forward-line (- line cur)))))
+
 (defun rmsbolt--setup-overlay (start end buf)
   "Setup overlay with START and END in BUF."
   (let ((o (make-overlay start end buf)))
     (overlay-put o 'face 'rmsbolt-current-line-face)
     o))
+
 (cl-defun rmsbolt--point-visible (point)
   "Check if the current point is visible in a window in the current buffer."
-  (when (cl-find-if (lambda (w)
-                      (and (>= point (window-start w))
-                           (<= point (window-end w))))
-                    (get-buffer-window-list))
-    t))
+  (cl-find-if (lambda (w)
+		(<= (window-start w) point (window-end w)))
+              (get-buffer-window-list)))
 
 (cl-defun rmsbolt-update-overlays (&key (force nil))
   "Update overlays to highlight the currently selected source and asm lines.
-  If FORCE, always scroll overlay, even when one is visible.
-  FORCE also scrolls to the first line, instead of the first line
-  of the last block."
+If FORCE, always scroll overlay, even when one is visible.  FORCE also
+scrolls to the first line, instead of the first line of the last block."
   (when rmsbolt-mode
     (if-let ((should-run rmsbolt-use-overlays)
              (output-buffer (get-buffer rmsbolt-output-buffer))
@@ -1841,8 +1841,7 @@ and return it."
                                          (not scroll-src-buffer-p))
                                 (setq line-visible (or (rmsbolt--point-visible start-pt)
                                                        (rmsbolt--point-visible end-pt)
-                                                       (and (> saved-pt start-pt)
-                                                            (< saved-pt end-pt)))))
+                                                       (< start-pt saved-pt end-pt))))
                               (push (rmsbolt--setup-overlay start-pt end-pt output-buffer)
                                     rmsbolt-overlays)))))
             (when (or (not line-visible) force)
@@ -1931,9 +1930,7 @@ and return it."
   "Toggle rmsbolt-mode.
 
 This mode is enabled in both src and assembly output buffers."
-  :global nil
   :lighter rmsbolt-mode-lighter
-  :keymap rmsbolt-mode-map
   ;; Init
   (cond
    (rmsbolt-mode

[-- Attachment #3: Type: text/plain, Size: 38 bytes --]



-- 
	Philip Kaludercic on peregrine

^ permalink raw reply related	[relevance 16%]

* Re: [External] : Re: [ELPA] New package: listen
  @ 2024-02-26 17:21 99%           ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-26 17:21 UTC (permalink / raw)
  To: Drew Adams; +Cc: Adam Porter, emacs-devel

Drew Adams <drew.adams@oracle.com> writes:

>> 2. WHEN's indentation also saves space, helping
>> to avoid long lines or awkwardly wrapped ones.
>
> OK.  So you prefer this:
>
> (when (or xxxxxx
>           yyyyyyyy
>           zzzzzzzzz)
>   foobar)
>
> to this:
>
> (or xxxxxx
>     yyyyyyyy
>     zzzzzzzzz)
>     foobar)

I suppose you mean (and ...)?

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: Manuals for GNU ELPA packages
  @ 2024-02-26 15:27 99%         ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-26 15:27 UTC (permalink / raw)
  To: Stefan Monnier
  Cc: Michael Albinus, Kjartan Óli Ágústsson,
	emacs-devel@gnu.org

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> On https://elpa.gnu.org/packages/doc/, there is a directory of all
>>> manuals, plus the README of plz.el. The latter is wrong here, I guess.
>
> I can't see any "readme" or "README" in
> https://elpa.gnu.org/packages/doc/ What am I missing?

I made the mistake of removing it, but the timestamp was from 2024-02-22
so it would reappear shortly (also, it wasn't the plz manual any more).

>
>         Stefan
>

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: [ELPA] New package: listen
  @ 2024-02-26 15:26 99%                 ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-26 15:26 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-devel

Adam Porter <adam@alphapapa.net> writes:

> Ok, this thread has been interesting.  Is there anything that hinders
> the package from being added to ELPA now?

Don't think so, so I've pushed the package specification to elpa.git.

> Thanks,
> Adam
>

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: Manuals for GNU ELPA packages
  @ 2024-02-26 14:05 73%         ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-26 14:05 UTC (permalink / raw)
  To: Stefan Monnier
  Cc: Michael Albinus, Kjartan Óli Ágústsson,
	emacs-devel@gnu.org

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

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> -	(let ((html-file (concat html-dir (cdr doc))))
>> +	(let ((html-file (expand-file-name
>> +                          (cdr doc)
>> +                          (expand-file-name
>> +                           (symbol-name (car pkg-spec))
>> +                           html-dir))))
>
> That looks about right, except we want relative names, so we should use
> `concat` or `file-name-concat`.

Of course, I forgot that fine-name-concat was available, and yes, the
absolute file names wouldn't really improve the website experience ^^

This is my suggestion:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Link-to-HTML-manuals-in-their-respective-subdirector.patch --]
[-- Type: text/x-patch, Size: 1972 bytes --]

From e999dbdc195b27ebd5699e5e756131e9b8de5fe5 Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Mon, 26 Feb 2024 15:03:43 +0100
Subject: [PATCH] Link to HTML manuals in their respective subdirectories

* elpa-admin.el (elpaa--html-insert-docs): To avoid manuals with the
same names overwriting each other, link directly to the files under
doc/[package name].
(elpaa--html-build-doc): Do not generate symlinks to the actual manual
files.
---
 elpa-admin.el | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index cde0e3437a..4eb47d6856 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -1856,7 +1856,10 @@ arbitrary code."
                (file-readable-p html-dir)) ;; html doc files were built
       (insert "<dt>Manual</dt> <dd>\n")
       (dolist (doc docfiles)
-	(let ((html-file (concat html-dir (cdr doc))))
+	(let ((html-file (file-name-concat
+                          html-dir
+                          (symbol-name (car pkg-spec))
+                          (cdr doc))))
 	  (insert "<a href=\"" html-file "\">"
 	          (car doc)
 	          "</a>\n")
@@ -2539,14 +2542,7 @@ directory; one of archive, archive-devel."
                :internal--html-docs
                (cons (cons (file-name-base html-file)
                            (file-name-nondirectory html-file))
-                     (plist-get (cdr pkg-spec) :internal--html-docs)))
-
-    ;; Create a symlink from elpa/archive[-devel]/doc/* to
-    ;; the actual file, so html references work.
-    (with-demoted-errors "%S" ;; 'make-symbolic-link' doesn't work on Windows
-      (make-symbolic-link
-       (concat (file-name-nondirectory html-dir) "/" destname)
-       html-xref-file t))))
+                     (plist-get (cdr pkg-spec) :internal--html-docs)))))
 
 (defun elpaa--build-Info-1 (pkg-spec docfile dir html-dir)
   "Build an info file from DOCFILE (a texinfo source file).
-- 
2.43.2


[-- Attachment #3: Type: text/plain, Size: 38 bytes --]



-- 
	Philip Kaludercic on peregrine

^ permalink raw reply related	[relevance 73%]

* Re: Manuals for GNU ELPA packages
    2023-12-27 13:47 99%     ` Philip Kaludercic
@ 2024-02-26 10:49 84%     ` Philip Kaludercic
      1 sibling, 2 replies; 200+ results
From: Philip Kaludercic @ 2024-02-26 10:49 UTC (permalink / raw)
  To: Michael Albinus
  Cc: Kjartan Óli Ágústsson, emacs-devel@gnu.org,
	Stefan Monnier

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

Michael Albinus <michael.albinus@gmx.de> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
> Hi Philip,
>
>> ... then the documentation should be packaged in
>> the tarball and also appear online under
>> https://elpa.gnu.org/packages/doc/calibre.html.
>
> On https://elpa.gnu.org/packages/doc/, there is a directory of all
> manuals, plus the README of plz.el. The latter is wrong here, I guess.

It turns out that this is actually a more general issue, since
elpa-admin.el keeps the basename of the file being rendered, even if
multiple packages use the same name (e.g. as is the case with packages
that use "README.org").  As we want to be able to render multiple manual
files, we cannot just trivially rename the name of the symlink.

I think the simplest solution is to point to files in the respective
doc/ sub-directory of each package:


[-- Attachment #2: Type: text/plain, Size: 654 bytes --]

diff --git a/elpa-admin.el b/elpa-admin.el
index cde0e3437a..3e79bef078 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -1856,7 +1856,11 @@ arbitrary code."
                (file-readable-p html-dir)) ;; html doc files were built
       (insert "<dt>Manual</dt> <dd>\n")
       (dolist (doc docfiles)
-	(let ((html-file (concat html-dir (cdr doc))))
+	(let ((html-file (expand-file-name
+                          (cdr doc)
+                          (expand-file-name
+                           (symbol-name (car pkg-spec))
+                           html-dir))))
 	  (insert "<a href=\"" html-file "\">"
 	          (car doc)
 	          "</a>\n")

[-- Attachment #3: Type: text/plain, Size: 111 bytes --]


and perhaps even stop generating the symlinks.

> Best regards, Michael.

-- 
	Philip Kaludercic on peregrine

^ permalink raw reply related	[relevance 84%]

* Re: [ELPA] New package: listen
  @ 2024-02-26 10:13 86%             ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-26 10:13 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-devel

Adam Porter <adam@alphapapa.net> writes:

> On 2/26/24 02:09, Philip Kaludercic wrote:
>
>> The pattern I usually use is something like this:
>> (mapcan
>>   (lambda (n)
>>     (if (> n 0) (list n) nil))
>>   '(1 -2 5 0 -10 10))
>> ;;=> (1 5 10)
>> The idea is that when using `mapcan', you provide the cons-cells of
>> the
>> resulting list, instead of having `mapcar' generate them for you and
>> then immediately discard them via `delq'.
>> There should be a seq method for this pattern imo.
>
> Interesting, thanks.  It looks like the performance of that technique
> is slightly better than (delq nil (mapcar ...)), but if performance is
> a concern, then it looks like one should use a loop:
>
> (benchmark-run-compiled 1000000
>   (mapcan
>    (lambda (n)
>      (if (> n 0) (list n) nil))
>    '(1 -2 5 0 -10 10)))
> ;; (0.21211651699999998 0 0.0)
>
> (benchmark-run-compiled 1000000
>   (delq nil
>         (mapcar
>          (lambda (n)
>            (when (> n 0)
>              n))
>          '(1 -2 5 0 -10 10))))
> ;; (0.21806460800000002 0 0.0)
>
> (benchmark-run-compiled 1000000
>   (cl-loop for n in '(1 -2 5 0 -10 10)
>            when (> n 0)
>            collect n))
> ;; (0.052528039 0 0.0)

True, invoking the lambda expression is probably the most expensive
part, but testing this on a 6-element list with a check that is
basically an opcode, restricts the universality of the claim we are
trying to make.

>> My point is that there shouldn't be an overlap.  I think a README
>> shouldn't contain too much detail, but serve as a signpost (suitable
>> both for online and offline (!) reading): "This is brief summary of what
>> you have found, the source code is hosted here, you can find the
>> documentation there, my contact information somewhere else, etc.", while
>> the package description gives a high level overview that doesn't have to
>> updated unless the entire idea of the package changes, while the
>> documentation goes into the nitty-gritty details.
>
> I understand what you're saying, but I think there is often value in
> having all of those categories of information in a single file,
> especially for smaller packages.  It's similar to the experience of
> being able to quickly scan through a man page compared to having to
> page through an Info manual.

I am not sure how the last point related to what you are saying, because
that sounds to me like an argument for not using the manual as the
package description.  And you already have a shorter package description
in the main file in your commentary section.  (It is possible to
instruct ELPA to use this for C-h P, instead of rendering the manual).

>>>>>> Also, your README includes this line
>>>>>>      :vc (:fetcher github :repo "alphapapa/listen.el")
>>>>>> which is malformed.
>>>>>
>>>>> I just tested that, and it works for me.
>>>> On Emacs 30?  That is not the code we merged...
>>>
>>> No, I'm using Emacs 29 with `vc-use-package'.  Its documentation seems
>>> to suggest that it uses the same format as that merged into Emacs 30,
>>> since it says that its features were merged into Emacs 30.
>>>
>>> Maybe `vc-use-package's documentation should be updated to reflect this?
>> Do you mean this: https://github.com/slotThe/vc-use-package?  I have
>> no
>> involvement with that project, but I don't see where they mention the
>> "fetcher" notation you mention.
>
> I see it in its readme under "Usage".

Oh, right.  Then I guess that should be noted somewhere to avoid
confusion.

>>>>>> What you want is
>>>>>>      :vc (:url "https://github.com/alphapapa/listen.el")
>>>
>>> Ok, so no ".git" on the end (i.e. relying on the GitHub redirect)?
>> That doesn't matter (FWIW I didn't know either of the two was a
>> redirect).
>> 
>>> And does this mean that none of the host-specific "fetchers" are
>>> available in Emacs 30?  (Which FTR is fine with me, as the URL should
>>> be enough, I'm just curious.)
>> No, the package-vc extension for use-package uses the same package
>> specifications as package-vc?
>
> Sorry, I don't understand: "No, it doesn't mean that," or, "No, the
> fetchers are not available in Emacs 30"?

There is no ":fetcher" keyword in Emacs 30.

To rephrase my above sentence: The version of use-package in Emacs 30
has a :vc keyword, that accepts mostly the same syntax for package
specifications as `package-vc-install' does (which in turn is the same
as what elpa-admin uses).

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 86%]

* Re: [ELPA] New package: listen
  @ 2024-02-26  8:09 78%         ` Philip Kaludercic
      1 sibling, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-26  8:09 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-devel

Adam Porter <adam@alphapapa.net> writes:

>> There were a few other places where you did (delq nil (mapcar ...)) that
>> might be replaced by this pattern.
>
> I confess that I've hardly ever used MAPCAN in any of my code--still,
> I'm not sure how that would help to avoid that pattern.  For example:
>
>   (let ((a '(1 nil 2 nil 3))
>         (b '(4 nil 5 nil 6)))
>     (mapcan #'identity (list a b)))
>
>   ;; (1 nil 2 nil 3 4 nil 5 nil 6)
>
> But I'm probably missing something.

The pattern I usually use is something like this:

(mapcan
 (lambda (n)
   (if (> n 0) (list n) nil))
 '(1 -2 5 0 -10 10))
;;=> (1 5 10)

The idea is that when using `mapcan', you provide the cons-cells of the
resulting list, instead of having `mapcar' generate them for you and
then immediately discard them via `delq'.

There should be a seq method for this pattern imo.

>> Not really, if you don't care about compiler warnings.  It just seems
>> like the kind of things that could cause problems at some later time,
>> when definitions are moved around.
>
> I do care about compiler warnings--I wrote makem.sh to catch such
> warnings in my projects before they reach users--but in this case,
> that code's not going anywhere, because it's already with
> bookmark-related code.

Feel free to do as you like (none of this is barring inclusion, if that
wasn't clear), that was just a suggestion.

>> Ah, the `t did confuse me momentarily, but in that case you can replace
>> the (guard ...) with (and 't (guard ...)).
>
> As much as I advocate using pcase and its powerful expressions, I
> think that would make this example harder to follow.  The pcase
> pattern is used to test an argument, and the string test is a separate
> concern.

But consider the saved indentation!

>>>> @@ -328,7 +328,7 @@ PROMPT is passed to `format-prompt', which see."
>>>>             n)
>>>>        (when current-track
>>>>          (cl-callf2 delete current-track tracks))
>>>> -    (setf n (length tracks))
>>>> +    (setf n (length tracks))   ;why the variable?
>>>
>>> Because the value is used elsewhere in the function.  Am I missing
>>> something?  (Anyway, as noted in the source, I did not write that
>>> function.)
>> Then I missed something, because I just saw the variable being
>> declared
>> in the let-head, set here and used once later.
>
> It's used in two places, and it would be undesirable to recalculate
> the list's length every time through the loop.

I see it now, sorry.

>>>> On the topic of the readme/manual, wouldn't it be better to have a
>>>> separate README file?  Then again, the manual is pretty short, and I
>>>> don't know if it is worth having it in the first place...
>>>
>>> As you said, this readme is currently trivial.  Were it larger,
>>> however--well, I have other packages with much larger readmes that are
>>> also converted to manuals.  There would not be much gained by
>>> separating into files.
>> I don't think that is a good practice.  A README for when you have
>> fetched the sources and want to figure out what is what, a manual for
>> when you have already installed a package and a package description for
>> when you are previewing a package using C-h P are three different
>> things.  One shouldn't cover all of it with the same file if you ask me,
>> since they all have different audiences with different levels of
>> interest.
>
> I don't know about that.  Especially for small packages with trivial
> documentation.  Maintaining documentation and commentaries, keeping
> them reasonably in sync, etc. is enough work without having them split
> into multiple files.  Having a README.org which is viewable at the
> package's repo also generate the manual is a relief to me.

My point is that there shouldn't be an overlap.  I think a README
shouldn't contain too much detail, but serve as a signpost (suitable
both for online and offline (!) reading): "This is brief summary of what
you have found, the source code is hosted here, you can find the
documentation there, my contact information somewhere else, etc.", while
the package description gives a high level overview that doesn't have to
updated unless the entire idea of the package changes, while the
documentation goes into the nitty-gritty details.

>>>> Also, your README includes this line
>>>>     :vc (:fetcher github :repo "alphapapa/listen.el")
>>>> which is malformed.
>>>
>>> I just tested that, and it works for me.
>> On Emacs 30?  That is not the code we merged...
>
> No, I'm using Emacs 29 with `vc-use-package'.  Its documentation seems
> to suggest that it uses the same format as that merged into Emacs 30,
> since it says that its features were merged into Emacs 30.
>
> Maybe `vc-use-package's documentation should be updated to reflect this?

Do you mean this: https://github.com/slotThe/vc-use-package?  I have no
involvement with that project, but I don't see where they mention the
"fetcher" notation you mention.

>>>> What you want is
>>>>     :vc (:url "https://github.com/alphapapa/listen.el")
>
> Ok, so no ".git" on the end (i.e. relying on the GitHub redirect)?

That doesn't matter (FWIW I didn't know either of the two was a redirect).

> And does this mean that none of the host-specific "fetchers" are
> available in Emacs 30?  (Which FTR is fine with me, as the URL should
> be enough, I'm just curious.)

No, the package-vc extension for use-package uses the same package
specifications as package-vc?

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 78%]

* Re: [ELPA] New package: listen
  @ 2024-02-26  7:47 99%         ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-26  7:47 UTC (permalink / raw)
  To: Adam Porter; +Cc: Andreas Schwab, emacs-devel

Adam Porter <adam@alphapapa.net> writes:

> Hi Andreas,
>
> On 2/25/24 08:17, Andreas Schwab wrote:
>> On Feb 25 2024, Adam Porter wrote:
>> 
>>>> @@ -942,10 +941,10 @@ extension.
>>>>      Return one of symbols `vorbis', `opus', `flac', or `mp3'."
>>>>      (let ((case-fold-search t))
>>>> -    (cond ((string-match ".ogg$" filename) 'vorbis)
>>>> -          ((string-match ".opus$" filename) 'opus)
>>>> -          ((string-match ".flac$" filename) 'flac)
>>>> -          ((string-match ".mp3$" filename) 'mp3)
>>>> +    (cond ((string-match ".ogg\\'" filename) 'vorbis)
>>>> +          ((string-match ".opus\\'" filename) 'opus)
>>>> +          ((string-match ".flac\\'" filename) 'flac)
>>>> +          ((string-match ".mp3\\'" filename) 'mp3)
>>>>              (t nil))))
>>>
>>> According to the Elisp manual: "When matching a string instead of a
>>> buffer, ‘$’ matches at the end of the string or before a newline
>>> character."  So it appears to be correct here
>> It should only match at the end of the string, not before a newline.
>
> As the manual says:
>
> ‘$’
>      is similar to ‘^’ but matches only at the end of a line (or the end
>      of the accessible portion of the buffer).  Thus, ‘x+$’ matches a
>      string of one ‘x’ or more at the end of a line.
>
>      When matching a string instead of a buffer, ‘$’ matches at the end
>      of the string or before a newline character.
                     ^
                     this is the problem.

Since it is possible for file-names to contain newline characters,
matching the end of a line can result in false-positives:

(string-match-p
 "\\.el$"
 "foo.el\nbar.le")
;;=> 3

(string-match-p
 "\\.el\\'"
 "foo.el\nbar.le")
;;=> nil

(It's called the "manual", not the "infallible" (hehe) for a reason)

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: NonGNU ELPA:   Conditions for accepting a potential new package 'rmsbolt' ?
  @ 2024-02-26  7:44 99% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-26  7:44 UTC (permalink / raw)
  To: Jeremy Bryant
  Cc: emacs-devel@gnu.org, Jay Kamat, João Távora,
	Stefan Monnier

Jeremy Bryant <jb@jeremybryant.net> writes:

> I would like to recommend the package 'rmsbolt' for NonGNU ELPA and
> volunteer for any required changes.
>
> The author is Jay Kamat, who as I understand is potentially supportive
> if the changes are minimal (and I am volunteering for these.)

Minimal as in "small diff" or "small effort"?

> 1. What is it?
> "A supercharged implementation of the [[https://github.com/mattgodbolt/compiler-explorer][godbolt compiler-explorer]] for Emacs.
>
> RMSbolt tries to make it easy to see what your compiler is doing. It does this
> by showing you the assembly output of a given source code file. It also
> highlights which source code a given assembly block corresponds to, and vice
> versa. It supports more types of languages than any previous tool of its kind.
> "

Sounds interesting.  I suppose the joke here is that RMS is God?

> It is currently hosted on gitlab and distributed on MELPA.

Could you provide a URL?

> 2. License
> From reading nongnu.elpa.git's README.org
>
> The package displays its License, which is Affero.
> Is the GNU Affero license considered suitable for NonGNU ELPA?

Yes, it should be.

>
> 3. Other
> I believe it follows the other requirements.
>
>
> WDYT?

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply	[relevance 99%]

* Re: Adding package "Loopy" to Non-GNU Devel?
  @ 2024-02-25 20:50 91%       ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-25 20:50 UTC (permalink / raw)
  To: Okamsn; +Cc: emacs-devel

Okamsn <okamsn@protonmail.com> writes:

> Okamsn wrote:
>> Philip Kaludercic wrote:
>>> Okamsn <okamsn@protonmail.com> writes:
>>>> I keep the extension package in the same GitHub repo as the main package for
>>>> testing purposes.  The Dash functionality was requested by a user, but
>>>> Dash is
>>>> not used by the rest of the package.  Because of that, I put the Dash
>>>> functionality in a small separate package.
>>>
>>> You are talking about the loopy-dash.el file in the same branch, right?
>> 
>> Yes.
>> 
>>> If possible, it would be better if you could at least maintain it in a
>>> separate branch.
>> 
>> If I added the file "loopy-dash.el" to an ".elpaignore" file in the main
>> branch and used GitHub Actions to push any changes from the main branch
>> to another branch containing the file "loopy-dash.el", would that be
>> acceptable?

Sorry for not answering earlier, this doesn't really solve the issue,
since the root issue is that when using package-vc or elpa-admin, you
still have two versions of the file in `load-path'.

>
> Hello,
>
> I figured out how to make GitHub automatically copy changes of the file 
> to another branch when the master branch changes, and have listed the 
> file `loopy-dash.el` in the `.elpaignore` file on the master branch.

If we were to disregard examples as those mentioned above, then this
would be an acceptable solution, but I'd rather not, unless you
categorically reject having two separate and disjoint branches.

> I successfully installed the packages locally using the instructions in 
> the ELPA readme.
>
> I have attached a patch file. Are there any other changes that you would 
> like made?

I don't think there is anything else (the only thing I can vainly try to
bring up is that having a diminutive as the name of a macro is something
I find peculiar, and I can imagine would keep a number of other people
from using the otherwise nice package, but it seems it is too late for
that now?)

> Thank you.



^ permalink raw reply	[relevance 91%]

* Re: [ELPA] New package: listen
  @ 2024-02-25 13:45 51%     ` Philip Kaludercic
      1 sibling, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-25 13:45 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-devel

Adam Porter <adam@alphapapa.net> writes:

> Hi Philip,
>
> Thanks for your review.  Comments to follow:
>
> On 2/25/24 05:43, Philip Kaludercic wrote:
>> Adam Porter <adam@alphapapa.net> writes:
>> 
>>> Hi,
>>>
>>> I'd like to submit a new package to ELPA, named "Listen".  It's a
>>> simple audio/music player that uses VLC as a backend.
>>>
>>> https://github.com/alphapapa/listen.el
>> Note that the copyright lines still have to be updated for it to be
>> added to GNU ELPA.
>
> Oops, I forgot to update the ones other than in listen.el.  Done.
>
>> Here are a few comments, questions and suggestions from briefly skimming
>> the code:
>> diff --git a/listen-info.el b/listen-info.el
>> index e74d376df9..a95a5b1d1b 100644
>> --- a/listen-info.el
>> +++ b/listen-info.el
>> @@ -56,7 +56,6 @@
>>     (require 'bindat)
>>   (require 'cl-lib)
>> -(require 'seq)
>
> The `seq' library is used in the file, so shouldn't this line be present?

Sorry, should have explained that.  If you depend on Emacs 29, then seq
is preloaded, so you don't need the line.  If you prefer to, you can
keep it in though.

>> @@ -942,10 +941,10 @@ extension.
>>     Return one of symbols `vorbis', `opus', `flac', or `mp3'."
>>     (let ((case-fold-search t))
>> -    (cond ((string-match ".ogg$" filename) 'vorbis)
>> -          ((string-match ".opus$" filename) 'opus)
>> -          ((string-match ".flac$" filename) 'flac)
>> -          ((string-match ".mp3$" filename) 'mp3)
>> +    (cond ((string-match ".ogg\\'" filename) 'vorbis)
>> +          ((string-match ".opus\\'" filename) 'opus)
>> +          ((string-match ".flac\\'" filename) 'flac)
>> +          ((string-match ".mp3\\'" filename) 'mp3)
>>             (t nil))))
>
> According to the Elisp manual: "When matching a string instead of a
> buffer, ‘$’ matches at the end of the string or before a newline
> character."  So it appears to be correct here (and its meaning is
> widely known, whereas the Emacsism "\\'" is not (I can never remember
> the escape sequences).

Hmm, I just went by the convention used in auto-mode-alist here (the
trick to remember \\' is that \\' and \\' always occur in the same order
as you would quote a symbol in a docstring).

> A good change to make, though, would be to escape the period, as
> otherwise it would match any character, as in "fooogg" rather than
> "foo.ogg".

Right.

>> diff --git a/listen-lib.el b/listen-lib.el
>> index 7743080c23..b3d48f51fa 100644
>> --- a/listen-lib.el
>> +++ b/listen-lib.el
>> @@ -50,7 +50,7 @@
>>   ;;;; Faces
>>     (defgroup listen-faces nil
>> -  "Faces."
>> +  "Faces used by listen.el."
>>     :group 'listen)
>
> As the `listen-faces' group is within the `listen' group, I would
> think that that its faces are related to `listen' goes without saying.

But that context would be missing if you were to use something like
`customize-apropos-groups'.

>> diff --git a/listen-library.el b/listen-library.el
>> index 77022e1791..90d40468ad 100644
>> --- a/listen-library.el
>> +++ b/listen-library.el
>> @@ -100,8 +100,8 @@ mode line and bookmark name.  BUFFER may be specified in which to
>>   show the view."
>>     (interactive
>>      (list (list (read-file-name "View library for: "))
>> -         :name (when current-prefix-arg
>> -                 (read-string "Library name: "))))
>> +         :name (and current-prefix-arg
>> +                    (read-string "Library name: "))))
>
> No, thanks.  I'm aware of this minor tradition, but I disagree with it.

I wouldn't call it a minor tradition (e.g. in Scheme the return value of
`when' is unspecified.  CLtL2 says "If the value is relevant, then it
may be stylistically more appropriate to use and or if."), and I am
curious why you disagree with it, but you are of course free to do as
you want.

>> @@ -181,7 +181,7 @@ Interactively, read COMMAND and use tracks at point in
>>       ;; it ought to return sections in the region), it returns nil.
>>       ;; This may be confusing to users, but it seems like an upstream
>>       ;; issue.
>> -    (or (flatten-list (mapcar #'value-of (magit-region-sections)))
>> +    (or (flatten-list (mapcar #'value-of (magit-region-sections))) ;or `mapcan'?
>>           (value-of (magit-current-section)))))
>
> Probably a good idea.

There were a few other places where you did (delq nil (mapcar ...)) that
might be replaced by this pattern.

>> @@ -192,7 +192,7 @@ Interactively, read COMMAND and use tracks at point in
>>     "Return a bookmark record for the current library buffer."
>>     (cl-assert listen-library-paths)
>>     `(,(format "Listen library: %s" (or listen-library-name listen-library-paths))
>> -    (handler . listen-library--bookmark-handler)
>> +    (handler . ,#'listen-library--bookmark-handler)
>
> Is there any advantage to this, given that the function is defined a
> few lines later?  Compiler warnings don't seem relevant here.

Not really, if you don't care about compiler warnings.  It just seems
like the kind of things that could cause problems at some later time,
when definitions are moved around.

>> diff --git a/listen-mpd.el b/listen-mpd.el
>> index b8a104febe..8c3a302f08 100644
>> --- a/listen-mpd.el
>> +++ b/listen-mpd.el
>> @@ -89,17 +89,17 @@ completion."
>>                                         (cons 'affixation-function #'affix)
>>                                         ;; (cons 'annotation-function #'annotate)
>>                                         ))))
>> -                  (`t (unless (string-empty-p str)
>> -                        (let ((tag (pcase tag
>> -                                     ('any 'file)
>> -                                     (_ tag))))
>> -                          (delete-dups
>> -                           (delq nil
>> -                                 (mapcar (lambda (row)
>> -                                           (when-let ((value (alist-get tag row)))
>> -                                             (propertize value
>> -                                                         :mpc-alist row)))
>> -                                         (search-any (split-string str))))))))))
>> +                  ((guard (not (string-empty-p str)))
>> +                   (let ((tag (pcase tag
>> +                                ('any 'file)
>> +                                (_ tag))))
>> +                     (delete-dups
>> +                      (delq nil
>> +                            (mapcar (lambda (row)
>> +                                      (when-let ((value (alist-get tag row)))
>> +                                        (propertize value
>> +                                                    :mpc-alist row)))
>> +                                    (search-any (split-string str)))))))))
>
> AFAICT, this change would not be strictly equivalent, as the original
> tests explicitly for t before testing the string, which, AFAICT, is
> the correct way to handle this part of the completion API.

Ah, the `t did confuse me momentarily, but in that case you can replace
the (guard ...) with (and 't (guard ...)).

>> diff --git a/listen-queue.el b/listen-queue.el
>> index 9515e3d7dc..cf4bd494bd 100644
>> --- a/listen-queue.el
>> +++ b/listen-queue.el
>> @@ -312,7 +312,7 @@ PROMPT is passed to `format-prompt', which see."
>>        ;; homedir path (so queues could be portable with music
>>        ;; libraries).
>>        :filename (abbreviate-file-name filename)
>> -     :artist (map-elt metadata "artist")
>> + :artist (map-elt metadata "artist") ;`metadata' is an alist,
>> right?  So why not use `let-alist'?
>
> Please note that the keys are strings, which AFAICT `let-alist' is not
> compatible with (nor `pcase-let', as it does not allow the test
> function to be specified).  `map-elt' tests with `equal'.

OK, I see.

>> @@ -328,7 +328,7 @@ PROMPT is passed to `format-prompt', which see."
>>            n)
>>       (when current-track
>>         (cl-callf2 delete current-track tracks))
>> -    (setf n (length tracks))
>> +    (setf n (length tracks))   ;why the variable?
>
> Because the value is used elsewhere in the function.  Am I missing
> something?  (Anyway, as noted in the source, I did not write that
> function.)

Then I missed something, because I just saw the variable being declared
in the let-head, set here and used once later.

>> @@ -357,6 +357,8 @@ PROMPT is passed to `format-prompt', which see."
>>                  (1+ (seq-position (listen-queue-tracks queue)
>>                                    (listen-queue-current queue)
>>                                    (lambda (a b)
>> +                                   ;; FWIW you still have a similar
>> +                                   ;; race condition here.
>
> I don't understand what you mean.  The comment before this hunk of
> code is not about a race condition (not a subtle or random one,
> anyway--it's a matter of whether the user manually modifies a track
> and then refreshes the queue's tracks from disk while the track is
> playing, something that is unlikely to happen unless the user is
> actively tidying their tracks' metadata, and fixing it will require
> more careful consideration; as well, if the file gets renamed in the
> process, there's little that can be done, as the track's primary
> identifier will no longer exist).

My understanding was that you were handling the case where files could
be renamed, but if that is not your concern, then disregard the comment.

>> @@ -427,7 +429,7 @@ tracks in the queue unchanged)."
>>           (goto-char beg)
>>           (cl-loop collect (vtable-current-object)
>>                    do (forward-line 1)
>> -                 while (<= (point) end))))))
>> +                 until (eobp))))))
>
> This code does not test for the end of the buffer, so `eobp' would not
> be appropriate.

You are right, never mind.

>> --- a/listen-vlc.el
>> +++ b/listen-vlc.el
>> @@ -43,7 +43,8 @@
>>       (save-excursion
>>         (insert (listen--send player "info")))
>>       (cl-loop while (re-search-forward (rx bol "| " (group (1+ (not blank))) ": "
>> -                                          (group (1+ (not (any ""))))) nil t)
>> +                                          (group (1+ (not (any "\C-m")))))
>> +                                      nil t)
>
> Other than the formatting, what is the purpose of this change?  This
> function parses output from VLC, and it appears to work correctly.

Formatting.  Emacs highlights the "nil t" as occurring in-between closed
parentheses, since it can be easily missed.

>> @@ -116,7 +117,7 @@ Stops playing, clears playlist, adds FILE, and plays it."
>>     "Return or set PLAYER's VOLUME.
>>   VOLUME is an integer percentage."
>>     (if volume
>> -      (listen--send player (format "volume %s" (* 255 (/ volume 100.0))))
>> +      (listen--send player (format "volume %s" (* 255 (/ volume 100.0)))) ;what if this is OOB?
>
> "Out Of Bounds"?  What do you mean?  VLC returns a value from 0-255,
> and `volume' is specified to be an integer percentage (i.e. from
> 0-100).  As far as I can tell, this works correctly.

I couldn't infer that from reading the function, so I wondered what
happens when `volume' is not between 0 and 100.  Perhaps a cl-assert
would be nice to have.

>> diff --git a/listen.el b/listen.el
>> index 3e3d11d572..c381b2a113 100755
>> --- a/listen.el
>> +++ b/listen.el
>> @@ -75,7 +75,7 @@
>>     :link '(emacs-commentary-link "listen")
>>     :link '(emacs-library-link "listen"))
>>   -(defcustom listen-directory "~/Music"
>> +(defcustom listen-directory "~/Music"   ;perhaps check XDG_MUSIC_DIR here?
>
> I cannot find such a variable defined, neither on my system nor on a
> Web search.  It doesn't appear to be part of the XDG standard.
>
>> -(declare-function listen-queue-next "listen-queue")
>> +(declare-function listen-queue-next "listen-queue") ;why not `require' it?
>
> Because it is an autoloaded command, one which the user might not use,
> so loading the library might be unnecessary.
>
>> @@ -251,19 +251,19 @@ command with completion."
>>   (defun listen-read-time (time)
>>     "Return TIME in seconds.
>>   TIME is an HH:MM:SS string."
>> -  (string-match (rx (group (1+ num))
>> -                    (optional ":" (group (1+ num))
>> -                              (optional ":" (group (1+ num)))))
>> -                time)
>> -  (let ((fields (nreverse
>> -                 (remq nil
>> -                       (list (match-string 1 time)
>> -                             (match-string 2 time)
>> -                             (match-string 3 time)))))
>> -        (factors [1 60 3600]))
>> -    (cl-loop for field in fields
>> -             for factor across factors
>> -             sum (* (string-to-number field) factor))))
>> +  (when (string-match (rx (group (1+ num))
>> +                          (optional ":" (group (1+ num))
>> +                                    (optional ":" (group (1+ num)))))
>> +                      time)
>> +    (let ((fields (nreverse
>> +                   (remq nil
>> +                         (list (match-string 1 time)
>> +                               (match-string 2 time)
>> +                               (match-string 3 time)))))
>> +          (factors [1 60 3600]))
>> +      (cl-loop for field in fields
>> +               for factor across factors
>> +               sum (* (string-to-number field) factor)))))
>
> If this function fails, I want it to signal an error, not return nil.

Am I missing something, or where will the error be signaled?  If the
pattern doesn't match, the match data won't be modified, and you'll
extract arbitrary substrings out of TIME. `String-to-number' doesn't
raise an error on malformed input,

  (string-to-number "31-") ;=> 31 (#o37, #x1f, ?\C-_)
  (string-to-number "x")   ;=> 0 (#o0, #x0, ?\C-@)
  (string-to-number "")    ;=> 0 (#o0, #x0, ?\C-@)

the only exception being if there was no match data for some n

  (string-to-number (match-string 100)) ;signals (wrong-type-argument stringp nil)

If you want to signal an error, then I think the robust thing would be
to check if `string-match' succeeds as proposed above, but using an `if'
not a `when' to raise an error in the ELSE case.

>>> For more details (though there's not much else to say), please see the
>>> readme/Info manual.
>> On the topic of the readme/manual, wouldn't it be better to have a
>> separate README file?  Then again, the manual is pretty short, and I
>> don't know if it is worth having it in the first place...
>
> As you said, this readme is currently trivial.  Were it larger,
> however--well, I have other packages with much larger readmes that are
> also converted to manuals.  There would not be much gained by
> separating into files.

I don't think that is a good practice.  A README for when you have
fetched the sources and want to figure out what is what, a manual for
when you have already installed a package and a package description for
when you are previewing a package using C-h P are three different
things.  One shouldn't cover all of it with the same file if you ask me,
since they all have different audiences with different levels of
interest.

>> Also, your README includes this line
>>    :vc (:fetcher github :repo "alphapapa/listen.el")
>> which is malformed.  
>
> I just tested that, and it works for me.

On Emacs 30?  That is not the code we merged...

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (error "use-package: Keyword :vc received unknown argument: :fetcher. Supported keywords are: (:url :branch :lisp-dir :main-file :vc-backend :rev)")
  signal(error ("use-package: Keyword :vc received unknown argument: :fetcher. Supported keywords are: (:url :branch :lisp-dir :main-file :vc-backend :rev)"))
  error("use-package: %s" "Keyword :vc received unknown argument: :fetcher. Supported keywords are: (:url :branch :lisp-dir :main-file :vc-backend :rev)")
  use-package-normalize--vc-arg((listen :fetcher github :repo "alphapapa/listen.el"))
  use-package-normalize/:vc(listen :vc ((:fetcher github :repo "alphapapa/listen.el")))
  use-package-normalize-plist(listen (:vc (:fetcher github :repo "alphapapa/listen.el")) nil use-package-merge-keys)
  use-package-normalize-keywords(listen (:vc (:fetcher github :repo "alphapapa/listen.el")))
  ...
--8<---------------cut here---------------end--------------->8---

>> What you want is
>>    :vc (:url "https://github.com/alphapapa/listen.el")
>> or after the package has been added to ELPA, then just
>>    :vc t
>
> I added that to the readme for before the package is available through
> ELPA.  Afterward I intend to recommend installing it from ELPA, not
> from git.

Yes, I noticed that after I had sent my message.  That is better
practice anyway, at least for the regular user.

> Please let me know if any other changes are needed.
>
> --Adam
>

-- 
	Philip Kaludercic on icterid



^ permalink raw reply	[relevance 51%]

* Re: [ELPA] New package: listen
  @ 2024-02-25 11:43 39% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-25 11:43 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-devel

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

Adam Porter <adam@alphapapa.net> writes:

> Hi,
>
> I'd like to submit a new package to ELPA, named "Listen".  It's a
> simple audio/music player that uses VLC as a backend.
>
> https://github.com/alphapapa/listen.el

Note that the copyright lines still have to be updated for it to be
added to GNU ELPA.

Here are a few comments, questions and suggestions from briefly skimming
the code:


[-- Attachment #2: Type: text/plain, Size: 9628 bytes --]

diff --git a/listen-info.el b/listen-info.el
index e74d376df9..a95a5b1d1b 100644
--- a/listen-info.el
+++ b/listen-info.el
@@ -1,6 +1,6 @@
 ;;; listen-info.el --- Audio file metadata library  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2020-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2021, 2024 Free Software Foundation, Inc.
 
 ;; Author: Petteri Hintsanen <petterih@iki.fi>
 
@@ -56,7 +56,6 @@
 
 (require 'bindat)
 (require 'cl-lib)
-(require 'seq)
 (require 'subr-x)
 
 (defconst listen-info--max-peek-size (* 2048 1024)
@@ -942,10 +941,10 @@ extension.
 
 Return one of symbols `vorbis', `opus', `flac', or `mp3'."
   (let ((case-fold-search t))
-    (cond ((string-match ".ogg$" filename) 'vorbis)
-          ((string-match ".opus$" filename) 'opus)
-          ((string-match ".flac$" filename) 'flac)
-          ((string-match ".mp3$" filename) 'mp3)
+    (cond ((string-match ".ogg\\'" filename) 'vorbis)
+          ((string-match ".opus\\'" filename) 'opus)
+          ((string-match ".flac\\'" filename) 'flac)
+          ((string-match ".mp3\\'" filename) 'mp3)
           (t nil))))
 
 (provide 'listen-info)
diff --git a/listen-lib.el b/listen-lib.el
index 7743080c23..b3d48f51fa 100644
--- a/listen-lib.el
+++ b/listen-lib.el
@@ -50,7 +50,7 @@
 ;;;; Faces
 
 (defgroup listen-faces nil
-  "Faces."
+  "Faces used by listen.el."
   :group 'listen)
 
 (defface listen-artist '((t :inherit font-lock-variable-name-face))
diff --git a/listen-library.el b/listen-library.el
index 77022e1791..90d40468ad 100644
--- a/listen-library.el
+++ b/listen-library.el
@@ -100,8 +100,8 @@ mode line and bookmark name.  BUFFER may be specified in which to
 show the view."
   (interactive
    (list (list (read-file-name "View library for: "))
-         :name (when current-prefix-arg
-                 (read-string "Library name: "))))
+         :name (and current-prefix-arg
+                    (read-string "Library name: "))))
   (let* ((filenames (cl-loop for path in paths
                              if (file-directory-p path)
                              append (directory-files-recursively path "." t)
@@ -181,7 +181,7 @@ Interactively, read COMMAND and use tracks at point in
     ;; it ought to return sections in the region), it returns nil.
     ;; This may be confusing to users, but it seems like an upstream
     ;; issue.
-    (or (flatten-list (mapcar #'value-of (magit-region-sections)))
+    (or (flatten-list (mapcar #'value-of (magit-region-sections))) ;or `mapcan'?
         (value-of (magit-current-section)))))
 
 ;;;;; Bookmark support
@@ -192,7 +192,7 @@ Interactively, read COMMAND and use tracks at point in
   "Return a bookmark record for the current library buffer."
   (cl-assert listen-library-paths)
   `(,(format "Listen library: %s" (or listen-library-name listen-library-paths))
-    (handler . listen-library--bookmark-handler)
+    (handler . ,#'listen-library--bookmark-handler)
     (name . ,listen-library-name)
     (paths . ,listen-library-paths)))
 
diff --git a/listen-mpd.el b/listen-mpd.el
index b8a104febe..8c3a302f08 100644
--- a/listen-mpd.el
+++ b/listen-mpd.el
@@ -89,17 +89,17 @@ completion."
                                       (cons 'affixation-function #'affix)
                                       ;; (cons 'annotation-function #'annotate)
                                       ))))
-                  (`t (unless (string-empty-p str)
-                        (let ((tag (pcase tag
-                                     ('any 'file)
-                                     (_ tag))))
-                          (delete-dups
-                           (delq nil
-                                 (mapcar (lambda (row)
-                                           (when-let ((value (alist-get tag row)))
-                                             (propertize value
-                                                         :mpc-alist row)))
-                                         (search-any (split-string str))))))))))
+                  ((guard (not (string-empty-p str)))
+                   (let ((tag (pcase tag
+                                ('any 'file)
+                                (_ tag))))
+                     (delete-dups
+                      (delq nil
+                            (mapcar (lambda (row)
+                                      (when-let ((value (alist-get tag row)))
+                                        (propertize value
+                                                    :mpc-alist row)))
+                                    (search-any (split-string str)))))))))
               (try (string _table _pred point &optional _metadata)
                 (cons string point))
               (all (string table pred _point)
diff --git a/listen-queue.el b/listen-queue.el
index 9515e3d7dc..cf4bd494bd 100644
--- a/listen-queue.el
+++ b/listen-queue.el
@@ -312,7 +312,7 @@ PROMPT is passed to `format-prompt', which see."
      ;; homedir path (so queues could be portable with music
      ;; libraries).
      :filename (abbreviate-file-name filename)
-     :artist (map-elt metadata "artist")
+     :artist (map-elt metadata "artist") ;`metadata' is an alist, right?  So why not use `let-alist'?
      :title (map-elt metadata "title")
      :album (map-elt metadata "album")
      :number (map-elt metadata "tracknumber")
@@ -328,7 +328,7 @@ PROMPT is passed to `format-prompt', which see."
          n)
     (when current-track
       (cl-callf2 delete current-track tracks))
-    (setf n (length tracks))
+    (setf n (length tracks))   ;why the variable?
     ;; Don't use dotimes result (bug#16206)
     (dotimes (i n)
       (cl-rotatef (elt tracks i) (elt tracks (+ i (cl-random (- n i))))))
@@ -357,6 +357,8 @@ PROMPT is passed to `format-prompt', which see."
                (1+ (seq-position (listen-queue-tracks queue)
                                  (listen-queue-current queue)
                                  (lambda (a b)
+                                   ;; FWIW you still have a similar
+                                   ;; race condition here.
                                    (equal (listen-track-filename a)
                                           (listen-track-filename b))))))))
 
@@ -427,7 +429,7 @@ tracks in the queue unchanged)."
         (goto-char beg)
         (cl-loop collect (vtable-current-object)
                  do (forward-line 1)
-                 while (<= (point) end))))))
+                 until (eobp))))))
 
 ;;;;; Bookmark support
 
diff --git a/listen-vlc.el b/listen-vlc.el
index 12e7e58693..a387c1c3d5 100755
--- a/listen-vlc.el
+++ b/listen-vlc.el
@@ -43,7 +43,8 @@
     (save-excursion
       (insert (listen--send player "info")))
     (cl-loop while (re-search-forward (rx bol "| " (group (1+ (not blank))) ": "
-                                          (group (1+ (not (any ""))))) nil t)
+                                          (group (1+ (not (any "\C-m")))))
+                                      nil t)
              collect (cons (match-string 1) (match-string 2)))))
 
 (cl-defmethod listen--filename ((player listen-player-vlc))
@@ -116,7 +117,7 @@ Stops playing, clears playlist, adds FILE, and plays it."
   "Return or set PLAYER's VOLUME.
 VOLUME is an integer percentage."
   (if volume
-      (listen--send player (format "volume %s" (* 255 (/ volume 100.0))))
+      (listen--send player (format "volume %s" (* 255 (/ volume 100.0)))) ;what if this is OOB?
     (* 100 (/ (string-to-number (listen--send player "volume")) 255.0))))
 
 (provide 'listen-vlc)
diff --git a/listen.el b/listen.el
index 3e3d11d572..c381b2a113 100755
--- a/listen.el
+++ b/listen.el
@@ -75,7 +75,7 @@
   :link '(emacs-commentary-link "listen")
   :link '(emacs-library-link "listen"))
 
-(defcustom listen-directory "~/Music"
+(defcustom listen-directory "~/Music"   ;perhaps check XDG_MUSIC_DIR here?
   "Default music directory."
   :type 'directory)
 
@@ -101,7 +101,7 @@ Interactively, uses the default player."
   (when (eq player listen-player)
     (setf listen-player nil)))
 
-(declare-function listen-queue-next "listen-queue")
+(declare-function listen-queue-next "listen-queue") ;why not `require' it?
 (defun listen-next (player)
   "Play next track in PLAYER's queue.
 Interactively, uses the default player."
@@ -251,19 +251,19 @@ command with completion."
 (defun listen-read-time (time)
   "Return TIME in seconds.
 TIME is an HH:MM:SS string."
-  (string-match (rx (group (1+ num))
-                    (optional ":" (group (1+ num))
-                              (optional ":" (group (1+ num)))))
-                time)
-  (let ((fields (nreverse
-                 (remq nil
-                       (list (match-string 1 time)
-                             (match-string 2 time)
-                             (match-string 3 time)))))
-        (factors [1 60 3600]))
-    (cl-loop for field in fields
-             for factor across factors
-             sum (* (string-to-number field) factor))))
+  (when (string-match (rx (group (1+ num))
+                          (optional ":" (group (1+ num))
+                                    (optional ":" (group (1+ num)))))
+                      time)
+    (let ((fields (nreverse
+                   (remq nil
+                         (list (match-string 1 time)
+                               (match-string 2 time)
+                               (match-string 3 time)))))
+          (factors [1 60 3600]))
+      (cl-loop for field in fields
+               for factor across factors
+               sum (* (string-to-number field) factor)))))
 
 ;;;; Transient
 

[-- Attachment #3: Type: text/plain, Size: 1956 bytes --]


> Compared to other Emacs music players like EMMS, Bongo, etc, it's much
> simpler to use: no setup or configuration is required--just "M-x
> listen RET" and use the Transient menu to begin.
>
> Compared to packages that use MPD as a backend, Listen provides a
> simpler UI, and it doesn't require installing and configuring MPD; the
> user just selects one or more files to play.  (However, support is
> provided for discovering and playing tracks from a local MPD library
> by searching its metadata database.)
>
> It's extensible, so e.g. a new backend could easily be added to use
> something like MPV to play files.

That would be nice.

> A queue (playlist) view is provided using the nice new Vtable library
> in Emacs 29.  And a library view is provided using the Taxy and
> Magit-Section libraries to browse tracks grouped by metadata.
>
> For more details (though there's not much else to say), please see the
> readme/Info manual.

On the topic of the readme/manual, wouldn't it be better to have a
separate README file?  Then again, the manual is pretty short, and I
don't know if it is worth having it in the first place... 

Also, your README includes this line

  :vc (:fetcher github :repo "alphapapa/listen.el")

which is malformed.  What you want is 

  :vc (:url "https://github.com/alphapapa/listen.el")

or after the package has been added to ELPA, then just

  :vc t

> By the way, unlike with some other packages I've submitted, I've not
> fully settled on the name, so I'm open to suggestions.  I considered
> naming it "EMP" (for "Emacs Music Player", which is fun and concise,
> and which is surprisingly not yet taken--although Nic Vollmer has an
> unpackaged library by that name, but he's graciously offered me the
> name for use with this package).  But "Listen" seemed more descriptive
> and concise enough, so that's what I've gone with for now.

I like the name ;)

> Thanks,
> Adam
>
>

-- 
	Philip Kaludercic on icterid

^ permalink raw reply related	[relevance 39%]

* Re: Docs on ELPA (was Re: Adding Flycheck to NonGNU ELPA)
  @ 2024-02-25 10:06 87%                                 ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-25 10:06 UTC (permalink / raw)
  To: Stefan Monnier
  Cc: Spencer Baugh, Bozhidar Batsov, Dmitry Gutov, joakim, Emacs Devel

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

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> It does, e.g. Compat directs directly to elpa.gnu.org:
>> https://elpa.gnu.org/packages/doc/compat/compat.html
>
> BTW, any help setting up some CSS styling there would be welcome
> (probably following the CSS styling used for Texinfo docs on on
> www.gnu.org).

Do we need more than this:


[-- Attachment #2: Type: text/plain, Size: 912 bytes --]

diff --git a/elpa-admin.el b/elpa-admin.el
index e1e0d2dd1e..f45c8586a0 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -43,6 +43,7 @@
 (defvar elpaa--name "NonGNU")
 (defvar elpaa--gitrepo "emacs/nongnu.git")
 (defvar elpaa--url "https://elpa.gnu.org/nongnu/")
+(defvar elpaa--css-url "https://www.gnu.org/software/emacs/manual.css")
 
 (defvar elpaa--branch-prefix "elpa/")
 (defvar elpaa--release-branch-prefix "elpa-release/")
@@ -2471,7 +2472,7 @@ directory; one of archive, archive-devel."
 	 (html-file (expand-file-name destname html-dir))
 	 (html-xref-file
 	  (expand-file-name destname (file-name-directory html-dir))))
-    (elpaa--makeinfo docfile html-file '("--html"))
+    (elpaa--makeinfo docfile html-file (list "--html" (format "--css-ref=%s" elpaa--css-url)))
     ;; FIXME: Use `push' in Emacs≥28
     (plist-put (cdr pkg-spec)
                :internal--html-docs

[-- Attachment #3: Type: text/plain, Size: 23 bytes --]


-- 
Philip Kaludercic

^ permalink raw reply related	[relevance 87%]

* Re: Docs on ELPA (was Re: Adding Flycheck to NonGNU ELPA)
  @ 2024-02-24  8:04 91%                                 ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-24  8:04 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-devel

Adam Porter <adam@alphapapa.net> writes:

>> Something similar I had in mind was a variation on package-install that
>> wouldn't persist the installation, and instead of extracting the files
>> into .../elpa/, would store them in a /tmp/ sub-directory.  That would
>> go further than what you are describing, but would make trying out a
>> package easier.
>
> FYI, that exists in the form of the `try' package available on
> MELPA.

I am surprised to hear that someone had to write a package for that,
when the basic functionality can be provided by

--8<---------------cut here---------------start------------->8---
(defun package-install-temporarily (pkg)
  (interactive
   (progn
     (package--archives-initialize)
     (list (intern (completing-read "Try: " package-archive-contents)))))
  (let ((package-user-dir (make-temp-file "package-tmp" t nil)))
    (package-install pkg t)))
--8<---------------cut here---------------end--------------->8---

(and if we extracted the interactive part from package-install, then it
would be even shorter).  Another idea would be to provide a generic
temporary package prefix command or minor mode.

>        It works well.  Maybe it could be added to GNU ELPA.  Or maybe
> a `package-try' command could be added to package.el.

That name is a bit short, and it is not clear what is meant.  Try to
install a package, try to find a package, etc.



^ permalink raw reply	[relevance 91%]

* Re: Docs on ELPA (was Re: Adding Flycheck to NonGNU ELPA)
  @ 2024-02-23 16:13 92%                             ` Philip Kaludercic
      0 siblings, 2 replies; 200+ results
From: Philip Kaludercic @ 2024-02-23 16:13 UTC (permalink / raw)
  To: Spencer Baugh
  Cc: Bozhidar Batsov, Dmitry Gutov, Stefan Monnier, joakim,
	Emacs Devel

Spencer Baugh <sbaugh@janestreet.com> writes:

> "Bozhidar Batsov" <bozhidar@batsov.dev> writes:
>> Thanks for the updates!
>>
>> Regarding the docs - I was thinking of converting them to something like AsciiDoc or org-mode, but that'd require me to find a new
>> way to host them as ReadTheDocs supports only RST and Markdown. That's why I've put this item on the backburner for now. I try
>> to find some time to look into the various conversion option (or generating TexInfo from the current docs). 
>
> Hm, maybe the web interface for GNU and NonGNU ELPA should support
> hosting web-rendered Texinfo manuals?  That would make it easier to
> evaluate packages without installing them, and also solve Flycheck's
> documentation hosting issue.

It does, e.g. Compat directs directly to elpa.gnu.org:
https://elpa.gnu.org/packages/doc/compat/compat.html

> Since this would require ELPA to build the Texinfo manuals, 

It just renders them in HTML, I don't know of any .info files being
available outside of the tarballs.

>                                                             
>                                                             perhaps we
> could also use this to make a package-view-docs command (or something)
> in Emacs which will fetch and view the manual for a package that is not
> yet installed.

Something similar I had in mind was a variation on package-install that
wouldn't persist the installation, and instead of extracting the files
into .../elpa/, would store them in a /tmp/ sub-directory.  That would
go further than what you are describing, but would make trying out a
package easier.



^ permalink raw reply	[relevance 92%]

* Re: Adding Flycheck to NonGNU ELPA
  @ 2024-02-22 16:57 94%                     ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-22 16:57 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Stefan Monnier, joakim, Bozhidar Batsov, Emacs Devel

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 21/02/2024 17:02, Stefan Monnier wrote:
>>> So, unless unless there is a strong objection from one of Emacs's head
>>> maintainers, I think I will commence Flycheck's addition to NonGNU in the
>>> next few days.
>> That would be very welcome, thanks.
>
> All right, I've made the push:
> https://git.savannah.gnu.org/cgit/emacs/nongnu.git/commit/

Here is a more permanent link for posterity:

https://git.savannah.gnu.org/cgit/emacs/nongnu.git/commit/?id=7c06709972291413f18b750248b141293415cd42

>
> It should build sometime within 24 hours.
>
> Bozhidar, see the recipe in the diff, if any exclusions should be
> added, the syntax is there (and also in the file's commentary at the
> top).

Ideally this information shouldn't be tracked in nongnu.git, but in an
.elpaignore file within the repository.

> What could be also added, is a way to build the manual to be included
> with the package. I'm not sure how easy that would be to do, though,
> with your current documentation setup.

It appears they use sphinx, which can generate TeXinfo output[0], though
I personally would recommend looking into translating the documentation
into a more standard format like Org or directly to TeXinfo.

[0] https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-texinfo-output



^ permalink raw reply	[relevance 94%]

* Re: Adding Flycheck to NonGNU ELPA
  @ 2024-02-21 18:05 99%                     ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-21 18:05 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: joakim, Bozhidar Batsov, Emacs Devel, Stefan Monnier

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 21/02/2024 19:01, Philip Kaludercic wrote:
>> Dmitry Gutov<dmitry@gutov.dev>  writes:
>> 
>>> On 20/02/2024 22:04, Dmitry Gutov wrote:
>>>> On 20/02/2024 13:48, Philip Kaludercic wrote:
>>>>
>>>>> If Flycheck were to use the same interface as Flymake, then the
>>>>> situation would be better, as it would only be a different UI with
>>>>> perhaps some other priorities.
>>>> Flycheck uses macros to define checkers and output parsers. Perhaps
>>>> one day those could expand to Flymake's functional interface under
>>>> the covers, but for that to happen, it would help a lot if we were
>>>> more welcoming.
>>> So, unless unless there is a strong objection from one of Emacs's head
>>> maintainers, I think I will commence Flycheck's addition to NonGNU in
>>> the next few days.
>> Before taking this step, can we please discuss the possibility of
>> creating a uniform interface?  As mentioned in my previous message,
>> this
>> is the crux of my complaint, and I don't even know what Bozhidar
>> position on the matter is.
>
> We've discussed it. Such possibility exists.

Who is we?

> If we're going to make the implementation of it as a prerequisite for
> merging, however, I imagine that's just not going to
> happen. Flycheck's contributors will go back to their own bubble, and
> we'll stay in ours.

As you might guess, I don't consider this a problem.

> Those are my expectations both from experience, and from the current
> mood of the people involved.

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Before taking this step, can we please discuss the possibility of
>> creating a uniform interface?
>
> That's orthogonal.

Not if the Flycheck maintainers have no interest, or are even opposed to
it.



^ permalink raw reply	[relevance 99%]

* Re: [elpa] externals/auctex f124fe7d28: Release GNU AUCTeX 14.0.3
  @ 2024-02-21 17:07 99%               ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-21 17:07 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Tassilo Horn, emacs-devel


Philip Kaludercic <philipk@posteo.net> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>>> Because back then, `elpa.gnu.org` was not able to generate them.
>>>> Nowadays, we could use
>>>>
>>>>     :doc "doc/auctex.texi"
>>>>
>>>> in the spec instead.
>>>
>>> Can :doc be a list?  Because there's also preview-latex.texi.
>>
>> Yes.
>>
>>> Does that mean the ELPA devel package could be built from our master
>>> branch always reflecting that and the normal package, too, after version
>>> bumps?
>>
>> Almost.
>>
>>> Well, at least in theory after adding a Version header and somehow
>>> setting the version when generating auctex.el from auctex.el.in?
>>
>> That's right: we still need the `auctex.el` file to be in Git and to
>> contain the `Version:` thingy.
>
> Another idea might be to have a separate :main-file for versioning, if
> there is an advantage in building auctex.el while preparing the package.

Never mind this, I missed Stefan's message.

>>
>>         Stefan

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> Well, at least in theory after adding a Version header and somehow
>>> setting the version when generating auctex.el from auctex.el.in?
>>
>> That's right: we still need the `auctex.el` file to be in Git and to
>> contain the `Version:` thingy.
>
> Tho, it could actually be another file (e.g. for Tramp we have
> `:main-file "trampver.el"`).

>
>         Stefan



^ permalink raw reply	[relevance 99%]

* Re: [elpa] externals/auctex f124fe7d28: Release GNU AUCTeX 14.0.3
    @ 2024-02-21 17:02 99%             ` Philip Kaludercic
  1 sibling, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-21 17:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Tassilo Horn, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> Because back then, `elpa.gnu.org` was not able to generate them.
>>> Nowadays, we could use
>>>
>>>     :doc "doc/auctex.texi"
>>>
>>> in the spec instead.
>>
>> Can :doc be a list?  Because there's also preview-latex.texi.
>
> Yes.
>
>> Does that mean the ELPA devel package could be built from our master
>> branch always reflecting that and the normal package, too, after version
>> bumps?
>
> Almost.
>
>> Well, at least in theory after adding a Version header and somehow
>> setting the version when generating auctex.el from auctex.el.in?
>
> That's right: we still need the `auctex.el` file to be in Git and to
> contain the `Version:` thingy.

Another idea might be to have a separate :main-file for versioning, if
there is an advantage in building auctex.el while preparing the package.

>
>         Stefan



^ permalink raw reply	[relevance 99%]

* Re: Adding Flycheck to NonGNU ELPA
    @ 2024-02-21 17:01 99%                 ` Philip Kaludercic
    1 sibling, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-21 17:01 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: joakim, Bozhidar Batsov, Emacs Devel, Stefan Monnier

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 20/02/2024 22:04, Dmitry Gutov wrote:
>> On 20/02/2024 13:48, Philip Kaludercic wrote:
>> 
>>> If Flycheck were to use the same interface as Flymake, then the
>>> situation would be better, as it would only be a different UI with
>>> perhaps some other priorities.
>> Flycheck uses macros to define checkers and output parsers. Perhaps
>> one day those could expand to Flymake's functional interface under
>> the covers, but for that to happen, it would help a lot if we were
>> more welcoming.
>
> So, unless unless there is a strong objection from one of Emacs's head
> maintainers, I think I will commence Flycheck's addition to NonGNU in
> the next few days.

Before taking this step, can we please discuss the possibility of
creating a uniform interface?  As mentioned in my previous message, this
is the crux of my complaint, and I don't even know what Bozhidar
position on the matter is.



^ permalink raw reply	[relevance 99%]

* Re: Adding Flycheck to NonGNU ELPA
    @ 2024-02-21 17:00 63%               ` Philip Kaludercic
  1 sibling, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-21 17:00 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: joakim, Bozhidar Batsov, Emacs Devel

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 20/02/2024 13:48, Philip Kaludercic wrote:
>
>> If Flycheck were to use the same interface as Flymake, then the
>> situation would be better, as it would only be a different UI with
>> perhaps some other priorities.
>
> Flycheck uses macros to define checkers and output parsers. Perhaps
> one day those could expand to Flymake's functional interface under the
> covers, but for that to happen, it would help a lot if we were more
> welcoming.

That is what flymake-collection is supposedly working on.

>>> It might be an improvement, but AFAIK Flycheck still has an order of a
>>> magnitude more checkers.
>>>
>>> Offhand,
>>> https://github.com/mohkale/flymake-collection/tree/release/src/checkers
>>> doesn't include anything for Rust or Golang.
>>>
>>> And Flycheck has several for both.
>> This appears to be true, but this is not an inherent advantage, just
>> the
>> fact that people have invested effort into it.  It seems to be that a
>> significant reason is that Flycheck has a convenient language for
>> defining checkers, something that IIUC flymake-collection is also
>> working on.  Giving this basis, we could look into perhaps even
>> automatically translating the Checker specifications, which would help
>> further "obsolete" Flycheck, given that this is apparently the only real
>> "advantage" it provides (which again, is not architectural, just the
>> accumulated labour over the last decade).
>
> Nobody stops people from working on Flymake, improving the
> documentation and developer experience, and the list of built-in
> checkers.
>
> In fact, I'm pretty sure this will happen faster with healthy
> competition in sight.

No, but effort is wasted on developing incompatible backends.  If
Flycheck could take a similar route like Company in recommending to
develop against the default/built-in interface (CAPF and Flymake
respectively), then I really wouldn't mind having a second UI, but
considering the misinformation that Flycheck still promote, I don't see
any interest from their side to converge to a common denominator.

>>>>> It also has a minor mode map, to invoke the errors buffer or jump
>>>>> between the errors. Though the latter is easy-ish to port over.
>>>> I agree, that that is an annoyance.  I have personally bound
>>>> `flymake-goto-next-error' and `flymake-goto-prev-error' to M-n and M-p
>>>> respectively, but it would be nice if we could find some keys to bind
>>>> these commands to.
>>>
>>> Same.
>> I'll look into submitting a bug report to propose such a change.
>
> Very good.
>
>> I wouldn't put it that way, but as mentioned above I do think that
>> pushing towards a consistent UI that aligns with Emacs strengths
>> (text-based, buffers in windows, ...) is worth the effort, even if some
>> projects have to change or die in the process.  E.g. a positive example:
>> I added support for the "dumb-jump" to use Xref instead of
>> re-implementing the UI with custom commands and popups.  People appear
>> to use that now.
>
> Note that when Xref was introduced, there were no existing protocols
> out there, in third-party packages or not, that could be used for the
> same purpose (abstraction over code navigation sources).

True, but that only made it easier.  If there had been some MELPA
package called "jumpy" of whatever, then some packages would support
xref, the others "jumpy", others again would have to try and support
both.  People would constantly be asking "what is the difference between
xref and jumpy", and others again wouldn't notice xref at all because
they assume that every feature in Emacs has to be installed via some
external package.

This also reminds me of another point: Xref, Flymake, CAPF, ... are all
interfaces, that don't have to bring with them implementations for all
kinds of languages.  That is the job of a major mode, and it is a lot
more reasonable for a major mode to implement this interface, if
provided by a core package, than if they had to use an third-party
package that is not even part of GNU ELPA.

> A counter-example is Projectile, which predated project.el, and which
> we included in NonGNU ELPA to no particular detriment.

FWIW I think having "Projectile" is a mistake as well (I didn't want to
voice the position at the time, because people were still belittling
NonGNU ELPA at the time), but at least the effect is not that
significant since it appears that not that many Projectile-based
packages?

>>> Let's remove Helm from NonGNU, then: its UI paradigm is also different
>>> from the core Emacs, and IMHO it's rather ugly. And swiper/ivy from
>>> ELPA, just because.
>> While I am not a fan of Helm, it was initially added to provide
>> popular
>> packages that a number of people appeared to want to use.  Luckily these
>> packages fall into the category of providing the front-end of a shared
>> interface (completing-read; and that not without issues, because they
>> tend to abuse completing-read's text expansion idea by focusing on
>> narrowing and selecting).
>
> Yes, Helm provides some support for completing-read, but it also has
> its own specific API which is bigger and more tailored for its UI, and
> is the reason there are Helm-specific plugins.

I know, having this kind of a parallel society of functionality is sad,
but as I said, it is a consequence of the way `completing-read' is used
and misunderstood.

Communicating with the package developers of these selection frameworks
to create a new interface would be an interesting task.

>> And yes, there are packages that have hard
>> dependencies on Helm, but usually when people submit these kinds of
>> packages, we at least mention the idea of trying to generalise them, so
>> that the front- and back-end can be disentangled from one another.
>
> We can both accept Flycheck and suggest the maintainers work toward
> someday having a compatible API, at least on the functional level.

I'd say that should be the sine qua non.  If I could decide, Flycheck
should be reduced to a UI, their interface should be deprecated and the
backends translated to Flymake.  That would have the best long-term
consequences for users.  But adding Flycheck just like that will
certainly just perpetuate the unnecessary schism and confusion.

>> I know that there are differences, and I hope that the situation
>> improves, but to mention another negative that probably disqualifies
>> adding the package just on its own: `lsp-install-server'.  The command
>> can download arbitrary executable files as servers and runs them
>> locally.
>
> curl can download arbitrary executable files, and it's still free
> software. The question is which urls are pre-configured.

The objection is not that lsp-mode is not free software, it is that it
doesn't respect their users by downloading arbitrary binaries from the
net and running them on their own machines, even if all the servers were
free (which I don't know, I haven't checked all of them).

> If we come to consider the inclusion of lsp-mode seriously (meaning,
> there would be some interest from the maintainers), I'm happy to
> discuss requesting that whatever proprietary servers are configured in
> (I think there is 1 proprietary option for PHP among the total 4
> available, not sure what else) are split off into separate packages
> that we don't publish.

My impression of the lsp-mode maintainers is that they have no interest
in collaborating with core development.



^ permalink raw reply	[relevance 63%]

* Re: [elpa] externals/auctex f124fe7d28: Release GNU AUCTeX 14.0.3
       [not found]     ` <20240220160445.7C360C00227@vcs2.savannah.gnu.org>
@ 2024-02-20 16:43 99%   ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-20 16:43 UTC (permalink / raw)
  To: emacs-devel; +Cc: Tassilo Horn

Tassilo Horn <tsdh@gnu.org> writes:

> branch: externals/auctex
> commit f124fe7d282e0693ce793a8c8b2a675765df63f3
> Author: Tassilo Horn <tsdh@gnu.org>
> Commit: Tassilo Horn <tsdh@gnu.org>
>
>     Release GNU AUCTeX 14.0.3
>     
>     * GNU AUCTeX Version 14.0.3 released.
> ---
>  auctex.el          |   2 +-
>  auctex.info        | 204 ++++++++++++++++++++++++++---------------------------
>  preview-latex.info |  80 ++++++++++-----------

Why are the .info files tracked in the repository?



^ permalink raw reply	[relevance 99%]

* Re: Adding Flycheck to NonGNU ELPA
  @ 2024-02-20 11:48 60%           ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-20 11:48 UTC (permalink / raw)
  To: joakim; +Cc: Dmitry Gutov, Bozhidar Batsov, Emacs Devel

joakim@verona.se writes:


[...]

> Maybe having more alternatives in Elpa/Melpa would actually lead to more
> code re-use between the alternatives? That would be nice but I guess
> history indicates otherwise.

I am afraid that this is not the case, instead of leads to more glue
code having to be written.  If we want to be more efficient, we should
focus on promoting generic interfaces (Xref, Imenu, Flymake, ...) and
writing back-end implementations.  As an added bonus, we improve the
consistency of the user experience.

If Flycheck were to use the same interface as Flymake, then the
situation would be better, as it would only be a different UI with
perhaps some other priorities.

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 19/02/2024 21:52, Philip Kaludercic wrote:
>> Dmitry Gutov <dmitry@gutov.dev> writes:
>> 
>>> On 19/02/2024 20:53, Philip Kaludercic wrote:
>>>> To this end, I repeat my question: What_technical functionality_  does
>>>> Flycheck_currently_  provide that Flymake does not?  A different way of
>>>> putting it is what architectural advantages does Flycheck exemplify over
>>>> Flymake, that give it an inherent edge?  If there aren't too many
>>>> differences, I think the cost of confusion (Flymake and Flycheck are
>>>> names that are easy to confuse) and of inducing choice-fatigue among new
>>>> users is not something we should ignore.
>>>
>>> I'm fairly sure the main answer is "lots of built-in checkers", much
>>> more than flymake still has now.
>> Do you think that adding "flymake-collection" to NonGNU ELPA could
>> help
>> improve the situation sufficiently?  See also
>> https://github.com/mohkale/flymake-collection/issues/2.
>
> It might be an improvement, but AFAIK Flycheck still has an order of a
> magnitude more checkers.
>
> Offhand,
> https://github.com/mohkale/flymake-collection/tree/release/src/checkers
> doesn't include anything for Rust or Golang.
>
> And Flycheck has several for both.

This appears to be true, but this is not an inherent advantage, just the
fact that people have invested effort into it.  It seems to be that a
significant reason is that Flycheck has a convenient language for
defining checkers, something that IIUC flymake-collection is also
working on.  Giving this basis, we could look into perhaps even
automatically translating the Checker specifications, which would help
further "obsolete" Flycheck, given that this is apparently the only real
"advantage" it provides (which again, is not architectural, just the
accumulated labour over the last decade).

>>> It also has a minor mode map, to invoke the errors buffer or jump
>>> between the errors. Though the latter is easy-ish to port over.
>> I agree, that that is an annoyance.  I have personally bound
>> `flymake-goto-next-error' and `flymake-goto-prev-error' to M-n and M-p
>> respectively, but it would be nice if we could find some keys to bind
>> these commands to.
>
> Same.

I'll look into submitting a bug report to propose such a change.

>>> On the subject of choice fatigue, would we hesitate to include
>>> lsp-mode in NonGNU ELPA, now that Eglot is in the core? I feel that
>>> would be the wrong move.
>> FWIW I would argue against it.  Setting aside issues of
>> dependencies, it
>> is my impression that the "lsp-mode" tries to superficially convert
>> Emacs into some VSCode like experience, introducing a lot of transient
>> information that cannot be operated on normally, popup windows that
>> cannot be selected/persisted/searched or otherwise re-creating UI
>> features that already exist in Emacs.
>
> Are we going to police UIs now?

I wouldn't put it that way, but as mentioned above I do think that
pushing towards a consistent UI that aligns with Emacs strengths
(text-based, buffers in windows, ...) is worth the effort, even if some
projects have to change or die in the process.  E.g. a positive example:
I added support for the "dumb-jump" to use Xref instead of
re-implementing the UI with custom commands and popups.  People appear
to use that now.

> Let's remove Helm from NonGNU, then: its UI paradigm is also different
> from the core Emacs, and IMHO it's rather ugly. And swiper/ivy from
> ELPA, just because.

While I am not a fan of Helm, it was initially added to provide popular
packages that a number of people appeared to want to use.  Luckily these
packages fall into the category of providing the front-end of a shared
interface (completing-read; and that not without issues, because they
tend to abuse completing-read's text expansion idea by focusing on
narrowing and selecting).  And yes, there are packages that have hard
dependencies on Helm, but usually when people submit these kinds of
packages, we at least mention the idea of trying to generalise them, so
that the front- and back-end can be disentangled from one another.

> lsp-mode is not just eye candy anyway.
>
> Just as I've discovered last week (I'm not a heavy user of either), it
> has a handy test runner integration and more reliable errors reporting
> (for syntax, etc). And that's with Flymake.
>
> Also, it's average latency for completion was lower in my benchmarking
> not too long ago. Though that's probably the fault of Eglot's
> expensive pretty-printing in logging.
>
> And the popup windows are easily turned off.

I know that there are differences, and I hope that the situation
improves, but to mention another negative that probably disqualifies
adding the package just on its own: `lsp-install-server'.  The command
can download arbitrary executable files as servers and runs them
locally.  From what I see there is no reference to any software licenses
or where to find the source code.  To be fair, this is partially due to
the mentality that Microsoft had when writing VSCode (remember that a
number of the most popular extensions and servers written by Microsoft
are explicitly non-free software that must be used together with the
official signed release of VSCode), which the "lsp-mode" developers
appears to accept uncritically.



^ permalink raw reply	[relevance 60%]

* Re: Adding package "Loopy" to Non-GNU Devel?
  @ 2024-02-20  8:09 92% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-20  8:09 UTC (permalink / raw)
  To: Okamsn; +Cc: emacs-devel

Okamsn <okamsn@protonmail.com> writes:

> Hello,
>
> I am the author of the package "loopy", which provides macros similar to
> ~cl-loop~ and Common Lisp's =iterate=.  It is located here:
>
> https://github.com/okamsn/loopy

(Obligatory question here, as to why we don't also name the package
iterate?)

> For those not willing to browse GitHub, I have copied the main points 
> from the
> README.org file. I have attached the README and the Org documentation file.
>
> Visually, Loopy differs by using parentheses instead of keywords like 
> ~cl-loop~.
> For example,
>
> #+begin_src emacs-lisp
>    ;; A use of `cl-loop':
>    (cl-loop for i from 1 to 10
>             if (cl-evenp i) collect i into evens
>             else collect i into odds
>             end ; This `end' keyword is optional here.
>             finally return (list odds evens))
>
>    ;; How it could be done using `loopy':
>    (loopy (numbers i :from 1 :to 10)
>           (if (cl-evenp i)
>               (collect evens i)
>             (collect odds i))
>           (finally-return odds evens))
> #+end_src
>
> Non-visually, these are I think the main improvements:
>
> - Better destructuring than =cl-lib=, in that it can destructure arrays and
>    supports destructuring in accumulations (like ~collect~) as well as in
>    iteration.  I recently added a Pcase pattern for this outside of the 
> ~loopy~ macro.
>
>    #+begin_src emacs-lisp
>      ;; => (8 10 12 14 16 18)
>      (loopy (list list-elem '(([1 2 3] [4 5 6])
>                               ([7 8 9] [10 11 12])))
>             (sum ([sum1 sum2 sum3] [sum4 sum5 sum6])
>                  list-elem)
>             (finally-return sum1 sum2 sum3 sum4 sum5 sum6))
>    #+end_src

Where is pcase being used here?

>
> - Better control over accumulations, in that one can declare that an
>    accumulation is "optimized" (for example, using the ~push~-~nreverse~ 
> pattern
>    instead of the ~append~-~list~ pattern) for named variables, allowing to
>    efficiently accumulate for multiple values and to declare beforehand 
> whether
>    adding to the front or the end of the list should be preferred.
>
>    The below expands into two instances of the ~push~-~nreverse~ pattern:
>
>    #+begin_src emacs-lisp
>      ;; Separate the elements of sub-list:
>      ;; => ((1 3) (2 4))
>      (loopy (accum-opt elem1 elem2)
>             (list i '((1 2) (3 4)))
>             (collect (elem1 elem2) i)
>             (finally-return elem1 elem2))
>    #+end_src
>
>
> - A way to embed the looping constructs in arbitrary code like in Common 
> Lisp's
>    Iterate:
>
>    #+begin_src emacs-lisp
>      (require 'loopy-iter)
>
>      ;; Things to note:
>      ;; => ((-9 -8 -7 -6 -5 -4 -3 -2 -1)
>      ;;     (0)
>      ;;     (1 2 3 4 5 6 7 8 9 10 11))
>      (loopy-iter (accum-opt positives negatives zeroes)
>                  (numbering i :from -10 :to 10)
>                  ;; Normal `let' and `pcase', not Loopy constructs:
>                  (let ((var (1+ i)))
>                    (pcase var
>                      ((pred cl-plusp)  (collecting positives var))
>                      ((pred cl-minusp) (collecting negatives var))
>                      ((pred zerop)     (collecting zeroes var))))
>                  (finally-return negatives zeroes positives))
>    #+end_src
>
>
> - An =at= feature to manipulate containing loops, such as moving to the next
>    iteration step or accumulating into a variable:
>
>    #+begin_src emacs-lisp
>      (loopy outer
>             (array i [(1 2) (3 4) (5 6)])
>             (loopy (with (sum (apply #'+ i)))
>                    (list j i)
>                    (at outer (collect (+ sum j)))))
>    #+end_src
>
> - It should be easy to add new looping features.  The documentation has 
> examples of this.
>
>
> The package and an extension package (to use Dash's destructuring instead of
> that of Loopy, Pcase, or Seq) has been available on MELPA for a few 
> years now.
> I am asking about Non-GNU Devel instead of just the normal Non-GNU archive
> because I am still making breaking changes to the package as I reduce
> duplication and improve on the ideas, but those changes are coming less
> frequently now.

If you want to prevent a package from being released, you just need to
make sure keep some negative version suffix like -rc in the version tag.

But in general, I wouldn't advise regarding NonGNU ELPA devel as a
proper package archive for users, but more as a preview for developers
to see how the ELPA build server is processing your package.  Or that is
at least my take.

> Is it possible to add this package and the extension package to the archive?
>
> I keep the extension package in the same GitHub repo as the main package for
> testing purposes.  The Dash functionality was requested by a user, but 
> Dash is
> not used by the rest of the package.  Because of that, I put the Dash
> functionality in a small separate package.

You are talking about the loopy-dash.el file in the same branch, right?
If possible, it would be better if you could at least maintain it in a
separate branch.

> Thank you.



^ permalink raw reply	[relevance 92%]

* Re: Adding Flycheck to NonGNU ELPA
  @ 2024-02-19 19:41 75%         ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-19 19:41 UTC (permalink / raw)
  To: Bozhidar Batsov; +Cc: Emacs Devel

"Bozhidar Batsov" <bozhidar@batsov.dev> writes:

>> For the sake of a constructive discussion, please don't make claims like
>> these without any further references.  Provocations like these, from
>> anyone, only make discussions like these more difficult.
>
> Oh, damn - I mixed a private thread with Philip and the message I had
> sent here. (I had reached out to him before posting here, as I was
> hoping to avoid a public thread on the topic) :double-facepalm:
> Anyways, that's on me.

No worries.  I prefer public conversations anyway, saves me from the
burden of archiving for myself ;)

>> I do not follow MELPA development or statistics, but from what I recall
>> these are just accumulated downloads over all versions, right?  If so,
>> then the information we get from this fact is rather low.
>
> Fair enough. Still, you don't get to #4 in the all-time rankings on
> past usage alone. I'm sorry that I can't provide better usage metrics
> to support my case.

I get what you mean, but what is really missing is growth statistics,
specifically w.r.t. new, manual installations.  MELPA also inflates for
packages that commit a lot, since they have more "releases", hence more
updates, and hence finally more downloads.  We can certainly conclude
that it is a package that people payed attention to, but I just want to
avoid inferring too much from that.

>> Could you explain how this relates to the current state of Flymake
>> vs. Flycheck?  The fact that Flymake caught up, and in my eyes
>> deprecated Flycheck, seems like a success story.
>
> I'm afraid I don't have the time to do a detailed research on the
> current state of Flymake. I haven't written the comparison page myself
> and I agree some points there are small/subjective. I'm not sure how
> you came to the conclusion that Flycheck got deprecated, though. 

Sorry, "deprecated" should have been in quotes;  perhaps "superseded"
would be the more appropriate term.  My point is just that there was a
time where Flycheck had advantages, in a certain milieu, but I think
that period is over and that is good.

>                                                                  Any
> analysis that I would do would be subjective of course, from mine
> perspective and from yours, so I think it wouldn't change anything.
>
> To be clear I don't want to argue which project is better and what are
> the merits of Flycheck over Flymake, if any. If it's so big of a deal
> to have packages that duplicate core functionality in the official
> repos - fine.

I'd qualify this as "duplicate existing functionality provided via ELPA,
without providing a characteristic advantage".  The fact that Flymake is
built-in is an important, but secondary point.

>> As you say, people will continue
>> maintaining third-party repositories that accept every brittle little
>> scripts anyone writes (I speak here from experience and personal
>> suffering), but I think it is a feature that ELPA has a more curated
>> policy.  I for my really try my best to raise the bar of package
>> submissions, and while it is not always easy, I hope that this helps
>> make the system more robust for everyone. 
>
> I get your point about quality, but here we're not talking about some
> random package of questionable provenance. You can inspect the
> codebase yourself if you want, but (subjectively speaking) has fairly
> clean codebase, lots of unit tests, and very detailed
> documentation. (and a sizeable, if hard to measure user-base)
> Flymake's docs
> (https://www.gnu.org/software/emacs/manual/html_node/emacs/Flymake.html)
> are pretty basic compared to Flycheck's so I feel you're applying
> double standards here.

(I really can't write) My above comment was on MELPA in general,
specifically deriving from my first few years of using Emacs before
getting into development (~2014-2020) -- a position I would argue that
most core developers /and/ MELPA contributors have not experienced --
and the issues and misconceptions I had to overcome.  While I cannot
recall any specific breakage related to Flycheck, the mentality of
having to install everything from MELPA, without properly studying the
documentation or understanding the potential synergy that Emacs can
provide, did keep me back for a long time, and as I regularly observe,
hinders others from advancing as well.  But that is a topic for another
thread, that should probably take place on some other mailing list...

> Anyways, I had a feeling I'd regret asking for the inclusion of Flycheck. I'll take is that my answer is "No".
>
> I really don't want to turn this into some heated debate, so we can just wrap up here. 

OK, thank you anyway for the idea.

> On Mon, Feb 19, 2024, at 8:53 PM, Philip Kaludercic wrote:
>> "Bozhidar Batsov" <bozhidar@batsov.dev> writes:
>> 
>> > There is a detailed comparison here
>> > https://www.flycheck.org/en/latest/user/flycheck-versus-flymake.html
>> 
>> From what I see, this comparison is outdated and somewhat one-sided.
>> Flymake has error explanations, and categories like "Automatic syntax
>> checking" seem disingenuous if the complaint is that there is not a
>> flymake-global-mode.  (It would have probably taken less time to write a
>> `define-globalized-minor-mode', than the time to write this point...)
>> 
>> > but many of the differences are probably not important to many
>> > people. You might remember that before Flycheck, Flymake was in a
>> > state of disarray and abandoment for years, so I'm pretty sure
>> > Flycheck making it almost obsolete back then was the trigger for some
>> > modernization around Emacs 26.1. 
>> 
>> Could you explain how this relates to the current state of Flymake
>> vs. Flycheck?  The fact that Flymake caught up, and in my eyes
>> deprecated Flycheck, seems like a success story.
>> 
>> >                                  And the contributors to Flycheck and
>> > Flymake were always pretty different - part of the reason Sebastien
>> > (the original author of Flycheck) quit Emacs were some attacks he was
>> > getting on emacs-devel.
>> 
>> For the sake of a constructive discussion, please don't make claims like
>> these without any further references.  Provocations like these, from
>> anyone, only make discussions like these more difficult.
>> 
>> > Many people are so off-put by the discourse there, that they want to
>> > have as little as possible with it. And that's the real value of
>> > alternative packages IMO - they allow us to harvest the energy of all
>> > contributors.
>> 
>> I don't think this is the problem you are making it out to be, and even
>> if it were, one could have a package like flymake-collection added to
>> NonGNU ELPA.
>> 
>> > Btw, flymake-flycheck was created only because Joao wouldn't agree to
>> > provide Flycheck support in Eglot (I know this from the author of
>> > flymake-flycheck). The whole situation with Elgot was a classic
>> > example of the hostility in Emacs towards packages some maintainers
>> > dislike... (https://github.com/joaotavora/eglot/issues/42)
>> 
>> I don't know how you infer, but again, it would be nice to keep the
>> discussion here on-topic instead of bringing up old drama between
>> GNU-adjacent/core development and MELPA/GitHub/anti-GNU people.
>> 
>> >> but considering that
>> >> more and more people rely on LSP for the information (and Eglot supports
>> >> Flymake OOTB), I don't know how valuable this is.
>> >
>> > Btw, Eglot is not the only LSP client for Emacs. :-) lsp-mode users
>> > flycheck by default for its error diagnostics. I'm not a big LSP user,
>> > though, and often prefer the simplicity of just shelling out to
>> > whatever lint tools I need.
>> 
>> The "lsp-mode" is not part of NonGNU ELPA, so I don't think that is a
>> problem in this case.
>> 
>> > You probably know that Flycheck is one of the most download packages
>> > on MELPA, so it has plenty of happy users. 
>> 
>> I do not follow MELPA development or statistics, but from what I recall
>> these are just accumulated downloads over all versions, right?  If so,
>> then the information we get from this fact is rather low.
>> 
>> (BTW. if we are to implement this feature for ELPA, then we should pay
>> attention to avoid this mistake, and only display the download counts
>> over some fixed time interval, e.g. the information currently available
>> in the access logs.)
>> 
>> >                                            
>> >                                            I'm one of them and that's
>> > why I took over the maintenance of the project. I felt that NonGNU
>> > ELPA existed to make it easier for popular stuff to be installed by
>> > users, but it seems to me MELPA won't be going away any time soon.
>> 
>> NonGNU ELPA is not only a means of making more useful packages readily
>> available to users OOTB (without having to search online blogs and fora
>> for code snippets that enable third-party archives and install dozens of
>> weirdly named packages replicating built-in functionality), but also a
>> chance to clean up the package landscape, and prune away some
>> experiments from the 2010s.  As you say, people will continue
>> maintaining third-party repositories that accept every brittle little
>> scripts anyone writes (I speak here from experience and personal
>> suffering), but I think it is a feature that ELPA has a more curated
>> policy.  I for my really try my best to raise the bar of package
>> submissions, and while it is not always easy, I hope that this helps
>> make the system more robust for everyone.  So once more, please do not
>> assume malice in these discussions, I don't think anyone here hates one
>> another or intentionally wants to hinder them personally.  It takes
>> effort to take others seriously, but it is worth undertaking if we want
>> to make Emacs better.
>> 
>> To this end, I repeat my question: What _technical functionality_ does
>> Flycheck _currently_ provide that Flymake does not?  A different way of
>> putting it is what architectural advantages does Flycheck exemplify over
>> Flymake, that give it an inherent edge?  If there aren't too many
>> differences, I think the cost of confusion (Flymake and Flycheck are
>> names that are easy to confuse) and of inducing choice-fatigue among new
>> users is not something we should ignore.
>> 
>> > On Mon, Feb 19, 2024, at 7:44 PM, Philip Kaludercic wrote:
>> >> "Bozhidar Batsov" <bozhidar@batsov.dev> writes:
>> >> 
>> >> > Hey everyone,
>> >> >
>> >> > Just wanted to ask if there's any interested in adding Flycheck
>> >> > (https://www.flycheck.org/en/latest/), a popular alternative to
>> >> > Flymake, to NonGNU ELPA?
>> >> >
>> >> > You can find the codebase here https://github.com/flycheck/flycheck
>> >> > There's also some integration with Eglot https://github.com/flycheck/flycheck-eglot
>> >> >
>> >> > I'm not sure what's the stance of adding alternatives to built-in
>> >> > packages in general, but I think providing some alternatives to the
>> >> > end users is not a bad thing overall.
>> >> 
>> >> My main question is what advantage Flycheck has over Flymake.  I
>> >> understand it has a database of tools built-in, but considering that
>> >> more and more people rely on LSP for the information (and Eglot supports
>> >> Flymake OOTB), I don't know how valuable this is.  In addition to that,
>> >> there are projects like
>> >> 
>> >> https://github.com/mohkale/flymake-collection
>> >> https://github.com/purcell/flymake-flycheck
>> >> 
>> >> that could help bridge the gap.
>> >> 
>> >> 
>> 
>> 



^ permalink raw reply	[relevance 75%]

* Re: master ddfba511c19 1/3: Check shortdoc keywords and fix one mistake
  @ 2024-02-19 19:25 99%       ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-19 19:25 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, mattiase

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Philip Kaludercic <philipk@posteo.net>
>> Cc: Mattias Engdegård <mattiase@acm.org>
>> Date: Mon, 19 Feb 2024 18:59:03 +0000
>> 
>> This causes an error while compiling on my end:
>> 
>> emacs-lisp/shortdoc.el:138:2: Error: Symbol’s function definition is
>> void: shortdoc--check
>
> How come? the function is defined before it is used.

Apparently because it is being used in a macro.

>> This would fix it, but I don't know the details of what is going on:
>
> Very strange fix, to say the least.  We should definitely try
> understanding better what's going on.  FTR, if I touch shortdoc.el and
> rebuild Emacs, I see no errors or warnings.  As expected.

Apparently this works as well; I had tried to byte-compile the file
manually and I got the same error, so I assumed something more
complicated was happening.  So disregard this thread.



^ permalink raw reply	[relevance 99%]

* Re: master ddfba511c19 1/3: Check shortdoc keywords and fix one mistake
       [not found]     ` <20240219171441.76EC3C3421F@vcs2.savannah.gnu.org>
@ 2024-02-19 18:59 82%   ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-19 18:59 UTC (permalink / raw)
  To: emacs-devel; +Cc: Mattias Engdegård

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

This causes an error while compiling on my end:

emacs-lisp/shortdoc.el:138:2: Error: Symbol’s function definition is
void: shortdoc--check

This would fix it, but I don't know the details of what is going on:


[-- Attachment #2: Type: text/plain, Size: 1368 bytes --]

diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
index cde28985cd0..7597f601124 100644
--- a/lisp/emacs-lisp/shortdoc.el
+++ b/lisp/emacs-lisp/shortdoc.el
@@ -50,19 +50,19 @@ shortdoc-section
   '((t :inherit variable-pitch))
   "Face used for a section.")
 
-;;;###autoload
-(defun shortdoc--check (group functions)
-  (let ((keywords '( :no-manual :args :eval :no-eval :no-value :no-eval*
-                     :result :result-string :eg-result :eg-result-string :doc)))
-    (dolist (f functions)
-      (when (consp f)
-        (dolist (x f)
-          (when (and (keywordp x) (not (memq x keywords)))
-            (error "Shortdoc %s function `%s': bad keyword `%s'"
-                   group (car f) x)))))))
-
 ;;;###autoload
 (progn
+  (eval-and-compile
+    (defun shortdoc--check (group functions)
+      (let ((keywords '( :no-manual :args :eval :no-eval :no-value :no-eval*
+                         :result :result-string :eg-result :eg-result-string :doc)))
+        (dolist (f functions)
+          (when (consp f)
+            (dolist (x f)
+              (when (and (keywordp x) (not (memq x keywords)))
+                (error "Shortdoc %s function `%s': bad keyword `%s'"
+                       group (car f) x))))))))
+
   (defvar shortdoc--groups nil)
 
   (defmacro define-short-documentation-group (group &rest functions)

[-- Attachment #3: Type: text/plain, Size: 2204 bytes --]



Mattias Engdegård <mattiase@acm.org> writes:

> branch: master
> commit ddfba511c190e5bb44e44a50aef5ab8c08e3d798
> Author: Mattias Engdegård <mattiase@acm.org>
> Commit: Mattias Engdegård <mattiase@acm.org>
>
>     Check shortdoc keywords and fix one mistake
>     
>     * lisp/emacs-lisp/shortdoc.el (shortdoc--check)
>     (define-short-documentation-group): Check that used keywords exist.
>     * lisp/emacs-lisp/shortdoc.el (list): Fix a typo.
> ---
>  lisp/emacs-lisp/shortdoc.el | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
> index a6a49c72f74..cde28985cd0 100644
> --- a/lisp/emacs-lisp/shortdoc.el
> +++ b/lisp/emacs-lisp/shortdoc.el
> @@ -50,6 +50,17 @@
>    '((t :inherit variable-pitch))
>    "Face used for a section.")
>  
> +;;;###autoload
> +(defun shortdoc--check (group functions)
> +  (let ((keywords '( :no-manual :args :eval :no-eval :no-value :no-eval*
> +                     :result :result-string :eg-result :eg-result-string :doc)))
> +    (dolist (f functions)
> +      (when (consp f)
> +        (dolist (x f)
> +          (when (and (keywordp x) (not (memq x keywords)))
> +            (error "Shortdoc %s function `%s': bad keyword `%s'"
> +                   group (car f) x)))))))
> +
>  ;;;###autoload
>  (progn
>    (defvar shortdoc--groups nil)
> @@ -118,6 +129,7 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'),
>  `:no-eval*', `:result', `:result-string', `:eg-result' and
>  `:eg-result-string' properties."
>      (declare (indent defun))
> +    (shortdoc--check group functions)
>      `(progn
>         (setq shortdoc--groups (delq (assq ',group shortdoc--groups)
>                                      shortdoc--groups))
> @@ -715,7 +727,7 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'),
>     :eval (plist-get '(a 1 b 2 c 3) 'b))
>    (plist-put
>     :no-eval (setq plist (plist-put plist 'd 4))
> -   :eq-result (a 1 b 2 c 3 d 4))
> +   :eg-result (a 1 b 2 c 3 d 4))
>    (plist-member
>     :eval (plist-member '(a 1 b 2 c 3) 'b))
>    "Data About Lists"

^ permalink raw reply related	[relevance 82%]

* Re: Adding Flycheck to NonGNU ELPA
  @ 2024-02-19 18:53 58%     ` Philip Kaludercic
      0 siblings, 2 replies; 200+ results
From: Philip Kaludercic @ 2024-02-19 18:53 UTC (permalink / raw)
  To: Bozhidar Batsov; +Cc: Emacs Devel

"Bozhidar Batsov" <bozhidar@batsov.dev> writes:

> There is a detailed comparison here
> https://www.flycheck.org/en/latest/user/flycheck-versus-flymake.html

From what I see, this comparison is outdated and somewhat one-sided.
Flymake has error explanations, and categories like "Automatic syntax
checking" seem disingenuous if the complaint is that there is not a
flymake-global-mode.  (It would have probably taken less time to write a
`define-globalized-minor-mode', than the time to write this point...)

> but many of the differences are probably not important to many
> people. You might remember that before Flycheck, Flymake was in a
> state of disarray and abandoment for years, so I'm pretty sure
> Flycheck making it almost obsolete back then was the trigger for some
> modernization around Emacs 26.1. 

Could you explain how this relates to the current state of Flymake
vs. Flycheck?  The fact that Flymake caught up, and in my eyes
deprecated Flycheck, seems like a success story.

>                                  And the contributors to Flycheck and
> Flymake were always pretty different - part of the reason Sebastien
> (the original author of Flycheck) quit Emacs were some attacks he was
> getting on emacs-devel.

For the sake of a constructive discussion, please don't make claims like
these without any further references.  Provocations like these, from
anyone, only make discussions like these more difficult.

> Many people are so off-put by the discourse there, that they want to
> have as little as possible with it. And that's the real value of
> alternative packages IMO - they allow us to harvest the energy of all
> contributors.

I don't think this is the problem you are making it out to be, and even
if it were, one could have a package like flymake-collection added to
NonGNU ELPA.

> Btw, flymake-flycheck was created only because Joao wouldn't agree to
> provide Flycheck support in Eglot (I know this from the author of
> flymake-flycheck). The whole situation with Elgot was a classic
> example of the hostility in Emacs towards packages some maintainers
> dislike... (https://github.com/joaotavora/eglot/issues/42)

I don't know how you infer, but again, it would be nice to keep the
discussion here on-topic instead of bringing up old drama between
GNU-adjacent/core development and MELPA/GitHub/anti-GNU people.

>> but considering that
>> more and more people rely on LSP for the information (and Eglot supports
>> Flymake OOTB), I don't know how valuable this is.
>
> Btw, Eglot is not the only LSP client for Emacs. :-) lsp-mode users
> flycheck by default for its error diagnostics. I'm not a big LSP user,
> though, and often prefer the simplicity of just shelling out to
> whatever lint tools I need.

The "lsp-mode" is not part of NonGNU ELPA, so I don't think that is a
problem in this case.

> You probably know that Flycheck is one of the most download packages
> on MELPA, so it has plenty of happy users. 

I do not follow MELPA development or statistics, but from what I recall
these are just accumulated downloads over all versions, right?  If so,
then the information we get from this fact is rather low.

(BTW. if we are to implement this feature for ELPA, then we should pay
attention to avoid this mistake, and only display the download counts
over some fixed time interval, e.g. the information currently available
in the access logs.)

>                                            
>                                            I'm one of them and that's
> why I took over the maintenance of the project. I felt that NonGNU
> ELPA existed to make it easier for popular stuff to be installed by
> users, but it seems to me MELPA won't be going away any time soon.

NonGNU ELPA is not only a means of making more useful packages readily
available to users OOTB (without having to search online blogs and fora
for code snippets that enable third-party archives and install dozens of
weirdly named packages replicating built-in functionality), but also a
chance to clean up the package landscape, and prune away some
experiments from the 2010s.  As you say, people will continue
maintaining third-party repositories that accept every brittle little
scripts anyone writes (I speak here from experience and personal
suffering), but I think it is a feature that ELPA has a more curated
policy.  I for my really try my best to raise the bar of package
submissions, and while it is not always easy, I hope that this helps
make the system more robust for everyone.  So once more, please do not
assume malice in these discussions, I don't think anyone here hates one
another or intentionally wants to hinder them personally.  It takes
effort to take others seriously, but it is worth undertaking if we want
to make Emacs better.

To this end, I repeat my question: What _technical functionality_ does
Flycheck _currently_ provide that Flymake does not?  A different way of
putting it is what architectural advantages does Flycheck exemplify over
Flymake, that give it an inherent edge?  If there aren't too many
differences, I think the cost of confusion (Flymake and Flycheck are
names that are easy to confuse) and of inducing choice-fatigue among new
users is not something we should ignore.

> On Mon, Feb 19, 2024, at 7:44 PM, Philip Kaludercic wrote:
>> "Bozhidar Batsov" <bozhidar@batsov.dev> writes:
>> 
>> > Hey everyone,
>> >
>> > Just wanted to ask if there's any interested in adding Flycheck
>> > (https://www.flycheck.org/en/latest/), a popular alternative to
>> > Flymake, to NonGNU ELPA?
>> >
>> > You can find the codebase here https://github.com/flycheck/flycheck
>> > There's also some integration with Eglot https://github.com/flycheck/flycheck-eglot
>> >
>> > I'm not sure what's the stance of adding alternatives to built-in
>> > packages in general, but I think providing some alternatives to the
>> > end users is not a bad thing overall.
>> 
>> My main question is what advantage Flycheck has over Flymake.  I
>> understand it has a database of tools built-in, but considering that
>> more and more people rely on LSP for the information (and Eglot supports
>> Flymake OOTB), I don't know how valuable this is.  In addition to that,
>> there are projects like
>> 
>> https://github.com/mohkale/flymake-collection
>> https://github.com/purcell/flymake-flycheck
>> 
>> that could help bridge the gap.
>> 
>> 



^ permalink raw reply	[relevance 58%]

* Re: Adding Flycheck to NonGNU ELPA
  @ 2024-02-19 17:44 98% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-19 17:44 UTC (permalink / raw)
  To: Bozhidar Batsov; +Cc: Emacs Devel

"Bozhidar Batsov" <bozhidar@batsov.dev> writes:

> Hey everyone,
>
> Just wanted to ask if there's any interested in adding Flycheck
> (https://www.flycheck.org/en/latest/), a popular alternative to
> Flymake, to NonGNU ELPA?
>
> You can find the codebase here https://github.com/flycheck/flycheck
> There's also some integration with Eglot https://github.com/flycheck/flycheck-eglot
>
> I'm not sure what's the stance of adding alternatives to built-in
> packages in general, but I think providing some alternatives to the
> end users is not a bad thing overall.

My main question is what advantage Flycheck has over Flymake.  I
understand it has a database of tools built-in, but considering that
more and more people rely on LSP for the information (and Eglot supports
Flymake OOTB), I don't know how valuable this is.  In addition to that,
there are projects like

https://github.com/mohkale/flymake-collection
https://github.com/purcell/flymake-flycheck

that could help bridge the gap.



^ permalink raw reply	[relevance 98%]

* Re: [Reminder]Decommissoned keyservers
  @ 2024-02-17 18:48 99%         ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-17 18:48 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: CHENG Gao via Emacs development discussions., CHENG Gao

Stefan Kangas <stefankangas@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> CHENG Gao via "Emacs development discussions." <emacs-devel@gnu.org>
>> writes:
>>
>>> *On Fri, 17 Nov 2023 21:15:55 +0000
>>> * Also sprach Philip Kaludercic <philipk@posteo.net>:
>>>
>>>> CHENG Gao via "Emacs development discussions." <emacs-devel@gnu.org>
>>>> writes:
>>>>
>>>>> In lisp/epa-ks.el, several keyservers were decommissioned, and guess
>>>>> shoule be removed:
>>>>>
>>>>> keys.gnupg.net
>>>>> pool.sks-keyservers.net
>>>>> zimmermann.mayfirst.org
>>>>
>>>> Do you have any links about this for the first two?  zimmermann has a
>>>> notice on the front page, so I guess it can be removed.
>>>
>>> See:
>>>
>>> https://gist.github.com/rjhansen/67ab921ffb4084c865b3618d6955275f
>>>
>>> https://unix.stackexchange.com/questions/656205/sks-keyservers-gone-what-to-use-instead
>>
>> So would anyone have an issue with applying this patch:
>
> LGTM.  Please install on emacs-29.

OK, done.  Thanks for the ack.

>> From cf77b918230b4403b8b5b9579fa97174edaf280c Mon Sep 17 00:00:00 2001
>> From: Philip Kaludercic <philipk@posteo.net>
>> Date: Sun, 11 Feb 2024 18:38:13 +0100
>> Subject: [PATCH] Removed decommissioned PGP keyservers
>>
>> * lisp/epa-ks.el (epa-keyserver): Update the user option type of
>> `epa-keyserver'.
>>
>> See https://mail.gnu.org/archive/html/emacs-devel/2023-11/msg00857.html.
>> ---
>>  lisp/epa-ks.el | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/lisp/epa-ks.el b/lisp/epa-ks.el
>> index c3c11bb0b0b..13840da0bd9 100644
>> --- a/lisp/epa-ks.el
>> +++ b/lisp/epa-ks.el
>> @@ -47,11 +47,8 @@ epa-keyserver
>>                   (repeat :tag "Random pool"
>>                           (string :tag "Keyserver address"))
>>                   (const "keyring.debian.org")
>> -                 (const "keys.gnupg.net")
>>                   (const "keyserver.ubuntu.com")
>>                   (const "pgp.mit.edu")
>> -                 (const "pool.sks-keyservers.net")
>> -                 (const "zimmermann.mayfirst.org")
>>                   (string :tag "Custom keyserver"))
>>    :version "28.1")
>>
>> --
>> 2.39.2

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 99%]

* Re: [Reminder]Decommissoned keyservers
  @ 2024-02-11 17:39 88%     ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-11 17:39 UTC (permalink / raw)
  To: CHENG Gao via Emacs development discussions.; +Cc: CHENG Gao

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

CHENG Gao via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> *On Fri, 17 Nov 2023 21:15:55 +0000
> * Also sprach Philip Kaludercic <philipk@posteo.net>:
>
>> CHENG Gao via "Emacs development discussions." <emacs-devel@gnu.org>
>> writes:
>>
>>> In lisp/epa-ks.el, several keyservers were decommissioned, and guess
>>> shoule be removed:
>>>
>>> keys.gnupg.net
>>> pool.sks-keyservers.net
>>> zimmermann.mayfirst.org
>>
>> Do you have any links about this for the first two?  zimmermann has a
>> notice on the front page, so I guess it can be removed.
>
> See:
>
> https://gist.github.com/rjhansen/67ab921ffb4084c865b3618d6955275f
>
> https://unix.stackexchange.com/questions/656205/sks-keyservers-gone-what-to-use-instead

So would anyone have an issue with applying this patch:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Removed-decommissioned-PGP-keyservers.patch --]
[-- Type: text/x-diff, Size: 1060 bytes --]

From cf77b918230b4403b8b5b9579fa97174edaf280c Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Sun, 11 Feb 2024 18:38:13 +0100
Subject: [PATCH] Removed decommissioned PGP keyservers

* lisp/epa-ks.el (epa-keyserver): Update the user option type of
`epa-keyserver'.

See https://mail.gnu.org/archive/html/emacs-devel/2023-11/msg00857.html.
---
 lisp/epa-ks.el | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lisp/epa-ks.el b/lisp/epa-ks.el
index c3c11bb0b0b..13840da0bd9 100644
--- a/lisp/epa-ks.el
+++ b/lisp/epa-ks.el
@@ -47,11 +47,8 @@ epa-keyserver
                  (repeat :tag "Random pool"
                          (string :tag "Keyserver address"))
                  (const "keyring.debian.org")
-                 (const "keys.gnupg.net")
                  (const "keyserver.ubuntu.com")
                  (const "pgp.mit.edu")
-                 (const "pool.sks-keyservers.net")
-                 (const "zimmermann.mayfirst.org")
                  (string :tag "Custom keyserver"))
   :version "28.1")
 
-- 
2.39.2


[-- Attachment #3: Type: text/plain, Size: 23 bytes --]


-- 
Philip Kaludercic

^ permalink raw reply related	[relevance 88%]

* Re: master 7e8b1863af8: Add support for deriving major modes in which-func
       [not found]     ` <20240210111023.1468FC0EFEF@vcs2.savannah.gnu.org>
@ 2024-02-10 16:36 99%   ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-10 16:36 UTC (permalink / raw)
  To: emacs-devel; +Cc: Damien Cassou

Stefan Kangas <stefankangas@gmail.com> writes:

> branch: master
> commit 7e8b1863af8c820c2969c1a4666ae4451cbcea92
> Author: Damien Cassou <damien@cassou.me>
> Commit: Stefan Kangas <stefankangas@gmail.com>
>
>     Add support for deriving major modes in which-func
>     
>     * lisp/progmodes/which-func.el (which-func-try-to-enable)
>     (which-func-ff-hook): Use `derived-mode-p' to check if the current major
>     mode is within `which-func-modes' or `which-func-non-auto-modes'.
>     (Bug#68981)
> ---
>  lisp/progmodes/which-func.el | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
> index bd68672f905..631cb3b0aef 100644
> --- a/lisp/progmodes/which-func.el
> +++ b/lisp/progmodes/which-func.el
> @@ -211,7 +211,7 @@ non-nil.")
>    (when which-function-mode
>      (unless (local-variable-p 'which-func-mode)
>        (setq which-func-mode (or (eq which-func-modes t)
> -                                (member major-mode which-func-modes)))
> +                                (apply #'derived-mode-p which-func-modes)))

Isn't the `apply' here unnecessary, since the argument to
`derived-mode-p' can be a symbol or a list.  Invoking the function with
multiple arguments appears to be deprecated anyway.

>        (setq which-func--use-mode-line
>              (member which-func-display '(mode mode-and-header)))
>        (setq which-func--use-header-line
> @@ -239,7 +239,7 @@ It creates the Imenu index for the buffer, if necessary."
>  
>    (condition-case err
>        (if (and which-func-mode
> -	       (not (member major-mode which-func-non-auto-modes))
> +	       (not (apply #'derived-mode-p which-func-non-auto-modes))
>  	       (or (null which-func-maxout)
>  		   (< buffer-saved-size which-func-maxout)
>  		   (= which-func-maxout 0)))
>
>

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 99%]

* Re: Request to include a couple of packages in GNU ELPA
  @ 2024-02-10 15:49 99%             ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-10 15:49 UTC (permalink / raw)
  To: Rahguzar; +Cc: rms, emacs-devel

Rahguzar <rahguzar@zohomail.eu> writes:

> Richard Stallman <rms@gnu.org> writes:
>
>> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
>> [[[ whether defending the US Constitution against all enemies,     ]]]
>> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>>
>>   > The service they provide is having indexed a lot of haskell libraries,
>>   > more than most people want to have installed on their own machines.
>>   > That is why they refer to themselves as a search engine, because they
>>   > provide a discovery feature.
>>
>> To use their service as a search engine for other people's code makes
>> some sense, and it's fine.
>>
>> But do they also invite you to send your own private code to be
>> indexed, then subsequently use their server to search for things in
>> your own code?  That would be SaaSS!
>
> As far as I know, the service only indexes code available on standard
> haskell repository https://hackage.haskell.org/ and it is not possible
> to use it for private code.

It is, and they document how to do it:

https://raw.githubusercontent.com/ndmitchell/hoogle/master/docs/Install.md

From what I see, it shouldn't be SaaSS, as it can be used offline.  As
such it would be nice if a hoogle package for Emacs could support this
mode of operation as well.

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 99%]

* Re: [DISCUSSION] "quick-help" popup for org-columns (column view)
  @ 2024-02-10 15:44 93%       ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-10 15:44 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Stefan Kangas, Adam Porter, slawomir.grochowski, eliz,
	emacs-devel, emacs-orgmode, hmelman, info, larsi

Ihor Radchenko <yantar92@posteo.net> writes:

> Stefan Kangas <stefankangas@gmail.com> writes:
>
>> Adam Porter <adam@alphapapa.net> writes:
>>
>>> Since transient.el is part of Emacs now, these kinds of menus should
>>> probably be implemented with it.
>>
>> IIUC, this is not a menu, but a reminder of key bindings that are usable
>> in that context.  Other keybindings here are self-inserting keys, which
>> are equally useful, and they wouldn't be available in a transient.

The point of quick-help is to provide a persistent buffer with useful
bindings, comparable to what Nano does OOTB.

> I am wondering how quick-help, transient, and which-key (AFAIU, it is to
> be included into the core soon-ish) play together.
>
> transient provides a specific way to define the displayed layout, among
> other things. At the same time, quick-help provides an alternative
> (undocumented) way to define the layout. And which-key uses pre-defined
> layout.

One critical difference between which-key and transient compared to
quick-help, is that the latter has nothing to do with prefix maps, but
(by default) just presents global bindings, and is as such closer to a
curated version of `describe-bindings' (sort of like how `shortdocs' is
a curated version of `apropos-functions').

> I am wondering if transient style to define how various options in the
> menu/help buffer/which-key buffer can be unified.

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 93%]

* Re: [External] : Re: cond* vs pcase
  @ 2024-02-08  2:49 99%               ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-08  2:49 UTC (permalink / raw)
  To: Po Lu; +Cc: Alfred M. Szmidt, Arthur Miller, drew.adams, adam, emacs-devel

Po Lu <luangruo@yahoo.com> writes:

> "Alfred M. Szmidt" <ams@gnu.org> writes:
>
>> That would be really nice (and maybe ecase, ccase as someone else
>> noted).
>
> So provided that no serious objections emerge within the next couple of
> days, I will install a change to this effect.  Thanks.

Do you plan to move the definitions from cl-lib or provide new
definitions (someone mentioned being able to use equal instead of eq as
an extension)?



^ permalink raw reply	[relevance 99%]

* Re: Request to include a couple of packages in GNU ELPA
  @ 2024-02-07  8:29 97%       ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-07  8:29 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Rahguzar, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> Thanks for explaining.  Hoogle sounds like a useful took, for Haskell
> users.  What is the license of Hoogle?

Hoogle is a service, the source code behind the service seems to be
published under a BSD-3 license (?)

https://github.com/ndmitchell/hoogle?tab=License-1-ov-file#readme

>   > There is web front end available at  https://hoogle.haskell.org/ but the
>   > package consult-hoogle is for using hoogle installed locally from within
>   > Emacs.
>
> Yes, that is the right way to do it.  Using someone else's sevrer
> to index code you have on your machine is bad for your freedom --
> see https://gnu.org/philosophy/who-does-that-server-really-serve.html.
> Running Hoogle on your own machine (assuming Hoogle is free software)
> is the way that respects freedom.

The service they provide is having indexed a lot of haskell libraries,
more than most people want to have installed on their own machines.
That is why they refer to themselves as a search engine, because they
provide a discovery feature.



^ permalink raw reply	[relevance 97%]

* Re: New package for NonGNU ELPA : totp-auth
  @ 2024-02-07  8:23 99%   ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-07  8:23 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Vivek Das Mohapatra, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> This is a useful feature, but should it be implemented as a part of
> Emacs?  Is there / should there be a shell command for this?

There seems to be this: https://www.nongnu.org/oath-toolkit/

> Given a shell command for this, do we want it implemented in Emacs
> too?

I don't think that the existence of shell utility is a reason not to
have a feature written for Emacs.  Elisp scripts are usually more
portable and certainly more easily hackable than their shell
counterparts.



^ permalink raw reply	[relevance 99%]

* Re: cond* vs pcase
  @ 2024-02-06 19:39 85%               ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-06 19:39 UTC (permalink / raw)
  To: Alfred M. Szmidt; +Cc: arthur.miller, emacs-devel

"Alfred M. Szmidt" <ams@gnu.org> writes:

>    >    > Because your not doing pattern matching, you're comparing against a
>    >    > set of strings/symbols/numbers/....
>    >
>    >    Simply because pattern matching is a more powerful generalisation,
>    >    capable of expressing case-distinction; in the end it compiles down to
>    >    almost the same code anyway.
>    >
>    > Are you suggesting that COND/CASE/... and other "trivial" matching
>    > constructs should be replaced with PCASE/COND*?
>
>    No, just that using pcase in these cases isn't wrong.
>
> Then we disagree on a fundamental level.  This is just like like using
> EQUAL when comparing stricly strings is not the right tool for the
> job.

"Alfred M. Szmidt" <ams@gnu.org> writes:

>    Also interning strings just for the purpose of comparing them with eq or
>    eql is questionable...
>
> So is pattern matching over characters, numbers, and other simple
> types... 

In both cases here I think that there is a fundamental distinction
between functionality that is generic at compile-time and at run-time.
While `equal' vs `eq' is not pretty, the main issue for me here is that
you might accidentally compare and equate two string or lists that are
not the same object, which you sometimes don't want to do.  Otherwise it
is not really slower than using `eq', if that is what concerns you:

--8<---------------cut here---------------start------------->8---
(benchmark-run 10000000
  (eq 'foo 'bar))
;; (2.589085844 0 0.0)

(benchmark-run 10000000
  (equal 'foo 'bar))
;; (2.611292045 0 0.0)
--8<---------------cut here---------------end--------------->8---

The pattern matching code is all generated at compile-time, and even
uses the `eq' to compare symbols, instead of the less specific `eql'
(!).

Yes, this might be a fundamental disagreement, but I still don't think
that using more abstract means to solve a problem is inherently wrong.
It might be a personal preference, but nothing we could derive a general
rule from -- which is fine.



^ permalink raw reply	[relevance 85%]

* Re: cond* vs pcase
  @ 2024-02-06 18:57 94%           ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-06 18:57 UTC (permalink / raw)
  To: Alfred M. Szmidt; +Cc: arthur.miller, emacs-devel

"Alfred M. Szmidt" <ams@gnu.org> writes:

>    > Because your not doing pattern matching, you're comparing against a
>    > set of strings/symbols/numbers/....
>
>    Simply because pattern matching is a more powerful generalisation,
>    capable of expressing case-distinction; in the end it compiles down to
>    almost the same code anyway.
>
> Are you suggesting that COND/CASE/... and other "trivial" matching
> constructs should be replaced with PCASE/COND*?

No, just that using pcase in these cases isn't wrong.

Drew Adams <drew.adams@oracle.com> writes:

>> Simply because [1] pattern matching is a more
>> powerful generalisation, capable of expressing
>> case-distinction; [2] in the end it compiles
>> down to almost the same code anyway.
>
> Wow.  Really _not_ a good reason (IMHO).
> Neither of those reasons [1,2] is good.
>
> With that reasoning you'll use `pcase'
> _always and everywhere_ - never `if',
> `cond', `let', `or', `and',...

Please don't be dishonest; My question was why cl-case was more
appropriate than pcase, where both are macros that boil down to simpler
primitives.  I don't see an inherent advantage to using the more
specific abstraction over the more generic one.  I like pcase, and
prefer using it in my code, but if you've got some code that is already
using a lot of cl-lib and no pcase, then there is no point in transiting
cl-case forms into pcase.

>
> Hey, `pcase' can do it all!  And it
> compiles down to almost the same thing!
>
> "Demain on rase gratis !"



^ permalink raw reply	[relevance 94%]

* Re: Elpa question: helping with maintainance of a package in Elpa
  @ 2024-02-06 17:24 99%     ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-06 17:24 UTC (permalink / raw)
  To: chad; +Cc: Arthur Miller, emacs-devel, Phillip Lord

chad <yandros@gmail.com> writes:

> On Tue, Feb 6, 2024 at 12:02 PM Philip Kaludercic <philipk@posteo.net>
> wrote:
>
>> > Do I understand the information in readme file from Elpa repository
>> correctly: I
>> > don't have to do anything special more than just update Phillips repo
>> for the
>> > package on GH, since the Cron job uses that URL to update the package
>> > automatically if the version is changed? Or do I need to do something
>> more to
>> > get the new version into Elpa too?
>>
>> The cron job will synchronise the mirror with the changes made on the GH
>> repository.  Just note that to release a package, you'll have to bump
>> the version tag (any commit changing the line with the version number
>> should do).
>>
>
> Note (mostly for future search results): "version tag" in this context
> means "the line
> in the file that looks something like ";; Version: 0.4", rather than
> anything having to
> do with git tags. (This sometimes confuses people who are/were familiar
> with, for
> example, Melpa Stable.)

Right, my bad, I should have said "Version" header or "Version"
attribute in the package header.

> Hope that helps,
> ~Chad



^ permalink raw reply	[relevance 99%]

* Re: Elpa question: helping with maintainance of a package in Elpa
  @ 2024-02-06 17:00 99% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-06 17:00 UTC (permalink / raw)
  To: Arthur Miller; +Cc: emacs-devel, Phillip Lord

Arthur Miller <arthur.miller@live.com> writes:

> I am helping Phillip to maintain his pabbrev package. He has given me write
> access to his repository on GH, and I was able to update the package with few
> patches It is currently just a "facelift" to skip compiler warnings when
> installing.
>
> Do I understand the information in readme file from Elpa repository correctly: I
> don't have to do anything special more than just update Phillips repo for the
> package on GH, since the Cron job uses that URL to update the package
> automatically if the version is changed? Or do I need to do something more to
> get the new version into Elpa too?

The cron job will synchronise the mirror with the changes made on the GH
repository.  Just note that to release a package, you'll have to bump
the version tag (any commit changing the line with the version number
should do).

> Since this is just a minor release; not new features, no changes in usability it
> does not have to have "announcement" on this list, or do you always announce?

No, package updates are usually never announced on emacs-devel.

> Thanks for the help in advance
> Best regards
> /arthur



^ permalink raw reply	[relevance 99%]

* Re: cond* vs pcase
  @ 2024-02-06 16:50 94%       ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-06 16:50 UTC (permalink / raw)
  To: Alfred M. Szmidt; +Cc: arthur.miller, emacs-devel

"Alfred M. Szmidt" <ams@gnu.org> writes:

>    "Alfred M. Szmidt" <ams@gnu.org> writes:
>
>    >    I use pcase often; but I use it just as a better cond. For example I find this
>    >    handy:
>    >
>    >    (defvar foo nil) <-- foo is some symbol
>    >
>    >    (pcase foo
>    >      ('bar (do-some-bar-stuff))
>    >      ('baz (do-some-baz-fluff)))
>    >
>    > cl-case seems more appropriate here (wish cl-case was just case ...)
>
>    Why more appropriate?
>
> Because your not doing pattern matching, you're comparing against a
> set of strings/symbols/numbers/....

Simply because pattern matching is a more powerful generalisation,
capable of expressing case-distinction; in the end it compiles down to
almost the same code anyway.

>    I always think of pcase as Elisp's case.  In
>    addition, pcase avoids the danger of naively writing 
>
>       (cl-case foo
> 	('bar (do-some-bar-stuff))
> 	('baz (do-some-baz-fluff)))
>
>    and then getting surprised when foo evaluates to `quote'.
>
> Suprises will happy, you will get suprises with pcase and cond* too --
> I find it suprising that to match over symbols requires pattern
> matching.  One might also question why you (well, no you specifically)
> are comparing against (quote bar) etc?  That is a suprise in it self...

I don't understand your point here.  If one expects the cases to be
evaluated, then quoting makes sense if you want to match a symbol.  It
is not true, but common enough that the byte compiler emits a warning.

>    >    or this:
>    >
>    >    (setq foo "some-string")
>    >
>    >    (pcase foo
>    >      ("foo" (do-foo-case))
>    >      ("bar" (do-bar-case)))
>    >
>    > Same here, with (intern foo) ...
>
>    Being able to do equal instead of eql is also something that speaks in
>    favour of pcase...
>
> It speaks more in favor of having CASE where you can change the
> comparison operator or a CASE-STRING or similar, not something much
> more generic pcase (or even cond*!) -- i.e. why use pcase/cond* when
> you're not using any of the features that are the main point of those
> two macros.

I am sorry, but I don't follow your point here either.  Is the general
claim, that one should only use whatever exactly and at most satisfies
the needs at hand?



^ permalink raw reply	[relevance 94%]

* Re: New package for NonGNU ELPA : totp-auth
  @ 2024-02-06 10:27 99%     ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-06 10:27 UTC (permalink / raw)
  To: Po Lu; +Cc: Vivek Das Mohapatra, emacs-devel

Po Lu <luangruo@yahoo.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Error!  Result from decryption:
>>
>> Decryption failed
>>
>> Decryption failed
>
> I can't decrypt this email, so would you please resend it _without_
> encryption?  Thanks in advance.

Uh, I don't know why this message was encrypted?  Thanks for the notice,
I'll try to resend it decrypted.



^ permalink raw reply	[relevance 99%]

* Re: [slime/slime] Merge changes from ELPA (PR #809)
       [not found]     ` <slime/slime/pull/809/c1929127567@github.com>
@ 2024-02-06 10:12 86%   ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-06 10:12 UTC (permalink / raw)
  To: Stas Boukarev; +Cc: slime/slime, slime/slime, Author

Stas Boukarev <notifications@github.com> writes:

> How does ELPA work that they a) can put random changes into their git
> b) can't remove them. 

ELPA periodically mirrors upstream repositories, but the mirrors can
diverge.  This is intentional, as sometimes we would like to make
changes to the upstream, when they are not responsive or the code has
been abandoned.  In this case my understanding is that the commit on the
elpa/slime branch was pushed by accident.

I haven't tried it out, but I could imagine that force-pushing to the
branch could be possible, but that would require destructively modifying
the commit history of a public repository/branch, which one would like
to avoid -- hence the suggestion in the other pull request to reconcile
the conflict without making such drastic moves.

>                       Why should it be recommended to users if it's
> not reliable?

Do you mean ELPA by "it"?  I would hesitate to say that this is an
indication of unreliability in general, it is just an issue that needs
resolving.  Do you have any technical objections to the changes proposed
here that we could work out?



^ permalink raw reply	[relevance 86%]

* Re: nongnu ELPA and slime
  @ 2024-02-06 10:07 99%     ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-06 10:07 UTC (permalink / raw)
  To: Colin Baxter; +Cc: Peter Hull, emacs-devel

Colin Baxter <m43cap@yandex.com> writes:

>>>>>> Philip Kaludercic <philipk@posteo.net> writes:
>
>     > Peter Hull <peterhull90@gmail.com> writes:
>     >> Hi,
>     >> 
>     >> Is this list the correct place to discuss nongnu ELPA?
>
>     > Sure.
>
>     >> I've come across a problem with the latest (2.29.1) SLIME package
>     >> when installed from ELPA. Basically the package appears to
>     >> install without problems but none of its functions are registered
>     >> so it cannot be activated. There is more discussion on
>     >> https://github.com/slime/slime/issues/808
>     >> 
>     >> What I believe is happening is that the slime-2.29.1.tar on ELPA
>     >> is being constructed without its hand-written slime-autoloads.el
>     >> file. At install time, an autoload file is generated which
>     >> doesn't work, because the relevant functions in SLIME are not
>     >> marked with autoload cookies. The release tarball on github does
>     >> have the autoloads file, as does slime-20240125.1336 from MELPA.
>
>     > Do you know why they don't mark their functions with autoload
>     > cookies?  Writing a manual autoload file is very unusual.
>
>     >> Unfortunately I've only ever been a user of emacs packages so I
>     >> don't understand how it all works. Is there a way to specify that
>     >> the slime-autoloads.el file needs to be included in the package,
>     >> or will the relevant bits of SLIME need to be annotated so the
>     >> generated file is functional?
>
>     > It would be imaginable to configure the ELPA build server to not
>     > overwrite the slime-autoloads.el file, but I'd first like to
>     > understand why they take this route in the first place.
>
>     > FWIW the quick fix for this issue is to add this to your init.el
>
>     > (autoload 'slime-mode "slime")
>
> (autoload 'slime-mode "slime") doesn't work for me.

It depends on what you do.  In my case I also have a hook configured in
my configuration (the next line in the snippet you quoted), which loads
up slime upon opening a lisp-mode buffer.

>
> I  need (require 'slime-autoloads) for slime from the git repository.

The point is that this is not available on NonGNU ELPA, because
elpa-admin.el is regenerating the file.

> Best wishes



^ permalink raw reply	[relevance 99%]

* Re: New package for NonGNU ELPA : totp-auth
  @ 2024-02-06 10:04 68% ` Philip Kaludercic
      1 sibling, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-06 10:04 UTC (permalink / raw)
  To: Vivek Das Mohapatra; +Cc: emacs-devel

[-- Attachment #1: Type: application/pgp-encrypted, Size: 11 bytes --]

[-- Attachment #2: Type: application/octet-stream, Size: 8673 bytes --]

-----BEGIN PGP MESSAGE-----

hQGMA8l9AV1fe8J4AQwAz/QMs0AwGZjXK465T/saRV5yPkV4DrUkJ2AIaUVHqdH+
sdQgZJQzeh/2YlVtn+KvE1rrnTSbrVsQOUY+NlmtVlHBoECS42Bg37YDuizod22Q
hD+k3oIRep+D68FvOQm6zgoQsVhzJANZ5lk+jV21bS2exyCcUZzxW+3Ga/Pu09zz
gFs5K0ZjBJ6OYdKYQwWWn4IQozR06kuDoTwvqJvz87Hify1To9qaugtQ5yMVsRXk
hBupIGiCsR2UFVUS16Caxz7du3CehtPYMFG3R2TppJITl8Fua+fSSvq/DEjs0aLL
zNYuKO3F4VwGGx7UasOD5oVCk/R65Jh7Omp+HcN/EtJGAZ9hHBWrFDocNTf3MFXw
rhGccoW2Uqsav0/IrdL8wB0OQSroiZCV3E21FmJ2439uwvW6oRF0LSYUl1bO0yuI
I/JOFH8240c/gln96Z/D/E66mcQ7xOPUz9VDgIUq+ImaYBcks1Yc3Es1Vk3Qzwtw
GSJD7ny2HacdziQW2vW60uwBwTUe7S/vYIcCpjSLbgHdDgTt++2SrXqPHrLoH8ON
qDliOiVjHUFIfo2l5a7dTOSW+DaB3FFjUHQB3dS7bPlRJXxRnagniqTSCEfPUzTS
QjwwlTBoXRauiXLgEGbz6OPvaQ9d69GySV8xVykomkDDBL3sd2YX+ZVAKOvlkiT9
D6RREOS/L2xGLWg6trVQ4fc1Sd7P1y93SiahNkLzDgomIm3qn8kNFXN1pSmdEBth
/ov8g7T+drToTrbCc+FRlKZIPonAjfFuTV0ucfovtbMxfBdeLwMwLKCBKUa/FQiu
MzLp9FtNtkZi5bfiQ1ZozQgu4YqLHT6S1UapspK9/mBKewyUaw17imOoEc/O54iu
1kGrUwShhILjePkvGTfUsUsRozx1Joj82zAbBkjA4Quy9zAw/gQyohSU8v9xexKd
uxAZTJuqtr16EfLslN+Rp/nkTmXo3afaZK8Tul9vyw0V07hGNWnaDMJQZR5q1dFg
2qRc/4bJKrUDZv/zl9PMW0cEdhMJOO8Hvg2DZNzytaDnEdcIGLUEfZEMGqjlV5Kk
0hRxZXM2o8vTfvG+9x0ZofAMTgOISLvvZr1yx+aN1Q59oY7FqVHrDF0iybkU6Dlc
YUlZNDuysh2IIBO46WqWqxtijVedvytKS10GeFGrtJM2yNgtULpb3fNfpt8VubZL
Mt6r/Nd+6HHtBZpasCjijCoCWPUFut4glprs65M1HJyp66GTKwWOlA64N8rhHPWT
Ytvb2flXoFQdh7UFjYuMTi03iizmzU/lXNmGDthzxCCZrm3uB1sKe1DIDhL05Llh
EmiBPMlyM/xUf+stNXADWfQisG8KVQz3O71pnojLbRkRVN9lK8m4gCbeDfsBxg1R
YaFWVD2ipqK+ldNR99+KSSsYhpeObSAPaoPqKazcm7qhmqymyPqNG8unPbDfrgft
OOJ7MnOc4ZkQqmqRN/SqgxN6QMBIv2795ee+SzBeO0DvHBd4U0ozAeW5MXD/2zWu
GgWxaNUECZKsWtLFEcix8VWu4S0vWIv4KB3kTn/FyWiJAPZzgGHFOUMp5IrWD7E3
G5IMiezLv805omSaCUAnEAwcGeZKPJ+xGFXz7SuQ0zwq990/w/UZqPxj6Jor/UhJ
BwqDI2wJQZQuD7tTq5PfwlEtdUeX426bxcn828PAbGNteC+vMG1Dlgq2T7294oqH
DShxh/EFdB6vybmczykUVqepNf0nQgaxpv3hrrOhYdEOD7cVLMaI7GX8Lcw97mEA
VAvGAbDPIFre35eAXLuVVtn6WEtmuUInilRd7ftm90SuBZraTc1mdJVPYDsAs/bF
vygnyk9Xb9rqiOGo0JZZydn8B7cscodT2uVWqIIMdrBhld17rD/y+pF/Dfjly3NF
XfBH25VzSQuezbBow8SfwiwvNr9DG9pCrE8jmrWgfjXeb7L+pZV5ln2UxbAEqx7k
8aLfL1DL0YZ93S1yZc2RlBMKv7qSrTIzIFj9g86gWUy6/jUJ5On9lul+Xe05GNt7
7uJIwr9yIWYEVw3r4zv7xBTDqkoDK7zbRPmNUg/8EXahaDEiE5NrQxSnUtD5szO+
d2dPmKqIzPkQLyVcHb7/RlLAXQiHvWBy/dVEexjXC+ebHBcVekBSBIYuaC8zkPc8
9vPKyIMFjwMU7qgDTAWUlfWYqx/v27I6J9Ca+CMpLIb1mXKSlhuIeZ0e8rYTMXIC
1t+uIy+Z1sAq8OGd6XjxIzzvqNcZPSinKDUI/kVD9VFUn+YBn/8YzmuSkzpM3D29
o0QTm9OOSsNmcehmILrN2zE13Vb9AAAB6NLPn0/kOSFMAWN8nCTdJ8pr/9rGNLp+
o99NHbss4a1UNPl/2oMEUjXF42MyP/iSkroEDgHC101f7ySL7fwpB4HPnLvejdr1
2WN5pfr9Ul2q57/y6qf2egpkzNJX0zG+sgRNvlcVfQ4+mY0ZGNW8nXeWGGo6kRtu
KDB5ZHVqpElVQ/6qmp07becEigrnJ+Ho3/nwc9K4sWDlvHe5UcZA4VPMto4PDeUG
xVcwW3vkgk4oUVxxqlj86PGJATEBAT2ll2UovCZFsN0fAS2wH3vlGr+D0NEZD1IN
vZOWhTzyNxd4hbAjtPEAtSS00aubnFoNkRmMprFosudBkrPcr3qyRzgqSUCIVcaD
mD5szJ/eO1tTJNJooEoj/N/p8/DLJVPMvKO+6OIthpPw2RBy8SUUlmsEfzDVBU4/
e9AXsOOPeoGKPIK7pVKqyfIz1qosWPpy3rEt84oO9ihySOLkthXvnhCRS/ajw/eS
Q/gTm4SWr5Dz0JEFDYXIvQ7Fnx65lam1zuDw5gDgejoFmUhrB7MncuklXT8laBw1
bTCVqNw+X+MPiGrNUL4xeoYlUjpF5/THQ63GJfDe4dT7HXlOjs7iScjo2yXoOckb
lvPE6jGDdIG6oMc8SjePVQsyH2QdHf6VC9u5xpxCEarg5UtLyjE+lYwneMq3PC9S
93ouyyegjBIkAkoA3mnS+0j3tiqJWV7//n2I7Dr6xo2MeHUwm4tnmjdo/dvLyUvp
ZGBK4VFn96z5HjrWpMScFW/fyaYZIIh9Cq6C7oYMH2apxcXaOcb0Dj6fTlMWG+pw
+oJD0TUyEWZ4CgvSZpLoQiZGVmtH477C1kzvuxK92gHbCNZgF04TvxlQMfvNocwc
DM5l7PFgiEh4IlCfpwnhiK2iU71t/YKy9t9TZFxKWkinKSr2s4RofETPxulwfPGW
44m/H99bJ6hIvcXIxQFaOCE3PipaZLYR16iUMrFGx4+MM9WiRnTorgVsEflD7usS
5u1BUEheQ6aK247YwCvi0P/OpjBO7Fj9ywfQFDzeaLiikFCoVAmpXlti/UH3tnNG
iNI2FAZoiC9Fr+MOU+mtUeRciHN9h3h7sCzySyTd47+ldBgOPCtbyB/bDaGnHirf
dJRwXtD0mS3ga4q3uXd/eAQ4hlsWPa1iz70RJhStFaMJ2crC9kxcsbtDLal16+/t
j+HwichgtA0LGXoeRSh6dgtF9XM5Q2WV8zCsYVND295TsDn/ACO5Lc1m0yHR/dn0
JoRf79m6Kt2w+N4QhC9FXTqmRd3w51UEBPLG777EoxtacK5nNrVK505pvCbS5ZTO
mYMIlOcyUM15CQUpcgfDX4XBJSwKhL3hu/pIQ8M5obYxCFmcd7KBRxQYZn0yDujJ
8lloiauSNDHcgFeUHo6d9V6NebEAL8a5554P1UOPQNG4LTjmkhaUeO5AwkzIEBEt
rnRkaxsqwKSgzryI1R9foBxFZfVTJT1yoCm2qXGoqcqc+OoLPx/2wuTtuL0UvAMa
2t1s28Wz9EEvNFW2WGnvqYJkEDlWCGhkCQL7KrwN/5zIgeZ/xLEHPO5sYDpv1oco
x7dKBnVoXB6JvujP40zd7EDiDKz0y6SAGzXD/nmA+PiI6c6I613TC8rZAMG9Ki+W
kPdmX+NZ4PX/hRIYTPC9ruHNRx35cGZVUwVqIl9sYop0Y9dD+USuLDF0OMIKbIFx
DPKbh3YCEvu5Xp/QdXlQ1Y5A4tKLWPcZmZ8Ge6qt4ueajLa+ra2OFvTX64AYcQdt
z9NNU/IfqKpN0baitP4jHCIl63pCig8ogWPyh7UuUcjyhyHWoKxRkAWkMWpc1spE
AdtG/sgeEVQlvMMwkDrbew6OB8jmSGHi/4oyLKjiBY2ulM0Pl4A6x1dLWItuRbHm
v+eQEx+pE2iXg0CMyhEKfzr4Mfdw4gaL2MXQsVbF4HfQO/A+K1Nrl5Syx4RAQPND
Gjp+RwUYW9WxVirWHDz5gyn8eE20SnlJYB5ao0t5OQDyXQetMeOeU/6XR0eOUCRV
eCpxuDwcWV4oQkIn53hinh1ZT2c/l80vHFm+nI73zHraXws+kjsIUxHuy4h1gQYW
vLLGurvwn4rUuTW5IhWz+T/SPywFExas/b27Z62WXtHkxqNiUGGQfdjwvQWXEh9M
S6f49EvDqGV10tG65a3SJlBanFq1cfnj0B0m2vGfcN6k1FH60S80gwkjCdH405/8
UAItxjIBW3Q4BDfoHm3gAjUoYRfkn3xTE3zUYqgG565Q5N3CDSP7eEqiHU9DvyRf
GXUAS7cLGtWylmqzIz/Sq8Z2xJT/ZnzwwLZwXj0cwgFHBwYvl6mZ/q/lG9DKb5ju
rAQsiUUwhpi5zar3I09+XJ+bivDNG/lncYfx8LcpnZ6ZTCCzx381WH2nxRp2Ez4Z
u0SqAd2d/6jrcD6T1oIb0aFvBF8jxfoA75dz5qPVN4AH7H7+Ckta6K7Tf6XZcpcu
W4V4tzBN/vxB4lhxm4EVP1BbbL4i8JiW7J1af9A6JHaa4uTsvqfGsGOeuFMsOEvT
qLoBUIX+KtP8qM41qc20EaBIotCmX8hyCCZXnrdhFxygHMaUgvkZyp+J2Q/neGSH
U4u+lSWab7t1r6/INaHMEiy/986mOOLDk6arxp+y9gJf0yoZmdLY/94+haPJV95J
116vdflItNjLHl1+93smGzE7qOngtG1FqgM48w/e+311NDe1997W0T/lmKmOAzOy
XQuC0qwGHi3eTNWUQzkHj/m9yRp6rHPw5E6Iqrscf0fKIX0Bt0cO3KPwqrS66m2L
OkHnBpG19Wti5DXIQJ1B1ADfYkO7L2CB//iA3oquTOV0wkwcmHBZmTH9h7rVa3YB
+BrkcqaHcc3Iht/m/+Y6yCwBSKGBNMHKSYlpDOl7Z9SkyI22Knxh7Qm541W5wwrM
TUtylORjctUCpGG6BMYmO5MgrHxpYgohRo5ypLHzWWombMYQxWtTLiUbZuRf0+Nz
W26m+0JReF3vILkYyRP5N1oKVAm9uQNA2cvHXpf6WAF/inJ5WtNAmGxIr9n46ruc
P5ksUWt3MvVsXNFANpo9SDpAN1+DWQ+WeCpScM8OigKMYZUnikrArjgZGfHzGYPk
SxzR6fA+ams0XFeEycAWP6ITe9Ov3H6bzpFwx1aMx3+L3s5+2xVgYZb92zUGCH0U
wAqP46btS7LGvsrlUUNMXi8MQE0CCim/eHraG0F4Xy0kiEF+ie6hKmqPGyOLZodM
m1udwAPQpsVUfVcUv6Bfavww8EbbQRI8NR2R5qECLbXLQ822xfpr9LTxfxwQdRY7
xHQznZeZWdtqdIDXN6hfBdqaVLkm5qlyUy884JQZ6Psogs9FcA6lM2KgDcJDG9t0
6qgfEKTAyvLN3Uy62uN9EzbFGq93JI/0RCBSiyQTwtzkhUrSJMZGSYT5qdIjct0A
wLJN9k1od1aVksgreHi7XF1Ug8YwRSsB0xQIGZ5VH3YqzuRVlHqtDkV7q434/htr
dBiaEUpGsanHzak9YzYevXFcuYabNXEywwDRF6s+vAI3xx8eSkbwYVS31aIcrkhG
Ya/SunxRNCXPzNDKEyQ/tzdPMzXtvjHc46hqMAeIApb113S0bRz8e6ME6KOeoXmK
ZHiu5X1u2aHLuYIN/HVkQwRhRoBPe1K9cvCBz2ibWyO06iRBrC98KuZKvDNugIkr
TMEmuLujzNEAlL8mZ+0cY0kJBCQ6eLXTTcilC5zKiBiVcjtpJZQtev7xbK3Zc+n6
n1HkA4KNMPQuQCmm5Qe5pIPYd36RY3zAycZs0zZS5Mn0Gi127mhyF2/VV85sQ80s
mJSNnntvqHrYT2SYK83UL6D1L4gP+7lRDaqqWp24nbOHfcf9cPo9Jjbcnvf8tf4A
BRY2CJwy4bbv8/eFg4elSFfRVSebgApl+aezZv/+CSiOLXKET5lA5tLbuQMugUt8
mCBlq6f1/Nt58CCg6XxnwhpM9kGa+1LPAdhReRc9ZGGmnYa4fjPz0zpNYok/Aq06
zeGSXijv/dqw7v/21vqBMzjv6sn8Ykj8bKHPgCzCLJH38vtOyWtthmGJxX93HuIQ
hWTwZ/6/EFvjRLqmAwA7cpEaxif07LxukFcrX6eHtjNH0SW/ciOKhxBLB5cs0y2s
B1l7gLrzeoKdvwu36geRKiOe+bwm4ZAq/GnsZuz1xB7B9RMcSBuM6ArhmcMB/MLw
yj6GlrWyyLllMFOrEkoY791zsDO64fn4KcqrpApie25kLtPfW+KJ2rn+jKkzePlZ
aPc6Kw5uzEixWuPeKTcB2bRCQvGSQD/JLgs+QgBTvYHaULUJv4octG8su/I8Agxg
do0+PDs8v7h6xiQp7a7S0edgtfMyKrVCmJoYnjlIJsDe016ezUbl8OyYNSJ6p3r2
Pd0VakKdPQxTdBQivuxWjmPDoHWfd7aLqTb0AX8KPDIImxTA5ITyTXzRXpsBm5g1
W2qqTFgb9G0eDlJcP3Vt6TSmkLfHnAYp3tBCmybL6wgQtITcuBpklx2bm0mIWiC2
RVL3VW4zXoIrVPBa1Z9RoSLWpnb61WpZHgth5dggWlJ5BPYT+NNEs4lAysJj25Wb
yu1rGGTJOp0ft4Q/MGaj2Q2Get/knaJinjvtfyPj2gyp20YBU4IXr8XdUasPoFuQ
+VrBT7d+fVPN3rK/gsAI5d+d332ZzW4SXi2vzbKDATzW5mjsyGDhcu20qFicxDq2
FWhsP865VMp9S9dVbnENAp/BW2xrzBQg0BtfQ+HuSr1TYVd/DYlhIOOw3DTugCZv
XqIbd+IE/DA9ZfjYz7XyvZe7wRXzliC/qJgnCURa2aozH2xzqG+mj1M6HjfUd4cc
dPHLcZFDU5S/Bqnq1CVwpnhzFJkdHaO5SF8Dfg6sKCXDFuCXspV4vNEfGB2IHdda
HIQTQpK6nYdI8oq+g9SVnq5DgAPlEbC57Tf/d1Ge4ugzCU8QWLZXEVayZ4VVfTne
gFyEeU2yvF4aN0wiVh5hFOFhJn20qtUcAfcLuSPyPE7WvldFSkDQQI0s7BE354W7
eODprXpqJOozeWxg7uFH2SSXf+ZnO1NhdxdSpzbJe+esGenYdZH0tbxJdQlvG4D0
Xfpp37ml6x4l92IeOCQlGn2rWseH+gH8WpuynyEu0WII9+K8UzKoB45g/3uIn0cP
NWnycvLX/rNfVWlE1OX0vI7bio3jKI7WqTFDqnYAsRf/B5+lnKWYuGK6F0PT4kcu
3hqLswDqy3YvJ7G/Zudv9RZvOg7Xldr5aFmx8Uwdwj1JtoWXMwfQqx8K/ELqOhLk
dWaD7NGIR0eGRpOu/aWPS9ci6rd1Rp488ygLJYJtX+m2nq6QtbGgrl5ExAwCiICy
gsqpXnlGpxtwTeQWFFM8hafktls2YCJQXzR9bCHWWxBYqH8Dvpq4VtDC1CgweZvr
QLO7ggFKYCAPwJ1oNCwRUD22oI2pY5D8TKAaot/kdppkklWjmR/3V2+XfYryw7lt
vMWKK0IzKmfCPL0yfWvW+uRPWdhQ/ZwFIpwT80EF/sBm3OsFnH0jUhEsjQCB2thX
scl/XgbHC+mlC1SobZx3X7gOiVfTESQytX8pZ4BNRN+qfkxm1mChV9R8AzqZDzYC
5iv4RW479fTNrrTR3StjULtzUevcw6xVX7d/c8ZtcfPBfBhNv+oO6C2jVKDcQZjY
1EhJLPkNQf+2w+LM0cYeyAjddidqvffXuT7A+pfHTvfBeKTAgTrAgOoqS+CgcFQo
wWPvi6l7ricXE+9Z6LxzfFLZ0alGIPpEZf1dY71y7CZL8thM0fblvt/zfilWgil4
epBms6zwHLRTnEeFNuaCQ2bBwxkIEEa6velGopyT+7eMFWrBibE06NisVL6pCqbT
lsvKx9bunCReMeSe/snD2Kmo0pIfXPaCnCoFNzz1gTbdnfOycjFDb2aQLYNHvtNX
YYUwXf0a4uAnXJ/1+IWcpL+8KCc5ujSl65cd75xp5uescCpNvgJR9gtOnlDfybG5
lf7acloW7mFzlFZQQTIODouh1L3aXukgL9gDiGHVqWxRuJkjArPalSlRmAnjgF7Y
ccrex7lBVvHsIGuaS5vKphUiZTCBk1V+ZsbmyjAyQq0xAMGBBM2DgYQCIzan++SG
P5HRSQMs/LJIX+lQVU5fvsBc7e702g==
=v43Z
-----END PGP MESSAGE-----

^ permalink raw reply	[relevance 68%]

* Re: Proposing new function for basic editing
  @ 2024-02-06  8:14 98% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-06  8:14 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: emacs-devel

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> Hi,
> I really don't know if this is useful for more people or it's just me. In
> the elisp I write, I have ended up more than once wrapping the point or the
> active region with two strings.

There are certainly some cases where less generic code like this was
written, e.g. in rcirc we have `rcirc-format'.

> I normally use a yasnippet for this, so I really don't use elisp ;-)
>
> But when I need this for a package, I end up replicating the following
> function where I need it:
>
> --- cut here ---
> (defun surround-region-or-point (before after &optional put-after)
>   "Insert `before' before mark or region,
> `after' after mark or region and
> put mark after `after' if `put-after' is not nil"
>   (if (use-region-p)
>       (with-restriction (region-beginning) (region-end)
>         ;; Insert `before' before region
>         (goto-char (point-min))
>         (insert before)
>         (goto-char (point-max))
>         ;; Insert `after' after region
>         (if put-after
>             (insert after) ; put point after inserted string
>           (save-excursion (insert after)))) ; put point after region

Can't you pull this code out of the if

>     (progn

... and then drop the progn?

>       (insert before)
>       (if put-after
>           (insert after) ; put point after both strings
>         (save-excursion (insert after)))))) ; put point between strings
> --- cut here ---

Also interesting, if you want to be generic, why not use an approach
like `isearch-forward-thing-at-point' and allow wrapping anything that
defines `bounds-of-thing-at-point'?

> I was wondering if it would make sense to have this in the emacs lisp
> library once and for good.
>
> Best, /PA



^ permalink raw reply	[relevance 98%]

* Re: nongnu ELPA and slime
  @ 2024-02-06  8:10 97% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-06  8:10 UTC (permalink / raw)
  To: Peter Hull; +Cc: emacs-devel

Peter Hull <peterhull90@gmail.com> writes:

> Hi,
>
> Is this list the correct place to discuss nongnu ELPA?

Sure.

> I've come across a problem with the latest (2.29.1) SLIME package when
> installed from ELPA. Basically the package appears to install without
> problems but none of its functions are registered so it cannot be
> activated. There is more discussion on
> https://github.com/slime/slime/issues/808
>
> What I believe is happening is that the slime-2.29.1.tar on ELPA is
> being constructed without its hand-written slime-autoloads.el file. At
> install time, an autoload file is generated which doesn't work,
> because the relevant functions in SLIME are not marked with autoload
> cookies. The release tarball on github does have the autoloads file,
> as does slime-20240125.1336 from MELPA.

Do you know why they don't mark their functions with autoload cookies?
Writing a manual autoload file is very unusual.

> Unfortunately I've only ever been a user of emacs packages so I don't
> understand how it all works. Is there a way to specify that the
> slime-autoloads.el file needs to be included in the package, or will
> the relevant bits of SLIME need to be annotated so the generated file
> is functional?

It would be imaginable to configure the ELPA build server to not
overwrite the slime-autoloads.el file, but I'd first like to understand
why they take this route in the first place.

FWIW the quick fix for this issue is to add this to your init.el

(autoload 'slime-mode "slime")
(add-hook 'lisp-mode-hook 'slime-mode)

> Thanks for your help,
>
> Peter



^ permalink raw reply	[relevance 97%]

* Re: discoverability, better defaults and which-key in Emacs
  @ 2024-02-05 18:47 97%           ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-05 18:47 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Po Lu, Jeremy Bryant, justin, Emacs Devel

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 05/02/2024 09:11, Philip Kaludercic wrote:
>> Dmitry Gutov <dmitry@gutov.dev> writes:
>> 
>>> On 03/02/2024 15:40, Philip Kaludercic wrote:
>>>> Po Lu<luangruo@yahoo.com>  writes:
>>>>
>>>>> Jeremy Bryant<jb@jeremybryant.net>  writes:
>>>>>
>>>>>> Here is a suggestion - include which-key in core and potentially enable
>>>>>> by for new users.
>>>>>>
>>>>>> I understand it is in ELPA already.
>>>>>>
>>>>>> Author Justin has expressed openness to the idea in
>>>>>> https://github.com/justbur/emacs-which-key/issues/355
>>>>> I don't think enabling it by default is all that desirable, since its
>>>>> popups are far more intrusive than keystrokes are when echoed, but
>>>>> moving it to core is a decent idea.
>>>> I second this concern, it also promotes the inefficient practice of
>>>> inspecting keymaps by waiting for the idle timer to be triggered.
>>>
>>> What if instead of having the help on a timer, the timer would add a
>>> small hint in the echo about how to invoke help (i.e. press C-h)?
>> I think that would be a significant improvement if it is to be
>> enabled
>> by default.  I don't have an issue with the presentation (though the
>> transient buffer is my preferred UX).
>
> Is "transient buffer" the same as what which-key uses? I think the
> 'transient' package uses similar display.

I don't know, what I meant with transient buffer is that it isn't
persistent, as is the case with C-h C-h where a new window pops up that
is no different than any other window and behaves consistently.
Transient buffers, in my experience, usually gobble up all key-presses
and re-implement their own "MVC" that can differ in subtle points.



^ permalink raw reply	[relevance 97%]

* Re: cond* vs pcase
  @ 2024-02-05 18:39 99%   ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-05 18:39 UTC (permalink / raw)
  To: Alfred M. Szmidt; +Cc: Arthur Miller, emacs-devel

"Alfred M. Szmidt" <ams@gnu.org> writes:

>    I use pcase often; but I use it just as a better cond. For example I find this
>    handy:
>
>    (defvar foo nil) <-- foo is some symbol
>
>    (pcase foo
>      ('bar (do-some-bar-stuff))
>      ('baz (do-some-baz-fluff)))
>
> cl-case seems more appropriate here (wish cl-case was just case ...)

Why more appropriate?  I always think of pcase as Elisp's case.  In
addition, pcase avoids the danger of naively writing 

   (cl-case foo
     ('bar (do-some-bar-stuff))
     ('baz (do-some-baz-fluff)))

and then getting surprised when foo evaluates to `quote'.

>    or this:
>
>    (setq foo "some-string")
>
>    (pcase foo
>      ("foo" (do-foo-case))
>      ("bar" (do-bar-case)))
>
> Same here, with (intern foo) ...

Being able to do equal instead of eql is also something that speaks in
favour of pcase...



^ permalink raw reply	[relevance 99%]

* Re: discoverability, better defaults and which-key in Emacs
  @ 2024-02-05  7:11 99%       ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-05  7:11 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Po Lu, Jeremy Bryant, justin, Emacs Devel

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 03/02/2024 15:40, Philip Kaludercic wrote:
>> Po Lu<luangruo@yahoo.com>  writes:
>> 
>>> Jeremy Bryant<jb@jeremybryant.net>  writes:
>>>
>>>> Here is a suggestion - include which-key in core and potentially enable
>>>> by for new users.
>>>>
>>>> I understand it is in ELPA already.
>>>>
>>>> Author Justin has expressed openness to the idea in
>>>> https://github.com/justbur/emacs-which-key/issues/355
>>> I don't think enabling it by default is all that desirable, since its
>>> popups are far more intrusive than keystrokes are when echoed, but
>>> moving it to core is a decent idea.
>> I second this concern, it also promotes the inefficient practice of
>> inspecting keymaps by waiting for the idle timer to be triggered.
>
> What if instead of having the help on a timer, the timer would add a
> small hint in the echo about how to invoke help (i.e. press C-h)?

I think that would be a significant improvement if it is to be enabled
by default.  I don't have an issue with the presentation (though the
transient buffer is my preferred UX).

> The interface for displaying help could be which-key (it seems to look
> pretty enough), or just the current 'C-h' help, depending on the
> settings.
>
> The result, though, is that everybody learns to press 'C-h' when they
> want to explore what the current prefix map contains and not just wait
> for the timer.



^ permalink raw reply	[relevance 99%]

* Re: Automatically saving package sources
  @ 2024-02-04 10:22 91% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-04 10:22 UTC (permalink / raw)
  To: sbaugh; +Cc: emacs-devel

sbaugh@catern.com writes:

> As an additional benefit, elpa-sources would be useful for reviewing
> changes in the source when upgrading packages.  It could be optionally
> maintained as a VCS repository, with packages saved to a constant path
> based on their name (e.g. elpa-sources/xref.el instead of
> elpa-sources/xref-1.2.3/xref.el).  Then a VCS could be used to review
> the diff resulting from an upgrade.  This would be useful for any user
> who wants to scrutinize package code changes before installing them.

This would partially overlap with the functionality provided by
package-vc.  It might be possible to re-use the functionality
wrt. building packages (e.g. building manuals, running extra commands),
that the ELPA build server takes care of when installing a package from
a tarball.

It might be, that all one needs would be to do a package-install-file?

Also, in the specific case of xref, you'd have the issue that xref.el is
maintained in emacs.git, and you cannot just checkout a subtree with
Git, so this would require tracking the entire Emacs repository,
presumably with individual checkouts for each core package you would
want to install, since the revisions one would be using wouldn't be the
same for all of them.

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 91%]

* Re: Request to include a couple of packages in GNU ELPA
    @ 2024-02-04  8:56 99%   ` Philip Kaludercic
  1 sibling, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-02-04  8:56 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Rahguzar, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > 1) consult-hoogle: https://codeberg.org/rahguzar/consult-hoogle
>   > It allows the use of hoogle search engine for haskell programming
>   > language from Emacs using the interfaces provided by consult package.
>
> I've never heard of hoogle.  What job does this do?
> How is hookle related to Haskell?

Hoogle (https://hoogle.haskell.org/) lets Haskell programmers search for
functions by giving their static types, among other queries.  So one
could look for the generic type "(a -> b) -> [a] -> [b]", and different
"map" functions, from both the standard library and third party packages.

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 99%]

* Re: discoverability, better defaults and which-key in Emacs
  @ 2024-02-03 13:40 99%   ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-02-03 13:40 UTC (permalink / raw)
  To: Po Lu; +Cc: Jeremy Bryant, justin, Emacs Devel

Po Lu <luangruo@yahoo.com> writes:

> Jeremy Bryant <jb@jeremybryant.net> writes:
>
>> Here is a suggestion - include which-key in core and potentially enable
>> by for new users.
>>
>> I understand it is in ELPA already.
>>
>> Author Justin has expressed openness to the idea in
>> https://github.com/justbur/emacs-which-key/issues/355
>
> I don't think enabling it by default is all that desirable, since its
> popups are far more intrusive than keystrokes are when echoed, but
> moving it to core is a decent idea.

I second this concern, it also promotes the inefficient practice of
inspecting keymaps by waiting for the idle timer to be triggered.



^ permalink raw reply	[relevance 99%]

* Re: [ELPA] New package: activities
  @ 2024-01-30  7:16 99%   ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-30  7:16 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-devel

Adam Porter <adam@alphapapa.net> writes:

> Hi Philip,
>
> Is there anything else I need to do before activities.el can be added
> to GNU ELPA?  The activities.info file is already in the .elpaignore
> file, which I think should cover your feedback.

Nothing, it's just the end of my semester, so I have slight difficulties
catching up to my non-uni backlog :)

Regardless, I've added your package specification, and it should appear
shortly on the archive.

> Thanks,
> Adam



^ permalink raw reply	[relevance 99%]

* Re: [ELPA] New package: activities
  @ 2024-01-29 13:03 99%                     ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-29 13:03 UTC (permalink / raw)
  To: Sergey Organov; +Cc: Eric S Fraga, emacs-devel

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

Sergey Organov <sorganov@gmail.com> writes:

> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>
>> On Saturday, 27 Jan 2024 at 19:14, Sergey Organov wrote:
>>> That's how I use Emacs as well, yet I've built a package based on
>>> deskstop.el and session.el a long time ago that I've called desksess.el,
>>> and I'm still using it.
>>
>> Interesting.  Are you able to share?
>
> Sure,
>
> https://drive.google.com/file/d/1U3TKybt8f7eiOGpyeoW_gFE8dDkFtASf/view?usp=sharing

I hope you don't mind me reposting the code here, because I know that
many here won't be able or willing to follow that link:


[-- Attachment #2: desksess.el --]
[-- Type: application/emacs-lisp, Size: 25563 bytes --]

^ permalink raw reply	[relevance 99%]

* Re: [ELPA] New package: activities
  @ 2024-01-26  7:33 99% ` Philip Kaludercic
    1 sibling, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-26  7:33 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-devel

Adam Porter <adam@alphapapa.net> writes:

> Hi,
>
> I'd like to add a new package to ELPA, activities.el.  It's hosted at:

Nice name ;)

>   https://github.com/alphapapa/activities.el

I don't have much to add on the code, just that if you are depending on
Emacs 29, you might be able to use `define-multisession-variable'
instead of having to depend on persist?

[...]

> + (activities           	:url "https://github.com/alphapapa/activities.el.git"
> +   :release-branch "stable"
> +   :doc "README.org")

There is no need to track the .info file in the repository, the build
server will generate that from :doc and overwrite it anyway.



^ permalink raw reply	[relevance 99%]

* Re: [PATCH] dictonary.el documentation
  @ 2024-01-23 17:14 99% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-23 17:14 UTC (permalink / raw)
  To: No Wayman; +Cc: emacs-devel

No Wayman <iarchivedmywholelife@gmail.com> writes:


[...]

> -(defun dictionary-read-definition (&ignore)
> +(defun dictionary-read-definition (_)

[...]

Is there any advantage to the one or the other approach?



^ permalink raw reply	[relevance 99%]

* Re: Package suggestion[nongnu]: Gnosis (γνῶσις)
  @ 2024-01-23  7:53 91%             ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-23  7:53 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: emacs-devel

Thanos Apollo <public@thanosapollo.org> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>
> [...]
>> If you want to, we can add the package right now as long as you add a
>> -git, -rc, -alpha suffix or any of the other pseudo-version strings
>> specified in `version-regexp-alist'.  That will instruct the ELPA build
>> server to not distribute the package on the main archive, until you bump
>> a release removing any "negative" version.  Then you don't have to wait
>> for someone to respond to your message again.
>
> This sounds ideal, I have pushed a 0.2.0-alpha version, which is the
> only tagged release available on <https://git.thanosapollo.org/gnosis>,
> to avoid unexpected issues.

ELPA doesn't use tags for releases, the version is determined by
checking the "Version" attribute in the package header (in your case it
is currently set to 0.0.1).  When this line is changed, a new release
will be triggered.

>
> Thank you,
>
> From 92c89f9bb3dd63fa3e81f22d34d6ab456e4eeb34 Mon Sep 17 00:00:00 2001
> From: Thanos Apollo <public@thanosapollo.org>
> Date: Tue, 23 Jan 2024 01:22:53 +0200
> Subject: [PATCH] * elpa-packages (gnosis): New package
>
> ---
>  elpa-packages | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/elpa-packages b/elpa-packages
> index 9032331c31..068ccb04c3 100644
> --- a/elpa-packages
> +++ b/elpa-packages
> @@ -282,6 +282,10 @@
>   (git-modes		:url "https://github.com/magit/git-modes"
>    :ignored-files ("LICENSE" ".mailmap"))
>  
> + (gnosis                :url "https://git.thanosapollo.org/gnosis"
> +  :doc "doc/gnosis.texi"

I notice that you have .texi and .info files in your repository.  IIUC
these are generated from the .org file, right?  If that is so, you can
get rid of the generated files and instead let the ELPA build server
prepare these from the .org file for you.

> +  :ignored-files ("LICENSE"))

It would be preferable, if you could track the files you wish not to
distribute in the package in a .elpaignore file within your repository,
that we don't need to update nongnu.git for any change.

> +
>   (gnu-apl-mode		:url "https://github.com/lokedhs/gnu-apl-mode"
>    ;; :doc "texi/gnu-apl-mode.texi" ; the manual is currently empty
>    :ignored-files ("Makefile"))
> -- 
> 2.43.0



^ permalink raw reply	[relevance 91%]

* Re: Possible minibuffer completion enhancements
  @ 2024-01-22 21:11 88%               ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-22 21:11 UTC (permalink / raw)
  To: Eshel Yaron; +Cc: Stefan Kangas, emacs-devel

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

Eshel Yaron <me@eshelyaron.com> writes:

> Eshel Yaron <me@eshelyaron.com> writes:
>
>> All right, I've created a new feature branch called
>> feature/minibuffer-completion-enhancements that you can find at:
>>
>> git clone -b feature/minibuffer-completion-enhancements https://git.sr.ht/~eshel/emacs
>>
>> I've also requested access to push this branch to emacs.git on Savannah,
>> so people won't need to fetch from another Git remote to test it.
>
> I've rebased the feature/minibuffer-completion-enhancements branch on
> top of the current master, and pushed it to emacs.git.  Looking forward
> for your thoughts and feedback!

I like the improvements, they are not invasive but useful.  C-o is
particularly nice.

One annoyance I had with `completions-auto-update-mode' was that it
didn't update the buffer on deleting a character.  This should fix it,
but perhaps it can be optimised further by using `after-change-functions'?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: pch.diff --]
[-- Type: text/x-diff, Size: 731 bytes --]

diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 0f503523817..6b949d67ec1 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -5804,12 +5804,12 @@ completions-auto-update-start-timer
 
 (defun completions-auto-update-setup ()
   "Prepare for updating *Completions* as you type in the minibuffer."
-  (add-hook 'post-self-insert-hook
+  (add-hook 'post-command-hook
             #'completions-auto-update-start-timer nil t))
 
 (defun completions-auto-update-exit ()
   "Stop updating *Completions* as you type in the minibuffer."
-  (remove-hook 'post-self-insert-hook
+  (remove-hook 'post-command-hook
                #'completions-auto-update-start-timer t))
 
 (define-minor-mode completions-auto-update-mode

^ permalink raw reply related	[relevance 88%]

* Re: Package suggestion[nongnu]: Gnosis (γνῶσις)
  @ 2024-01-22 17:59 98%         ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-01-22 17:59 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: emacs-devel

Thanos Apollo <public@thanosapollo.org> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Thanos Apollo <public@thanosapollo.org> writes:
>>
>>> Philip Kaludercic <philipk@posteo.net> writes:
>
> [...]
>
>>> Is there any alternative that it's recommended instead of emacsql for a
>>> package to interact with an sqlite databases? (Except triples)
>>
>> If you require at least Emacs 29, then you could fall back onto the
>> built-in SQLite support.
>>
>
> Thanks for the feedback, FYI I'm rewriting this with the built in
> sqlite & adding new features. Personally, I've found it much easier to
> work with the built in sqlite, since I can import items from other
> arbitrary databases that I've been using before.
>
> I'm also refactoring instances that use completing-read with
> read-multiple-choice.

Thanks.

> I will be contacting you when this package has a new stable version that
> is ready to be considered for inclusion in nongnu elpa.

If you want to, we can add the package right now as long as you add a
-git, -rc, -alpha suffix or any of the other pseudo-version strings
specified in `version-regexp-alist'.  That will instruct the ELPA build
server to not distribute the package on the main archive, until you bump
a release removing any "negative" version.  Then you don't have to wait
for someone to respond to your message again.



^ permalink raw reply	[relevance 98%]

* Re: Patch for ansi-osc.el
  @ 2024-01-22  7:21 99% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-22  7:21 UTC (permalink / raw)
  To: Brad Howes; +Cc: emacs-devel@gnu.org

Brad Howes <bradhowes@mac.com> writes:

> FYI,
>
> I filed a tiny patch for ansi-osc.el which applies `downcase` to the
> result of `(system-host)` in order to match the behavior obtained when
> parsing the URL extracted from the comint output.

It usually isn't necessary to announce a bug report on the development
mailing list, people read both.

> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68632
>
> Regards,
>
> Brad



^ permalink raw reply	[relevance 99%]

* Re: completing-read & emacsql
       [not found]     <871qacrubf.fsf@thanosapollo.org>
@ 2024-01-20 14:36 82% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-20 14:36 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: emacs-devel, Stefan Kangas

Thanos Apollo <public@thanosapollo.org> writes:

> Hello Philip,

You seemed to have dropped emacs-devel, so I added it again.

> Is using a defcustom like this a valiable solution, for completing-read
> interactions?
>
> (defcustom gnosis-completing-read-function
>   (cond ((or (and (featurep 'vertico)
> 		  vertico-mode)
> 	     (and (featurep 'helm)
> 		  helm-mode))
> 	 'completing-read)
>         ((and (featurep 'ivy)
> 	      ivy-mode)
> 	 'ivy-completing-read)
>         (t 'ido-completing-read))
>   "Preferred `completing-read' function to use.
>
> Defaults to Vertico, Ivy or Helm if available and enabled,
> otherwise defaults to `ido-completing-read'."
>   :type 'function
>   :group 'gnosis)

I wouldn't say so, at least for people like me who want to avoid visual
noise (as Emacs does by default), all of the above are wrong.  I /want/
to use the default completion interface.

There is sadly a common mistake, in believing that `completing-read'
provides an interface for selecting strings, while the default interface
distinguishes between expansion of partial input and selecting from a
list of completion options.  To me, that is the reason why

  (completing-read "Select: " '(foo bar baz))

returns a string, and not a symbol.  The interface is reading textual
input while providing completion -- which by default doesn't have to be
any of the completion options!

There is no canonical interface I know of to select an s-expression from
a collection, but perhaps there should be, to avoid the need of misusing
`completing-read'.

>
> AFAIK ido-completing-read is built-in with Emacs, this should make the
> user intractions with gnosis more convenient with the default emacs
> behavior.
>
>
> Where can I look for the discussions that took place for emacsql
> inclusion in nongnu ELPA? I can see a github issue on emacsql repo, but
> searching for "Jonas Bernoulli emacsql" on the emacs-devel archive
> doesn't return anything.

Stefan Kangas (CC'ed) added the packages a little over a year ago,
perhaps he remembers?

> I could use the built-in sqlite implementation, but it would mean that I
> (might) have to change much of the current values of my current database
> or at least how they are outputted.
>
> If you were developing a package that was already built using emacsql,
> would you consider it worth the work to change it to the built in sqlite?

I don't know what the current emacsql situation is, so it would be worth
looking into to resolve why the package is currently only on -devel, at
least before you start rewriting stuff.



^ permalink raw reply	[relevance 82%]

* Re: Package suggestion[nongnu]: Gnosis (γνῶσις)
  @ 2024-01-20 12:20 98%     ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-01-20 12:20 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: emacs-devel

Thanos Apollo <public@thanosapollo.org> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>>
>> Here area few comments in form of a diff (this is NOT a patch):
>
> [...]
>
> Thank you for your suggestions, they've been really helpful.
>
> I got confused and thought emacsql was included in nongnu elpa, but it's only
> available only in nongnu-devel.

You are right, that is peculiar.  One should see what is holding back
the release.

> Is there any alternative that it's recommended instead of emacsql for a
> package to interact with an sqlite databases? (Except triples)

If you require at least Emacs 29, then you could fall back onto the
built-in SQLite support.

> I've refactored a couple important parts of gnosis to take into an
> account future extensibility, even by 3rd party packages. Example:
>
> (defvar gnosis-note-types '(MCQ Cloze Basic Double y-or-n)
>   "Gnosis available note types.")
>   
> (defun gnosis-add-note (type)
>   "Create note(s) as TYPE interactively."
>   (interactive (list (completing-read "Type: " gnosis-note-types nil t)))
>   (when gnosis-testing
>     (unless (y-or-n-p "You are using a testing environment! Continue?")
>       (error "Aborted")))
>   (let ((func-name (intern (format "gnosis-add-note-%s" (downcase type)))))

Perhaps using `intern-soft' would be better here.

>     (if (fboundp func-name)
>         (funcall func-name)
>       (message "No such type."))))
>       
> (defun gnosis-review-note (id)
>   "Start review for note with value of id ID."
>   (when (gnosis-suspended-p id)
>     (message "Suspended note with id: %s" id)
>     (sit-for 0.3)) ;; this should only occur in testing/dev cases
>   (let* ((type (gnosis-get 'type 'notes `(= id ,id)))
>          (func-name (intern (format "gnosis-review-%s" (downcase type)))))
>     (if (fboundp func-name)
>         (progn
>           (with-current-buffer (switch-to-buffer (get-buffer-create "*gnosis*"))

You don't need `switch-to-buffer' if you are using `with-current-buffer'.

>             (gnosis-mode)
>             (funcall func-name id)))
>       (error "Malformed note type: '%s'" type))))
>
> Adding new note types should be a trivial task now.
>
> I hadn't really used emacs without vertico and was unaware of how
> different completing-read user interactions actually are. I will be
> making adjustments for that wherever possible.

I use Emacs that way, so if you have any questions I'd be glad to
clarify usage patterns and annoyances.



^ permalink raw reply	[relevance 98%]

* Re: Package suggestion[nongnu]: Gnosis (γνῶσις)
  @ 2024-01-18 19:42 19% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-01-18 19:42 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: emacs-devel

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

Thanos Apollo <public@thanosapollo.org> writes:

> Gnosis (γνῶσις), pronounced "noh-sis", meaning knowledge in Greek, is
> a [Spaced Repetition](https://en.wikipedia.org/wiki/Spaced_repetition)
> implementation for GNU Emacs.
>
> Gnosis does not implement flashcard type review sessions where the
> user rates his own answer on an arbitrary scale. Instead implements
> "note" types that require user input. Some of these note types, like
> the `MCQ`, multiple choice question, even allow for simulating
> real-life exams.
>
> Unlike other SRS implementations for GNU Emacs, gnosis does not rely on
> `org-mode`, which I've found not to be an ideal option for a database
> replacement. Instead opting for an sqlite database with git to track
> any changes made, enabling efficient data management, manipulation and
> data integrity.
>
> You can read more on my blog post here:
>   <https://thanosapollo.org/blog/gnosis-release/>
>
> This is a personal project of my mine that I made during my winter
> holidays, I have found it to be highly beneficial for my use case and,
> as a result, I decided to share it with all of you for anyone that's
> interested.
>
> Direct link to gnosis repo:
>   <https://git.thanosapollo.org/gnosis/>
>
>
> Any feedback would be appreciated, since I'm far from a programmer and
> relatively new to the GNU Emacs ecosystem.
>
> Thank you,

Here area few comments in form of a diff (this is NOT a patch):


[-- Attachment #2: Type: text/plain, Size: 19688 bytes --]

diff --git a/gnosis.el b/gnosis.el
index 7ddeb30..87e1cee 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -9,6 +9,8 @@
 
 ;; Package-Requires: ((emacs "27.2") (compat "29.1.4.2") (emacsql "20230228"))
 
+;; There is no package "emacsql" on GNU or NonGNU ELPA!
+
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation, either version 3 of the License, or
@@ -29,13 +31,13 @@
 ;; for GNU Emacs.
 ;;
 ;; Gnosis does not implement flashcard type review sessions where the
-;; user rates his own answer on an arbitrary scale. Instead implements
-;; "note" types that require user input. Some of these note types, like
+;; user rates his own answer on an arbitrary scale.  Instead implements
+;; "note" types that require user input.  Some of these note types, like
 ;; the MCQ, multiple choice question, even allow for simulating
 ;; real-life exams.
 ;; 
 ;; Unlike other SRS implementations for GNU Emacs, gnosis not rely on
-;; org-mode. Instead utilizes an sqlite database & git, enabling
+;; org-mode.  Instead utilizes an sqlite database & git, enabling
 ;; efficient data management, manipulation and data integrity.
 
 ;;; Code:
@@ -51,7 +53,7 @@
   :group 'external
   :prefix "gnosis-")
 
-(defcustom gnosis-dir (concat user-emacs-directory "gnosis")
+(defcustom gnosis-dir (locate-user-emacs-file "gnosis")
   "Gnosis directory."
   :type 'directory
   :group 'gnosis)
@@ -62,13 +64,13 @@
   :group 'gnosis)
 
 
-(defvar gnosis-images-dir (concat (file-name-as-directory gnosis-dir) "images")
+(defvar gnosis-images-dir (expand-file-name "images" gnosis-dir)
   "Gnosis images directory.")
 
 (defconst gnosis-db
   (if (not (file-directory-p gnosis-dir))
       (gnosis-db-init)
-    (emacsql-sqlite (concat (file-name-as-directory gnosis-dir) "gnosis.db")))
+    (emacsql-sqlite (expand-file-name "gnosis.db" gnosis-dir)))
   "Gnosis database file.")
 
 (defvar gnosis-testing nil
@@ -136,8 +138,6 @@
   "Face for next review."
   :group 'gnosis-face)
 
-
-
 (cl-defun gnosis-select (value table &optional (restrictions '1=1))
   "Select VALUE from TABLE, optionally with RESTRICTIONS.
 
@@ -264,7 +264,7 @@ SUCCESS is t when user-input is correct, else nil"
   "Replace CLOZE-CHAR with REPLACE.
 
 If FACE nil, propertize replace using `gnosis-face-correct', or
-`gnosis-face-false' when (not SUCCESS). Else use FACE value."
+`gnosis-face-false' when (not SUCCESS).  Else use FACE value."
    (goto-char (point-min))
    (search-forward cloze-char nil t)
    (replace-match (propertize replace 'face (if (not face)
@@ -329,6 +329,8 @@ Set DOWNCASE to t to downcase all input given.
 Set SPLIT to t to split all input given."
   (cl-loop with input = nil
            for response = (read-string (concat prompt " (q for quit): "))
+	   ;; Are you sure you don't want to use `read-char' here?  Or
+	   ;; `completing-read-multiple'
 	   do (if downcase (setf response (downcase response)))
            for response-parts = (if split (split-string response " ") (list response))
            if (member "q" response-parts) return (nreverse input)
@@ -397,6 +399,9 @@ When called with a prefix, unsuspends all notes for tag."
   "Suspend note(s) with specified values."
   (interactive)
   (let ((item (completing-read "Suspend by: " '("Deck" "Tag"))))
+    ;; Why use completing prompt for a two-choice option?  I think
+    ;; `yes-or-no-p' or `read-multiple-choice' would be more adequate
+    ;; and would require less custom logic.
     (pcase item
       ("Deck" (gnosis-suspend-deck))
       ("Tag" (gnosis-suspend-tag))
@@ -444,8 +449,8 @@ NOTE: If a gnosis--insert-into fails, the whole transaction will be
 
 MCQ type consists of a main `QUESTION' that is displayed to the user.
 The user will be prompted to select the correct answer from a list of
-`CHOICES'. The `CORRECT-ANSWER' should be the index of the correct
-choice in the `CHOICES' list. Each note must correspond to one `DECK'.
+`CHOICES'.  The `CORRECT-ANSWER' should be the index of the correct
+choice in the `CHOICES' list.  Each note must correspond to one `DECK'.
 
 `IMAGE' Image to display before user-input
 `SECOND-IMAGE' Image to display after user-input
@@ -470,6 +475,8 @@ TAGS: Used to organize notes
 
 Refer to `gnosis-add-note--mcq' for more."
   (let ((deck (gnosis--get-deck-name)))
+    ;; Prefer `yes-or-no-p', and let the user decide what to use with
+    ;; `use-short-answers'.
     (while (y-or-n-p (format "Add note of type `MCQ' to `%s' deck? " deck))
       (gnosis-add-note--mcq :deck deck
 			    :question (read-string "Question: ")
@@ -590,7 +597,7 @@ Example:
       {c2:Staphylococcus aureus} causes {c3:rapid} onset
       food poisoning
 
-Generates 3 cloze note types. Where the \"main\" part of the note is the full
+Generates 3 cloze note types.  Where the \"main\" part of the note is the full
 note, with the cloze(s) extracted & used as the \"answer\".
 
 One cloze note may have multiple clozes
@@ -632,7 +639,7 @@ Example:
       {c2:Staphylococcus aureus} causes {c3:rapid} onset
       food poisoning
 
-Generates 3 cloze note types. Where the \"main\" part of the note is
+Generates 3 cloze note types.  Where the \"main\" part of the note is
 the full note, with the cloze(s) extracted & used as the \"answer\".
 
 See `gnosis-add-note--cloze' for more reference."
@@ -651,6 +658,9 @@ See `gnosis-add-note--cloze' for more reference."
   (when gnosis-testing
     (unless (y-or-n-p "You are using a testing environment! Continue?")
       (error "Aborted")))
+  ;; would it make more sense to invert the control-logic using
+  ;; generic functions.  That would make it easier to extend the
+  ;; package from outside as well.
   (pcase type
     ("MCQ" (gnosis-add-note-mcq))
     ("Cloze" (gnosis-add-note-cloze))
@@ -708,6 +718,7 @@ Valid cloze formats include:
   "Compare STR1 and STR2.
 
 Compare 2 strings, ignoring case and whitespace."
+  ;; see also `string-equal-ignore-case'
   (string= (downcase (replace-regexp-in-string "\\s-" "" str1))
 	   (downcase (replace-regexp-in-string "\\s-" "" str2))))
 
@@ -718,7 +729,7 @@ DIR is the base directory path from which to start the recursive search.
 REGEX is the regular expression pattern to match the file names against.
 
 This function traverses the subdirectories of DIR recursively,
-collecting file paths that match the regular expression. The file
+collecting file paths that match the regular expression.  The file
 paths are returned as a list of strings, with each string representing
 a relative file path to DIR.
 
@@ -758,9 +769,7 @@ Optionally, add cusotm PROMPT."
 
 (defun gnosis-suspended-p (id)
   "Return t if note with ID is suspended."
-  (if (= (gnosis-get 'suspend 'review-log `(= id ,id)) 1)
-      t
-    nil))
+  (= (gnosis-get 'suspend 'review-log `(= id ,id)) 1))
 
 (defun gnosis-get-deck-due-notes (&optional deck-id)
   "Return due notes for deck, with value of DECK-ID.
@@ -788,7 +797,7 @@ DATE is a list of the form (year month day)."
      (cl-mapcan (lambda (note-id)
                   (gnosis-get-note-tags note-id))
 	        due-notes)
-     :test 'equal)))
+     :test #'equal)))
 
 
 (cl-defun gnosis-tag-prompt (&key (prompt "Selected tags") (match nil) (due nil))
@@ -816,15 +825,13 @@ Returns a list of unique tags."
   "Check if note with value of NOTE-ID for id is due for review.
 
 Check if it's suspended, and if it's due today."
-  (if (and (not (gnosis-suspended-p note-id))
-	   (gnosis-review-is-due-today-p note-id))
-      t
-    nil))
+  (and (not (gnosis-suspended-p note-id))
+       (gnosis-review-is-due-today-p note-id)))
 
 (defun gnosis-review-is-due-today-p (id)
   "Return t if note with ID is due today.
 
-This function ignores if note is suspended. Refer to
+This function ignores if note is suspended.  Refer to
 `gnosis-review-is-due-p' if you need to check for suspended value as
 well."
   (let ((next-rev (gnosis-get 'next-rev 'review-log `(= id ,id))))
@@ -867,7 +874,7 @@ Returns a list of the form ((yyyy mm dd) ef)."
      (cl-mapcan (lambda (note-id)
                   (gnosis-get-note-tags note-id))
 	        due-notes)
-     :test 'equal)))
+     :test #'equal)))
 
 (defun gnosis-review--get-offset (id)
   "Return offset for note with value of id ID."
@@ -879,7 +886,7 @@ Returns a list of the form ((yyyy mm dd) ef)."
 
 This function is used to round floating point numbers to 1 decimal,
 such as the easiness factor (ef)."
-  (/ (round (* num 100.00)) 100.00))
+  (/ (round (* num 100.00)) 100.00))	;doesn't this leave two decimals?
 
 (defun gnosis-review-new-ef (id success)
   "Return new ef for note with value of id ID.
@@ -917,8 +924,9 @@ SUCCESS is a binary value, 1 is for successful review."
 	   (answer (nth (- (gnosis-get 'answer 'notes `(= id ,id)) 1) choices))
 	   (user-choice (gnosis-mcq-answer id)))
       (if (string= answer user-choice)
-          (progn (gnosis-review--update id 1)
-		 (message "Correct!"))
+          (progn
+	    (gnosis-review--update id 1)
+	    (message "Correct!"))
 	(gnosis-review--update id 0)
 	(message "False"))
       (gnosis-display-correct-answer-mcq answer user-choice)
@@ -1014,17 +1022,18 @@ Used to reveal all clozes left with `gnosis-face-cloze-unanswered' face."
   "Commit review session on git repository.
 
 This function initializes the `gnosis-dir' as a Git repository if it is not
-already one. It then adds the gnosis.db file to the repository and commits
+already one.  It then adds the gnosis.db file to the repository and commits
 the changes with a message containing the reviewed number of notes.
 
 NOTE-NUM: The number of notes reviewed in the session."
-  (let ((git (executable-find "git"))
+  (let ((git (executable-find "git"))	;consider using `vc-git'
 	(default-directory gnosis-dir))
     (unless git
       (error "Git not found, please install git"))
     (unless (file-exists-p (concat (file-name-as-directory gnosis-dir) ".git"))
       (shell-command "git init"))
     (sit-for 0.2) ;; wait for shell command to finish
+    ;; `shell-command' is blocking anyway, so you don't need to wait
     (shell-command (concat git " add " (shell-quote-argument "gnosis.db")))
     (shell-command (concat git " commit -m "
 			   (shell-quote-argument (concat (format "Total notes for session: %d " note-num)))))
@@ -1039,13 +1048,20 @@ NOTE-NUM: The number of notes reviewed in the session."
 	(cl-loop for note in notes
 		 do (gnosis-review-note note)
 		 (setf note-count (1+ note-count))
-		 (pcase (read-char-choice "Note Action: [n]ext, [s]uspend, [e]dit, [q]uit: " '(?n ?s ?e ?q))
+		 (pcase (car (read-multiple-choice
+			      "Note actions"
+			      '((?n "next")
+				(?s "suspend")
+				(?e "edit")
+				(?q "quit"))))
 		   (?n nil)
 		   (?s (gnosis-suspend-note note))
-		   (?e (progn (gnosis-edit-note note)
-			      (recursive-edit)))
-		   (?q (progn (gnosis-review-commit note-count)
-			      (cl-return))))
+		   (?e
+		    (gnosis-edit-note note)
+		    (recursive-edit))
+		   (?q
+		    (gnosis-review-commit note-count)
+		    (cl-return)))
 		 finally (gnosis-review-commit note-count))))))
 
 
@@ -1065,6 +1081,7 @@ NOTE-NUM: The number of notes reviewed in the session."
 			   ("Total" 2)
 			   ("Decrease" 1)
 			   ("Increase" 0)))
+	;; Thy does this have to be a float?  Why not use `read-number'?
 	(new-value (float (string-to-number (read-string "New value: ")))))
     ;; error checking.
     (cond ((>= 0 new-value) (error "New value needs to be a number & higher than `0'"))
@@ -1079,7 +1096,7 @@ NOTE-NUM: The number of notes reviewed in the session."
   "Edit the contents of a note with the given ID.
 
 This function creates an Emacs Lisp buffer named *gnosis-edit* and populates it
-with the values of the note identified by the specified ID. The note values are
+with the values of the note identified by the specified ID.  The note values are
 inserted as keywords for the `gnosis-edit-update-note' function.
 
 To make changes, edit the values in the buffer, and then evaluate the
@@ -1109,6 +1126,9 @@ changes."
     (with-current-buffer (switch-to-buffer (get-buffer-create "*gnosis-edit*"))
       (gnosis-edit-mode)
       (erase-buffer)
+      ;; I feel it would be better to construct an s-expression and
+      ;; then transform it into a string using `pp-to-string' or some
+      ;; function like that.
       (insert ";;\n;; You are editing a gnosis note. DO NOT change the value of id.\n\n")
       (insert "(gnosis-edit-update-note ")
       (cl-loop for (field value) in `((id ,id)
@@ -1119,7 +1139,7 @@ changes."
 				      (extra-notes ,extra-notes)
 				      (image ,image)
 				      (second-image ,second-image))
-	       do (cond ((equal field 'id)
+	       do (cond ((eq field 'id)
 			 (insert (format (concat ":%s " (propertize "%s" 'read-only t) "\n") field value)))
 			((numberp value)
 			 (insert (format ":%s %s\n" field value)))
@@ -1127,7 +1147,7 @@ changes."
 			      (not (equal value nil)))
 			 (insert (format ":%s '%s\n" field (format "%s" (cl-loop for item in value
 										 collect (format "\"%s\"" item))))))
-			((equal value nil)
+			((nul value)
 			 (insert (format ":%s %s\n" field 'nil)))
 			(t (insert (format ":%s \"%s\"\n" field value)))))
       (delete-char -1) ;; delete extra line
@@ -1148,11 +1168,8 @@ changes."
 
 (define-derived-mode gnosis-edit-mode emacs-lisp-mode "Gnosis EDIT"
   "Gnosis Edit Mode."
-  :interactive t
-  :lighter " gnosis-edit-mode"
-  :keymap gnosis-edit-mode-map)
-
-
+  :lighter " gnosis-edit-mode")		;this is a rather long lighter...
+  
 (cl-defun gnosis-edit-update-note (&key id main options answer tags (extra-notes nil) (image nil) (second-image nil))
   "Update note with id value of ID.
 
@@ -1175,7 +1192,7 @@ SECOND-IMAGE: Image to display after user-input"
              (image . ,image)
              (second-image . ,second-image))
            when value
-           do (cond ((member field '(extra-notes image second-image))
+           do (cond ((memq field '(extra-notes image second-image))
 		     (gnosis-update 'extras `(= ,field ,value) `(= id ,id)))
 		    ((listp value)
 		     (gnosis-update 'notes `(= ,field ',value) `(= id ,id)))
@@ -1191,13 +1208,13 @@ SECOND-IMAGE: Image to display after user-input"
 ID: Identifier of the note to export.
 
 This function retrieves the fields of a note with the given ID and
-inserts them into the current buffer. Each field is represented as a
-property list entry. The following fields are exported: type, main,
+inserts them into the current buffer.  Each field is represented as a
+property list entry.  The following fields are exported: type, main,
 options, answer, tags, extra-notes, image, and second-image.
 
 The exported fields are formatted as key-value pairs with a colon,
-e.g., :field value. The fields are inserted sequentially into the
-buffer. For certain field values, like lists or nil, special
+e.g., :field value.  The fields are inserted sequentially into the
+buffer.  For certain field values, like lists or nil, special
 formatting is applied.
 
 If the value is a list, the elements are formatted as strings and
@@ -1249,11 +1266,11 @@ It then retrieves all the notes associated with the deck and exports
 them.
 
 The exported notes are formatted as an Emacs Lisp code block that can
-be evaluated to recreate the deck with its associated notes. The
+be evaluated to recreate the deck with its associated notes.  The
 resulting code is saved to a file with the provided FILENAME and a
 '.el' extension is added automatically.
 
-Each note is exported using the `gnosis-export-note` function. The
+Each note is exported using the `gnosis-export-note` function.  The
 generated code includes a call to `gnosis-define-deck` with the deck
 name and all notes formatted as nested lists"
   (interactive (list (read-string "Filename: ")))
@@ -1271,27 +1288,27 @@ name and all notes formatted as nested lists"
   "Define DECK consisting of NOTES, optionally add them as SUSPENDED.
 
 The `gnosis-define-deck` function adds a new deck with the specified
-name to `gnosis-db'. It also adds each note from the given list
-of `notes` to the deck. The function takes three optional arguments:
+name to `gnosis-db'.  It also adds each note from the given list
+of `notes` to the deck.  The function takes three optional arguments:
 `deck`, `notes`, and `suspended`.
 
-- `deck`: The name of the deck to be added. It should be provided as a
+- `deck`: The name of the deck to be added.  It should be provided as a
           symbol.
 
-- `notes`: A list containing the notes to be added to the deck. Each
+- `notes`: A list containing the notes to be added to the deck.  Each
            note should be represented as a property list with the
            following keys: `:type`, `:main`, `:options`, `:answer`
 
 - extras include :`:extra-notes`, `:tags`, `:image`, and `:second-image`.
 
 - `suspended`: An optional argument specifying whether the deck should
-               be created in a suspended state. A non-zero value
+               be created in a suspended state.  A non-zero value
                suspends the deck, while a value of 0 (default) creates
                the deck in an active state.
 
 When calling `gnosis-define-deck`, the deck is added to the Gnosis
-system by calling `gnosis-add-deck`. Each note is added to the deck
-using `gnosis-add-note-fields`. The function iterates over the list of
+system by calling `gnosis-add-deck`.  Each note is added to the deck
+using `gnosis-add-note-fields`.  The function iterates over the list of
 `notes` and extracts the necessary fields from each note's property
 list before adding them to the deck.
 
@@ -1300,6 +1317,10 @@ associated notes in `gnosis-db', ready for further processing or
 review."
   (gnosis-add-deck (symbol-name deck))
   (sit-for 0.1) ;; wait for low-spec computers to create deck
+
+  ;; I am not sure what is going on, but `sit-for' is not a robust way
+  ;; to handle asynchronous processes.  If everything is synchronous,
+  ;; there is no reason to block.
   (cl-loop for note in notes
 	   do (gnosis-add-note-fields (symbol-name deck)
 				      (plist-get note :type)
@@ -1318,6 +1339,11 @@ review."
   "Start gnosis review session."
   (interactive)
   (gnosis-db-init)
+  ;; There are a lot of string constants here that are being
+  ;; duplicated.  And as mentioned before, `completing-read' does not
+  ;; appear to be the best interface.  Keep in mind that not everyone
+  ;; uses a selecting interface like icomplete or vertico, where this
+  ;; kind of UI is pretty awkward.
   (let ((review-type (completing-read "Review: " '("Due notes"
 						   "Due notes of deck"
 						   "Due notes of specified tag(s)"
@@ -1377,7 +1403,7 @@ review."
     ;; Make sure gnosis-db is initialized
     (setf gnosis-db (emacsql-sqlite (concat (file-name-as-directory gnosis-dir) "gnosis.db"))))
   ;; Create database tables
-  (unless (= (length (emacsql gnosis-db [:select name :from sqlite-master :where (= type table)])) 6)
+  (unless (length= (emacsql gnosis-db [:select name :from sqlite-master :where (= type table)]) 6)
     ;; Enable foreign keys
     (emacsql gnosis-db "PRAGMA foreign_keys = ON")
     ;; Gnosis version
@@ -1397,12 +1423,10 @@ review."
 ;;;;;;;;;;;;;;;;;
 
 (define-derived-mode gnosis-mode special-mode "Gnosis"
-  "Gnosis Mode."
-  :interactive t
+  "Gnosis Mode."			;this could be extended
+  :lighter " gnosis-mode"
   (read-only-mode 0)
-  (display-line-numbers-mode 0)
-  :lighter " gnosis-mode")
-
+  (display-line-numbers-mode 0))
 
 (provide 'gnosis)
 ;;; gnosis.el ends here

^ permalink raw reply related	[relevance 19%]

* Re: [ELPA] New package: jami-bot and org-jami-bot
  @ 2024-01-17 23:39 97%           ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-17 23:39 UTC (permalink / raw)
  To: Hanno Perrey; +Cc: Stefan Kangas, emacs-devel

Hanno Perrey <hanno@hoowl.se> writes:

> Dear Philip,
>
>> Other than that, here is a diff with the remaining changes I would
>> propose:
>
> applied and pushed, thanks for the detailed comb-through! :)

OK, looks like it works now, so I have pushed the package specification.
One more thing I noticed is that you have this in your package header,

;; Author: Hanno Perrey <http://gitlab.com/hperrey>

which is not a valid Email address.  The idea is to have an email
address here, that is used to generate a compose buffer when the user is
reading about the package from a package description buffer.

> Best wishes,
>
> Hanno



^ permalink raw reply	[relevance 97%]

* Re: Auto-suggesting Packages
  @ 2024-01-16 16:18 99%       ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-16 16:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Philip Kaludercic <philipk@posteo.net>
>> Cc: emacs-devel@gnu.org
>> Date: Tue, 16 Jan 2024 15:06:02 +0000
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> > Is it really a good idea to show this on the mode line?  Why not in
>> > the echo-area?  We have several features that suggest tips, and AFAIK
>> > they all show the tips in the echo-area.
>> 
>> That is also implemented, I don't know what default is better.  The
>> reason I considered the mode line is because having the information
>> displayed persistently might something that newcomer appreciate,
>> especially when they are prone to overlooking something, especially in
>> the echo area.
>
> Then how about displaying it on a header-line instead (or as an
> option)?
>
>> I know that VSCode has something along these lines with
>> a popup window.
>
> We could offer a popup window as well, or (on GUI terminals) maybe a
> dialog box.

Both are possible, but perhaps invasive.  The popup buffer that VSCode
displays is more akin to a child window that disappears after a timeout,
and my understanding is that these are a conventional part of the user
experience, which IMO is not the case with Emacs.



^ permalink raw reply	[relevance 99%]

* Re: Auto-suggesting Packages
  @ 2024-01-16 15:06 96%   ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-01-16 15:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Philip Kaludercic <philipk@posteo.net>
>> Date: Tue, 16 Jan 2024 08:18:55 +0000
>> 
>> I posted a patch like this a few months back and forgot about it, but
>> Sacha's Emacs News this weeks reminded me again.  I took the code and
>> changed the default behaviour to indicate a package can be installed in
>> the mode line:
>
> Is it really a good idea to show this on the mode line?  Why not in
> the echo-area?  We have several features that suggest tips, and AFAIK
> they all show the tips in the echo-area.

That is also implemented, I don't know what default is better.  The
reason I considered the mode line is because having the information
displayed persistently might something that newcomer appreciate,
especially when they are prone to overlooking something, especially in
the echo area.  I know that VSCode has something along these lines with
a popup window.

This is how the message would look like, for fundamental mode buffers:

--8<---------------cut here---------------start------------->8---
Found suggested packages: lua-mode.  Install using  M-x package-autosuggest
--8<---------------cut here---------------end--------------->8---

> Thanks.



^ permalink raw reply	[relevance 96%]

* Re: Auto-suggesting Packages
  @ 2024-01-16  9:26 99%   ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-16  9:26 UTC (permalink / raw)
  To: Stephen Berman; +Cc: emacs-devel

Stephen Berman <stephen.berman@gmx.net> writes:

> On Tue, 16 Jan 2024 08:18:55 +0000 Philip Kaludercic <philipk@posteo.net> wrote:
>
>> I posted a patch like this a few months back and forgot about it, but
>> Sacha's Emacs News this weeks reminded me again.  I took the code and
>> changed the default behaviour to indicate a package can be installed in
>> the mode line:
> [...]
>> +;;;; Autosuggest
> [...]
>> +(defvar package--autosugest-line-format
>> +  '(:eval (package--autosugest-line-format)))
>> +(put 'package--autosugest-line-format 'risky-local-variable t)
> [...]
>> +(defun package--autosugest-line-format ()
> [...]
>> +             `(package-autosuggest-mode ("" package--autosugest-line-format)))
>
> autosugest -> autosuggest

Thanks, fixed that.

> Steve Berman



^ permalink raw reply	[relevance 99%]

* Auto-suggesting Packages
@ 2024-01-16  8:18 46% Philip Kaludercic
      0 siblings, 2 replies; 200+ results
From: Philip Kaludercic @ 2024-01-16  8:18 UTC (permalink / raw)
  To: emacs-devel

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


I posted a patch like this a few months back and forgot about it, but
Sacha's Emacs News this weeks reminded me again.  I took the code and
changed the default behaviour to indicate a package can be installed in
the mode line:


[-- Attachment #2: Type: text/plain, Size: 6665 bytes --]

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 868373f46c2..0c94a1df1cf 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -4533,6 +4533,155 @@ package-get-version
             (or (lm-header "package-version")
                 (lm-header "version")))))))))
 
+\f
+;;;; Autosuggest
+
+(defvar package-autosuggest-database
+  '((sml-mode auto-mode-alist "\\.sml\\'")
+    (lua-mode auto-mode-alist "\\.lua\\'" )
+    (ada-mode auto-mode-alist "\\.ada\\'")
+    ;; ...
+    ;;
+    ;; this is just for testing, in practice I think this data should
+    ;; be generated and bundled with Emacs, and would ideally be
+    ;; loaded in at compile-time.  When the "archive-contents" file
+    ;; format is updated, we can include more information in there
+    ;; that would be added to this database.
+    )
+  "Database of hints for packages to suggest installing.")
+
+(define-minor-mode package-autosuggest-mode
+  "Enable the automatic suggestion and installation of packages."
+  :init-value 'mode-line :global t
+  :type '(choice (const :tag "Indicate in mode line" mode-line)
+                 (const :tag "Always prompt" always)
+                 (const :tag "Prompt only once" once)
+                 (const :tag "Indicate with message" message)
+                 (const :tag "Do not suggest anything" nil))
+  (funcall (if package-autosuggest-mode #'add-hook #'remove-hook)
+           'after-change-major-mode-hook
+           #'package--autosuggest-after-change-mode))
+
+(defun package--suggestion-applies-p (pkg-sug)
+  "Check if a suggestion PKG-SUG is applicable to the current buffer."
+  (pcase pkg-sug
+    (`(,(pred package-installed-p) . _) nil)
+    ((or `(,_ auto-mode-alist ,ext _)
+         `(,_ auto-mode-alist ,ext))
+     (and (string-match-p ext (buffer-name)) t))
+    ((or `(,_ magic-mode-alist ,mag _)
+         `(,_ magic-mode-alist ,mag))
+     (save-restriction
+       (widen)
+       (save-excursion
+         (goto-char (point-min))
+         (looking-at-p mag))))
+    ((or `(,_ interpreter-mode-alist ,magic _)
+         `(,_ interpreter-mode-alist ,magic))
+     (save-restriction
+       (widen)
+       (save-excursion
+         (goto-char (point-min))
+         (and (looking-at auto-mode-interpreter-regexp)
+              (string-match-p
+               (concat "\\`" (file-name-nondirectory (match-string 2)) "\\'")
+               magic)))))))
+
+(defun package--autosuggest-find-candidates ()
+  "Return a list of packages that might be interesting the current buffer."
+  (and package-autosuggest-mode
+       (let (suggetions)
+         (dolist (sug package-autosuggest-database)
+           (when (package--suggestion-applies-p sug)
+             (push sug suggetions)))
+         suggetions)))
+
+(defun package--autosuggest-install-and-enable (pkg-sug)
+  "Install and enable a package suggestion PKG-ENT.
+PKG-SUG has the same form as an element of
+`package-autosuggest-database'."
+  (package-install (car pkg-sug))
+  (with-demoted-errors "Failed to enable: %S"
+    (dolist (buf (buffer-list))
+      (with-current-buffer buf
+        (when (and (eq major-mode 'fundamental-mode) (buffer-file-name)
+                   (package--suggestion-applies-p pkg-sug))
+          (funcall-interactively (or (cadddr pkg-sug) (car pkg-sug))))))))
+
+(defvar package--autosuggest-suggested '()
+  "List of packages that have already been suggested.")
+
+(defvar package--autosugest-line-format
+  '(:eval (package--autosugest-line-format)))
+(put 'package--autosugest-line-format 'risky-local-variable t)
+
+(defface package-autosuggest-face
+  '((t :inherit (success)))
+  "Face to use in the mode line to highlight suggested packages."
+  :version "30.1")
+
+(defun package--autosugest-line-format ()
+  "Generate a mode-line string to indicate a suggested package."
+  `(,@(and-let* (((eq package-autosuggest-mode 'mode-line))
+                 (avail (seq-difference (package--autosuggest-find-candidates)
+                                        package--autosuggest-suggested)))
+        (propertize
+         (format "Install %s?"
+                 (mapconcat
+                  #'symbol-name
+                  (delete-dups (mapcar #'car avail))
+                  ", "))
+         'face 'package-autosuggest-face
+         'mouse-face 'mode-line-highlight
+         'help-echo "Click to install suggested package."
+         'keymap (let ((map (make-sparse-keymap)))
+                   (define-key map [mode-line down-mouse-1] #'package-autosuggest)
+                   map)))))
+
+(add-to-list 'mode-line-misc-info
+             `(package-autosuggest-mode ("" package--autosugest-line-format)))
+
+(defun package--autosuggest-after-change-mode ()
+  "Hook function to suggest packages for installation."
+  (when-let ((avail (seq-difference (package--autosuggest-find-candidates)
+                                    package--autosuggest-suggested))
+             (pkgs (mapconcat #'symbol-name
+                              (delete-dups (mapcar #'car avail))
+                              ", ")))
+    (add-to-list 'mode-line-misc-info
+                 `(eglot--managed-mode (" [" eglot--mode-line-format "] ")))
+    (pcase package-autosuggest-mode
+      ('mode-line
+       (force-mode-line-update t))
+      ('always
+       (when (yes-or-no-p (format "Install suggested packages (%s)?" pkgs))
+         (mapc #'package--autosuggest-install-and-enable avail)))
+      ('once
+       (when (yes-or-no-p (format "Install suggested packages (%s)?" pkgs))
+         (mapc #'package--autosuggest-install-and-enable avail))
+       (setq package--autosuggest-suggested (append avail  package--autosuggest-suggested)))
+      ('message
+       (message
+        (substitute-command-keys
+         (format "Found suggested packages: %s.  Install using  \\[package-autosuggest]"
+                 pkgs)))))))
+
+(defun package-autosuggest ()
+  "Prompt the user for suggested packages."
+  (interactive)
+  (let* ((avail (or (package--autosuggest-find-candidates)
+                    (user-error "No suggestions found")))
+         (pkgs (completing-read-multiple
+                "Install suggested packages: " avail
+                nil t
+                (mapconcat #'symbol-name
+                           (delete-dups (mapcar #'car avail))
+                           ",")))
+         (choice (concat "\\`" (regexp-opt pkgs) "\\'")))
+    (dolist (ent avail)
+      (when (string-match-p choice (symbol-name (car ent)))
+        (package--autosuggest-install-and-enable ent)))))
+
 \f
 ;;;; Quickstart: precompute activation actions for faster start up.
 

[-- Attachment #3: Type: text/plain, Size: 449 bytes --]


One annoyance I cannot resolve right now is that when I click on the
mode line, it calls `package-autosuggest' that attempts to confirm the
installation wish using `completing-read-multiple' with an initial input
(so everything the user needs to do is to press enter).  But due to the
mouse-click, it appears the minibuffer is not selected, which can be
confusing.  Adding a `switch-to-minibuffer' didn't help either.  Does
anyone know what to do?

^ permalink raw reply related	[relevance 46%]

* Re: [ELPA] New package devicetree-ts-mode
  @ 2024-01-16  7:30 96%     ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-16  7:30 UTC (permalink / raw)
  To: Aleksandr Vityazev; +Cc: emacs-devel, Stefan Kangas

Aleksandr Vityazev <avityazev@disroot.org> writes:

> On 2024-01-16 06:18, Philip Kaludercic wrote:
>
>> Aleksandr Vityazev <avityazev@disroot.org> writes:
>>
>>> Hello,
>>>
>>> Since the previous thread [1] got lost over time and no more replies,
>>> I'm starting a new one.
>>
>> Sorry about that, I hadn't gotten around to answering your last ping.
>>
>>> All of Philip's suggested points have been fixed, is there any reason
>>> why this package should not be included in ELPA? I am willing to listen
>>> and fix if possible.
>>
>> I think code-wise everything should be fine.  Just to be sure, you have
>> signed the FSF CA and are familiar with how the ELPA build server works
>> (at least from a package developer perspective)?
>>
>
> Yes, I have a signed CA FSF. One of my packages is already in ELPA, so I'm more
> or less familiar with the build process.

OK, great, I have tried building the package and it works.  The package
has been added to the archive and should appear soon enough.

Another tip I can give you is that since you have a mailing list on
Soucehut, I recommend adding that is the maintainer address in the
package header.

Also, is it necessary to distribute both the README.md and README.org in
the package tarball?  I would assume the former is for Sourcehut, right?

>>> Link to repository - https://git.sr.ht/~akagi/devicetree-ts-mode/
>>>
>>> [1] https://mail.gnu.org/archive/html/emacs-devel/2023-12/msg00629.html



^ permalink raw reply	[relevance 96%]

* Re: [elpa] main 630bdd7c45: * elpa-packages: update all Protesilaos repo URLs
       [not found]     ` <20240112055545.BD592C00216@vcs2.savannah.gnu.org>
@ 2024-01-16  7:26 99%   ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-16  7:26 UTC (permalink / raw)
  To: emacs-devel; +Cc: Protesilaos Stavrou

Protesilaos Stavrou <info@protesilaos.com> writes:

> branch: main
> commit 630bdd7c45982b71bcaf86019a0cd3bd1f2f9336
> Author: Protesilaos Stavrou <info@protesilaos.com>
> Commit: Protesilaos Stavrou <info@protesilaos.com>
>
>     * elpa-packages: update all Protesilaos repo URLs
>     
>     SourceHut is down and I need to deliver new versions to users.

[...]

> - (agitate		:url "https://git.sr.ht/~protesilaos/agitate"
> + (agitate		:url "https://github.com/protesilaos/agitate"

It seems that the DDOS attack is over (see https://sourcehut.org/), do
you plan to revert these changes?  I don't know what the background was,
but if there was some urgent change, you could have also just pushed the
changes directly to elpa.git.



^ permalink raw reply	[relevance 99%]

* Re: [ELPA] New package devicetree-ts-mode
  @ 2024-01-16  6:18 99% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-01-16  6:18 UTC (permalink / raw)
  To: Aleksandr Vityazev; +Cc: emacs-devel, Stefan Kangas

Aleksandr Vityazev <avityazev@disroot.org> writes:

> Hello,
>
> Since the previous thread [1] got lost over time and no more replies,
> I'm starting a new one.

Sorry about that, I hadn't gotten around to answering your last ping.

> All of Philip's suggested points have been fixed, is there any reason
> why this package should not be included in ELPA? I am willing to listen
> and fix if possible.

I think code-wise everything should be fine.  Just to be sure, you have
signed the FSF CA and are familiar with how the ELPA build server works
(at least from a package developer perspective)?

> Link to repository - https://git.sr.ht/~akagi/devicetree-ts-mode/
>
> [1] https://mail.gnu.org/archive/html/emacs-devel/2023-12/msg00629.html



^ permalink raw reply	[relevance 99%]

* Re: [PATCH] New major-mode: bicep-ts-mode
  @ 2024-01-15 17:35 98%                   ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-15 17:35 UTC (permalink / raw)
  To: Stefan Monnier
  Cc: Stefan Kangas, Jostein Kjønigsen, Daniel Mendler,
	Ergus via Emacs development discussions., Yuan Fu,
	Theodor Thornhill, Dmitry

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Stefan Kangas [2024-01-09 11:16:36] wrote:
>> Jostein Kjønigsen <jostein@secure.kjonigsen.net> writes:
>>> I'd be more happy if we can make it part elpa.git, since that to me
>>> sounds like a better "home" for an Emacs-package, but I must admit I've
>>> never actually contributed a package directly to ELPA earlier.
>>>
>>> Is there a process I would need to follow, or could someone else help
>>> land it there, based on the source provided so far?
>>
>> See README in elpa.git and ask here if you have any questions.
>>
>> I think you should apply for commit access for this workflow to be
>> really practical.  Stefan M, is that correct?
>
> Yes, but doesn't Jostein already have it?  IIRC the alternative was to
> host the major mode in `emacs.git` and Jostein has two other major
> modes in `emacs.git`, so how does he maintain those?

Did I miss something (see also <87bk9us421.fsf@posteo.net>), or what is
the reason for not taking the usual route of mirroring some external
repository, as is some with the vast majority of ELPA packages.

>
>
>         Stefan



^ permalink raw reply	[relevance 98%]

* Re: [ELPA] New package: jami-bot and org-jami-bot
  @ 2024-01-15  7:06 66%       ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-01-15  7:06 UTC (permalink / raw)
  To: Hanno Perrey; +Cc: Stefan Kangas, emacs-devel

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

Hanno Perrey <hanno@hoowl.se> writes:

> Hej Philip,
>
> I have now modified the code according to your suggestions and pushed
> the changes. 

[...]


The sharp-quoting was my mistake, I misread the hooks as functions.
Other than that, here is a diff with the remaining changes I would
propose:


[-- Attachment #2: Type: text/plain, Size: 2710 bytes --]

diff --git a/jami-bot.el b/jami-bot.el
index 8ad3ed0..5ea9aad 100644
--- a/jami-bot.el
+++ b/jami-bot.el
@@ -1,6 +1,6 @@
 ;;; jami-bot.el --- An extendable chat bot for the private messenger GNU Jami -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2023 Free Software Foundation, Inc.
+;; Copyright (C) 2023, 2024 Free Software Foundation, Inc.
 
 ;; Author: Hanno Perrey <http://gitlab.com/hperrey>
 ;; Maintainer: Hanno Perrey <hanno@hoowl.se>
@@ -73,14 +73,14 @@ consist of a single (lowercase) word.  The corresponding function needs to
 accept the account id, the conversation id and the message alist as
 arguments and return a string (that is sent as reply to the original message)."
   :group 'jami-bot
-  :type '(alist :key-type 'string :value-type 'function))
+  :type '(alist :key-type string :value-type function))
 
 (defcustom jami-bot-text-message-functions nil
   "A list of functions that will be called when processing a plain text message.
 Functions must take the ACCOUNT and CONVERSATION ids as well as
 the actual MSG as arguments.  Their return value will be ignored."
   :group 'jami-bot
-  :type '(group 'function))
+  :type '(group function))
 
 (defcustom jami-bot-download-path "~/jami/"
   "Path in which to store files downloaded from conversations.
@@ -95,9 +95,9 @@ Functions must take the ACCOUNT and CONVERSATION ids as well as
 the actual MSG and the local downloaded file name, DLNAME, as
 arguments.  Their return value will be ignored."
   :group 'jami-bot
-  :type '(group 'function))
+  :type '(group function))
 
-;; Internal variables
+;;;; Internal variables
 
 (defvar jami-bot--jami-local-account-ids nil
   "List of `jami' local accounts user ids and name pairs.
@@ -105,7 +105,7 @@ arguments.  Their return value will be ignored."
 Caches output of dbus-methods \"getAccountList\" and
 \"getAccountDetails\". For internal use in `jami-bot'.")
 
-;; Functions
+;;;; Functions
 
 (defun jami-bot--messageReceived-handler (account conversation msg)
   "Handle messages from Jami's `messageReceived' D-Bus signal.
@@ -254,7 +254,9 @@ corresponding ids to which the message MSG belongs to."
          (filename (cadr (assoc-string "displayName" msg)))
          (dlpath (file-name-as-directory
                   (expand-file-name jami-bot-download-path)))
-         (dlname (concat dlpath (format-time-string "%Y%m%d-%H%M") "_" filename)))
+         (dlname (expand-file-name
+		  (concat (format-time-string "%Y%m%d-%H%M") "_" filename)
+		  dlpath)))
     (unless (file-directory-p dlpath) (make-directory dlpath 't))
     (message "jami-bot: downloading file %s" dlname)
     (jami-bot--dbus-cfgmgr-call-method "downloadFile" account conversation id fileid dlname)

[-- Attachment #3: Type: text/plain, Size: 60 bytes --]



> Thanks again for the feedback!
>
> Best wishes,
> Hanno

^ permalink raw reply related	[relevance 66%]

* Re: Is it better to add treesitter modes to core?
  @ 2024-01-09 20:21 99%               ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-09 20:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: dmitry, stefankangas, emacs-devel, stephen_leake

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Philip Kaludercic <philipk@posteo.net>
>> Cc: dmitry@gutov.dev,  stefankangas@gmail.com,  emacs-devel@gnu.org,
>>   stephen_leake@stephe-leake.org
>> Date: Tue, 09 Jan 2024 19:27:50 +0000
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> From: Philip Kaludercic <philipk@posteo.net>
>> >> Cc: Stefan Kangas <stefankangas@gmail.com>,  emacs-devel@gnu.org,  Stephen
>> >>  Leake <stephen_leake@stephe-leake.org>
>> >> Date: Mon, 08 Jan 2024 06:15:07 +0000
>> >> 
>> >> > Possible grammar versioning problems. But the above should be small
>> >> > and stable enough, nor should they require many changes over the
>> >> > years.
>> >> 
>> >> I don't think this has to be a problem.  Last year I had suggested that
>> >> `treesit-install-language-grammar' should download release GitHub
>> >> tarballs, not just clone the repository (which requires Git, and is
>> >> prone to upstream breakage).
>> >
>> > Alas, this solution is incomplete, because some grammar libraries
>> > don't have releases at all.
>> 
>> Most if not all git forges should support requesting an archive for a
>> specific commit (basically git-archive over https).  For example, this
>> will provide a tarball for the current newest commit for the python
>> tree-sitter library:
>> 
>>   https://github.com/tree-sitter/tree-sitter-python/archive/4bfdd9033a2225cc95032ce77066b7aeca9e2efc.tar.gz
>
> I was responding to the suggestion to download release tarballs.

Then I misunderstood you, my argument is just that we could avoid
grammar versioning issues by fetching specific revisions (be it by
commits or by releases), and that we don't even have to use git for
that.



^ permalink raw reply	[relevance 99%]

* Re: [ELPA] New package: jami-bot and org-jami-bot
  @ 2024-01-09 19:39 90%   ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-01-09 19:39 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Hanno Perrey, emacs-devel

Stefan Kangas <stefankangas@gmail.com> writes:

> Hanno Perrey <hanno@hoowl.se> writes:
>
>> I would like to propose two tightly-coupled packages for inclusion into
>> ELPA: jami-bot and org-jami-bot.
>>
>> jami-bot is an extendable chat bot for the distributed, private
>> messenger Jami. It interacts with the locally-installed Jami daemon via
>> D-Bus and reacts to both plain text messages and file transfers sent to
>> local accounts.
>>
>> org-jami-bot builds upon jami-bot and extends it with Org mode capture
>> functionality for text messages and images. It allows to schedule agenda
>> items at specific dates, compose multi-measure captures and capture
>> images -- all by sending a message via the GNU Jami messenger.
>>
>> I would like to keep maintaining both packages at their current
>> repositories:
>>
>> - https://gitlab.com/hperrey/jami-bot
>> - https://gitlab.com/hperrey/org-jami-bot
>>
>> I have signed the copyright paperwork with the FSF already and changed
>> the copyright in the respective files for both packages.
>>
>> As this is the first time I am proposing a package for ELPA, any
>> guidance on the process and feedback would be highly welcome!
>
> Philip, could you please help add these packages to GNU ELPA?
>
> The copyright assignment is all taken care of.

Sure, but first Hanno could you bump the version header, so that the
ELPA build system uses a newer commit, that includes the stylistic
changes + the updated copyright line?

A few comments from my side:

- It seems like a few variable (`jami-bot-account-user-names'?) would be
  nice to have as proper user options, defined with `defcustom' and a
  type.

- Try to sharp-quote (#') function symbols.

- If possible, try to join file paths using functions like
  `expand-file-name' with `default-directory' set, instead of using
  "low-level" string-manipulation.

- There seem to be some indentation issues (jami-bot-send-message), try
  running `indent-region' on the entire buffer.

- There are a few minor checkdoc issues, consider resolving them.



^ permalink raw reply	[relevance 90%]

* Re: Is it better to add treesitter modes to core?
  @ 2024-01-09 19:27 99%           ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-01-09 19:27 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: dmitry, stefankangas, emacs-devel, stephen_leake

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Philip Kaludercic <philipk@posteo.net>
>> Cc: Stefan Kangas <stefankangas@gmail.com>,  emacs-devel@gnu.org,  Stephen
>>  Leake <stephen_leake@stephe-leake.org>
>> Date: Mon, 08 Jan 2024 06:15:07 +0000
>> 
>> > Possible grammar versioning problems. But the above should be small
>> > and stable enough, nor should they require many changes over the
>> > years.
>> 
>> I don't think this has to be a problem.  Last year I had suggested that
>> `treesit-install-language-grammar' should download release GitHub
>> tarballs, not just clone the repository (which requires Git, and is
>> prone to upstream breakage).
>
> Alas, this solution is incomplete, because some grammar libraries
> don't have releases at all.

Most if not all git forges should support requesting an archive for a
specific commit (basically git-archive over https).  For example, this
will provide a tarball for the current newest commit for the python
tree-sitter library:

  https://github.com/tree-sitter/tree-sitter-python/archive/4bfdd9033a2225cc95032ce77066b7aeca9e2efc.tar.gz



^ permalink raw reply	[relevance 99%]

* Re: [PATCH] New major-mode: bicep-ts-mode
    @ 2024-01-09 19:24 95%               ` Philip Kaludercic
  1 sibling, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-09 19:24 UTC (permalink / raw)
  To: Jostein Kjønigsen
  Cc: Stefan Monnier, Stefan Kangas, Daniel Mendler,
	Ergus via Emacs development discussions., Yuan Fu,
	Theodor Thornhill, Dmitry

Jostein Kjønigsen <jostein@secure.kjonigsen.net> writes:

> On 09.01.2024 01:33, Stefan Monnier wrote:
>>> OK, let's go with GNU ELPA.
>>> Could you set up the repository and let us know where it is?
>>> Then we can add it.
>> Of course, we can also host it directly in `elpa.git`.
>>
>>
>>          Stefan
>>
> Before reading this email, I created this bare-bones repo:
> https://github.com/josteink/bicep-ts-mode
>
> I'd be more happy if we can make it part elpa.git, since that to me
> sounds like a better "home" for an Emacs-package, but I must admit
> I've never actually contributed a package directly to ELPA earlier.

Most packages on ELPA are not primarily hosted inside of elpa.git, but
just mirrored, see

  https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/elpa-packages

So this doesn't have to be a concern, it would be simpler to use an
external repository that you already have access to.

> Is there a process I would need to follow, or could someone else help
> land it there, based on the source provided so far?
>
> --
> Jostein



^ permalink raw reply	[relevance 95%]

* Re: Is it better to add treesitter modes to core?
  @ 2024-01-08  6:15 90%       ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-01-08  6:15 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Stefan Kangas, emacs-devel, Stephen Leake

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 07/01/2024 19:46, Stefan Kangas wrote:
>> Dmitry <dmitry@gutov.dev> writes:
>> 
>>> On Sun, Jan 7, 2024, at 2:34 PM, Philip Kaludercic wrote:
>>>> What I am wondering, is if this simplification were to take place, if it
>>>> would be possible to add ada-mode (or ada-ts-mode in that case) back to
>>>> the core?
>>> What is this fetish of adding everything to the core?
>>> ELPA is just one 'M-x package-install' away.
>> In Emacs, whatever real work you need to do, it's often the case
>> that
>> "it's just one M-x package-install" away.
>
> That's right. It doesn't work for every purpose, though. Not for
> infrastructure packages (which we expect to be used by other
> packages), nor for features that we want to have enabled by default.
>
>> I see little reason for that.
>
> You don't want ELPA to be used?
>
>> In my ideal world, we should have basic editing support in place in
>> Emacs for typical tasks, and packages should provide extensions.  Most
>> users don't particularly enjoy starting work with installing a bunch of
>> extras.
>
> The way VS Code works and its level of popularity seem to say otherwise.

One notable difference is that VS Code prompts users to install the
necessary packages, while with Emacs one has to figure out what to
install (and how to install it in the case of ada-mode).

>> Take a look at how much better things are elsewhere and weep:
>>      https://github.com/vim/vim/tree/master/runtime/syntax
>> Yes, vim is different, their job is easier and so on and so forth.
>
> It is only better if the features provided in there are reasonably
> complete and well-maintained.
>
> Also note that in no cases Vim bundles advanced completion
> functionality of the kind that Ada-mode has. It's much bigger than any
> of the files in the above dir.
>
>> But
>> also consider that treesitter modes are looking far easier to maintain
>> than some of the behemoths we have sometimes had to write in ELisp.
>
> And yet the Vim repository doesn't have any tree-sitter integration,
> it's all third-party. I don't think we'll see it there anytime soon
> (or even in the medium term).

I don't know how to check this, but didn't Neovim have built-in
tree-sitter support?

>> We might not want _all_ language support in Emacs, but for the main
>> languages: why would we _not_ want it?  While I appreciate the
>> importance of workflow related arguments, from the end users point of
>> view, it really is a no-brainer which way is better.
>
> I don't really mind having the major modes for most popular languages
> in here, because in those cases the problem of extra traffic is offset
> by the advantage that one can see a problem and contribute a fix that
> will go out to help a lot of people. Even if I don't use a language in
> question myself. But doing that with languages that are unfamiliar to
> most contributors, and have small audience, is questionable.
>
>> This doesn't only apply to prog-modes, but also many text-modes.  Take a
>> look at toml-ts-mode.el for example, and tell me one reason why it
>> shouldn't be in Emacs core.  Markdown.  YAML.  Stuff like that.
>
> Possible grammar versioning problems. But the above should be small
> and stable enough, nor should they require many changes over the
> years.

I don't think this has to be a problem.  Last year I had suggested that
`treesit-install-language-grammar' should download release GitHub
tarballs, not just clone the repository (which requires Git, and is
prone to upstream breakage).

>>> And Ada is niche enough that even the argument of having the popular
>>> languages supported OOtB doesn't work.
>> I think historical context matters here.  Ada is not exactly in
>> vogue
>> these days, but it _is_ supported by GCC, and it has an ISO standard.
>> It's not some random novelty language for people that feel that
>> Typescript is not edgy enough, or anything like that.
>> We also happened to support it in Emacs for ages.
>
> And it's still there in ELPA, available for everybody to install.
>
> Note that I don't mean to belittle Stephen's work, nor have any desire
> to throw it away, but the sentiment "it's unmaintained, let's bring it
> in the core and see what happens" sounds very wrong to me.

Just to clarify, my question was what people would think of adding
ada-mode back to the core, if it were simplified using tree sitter.

> It would be a good idea for the interested parties to pay more
> attention to ELPA and improve it there. And if we really want basic
> support for Ada in the core, one could extract the "traditional" major
> mode from it. Or perhaps start anew and implement the tree-sitter
> based mode. Since there is an existing (LSP) language server, Eglot
> could be used for the IDE features. And then it would be easier to
> compare the feature sets.



^ permalink raw reply	[relevance 90%]

* Re: Ada-mode to be abandoned?
  @ 2024-01-07 16:48 96%   ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-07 16:48 UTC (permalink / raw)
  To: Fernando Oleo Blanco; +Cc: emacs-devel, Stephen Leake

Fernando Oleo Blanco <irvise_ml@irvise.xyz> writes:

> ada-mode, as it currently stands, requires compiling some Ada code in 
> order for it to work. It comes with some helper scripts for that task. 
> However, the experience to get it working is not as nice as with other 
> packages due to the compilation step. One cannot simply install it and 
> just M-x ada-mode... 

On this point, I believe it could be improved if `ada-mode' could check
if the necessary programs are installed, and otherwise try to build them
on its own (as other packages do, e.g. pdf-tools).  Playing around with
ada-mode today, I just got an error message after error message, having
to guess what packages, dependencies and package managers to install,
that I ended up writing my code in fundamental mode, which I find sad.

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 96%]

* Re: Ada-mode to be abandoned?
  @ 2024-01-07 16:26 85%   ` Philip Kaludercic
    1 sibling, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-07 16:26 UTC (permalink / raw)
  To: Dmitry; +Cc: emacs-devel, Stephen Leake

Dmitry <dmitry@gutov.dev> writes:

> On Sun, Jan 7, 2024, at 2:34 PM, Philip Kaludercic wrote:
>> What I am wondering, is if this simplification were to take place, if it
>> would be possible to add ada-mode (or ada-ts-mode in that case) back to
>> the core?
> What is this fetish of adding everything to the core?

For me it is usually just that it is easier for a newcomer to get stuff
working, without having to deal with package management, which can be a
bother when working offline or in isolated environments.  TBH
tree-sitter complicates this somewhat, because the grammars are not
installed along with Emacs or by the system, but that is a different
issue.

> ELPA is just one 'M-x package-install' away.
>
> And Ada is niche enough that even the argument of having the popular
> languages supported OOtB doesn't work.

There are plenty of languages that are niche and supported OOtB,
especially since the introduction of tree-sitter (I for example am not
familiar with "heex").  If I were to consider helping out with
maintaining the major mode -- where my main disinclination is just the
lack of experience I have with Ada -- I'd prefer to maintain it inside
the core, because if nothing else it makes it easier for others to help
out with bugs/mistakes and use the newest features.

Either way, the current state of `ada-mode' is in my experience in no
way satisfactory, and I believe that this kind of issue is less likely
to happen inside the core.

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 85%]

* Ada-mode to be abandoned?
@ 2024-01-07 12:34 79% Philip Kaludercic
      0 siblings, 2 replies; 200+ results
From: Philip Kaludercic @ 2024-01-07 12:34 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stephen Leake


I recently came across this message on the ada-mode-users' mailing list:

  https://lists.nongnu.org/archive/html/ada-mode-users/2023-11/msg00000.html

Stephen (the maintainer, in the CC's) indicates that he would like to
retire from maintenance, which might mean that the package could become
abandon-ware.

One note he makes is that the current implementation could be
simplified, by just using tree-sitter, instead of the approach that
makes use of a custom parser:

--8<---------------cut here---------------start------------->8---
2) Drop the wisitoken parser generator and runtime, use tree-sitter
   instead. This requires writing a wrapper for tree-sitter to match
   the wisitoken syntax-tree API; then the current wisi indentation
   code can be used.

   This maintains all of the ada-mode features, while reducing the
   maintenance burden significantly.

   I believe the tree-sitter error correction is less powerful than
   wisitoken, but it would be interesting to see if that matters in
   practice.
--8<---------------cut here---------------end--------------->8---

What I am wondering, is if this simplification were to take place, if it
would be possible to add ada-mode (or ada-ts-mode in that case) back to
the core?  I would be glad to help out, since I've been interested in
working with Ada for a while but never got it to work, I have just been
struggling with understanding how `treesit-font-lock-rules' is supposed
to be used, so some help would be appreciated.

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 79%]

* Re: man broken?
  2024-01-03 15:45 88%           ` Philip Kaludercic
@ 2024-01-03 15:48 99%             ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2024-01-03 15:48 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Visuwesh, T.V Raman, emacs-devel

Philip Kaludercic <philipk@posteo.net> writes:

> Michael Albinus <michael.albinus@gmx.de> writes:
>
>> Visuwesh <visuweshm@gmail.com> writes:
>>
>> Hi,
>>
>>> 1. emacs -Q
>>> 2. M-: (require 'tramp-adb) RET
>>> 3. M-x man RET ls RET
>>>
>>> This seems to be because connection-local-profile-alist has the adb
>>> configuration which sets shell-file-name to "/system/bin/sh".
>>
>> Thanks for the recipe. I'll work on it when my health condition is going
>> better, hopefully next days.
>
> Could it be that this is the issue:
>
> diff --git a/lisp/files-x.el b/lisp/files-x.el
> index 41d9cd3bab8..1911afe43e0 100644
> --- a/lisp/files-x.el
> +++ b/lisp/files-x.el
> @@ -1,6 +1,6 @@
>  ;;; files-x.el --- extended file handling commands  -*- lexical-binding: t; -*-
>  
> -;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
> +;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
>  
>  ;; Author: Juri Linkov <juri@jurta.org>
>  ;; Maintainer: emacs-devel@gnu.org
> @@ -704,7 +704,7 @@ connection-local-get-profiles
>          profiles)
>      (dolist (crit-alist connection-local-criteria-alist)
>        (let ((crit criteria)
> -            (match t))
> +            (match nil))
>          (while (and crit match)
>            (when (plist-member (car crit-alist) (car crit))
>              (setq match (equal (plist-get (car crit-alist) (car crit))
>
>
> I am not quite sure what is going on in the function, but the invariant
> is that match is always non-nil after the loop is done, which seems
> suspicious to me.

Never mind the last sentence, match can be nil if `equal' returns nil at
some point, but that doesn't happen locally since `criteria' is nil.

>> Best regrds, Michael.



^ permalink raw reply	[relevance 99%]

* Re: man broken?
  @ 2024-01-03 15:45 88%           ` Philip Kaludercic
  2024-01-03 15:48 99%             ` Philip Kaludercic
  0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2024-01-03 15:45 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Visuwesh, T.V Raman, emacs-devel

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

Michael Albinus <michael.albinus@gmx.de> writes:

> Visuwesh <visuweshm@gmail.com> writes:
>
> Hi,
>
>> 1. emacs -Q
>> 2. M-: (require 'tramp-adb) RET
>> 3. M-x man RET ls RET
>>
>> This seems to be because connection-local-profile-alist has the adb
>> configuration which sets shell-file-name to "/system/bin/sh".
>
> Thanks for the recipe. I'll work on it when my health condition is going
> better, hopefully next days.

Could it be that this is the issue:


[-- Attachment #2: Type: text/plain, Size: 796 bytes --]

diff --git a/lisp/files-x.el b/lisp/files-x.el
index 41d9cd3bab8..1911afe43e0 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -1,6 +1,6 @@
 ;;; files-x.el --- extended file handling commands  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
 
 ;; Author: Juri Linkov <juri@jurta.org>
 ;; Maintainer: emacs-devel@gnu.org
@@ -704,7 +704,7 @@ connection-local-get-profiles
         profiles)
     (dolist (crit-alist connection-local-criteria-alist)
       (let ((crit criteria)
-            (match t))
+            (match nil))
         (while (and crit match)
           (when (plist-member (car crit-alist) (car crit))
             (setq match (equal (plist-get (car crit-alist) (car crit))

[-- Attachment #3: Type: text/plain, Size: 184 bytes --]


I am not quite sure what is going on in the function, but the invariant
is that match is always non-nil after the loop is done, which seems
suspicious to me.

> Best regrds, Michael.

^ permalink raw reply related	[relevance 88%]

* Re: A new collaborative editing package (maybe tangent)
  @ 2023-12-30 10:56 99%   ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-12-30 10:56 UTC (permalink / raw)
  To: Karl Fogel; +Cc: Yuan Fu, emacs-devel

Karl Fogel <kfogel@red-bean.com> writes:

> On 29 Dec 2023, Yuan Fu wrote:
>> I’ve been working on a collaborative editing package on-and-off for
>> a
>> while. I call it collab-mode. It’s far from complete but I want to
>>gather some early feedback (and find some people to test it).
>>
>>Yes, another collab editing package. I know there’s a pile of
>> abandoned collab editing packages already, and whether it’s really
>>very useful is questionable in the age of google docs.
>
> There is no question at all about its usefulness!  Having a reliable,
> usable, and easy-to-install Emacs package for collaborative editing
> would be amazing.  Even if it were to only support Emacs<->Emacs it
> would be a great thing; if it allows collaborative editing with people
> using other editors, then it will make the stars shine and the moon
> sing.

Just because it doesn't appear to be mentioned, are you familiar with
the CRDT package on GNU ELPA?  My understanding is that it is not
compatible with other editors, due to limits in the API they expose, but
it does provide P2P collaboration.



^ permalink raw reply	[relevance 99%]

* Re: man broken?
  @ 2023-12-29 19:38 99%       ` Philip Kaludercic
    1 sibling, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-12-29 19:38 UTC (permalink / raw)
  To: Michael Albinus; +Cc: T.V Raman, emacs-devel

Michael Albinus <michael.albinus@gmx.de> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
> Hi Philip,

Hi,

>>>> Invoking man M-x man on any program, eg ls returns error:
>>>>
>>>> Invalid function: connection-local-value
>>>>
>>>> appears to be due to tramp related logic in man-shell-file-name
>>>
>>> connection-local-value is a new macro. So you need to recompile
>>> man.el. Since it is used somewhere else as well, 'make bootstrap' might
>>> be the best option.
>>
>> I've been having another issue, whatever man page I try to open I get a
>>
>>    /system/bin/sh: No such file or directory
>>
>> error message, because
>>
>>   (connection-local-value shell-file-name) => "/system/bin/sh"
>>
>> I haven't reported it as a bug yet, because I cannot reproduce it in
>> emacs -Q, and I haven't found any useful information to help debugging
>> the issue.
>>
>> Perhaps you have some ideas that could help me prepare a bug report?
>
> Im don't get it. Have you tried 'make bootstrap' Could you pls tell what
> hayou done, starting with "emacs -Q"?

I did try make bootstrap, and it didn't work, but I cannot reproduce the
issue with emacs -Q either, so my configuration is apparently playing a
part in the issue.

> Best regards, Michael.



^ permalink raw reply	[relevance 99%]

* Re: man broken?
  @ 2023-12-28  9:48 97%   ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-12-28  9:48 UTC (permalink / raw)
  To: Michael Albinus; +Cc: T.V Raman, emacs-devel

Michael Albinus <michael.albinus@gmx.de> writes:

> "T.V Raman" <raman@google.com> writes:
>
> Hi,
>
>> Invoking man M-x man on any program, eg ls returns error:
>>
>> Invalid function: connection-local-value
>>
>> appears to be due to tramp related logic in man-shell-file-name
>
> connection-local-value is a new macro. So you need to recompile
> man.el. Since it is used somewhere else as well, 'make bootstrap' might
> be the best option.

I've been having another issue, whatever man page I try to open I get a

   /system/bin/sh: No such file or directory

error message, because

  (connection-local-value shell-file-name) => "/system/bin/sh"

I haven't reported it as a bug yet, because I cannot reproduce it in
emacs -Q, and I haven't found any useful information to help debugging
the issue.

Perhaps you have some ideas that could help me prepare a bug report?

> Best regards, Michael.



^ permalink raw reply	[relevance 97%]

* Re: cond*
  @ 2023-12-27 14:34 99%                     ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-12-27 14:34 UTC (permalink / raw)
  To: Richard Stallman; +Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > Having a rough prototype of an implementation would still be useful to
>   > have, to get a better felling of what the macro should look and feel
>   > like.
>
> Yes, it might do that.  Would you like to help write it?
> I think some parts of the pcase code could be adapted.

I have some time and could try it out.  Can you link me to the most
current specification?

>   > E.g. from reading your messages, I am
>   > still not sure how `cond*' and `match' are supposed to interact with one
>   > another.
>
> `match*' is not an independent construct defined on its own.
> It is meaningful only within a cond* construct.  In effect,
> it marks a certain part of the cond*.
>
> If someone can figure out a way that `match*' could be meaningful on
> its own, whi;e also working together with `cond*' so that the two
> function together as desired, that would be a neat hack.  But I'm not
> aiming for that.

I agree, that would be interesting to have.



^ permalink raw reply	[relevance 99%]

* Re: Manuals for GNU ELPA packages
  @ 2023-12-27 13:47 99%     ` Philip Kaludercic
  2024-02-26 10:49 84%     ` Philip Kaludercic
  1 sibling, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-12-27 13:47 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Kjartan Óli Ágústsson, emacs-devel@gnu.org

Michael Albinus <michael.albinus@gmx.de> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
> Hi Philip,
>
>> ... then the documentation should be packaged in
>> the tarball and also appear online under
>> https://elpa.gnu.org/packages/doc/calibre.html.
>
> On https://elpa.gnu.org/packages/doc/, there is a directory of all
> manuals, plus the README of plz.el. The latter is wrong here, I guess.

That is true, but it appears that the file is being regenerated
regularly, so this is probably an issue  with elpa-admin.el.  I'll look
into it.

> Best regards, Michael.



^ permalink raw reply	[relevance 99%]

* Re: [elpa] externals/ellama 3b077c0842 4/7: Call ellama-setup-keymap on prefix change
       [not found]     ` <20231225205746.E0F24C004EC@vcs2.savannah.gnu.org>
@ 2023-12-26 17:18 99%   ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-12-26 17:18 UTC (permalink / raw)
  To: emacs-devel; +Cc: Sergey Kostyaev

ELPA Syncer <elpasync@gnu.org> writes:

> branch: externals/ellama
> commit 3b077c0842941fa96295705b8414df628c25419c
> Author: Sergey Kostyaev <kostyaev.sergey2@wb.ru>
> Commit: Sergey Kostyaev <kostyaev.sergey2@wb.ru>
>
>     Call ellama-setup-keymap on prefix change
> ---
>  NEWS.org  | 3 +++
>  ellama.el | 6 +++++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/NEWS.org b/NEWS.org
> index bf97cb2c43..3fddc7a6bb 100644
> --- a/NEWS.org
> +++ b/NEWS.org
> @@ -1,3 +1,6 @@
> +* Version 0.4.10
> +- Add customization group.
> +- Call ellama-setup-keymap on prefix change.
>  * Version 0.4.9
>  - Call fill-region only for non-programming modes.
>  * Version 0.4.8
> diff --git a/ellama.el b/ellama.el
> index 98e19337af..0bf1dec827 100644
> --- a/ellama.el
> +++ b/ellama.el
> @@ -6,7 +6,7 @@
>  ;; URL: http://github.com/s-kostyaev/ellama
>  ;; Keywords: help local tools
>  ;; Package-Requires: ((emacs "28.1") (llm "0.6.0") (spinner "1.7.4"))
> -;; Version: 0.4.9
> +;; Version: 0.4.10
>  ;; SPDX-License-Identifier: GPL-3.0-or-later
>  ;; Created: 8th Oct 2023
>  
> @@ -97,6 +97,10 @@
>  (defcustom ellama-keymap-prefix "C-c e"
>    "Key sequence for Ellama Commands."
>    :type 'string
> +  :set (lambda (symbol value)
> +	 (set symbol value)

AFAIK it is better to use a function like `set-default' or even
`custom-set-default'.

> +	 (when value
> +	   (ellama-setup-keymap)))
>    :group 'ellama)
>  
>  (defcustom ellama-ollama-binary (executable-find "ollama")



^ permalink raw reply	[relevance 99%]

* Re: Manuals for GNU ELPA packages
  @ 2023-12-26 17:17 89% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-12-26 17:17 UTC (permalink / raw)
  To: Kjartan Óli Ágústsson; +Cc: emacs-devel@gnu.org

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

Kjartan Óli Ágústsson <kjartanoli@outlook.com> writes:

> Some time ago my calibre package
> (https://elpa.gnu.org/packages/calibre.html) was added to GNU ELPA.
> Shortly after that I made my first attempt to write a Texinfo manual for
> the package.  When I look at the tarball downloaded from ELPA I see the
> texi files are there but there are no info files.  Does the ELPA package
> specification need to be updated, or did I do something wrong when
> adding the manual to my repository?

Yes, the package specification needs a new :doc attribute, something
like


[-- Attachment #2: Type: text/plain, Size: 543 bytes --]

diff --git a/elpa-packages b/elpa-packages
index 858948422f..8faa74d12b 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -123,7 +123,8 @@
  ;;                      :doc "cc-mode.texi"))
  (buildbot		:url "https://g.ypei.me/buildbot.el.git"
   :readme "README.org")
- (calibre               :url "https://git.disroot.org/kjartanoli/calibre.el")
+ (calibre               :url "https://git.disroot.org/kjartanoli/calibre.el"
+  :doc "doc/calibre.tex")
  (cape			:url "https://github.com/minad/cape"
   :doc "README.org"
   :news "CHANGELOG.org"

[-- Attachment #3: Type: text/plain, Size: 301 bytes --]


Just note that the file extension .tex is wrong here, since this is not
a regular TeX or LaTeX file.  If you rename it to .texi and we then
update the specification, then the documentation should be packaged in
the tarball and also appear online under
https://elpa.gnu.org/packages/doc/calibre.html.

^ permalink raw reply related	[relevance 89%]

* Re: cond*
  @ 2023-12-25 12:32 95%                 ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-12-25 12:32 UTC (permalink / raw)
  To: Richard Stallman; +Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> I'm going to finish designing the specs of cond* before trying to
> implement it.  To implement each of the different spec versions
> would have been a lot more work than is really necessary.

Having a rough prototype of an implementation would still be useful to
have, to get a better felling of what the macro should look and feel
like.  An advantage of `pcase' (as with Emacs) is that it is extensible
and can be adapted to new needs.  My fear is that if `cond*' is conjured
up in our minds, it is easy to misunderstand the needs in practice, or
if it really will be easier to use.  E.g. from reading your messages, I am
still not sure how `cond*' and `match' are supposed to interact with one
another.



^ permalink raw reply	[relevance 95%]

* Re: Making package.el talk over Tor
  @ 2023-12-24 15:19 99%                                   ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-12-24 15:19 UTC (permalink / raw)
  To: Tomas Hlavaty; +Cc: rms, emacs-devel

Tomas Hlavaty <tom@logand.com> writes:

> On Sat 23 Dec 2023 at 22:57, Richard Stallman <rms@gnu.org> wrote:
>>   > >>   >  '(url-proxy-services
>>   > >>   >    '(("no_proxy" . "localhost")
>>   > >>   >      ("http" . "127.0.0.1:8118")
>>   > >>   >      ("https" . "127.0.0.1:8118")))
>>
>> Is there a reason for using the number 9118?
>
> in my case:
> 8118 has privoxy running
> so it looks like this:
> emacs -> 8118 privoxy -> 9050 tor
>
> 8118 is a HTTP proxy
> 9050 is a socks proxy
>
>> Tor's default seems to
>> be 9050; if I specify that number here, would it work
>> without changing /etc/tor/torrc?
>
> I don't think so.
>
> iirc emacs using socks proxy did not work for me

Do you recall what your configuration was.  I gave an example earlier on
in this thread, but noticed that url wouldn't redirect all messages over
the SOCKS proxy.

> emacs using http proxy works fine
> and I can have other rules in privoxy
> which I do not thing is possible to specify directly in emacs
> without changing emacs




^ permalink raw reply	[relevance 99%]

* Re: [ELPA] New package devicetree-ts-mode
  @ 2023-12-22  7:36 65% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-12-22  7:36 UTC (permalink / raw)
  To: Aleksandr Vityazev; +Cc: emacs-devel

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

Aleksandr Vityazev <avityazew@gmail.com> writes:

> Hello,
>
> I'd like to submit devicetree-ts-mode [1] to GNU ELPA.
> This is tree-sitter major mode for Devicetree [2] files.
>
> [1] https://git.sr.ht/~akagi/devicetree-ts-mode/
> [2] https://www.devicetree.org/

Here are a few comments:


[-- Attachment #2: Type: text/plain, Size: 3397 bytes --]

diff --git a/devicetree-ts-mode.el b/devicetree-ts-mode.el
index 1d9f72c..d26937c 100644
--- a/devicetree-ts-mode.el
+++ b/devicetree-ts-mode.el
@@ -33,6 +33,7 @@
 ;; * IMenu
 ;; * Font Lock
 
+;; The commentary section could elaborate on what "Devicetree" are.
 
 ;;; Code:
 
@@ -44,15 +45,21 @@
 (declare-function treesit-parser-create "treesit.c")
 (declare-function treesit-node-child-by-field-name "treesit.c")
 
+(defgroup devicetree ()
+  "Tree-sitter support for DTS."
+  :prefix "devicetree-ts-"
+  :group 'languages)
+
 (defcustom devicetree-ts-mode-indent-offset 4
   "Number of spaces for each indentation step in `devicetree-ts-mode'."
   :version "29.1"
+  ;; This is not a core package, the version of your package is 0.2,
+  ;; so this doesn't match up
   :type 'natnum
-  :safe 'natnump
-  :group 'devicetree)
+  :safe 'natnump)
 
 ;; Taken from the dts-mode
-(defvar devicetree-ts-mode--syntax-table
+(defvar devicetree-ts-mode-syntax-table
   (let ((table (make-syntax-table)))
 
     (modify-syntax-entry ?<  "(>" table)
@@ -81,6 +88,10 @@
 
 (defvar devicetree-ts-mode--indent-rules
   (let ((offset devicetree-ts-mode-indent-offset))
+    ;; If this is a variable, that is set when the package is loaded,
+    ;; customising the user option `devicetree-ts-mode-indent-offset'
+    ;; will have no effect.  You could turn this into a function
+    ;; instead.
     `((devicetree
        ((node-is ">") parent-bol 0)
        ((node-is "]") parent-bol 0)
@@ -93,13 +104,14 @@
        (no-node parent-bol 0))))
   "Tree-sitter indent rules for `devicetree-ts-mode'.")
 
+;; Could these be defconst?
 (defvar devicetree-ts-mode--treesit-keywords
   '("/delete-node/" "/delete-property/" "#define" "#include"
     "/omit-if-no-ref/" "/dts-v1/"))
 
 (defvar devicetree-ts-mode--treesit-operators
-  '( "!" "~" "-" "+" "*" "/" "%" "||" "&&" "|"
-     "^" "&" "==" "!=" ">" ">=" "<=" ">" "<<" ">>"))
+  '("!" "~" "-" "+" "*" "/" "%" "||" "&&" "|"
+    "^" "&" "==" "!=" ">" ">=" "<=" ">" "<<" ">>"))
 
 (defvar devicetree-ts-mode--font-lock-settings
   (treesit-font-lock-rules
@@ -154,8 +166,8 @@
 
 (defun devicetree-ts-mode--node-addresses (node)
   "List of addresses for NODE."
-  (reverse
-   (seq-reduce
+  (reverse				;Why `reverse'? (or `nreverse'?)
+   (seq-reduce				;Isn't this a `seq-filter'?
     (lambda (acc children)
       (if (string-equal (treesit-node-field-name children)
                         "address")
@@ -175,8 +187,6 @@
 ;;;###autoload
 (define-derived-mode devicetree-ts-mode prog-mode "DTS"
   "Major mode for editing devicetree, powered by tree-sitter."
-  :group 'devicetree
-  :syntax-table devicetree-ts-mode--syntax-table
 
   (when (treesit-ready-p 'devicetree)
     (treesit-parser-create 'devicetree)
@@ -187,7 +197,7 @@
 
     ;; Imenu.
     (setq-local treesit-simple-imenu-settings
-                `((nil "\\`node\\'"
+                `((nil ,(rx bos "node" eos)
                        nil devicetree-ts--mode--name-function)))
     (setq-local which-func-functions nil)
 
@@ -216,9 +226,8 @@
 
     (treesit-major-mode-setup)))
 
-(if (treesit-ready-p 'devicetree)
-    (add-to-list 'auto-mode-alist
-                 '("\\.dtsi?\\'" . devicetree-ts-mode)))
+(when (treesit-ready-p 'devicetree)
+  (add-to-list 'auto-mode-alist '("\\.dtsi?\\'" . devicetree-ts-mode)))
 
 (provide 'devicetree-ts-mode)
 ;;; devicetree-ts-mode.el ends here

[-- Attachment #3: Type: text/plain, Size: 1151 bytes --]


>
> From b69687be8232cfd305893b7c0b6999e6667d6dd8 Mon Sep 17 00:00:00 2001
> Message-ID: <b69687be8232cfd305893b7c0b6999e6667d6dd8.1703075351.git.avityazew@gmail.com>
> From: Aleksandr Vityazev <avityazew@gmail.com>
> Date: Wed, 20 Dec 2023 15:28:35 +0300
> Subject: [PATCH] * elpa-packages (devicetree-ts-mode): New package
>
> ---
>  elpa-packages | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/elpa-packages b/elpa-packages
> index 612bc676cd..6f86a59cfd 100644
> --- a/elpa-packages
> +++ b/elpa-packages
> @@ -207,6 +207,8 @@
>    :news "CHANGELOG.org"
>    :readme "README.md")
>   (devdocs		:url "https://github.com/astoff/devdocs.el")
> + (devicetree-ts-mode	:url "https://sr.ht/~akagi/devicetree-ts-mode"
> +  :ignored-files ("LICENSE"))

You can track this file in an .elpaignore file, within your repository
(which you appear to have anyway).

>   (dict-tree		:url nil) ;"http://www.dr-qubit.org/git/predictive.git"
>   (diff-hl		:url "https://github.com/dgutov/diff-hl.git")
>   (diffview            	:url "https://github.com/mgalgs/diffview-mode.git")
>
> base-commit: b7bbd439862f2a58151eacacebc1815b7ddf3322
> -- 
> 2.41.0

^ permalink raw reply related	[relevance 65%]

* Re: cond*
  @ 2023-12-22  7:27 99%             ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-12-22  7:27 UTC (permalink / raw)
  To: Richard Stallman; +Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> Fall-through clauses are an important feature of cond* and a big
> advance in flexibility.  Precisely how to indicate one is a detail,
> and I've proposed three ways to design that:
>
> * A clause with one element.
> * A clause that starts with t.
> * A clause that starts with nil.
> * A keyword.
>
> If you have preferences about that detail, please let me know.
> I am also interested in other suggestions, but I will only accept
> it if it is as natural and simple as those above.

Have I missed something, or where is the source code for cond*.
Skimming through the messages, I don't quite understand how it is
supposed to work.



^ permalink raw reply	[relevance 99%]

* Re: [elpa] main 080e09a4c6: * elpa-packages (spacious-padding): Add :doc, :news, and expand :ignored-files
       [not found]     ` <20231221073151.CF09CC00613@vcs2.savannah.gnu.org>
@ 2023-12-21 10:32 99%   ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-12-21 10:32 UTC (permalink / raw)
  To: emacs-devel; +Cc: Protesilaos Stavrou

Protesilaos Stavrou <info@protesilaos.com> writes:

> branch: main
> commit 080e09a4c6f038818a5a7a9c5e53ff168e0fe00e
> Author: Protesilaos Stavrou <info@protesilaos.com>
> Commit: Protesilaos Stavrou <info@protesilaos.com>
>
>     * elpa-packages (spacious-padding): Add :doc, :news, and expand :ignored-files
> ---
>  elpa-packages | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/elpa-packages b/elpa-packages
> index 858948422f..f2c60cac5d 100644
> --- a/elpa-packages
> +++ b/elpa-packages
> @@ -638,8 +638,10 @@
>   (sokoban		:url nil)
>   (sotlisp		:url "https://github.com/Malabarba/speed-of-thought-lisp")
>   (spacious-padding		:url "https://git.sr.ht/~protesilaos/spacious-padding"
> +  :doc "README.org"
>    :readme "README.md"
> -  :ignored-files ("COPYING"))
> +  :news "CHANGELOG.org"
> +  :ignored-files ("COPYING" "doclicense.texi"))

It would be better to track this in your repository, within a
.elpaignore file.

>   (spinner		:url "https://github.com/Malabarba/spinner.el")
>   (sql-beeline		:url nil)
>   (sql-cassandra		:url nil)



^ permalink raw reply	[relevance 99%]

* Re: Making package.el talk over Tor
  2023-12-21  9:52 99%                           ` Philip Kaludercic
@ 2023-12-21  9:55 99%                             ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-12-21  9:55 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Tomas Hlavaty, emacs-devel

Philip Kaludercic <philipk@posteo.net> writes:

> Richard Stallman <rms@gnu.org> writes:
>
>> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
>> [[[ whether defending the US Constitution against all enemies,     ]]]
>> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>>
>>   > (custom-set-variables
>>   >  '(url-cookie-confirmation nil)
>>   >  '(url-cookie-untrusted-urls '(".*"))
>>   >  '(url-gateway-method 'native)
>>   >  '(url-privacy-level 'paranoid)
>>   >  '(url-proxy-services
>>   >    '(("no_proxy" . "localhost")
>>   >      ("http" . "127.0.0.1:8118")
>>   >      ("https" . "127.0.0.1:8118")))
>
> For this to work, one has to add
>
>    HTTPTunnelPort localhost:8118

* to /etc/tor/torrc

> and it only appears to work for https:// URLs, not unencrypted http://.
>
>>   >  '(url-queue-timeout 4)
>>
>> I will give that a try.  Thanks.
>>
>>   > why is this not a sufficient solution?
>>
>> I am the wrong person to ask.  I don't have the background knowledge
>> to tell whether it solves the problem.
>
> You can use https://check.torproject.org/ to check, if the request goes
> through the Tor proxy, the page will say "Congratulations. This browser
> is configured to use Tor."



^ permalink raw reply	[relevance 99%]

* Re: Making package.el talk over Tor
  @ 2023-12-21  9:52 99%                           ` Philip Kaludercic
  2023-12-21  9:55 99%                             ` Philip Kaludercic
  0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-12-21  9:52 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Tomas Hlavaty, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > (custom-set-variables
>   >  '(url-cookie-confirmation nil)
>   >  '(url-cookie-untrusted-urls '(".*"))
>   >  '(url-gateway-method 'native)
>   >  '(url-privacy-level 'paranoid)
>   >  '(url-proxy-services
>   >    '(("no_proxy" . "localhost")
>   >      ("http" . "127.0.0.1:8118")
>   >      ("https" . "127.0.0.1:8118")))

For this to work, one has to add

   HTTPTunnelPort localhost:8118

and it only appears to work for https:// URLs, not unencrypted http://.

>   >  '(url-queue-timeout 4)
>
> I will give that a try.  Thanks.
>
>   > why is this not a sufficient solution?
>
> I am the wrong person to ask.  I don't have the background knowledge
> to tell whether it solves the problem.

You can use https://check.torproject.org/ to check, if the request goes
through the Tor proxy, the page will say "Congratulations. This browser
is configured to use Tor."



^ permalink raw reply	[relevance 99%]

* Re: The place for the "ELPA bundling" project
  @ 2023-12-19  6:45 96% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-12-19  6:45 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: emacs-devel

Dmitry Gutov <dmitry@gutov.dev> writes:

> I've tried to find the bug number, or a specific emacs-devel
> discussion, that would contain the existing knowledge and some hint of
> the current state. And failed.
>
> Could somebody give me the link I could post in public? Both to refer
> to that potential feature, and to invite people to help out.

Eli send me this <83zg27emh8.fsf@gnu.org>, or if you cannot resolve it,
here is the copied text:

--8<---------------cut here---------------start------------->8---
> From: Philip Kaludercic <philipk@posteo.net>
> Cc: rms@gnu.org,  emacs-devel@gnu.org
> Date: Thu, 31 Aug 2023 06:10:17 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > It is indeed planned to do that only with packages on GNU ELPA.  But
> > we haven't yet figured some important aspects of including ELPA
> > packages in release tarballs, so the idea is there, but it is not yet
> > actionable.
> 
> I was under the assumption that issue was resolved, if
> `package-directory-list' would contain the right directory?

That's not the only issue we need to resolve.  See

  https://lists.gnu.org/archive/html/emacs-devel/2020-12/msg00917.html
  https://lists.gnu.org/archive/html/emacs-devel/2021-01/msg01017.html
  https://lists.gnu.org/archive/html/emacs-devel/2021-01/msg01373.html

for the previous discussions, where the issues were raised and
discussed.
--8<---------------cut here---------------end--------------->8---



^ permalink raw reply	[relevance 96%]

* Re: Ellama comments
  @ 2023-12-17 21:39 99%               ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-12-17 21:39 UTC (permalink / raw)
  To: Sergey Kostyaev; +Cc: emacs-devel

Sergey Kostyaev <sskostyaev@gmail.com> writes:

> .elpaignore added, thank you.

OK, as there haven't been any comments I have added the package to GNU
ELPA.



^ permalink raw reply	[relevance 99%]

* Re: Ellama comments
  @ 2023-12-17 12:06 92%           ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-12-17 12:06 UTC (permalink / raw)
  To: Sergey Kostyaev; +Cc: emacs-devel

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

Sergey Kostyaev <sskostyaev@gmail.com> writes:

> Done.

OK, the package builds now.


[-- Attachment #2: Type: text/plain, Size: 509 bytes --]

diff --git a/elpa-packages b/elpa-packages
index 07f9e2373e..8695a87faf 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -258,6 +258,7 @@
  ;;(eldoc-eval		:url "https://github.com/thierryvolpiatto/eldoc-eval.git")
  (electric-spacing	:url nil)
  (elisp-benchmarks	:url nil)
+ (ellama                :url "https://github.com/s-kostyaev/ellama")
  (emacs-gc-stats	:url "https://git.sr.ht/~yantar92/emacs-gc-stats"
   :ignored-files ("COPYING"))
  ;; FIXME: Work in progress.  The copyright paperwork is ready.

[-- Attachment #3: Type: text/plain, Size: 3362 bytes --]



I would also recommend adding an .elpaignore, with these lines:

--8<---------------cut here---------------start------------->8---
.github
imgs
--8<---------------cut here---------------end--------------->8---

To avoid packaging them in the release tarball.

I'll wait a bit to see if there are any comments, and then publish the
package.

>> 14 дек. 2023 г., в 18:18, Philip Kaludercic <philipk@posteo.net> написал(а):
>> 
>> The development mailing list got dropped, I've added it again.
>> 
>> Sergey Kostyaev <sskostyaev@gmail.com> writes:
>> 
>>> Today I finally got signed CA. What’s my next steps to move ellama to GNU Elpa?
>> 
>> The first thing that you'll need to do is to update the copyright
>> string, and replace it with
>> 
>>  ;; Copyright (C) 2023  Free Software Foundation, Inc.
>> 
>> and bump the version header.
>> 
>> Unless we find any further issues, I can just add the package to
>> elpa.git and that is that.
>> 
>>> I have fixed most of your comments and fix customization group
>>> soon. Spinner instead of progress-reporter because it was contribution
>>> from other person. And I like it - it has high level api. And it’s
>>> informative enough.
>> 
>> OK, if you say so, it just seems like an unnecessary dependency to me,
>> that might also be a soft dependency.
>> 
>>> Best Regards,
>>> Sergei Kostiaev
>>> 
>>>> 3 нояб. 2023 г., в 00:24, Philip Kaludercic <philipk@posteo.net> написал(а):
>>>> 
>>>> Sergey Kostyaev <sskostyaev@gmail.com> writes:
>>>> 
>>>>> Hi, Philip. I'm honored. It's OK for me in general. I need to check my
>>>>> job contract about signature for GNU Elpa. And I'm in Russia now, can
>>>>> this be a problem? I need some time to investigate your comments. I
>>>>> will reply more specifically a few days later.
>>>> 
>>>> I don't expect that there should be an issue wrt to Russia, but I cannot
>>>> say for sure.
>>>> 
>>>>> Best regards,
>>>>> Sergey Kostyaev 
>>>>> 
>>>>> 2 ноября 2023 г. 11:23:04 UTC, Philip Kaludercic <philipk@posteo.net> пишет:
>>>>>> 
>>>>>> Hi, I was looking into proposing the inclusion of Ellama to NonGNU ELPA
>>>>>> (or ideally GNU ELPA if you are OK with it), but I first wanted to send
>>>>>> you a few comments on the code:
>>>>>> 
>>>> 
>>>> Sergey Kostyaev <sskostyaev@gmail.com> writes:
>>>> 
>>>>> About job contract all fine. What should I do with code by other
>>>>> contributors to move project to GNU Elpa? Are there any cheatsheets
>>>>> about it? About code comments I will reply later.
>>>> 
>>>> It is necessary that all significant contributors have signed the FSF
>>>> copyright assignment (CA), but from what I see you seem to be the only one
>>>> that would qualify as such (more than 15 lines of substantial code is
>>>> the way this is usually approximated).
>>>> 
>>>> Have you already signed the CA?  If not, send an email to
>>>> emacs-devel@gnu.org to request the form.
>>>> 
>>>>> 2 ноября 2023 г. 11:23:04 UTC, Philip Kaludercic <philipk@posteo.net> пишет:
>>>>>> 
>>>>>> Hi, I was looking into proposing the inclusion of Ellama to NonGNU ELPA
>>>>>> (or ideally GNU ELPA if you are OK with it), but I first wanted to send
>>>>>> you a few comments on the code:
>>>>>> 
>

-- 
Philip Kaludercic

^ permalink raw reply related	[relevance 92%]

* Re: Making package.el talk over Tor
  @ 2023-12-17 11:51 73%             ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-12-17 11:51 UTC (permalink / raw)
  To: Richard Stallman; +Cc: akib, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > 185.220.101.26 - - [14/Dec/2023:13:04:00 +0100] "GET /test HTTP/1.1" 301 169 "https://amodernist.com/" "URL/Emacs Emacs/30.0.50 (PureGTK; x86_64-pc-linux-gnu)"
>
>   > As you can see the User-Agent indicates that I am using Emacs, what
>   > version and even my architecture.  Compare that to the user agent that
>   > you'd regularly encounter from an average browser:
>
> We should (1) let users specify what User-Agent to send, 

That is already possible using the `url-user-agent' user option.

>                                                          and (2) maybe
> choose a different default.

1+

> Icecat, by default, identifies itself as some widely used proprietary
> browser running on Windows.

While helpful, it could also be dangerous if the server decides to send
the user content that only a widely used proprietary browser running on
Windows could process.

>   > Other than the user-agent, there are certainly other bits of behaviour
>   > that a malicious actor can use to track a user, such as the order in
>   > which HTTP headers are transmitted, the size of chunks by which the
>   > client sends and receives data and of course what requests aren't being
>   > sent (e.g. due to a lack of Javascript in EWW).
>
> We could work on making Emacs-based browsing more similar to the most
> common browsers, in such aspects of visible behavior.
>
>   >  and of course what requests aren't being
>   > sent (e.g. due to a lack of Javascript in EWW).
>
> Compareed with the harm done by _running_ the page's Javascript,
> giving evidence of not running Javascript is arguably a far lesser
> evil.

The way I see this, this is a security/privacy vs freedom issue.  If you
really want to blend in, you have to behave the way most people do.

> That said, one important method for preventing sites from effectively
> profiling you is to connect to them through Tor.  In fact, connecting
> directly enables OTHERS that observe your network traffic to figure
> out what you are talking to!

Tor hides your IP address, in which sense it acts like a trusted VPN
service, but I am just trying to emphasise that (in general) just using
Tor as a transport layer can give users a false sense of security.

> That is why I want to connect to the Emacs package repo via Tor.
> I am not worried about being profiled by the Emacs package repo!
>
> More generally, if all that distinguishes you in the actual
> interaction with a site is that you don't run the Javascript, and you
> connect through Tor, whatever site you are talking to will have
> trouble distinguishing you from other users that don't run the
> Javascript.

True, but considering how infrequent this is on a global scale, "no
Javascript" still holds a lot of information.

>   > That being said: All of this doesn't matter that much for package.el,
>   > since most people are accessing it via Emacs.
>
> I agree.  However, these issues may have some real importance for the case
> of using EWW to look at pages _other than_ the Emacs package repo.

Right, that is where my concerns from above apply.

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > If you have a Tor daemon running on your system, it should provide a
>   > SOCKS proxy by default,
>
> I believe it does that.
>
>                             meaning that you can configure every package
>   > that uses url.el to go through this proxy (unless I have misunderstood
>   > something):
>
> Maybe that is possible.  But I know very little about sockets or how
> to use them.  I would appreciate precise advice about what I should do
> to tell package.el to connect using Tor.

That was the code you quoted below with `url-gateway-method'.

> You sent this code
>
>     (let ((conn
>            (open-network-stream
>             "test" (current-buffer) "gnu.org" "http"
>             :type 'shell
>             :shell-command "torsocks nc %s %p")))
>       (process-send-string conn "GET / HTTP/1.0\r\n\r\n"))
>
> but I don't think that is a solution ready to use.  It looks like a
> proposed approach for designing that solution.
>
> Also, the end of your message MAY mean that this approach is not
> applicable to package.el.

Yes, this was just a proof of concept integrating torsocks into a
network connection open from within Emacs.

>   > If you have a Tor daemon running on your system, it should provide a
>   > SOCKS proxy by default, meaning that you can configure every package
>   > that uses url.el to go through this proxy (unless I have misunderstood
>   > something):
>
>   > --8<---------------cut here---------------start------------->8---
>   > (setq url-gateway-method 'socks
>   >       socks-server '("Tor" "localhost" 9050 5))
>   > --8<---------------cut here---------------end--------------->8---
>
>   > That being said, while testing I noticed that when connecting to a
>   > server I have access to, I always receive two requests, one from a Tor
>   > exit node and one from my current IP address.  Unless I missed something
>   > obvious, that might be a bug.
>
> I await word about further progress.

I will try and look into if I am mis-configuring something, and
otherwise report a bug.

> When I know enough to be able to do it, I will add a feature to
> package.el for a user option to tell it to go through Tor always.

Stefan Kangas <stefankangas@gmail.com> writes:

> Richard Stallman <rms@gnu.org> writes:
>
>>   > 185.220.101.26 - - [14/Dec/2023:13:04:00 +0100] "GET /test
>>   > HTTP/1.1" 301 169 "https://amodernist.com/" "URL/Emacs
>>   > Emacs/30.0.50 (PureGTK; x86_64-pc-linux-gnu)"
>>
>>   > As you can see the User-Agent indicates that I am using Emacs, what
>>   > version and even my architecture.  Compare that to the user agent that
>>   > you'd regularly encounter from an average browser:
>>
>> We should (1) let users specify what User-Agent to send, and (2) maybe
>> choose a different default.
>>
>> Icecat, by default, identifies itself as some widely used proprietary
>> browser running on Windows.
>
> Should we bump the default to 'paranoid'?  Do what icecat does?

That wouldn't send any Use-Agent header at all, which is still
fingerprintable.  Richard mentioned that Icecat uses a false user agent like

  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.3

but that would have to be updated on a regular basis, to keep up with
whatever is being used.  That being said, I don't believe that this is
enough, if we take the threat model into account that a Tor user is
operating under.  In their case, it probably is the best to just use the
Tor Browser.

> Does the remote ever need to know if we're using X11 or PureGTK?
> I think they don't, and we should never add that information, in any
> configuration.

Yes, it might make sense to just add `os' to `url-privacy-level'.

>>   > Other than the user-agent, there are certainly other bits of behaviour
>>   > that a malicious actor can use to track a user, such as the order in
>>   > which HTTP headers are transmitted, the size of chunks by which the
>>   > client sends and receives data and of course what requests aren't being
>>   > sent (e.g. due to a lack of Javascript in EWW).
>>
>> We could work on making Emacs-based browsing more similar to the most
>> common browsers, in such aspects of visible behavior.
>
> If you are very concerned about your privacy, it's probably better to
> browse the web using the Tor web browser and eschew Emacs altogether.
>
> How about telling users about this in the EWW manual?

1+

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 73%]

* Re: [ELPA] Use :release-branch for plz.el
  @ 2023-12-17  8:38 99% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-12-17  8:38 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-devel

Adam Porter <adam@alphapapa.net> writes:

> Hi Stefan, Philip, et al,
>
> Please see the attached patch which sets the release branch for
> plz.el. This will allow me to make small, bug-fix version releases
> from the stable branch while the next version is in development on the
> master branch.

Thanks, I have applied and pushed the patch.

> BTW, after having done this for a few packages now, this seems to me
> to be the best practice.  It might be worth recommending this for new
> packages.

I have no real opinion on this, other than that it might be
unnecessarily complicated for most packages.

> Thanks,
> Adam

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 99%]

* Re: Making package.el talk over Tor
    @ 2023-12-14 12:41 79%         ` Philip Kaludercic
    1 sibling, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-12-14 12:41 UTC (permalink / raw)
  To: Richard Stallman; +Cc: akib, emacs-devel

Richard Stallman <rms@gnu.org> writes:

>   >  because one will continue to leak fingerprintable
>   > metadata (specially inside of Emacs)
>
> Could you give me an example of what you mean?

As mention in my other message, I was testing what my web server was
logging when accessing the server via Tor, and this was the log entry:

185.220.101.26 - - [14/Dec/2023:13:04:00 +0100] "GET /test HTTP/1.1" 301 169 "https://amodernist.com/" "URL/Emacs Emacs/30.0.50 (PureGTK; x86_64-pc-linux-gnu)"

As you can see the User-Agent indicates that I am using Emacs, what
version and even my architecture.  Compare that to the user agent that
you'd regularly encounter from an average browser:

31.10.139.153 - - [14/Dec/2023:00:18:33 +0100] "GET / HTTP/1.1" 200 10585 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36"

This can be remedied by setting the `url-privacy-level' user option to
'paranoid, but in that case you are still identifiable because there is
no user agent, which carries some information.

Other than the user-agent, there are certainly other bits of behaviour
that a malicious actor can use to track a user, such as the order in
which HTTP headers are transmitted, the size of chunks by which the
client sends and receives data and of course what requests aren't being
sent (e.g. due to a lack of Javascript in EWW).

The EFF has more information on the topic here:
https://coveryourtracks.eff.org/learn.

That being said: All of this doesn't matter that much for package.el,
since most people are accessing it via Emacs.



^ permalink raw reply	[relevance 79%]

* Re: Making package.el talk over Tor
  @ 2023-12-14 12:25 85%                 ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-12-14 12:25 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Eli Zaretskii, akib, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > This sounds like a way to make the connection by running a shell
>   > command.  Maybe you could arrange for using this facility to do what
>   > you want?
>
> I have no idea.  I don't know how to make a program talk to anything
> over the net, either with Tor or without.

I tried out Eli's suggestion, and it seems to work:

(let ((conn
       (open-network-stream
	"test" (current-buffer) "gnu.org" "http"
	:type 'shell
	:shell-command "torsocks nc %s %p")))
  (process-send-string conn "GET / HTTP/1.0\r\n\r\n"))

>
> I think all Emacs features to do something over the internet should
> give users a way to say "go through Tor".  (For most applicaions I
> think a global variable is the preferable way to specify this.)

If you have a Tor daemon running on your system, it should provide a
SOCKS proxy by default, meaning that you can configure every package
that uses url.el to go through this proxy (unless I have misunderstood
something):

--8<---------------cut here---------------start------------->8---
(setq url-gateway-method 'socks
      socks-server '("Tor" "localhost" 9050 5))
--8<---------------cut here---------------end--------------->8---

That being said, while testing I noticed that when connecting to a
server I have access to, I always receive two requests, one from a Tor
exit node and one from my current IP address.  Unless I missed something
obvious, that might be a bug.

> Can someone who knows how to do that please implement it for Emacs package.el?

FWIW As package.el doesn't directly use any low level networking, so the
:shell trick wouldn't be something that could be easily implemented.



^ permalink raw reply	[relevance 85%]

* Re: Ellama comments
       [not found]         ` <6B0DECA2-8E81-495E-99AC-A9F81B43C05E@gmail.com>
@ 2023-12-14 11:18 97%       ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-12-14 11:18 UTC (permalink / raw)
  To: Sergey Kostyaev; +Cc: emacs-devel

The development mailing list got dropped, I've added it again.

Sergey Kostyaev <sskostyaev@gmail.com> writes:

> Today I finally got signed CA. What’s my next steps to move ellama to GNU Elpa?

The first thing that you'll need to do is to update the copyright
string, and replace it with

  ;; Copyright (C) 2023  Free Software Foundation, Inc.

and bump the version header.

Unless we find any further issues, I can just add the package to
elpa.git and that is that.

> I have fixed most of your comments and fix customization group
> soon. Spinner instead of progress-reporter because it was contribution
> from other person. And I like it - it has high level api. And it’s
> informative enough.

OK, if you say so, it just seems like an unnecessary dependency to me,
that might also be a soft dependency.

> Best Regards,
> Sergei Kostiaev
>
>> 3 нояб. 2023 г., в 00:24, Philip Kaludercic <philipk@posteo.net> написал(а):
>> 
>> Sergey Kostyaev <sskostyaev@gmail.com> writes:
>> 
>>> Hi, Philip. I'm honored. It's OK for me in general. I need to check my
>>> job contract about signature for GNU Elpa. And I'm in Russia now, can
>>> this be a problem? I need some time to investigate your comments. I
>>> will reply more specifically a few days later.
>> 
>> I don't expect that there should be an issue wrt to Russia, but I cannot
>> say for sure.
>> 
>>> Best regards,
>>> Sergey Kostyaev 
>>> 
>>> 2 ноября 2023 г. 11:23:04 UTC, Philip Kaludercic <philipk@posteo.net> пишет:
>>>> 
>>>> Hi, I was looking into proposing the inclusion of Ellama to NonGNU ELPA
>>>> (or ideally GNU ELPA if you are OK with it), but I first wanted to send
>>>> you a few comments on the code:
>>>> 
>> 
>> Sergey Kostyaev <sskostyaev@gmail.com> writes:
>> 
>>> About job contract all fine. What should I do with code by other
>>> contributors to move project to GNU Elpa? Are there any cheatsheets
>>> about it? About code comments I will reply later.
>> 
>> It is necessary that all significant contributors have signed the FSF
>> copyright assignment (CA), but from what I see you seem to be the only one
>> that would qualify as such (more than 15 lines of substantial code is
>> the way this is usually approximated).
>> 
>> Have you already signed the CA?  If not, send an email to
>> emacs-devel@gnu.org to request the form.
>> 
>>> 2 ноября 2023 г. 11:23:04 UTC, Philip Kaludercic <philipk@posteo.net> пишет:
>>>> 
>>>> Hi, I was looking into proposing the inclusion of Ellama to NonGNU ELPA
>>>> (or ideally GNU ELPA if you are OK with it), but I first wanted to send
>>>> you a few comments on the code:
>>>> 



^ permalink raw reply	[relevance 97%]

* Re: [ELPA] New package: dape
  @ 2023-12-05 10:59 98%                       ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-12-05 10:59 UTC (permalink / raw)
  To: João Távora
  Cc: Daniel Pettersson, Dmitry Gutov, John Yates, Krister Schuchardt,
	Adam Porter, emacs-devel

João Távora <joaotavora@gmail.com> writes:

> On Tue, Dec 5, 2023 at 8:41 AM Philip Kaludercic <philipk@posteo.net> wrote:
>
>> I have resolved the issue directly with Daniel.  The package has been
>> added to GNU ELPA.
>>
>> Depending on how it is received, it would be nice to see the package be
>> added to the core in some form or another.
>
> Yes to this.  I'm working to make it as well received as possible.
>
> In fact, I've been working on dape.el (slightly late unfortunately,
> but hope to pick up on that soon) and these enhancements need
> `jsonrpc.el` changes too, so I've been working on a branch of Emacs
> where dape.el lives alongside eglot.el in core.  Of course this was
> just for practical reasons, I'll take it out if there when I'm done,
> unless someone tells me to _not_ take it out ;-).

I guess that depends on what model of development Daniel would prefer.

>> By my book, the naming issue
>> could be resolved by adding a `start-dap' command (a `start-lsp' alias
>> for Eglot would also be nice).
>
> There is no real naming issue, but I'm not opposed to adding those
> aliases if M-x dape and M-x eglot both stay)

Hence the "in my book", I know there is disagreement there, it is just
that my main objection "Arbitrary names are difficult to memorise and
communicate" would be sufficiently resolved by adding these kinds of
aliases.



^ permalink raw reply	[relevance 98%]

* Re: [ELPA] New package: dape
  2023-11-23  6:10 91%                 ` Philip Kaludercic
@ 2023-12-05  8:41 95%                   ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-12-05  8:41 UTC (permalink / raw)
  To: Daniel Pettersson
  Cc: João Távora, Dmitry Gutov, John Yates,
	Krister Schuchardt, Adam Porter, emacs-devel

Philip Kaludercic <philipk@posteo.net> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Daniel Pettersson <daniel@dpettersson.net> writes:
>>
>>> On Wed, Nov 1, 2023 at 7:35 PM Philip Kaludercic <philipk@posteo.net> wrote:
>>>> Did we ever come to a conclusion on this point?
>>>
>>> Sorry I have been putting the naming thing off as this thread sparked
>>> a bit of interest in the package which lead to a lot of great input and
>>> bugfixing. There have been a lot of good suggestions and no consensus
>>> which has made the even task harder.
>>
>> In the end that is your call, it is just currently a blocking issue
>> before we add the package to GNU ELPA.
>
> It seems that the name is here to stay, so I'd go ahead and add the
> package to GNU ELPA.  It just seems that you forgot to add a copyright
> notice to the package header.  Could you apply a change along these
> lines:
>
> diff --git a/dape.el b/dape.el
> index f5de1cd..949049d 100644
> --- a/dape.el
> +++ b/dape.el
> @@ -1,5 +1,7 @@
>  ;;; dape.el --- Debug Adapter Protocol for Emacs -*- lexical-binding: t -*-
>  
> +;; Copyright (C) 2023  Free Software Foundation, Inc.
> +
>  ;; Author: Daniel Pettersson
>  ;; Created: 2023
>  ;; License: GPL-3.0-or-later
>
>
> Followed by a  commit (or in the same one) that bumps the "Version"
> header, indicating a new package release?

I have resolved the issue directly with Daniel.  The package has been
added to GNU ELPA.

Depending on how it is received, it would be nice to see the package be
added to the core in some form or another.  By my book, the naming issue
could be resolved by adding a `start-dap' command (a `start-lsp' alias
for Eglot would also be nice).



^ permalink raw reply	[relevance 95%]

* Re: Instead of pcase
  @ 2023-12-02  9:02 76%                           ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-12-02  9:02 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Richard Stallman, Lynn Winebarger, dmitry, emacs-devel

Andreas Schwab <schwab@linux-m68k.org> writes:

> On Dez 01 2023, Richard Stallman wrote:
>
>> confusing.  I know what dotted pairs mean, but I was not sure what
>> they meant in pcase patterns.
>
> They don't mean anything.  It's pure lisp syntax.

Right, the doc-string mentions this as well:

--8<---------------cut here---------------start------------->8---
-- `QPAT

Backquote-style pcase patterns: `QPAT
QPAT can take the following forms:
  (QPAT1 . QPAT2)       matches if QPAT1 matches the car and QPAT2 the cdr.
[...]
--8<---------------cut here---------------end--------------->8---

Just like cons-cells are the "real" constituents of a list, so
pattern-matching on a list "really" means pattern matching on
cons-cells.  I believe this is the kind of behaviour that would arise
naturally, whenever someone tries to re-implement this themselves.

As has been said many times already in this thread: All of this seems to
point in the direction that the main issue people are having is that of
documentation, and part of the problem might be that pcase is generating
its doc-string dynamically, which -- while cool -- might not present the
information in the most understandable way.

Another question I meant to raise, and forgive me if I missed it
somewhere in the remaining discussions, is those who find themselves
confused by `pcase':  Do you have experience with programming languages
that heavily rely on pattern matching and/or unification (ML, Haskell,
Prolog, ...)?  Myself having experience with this kind of programming,
all I had to do to understand `pcase' was to translate the existing
abstract notion I had to the syntax that `pcase' provides.  While I can
imagine that one is more prone to be confused, if trying to learn both
the syntax and the point of `pcase', assuming that this kind of
articulating oneself is not natural.



^ permalink raw reply	[relevance 76%]

* Re: a mode for algol 68
  @ 2023-11-30 13:01 99%       ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-11-30 13:01 UTC (permalink / raw)
  To: Jose E. Marchesi; +Cc: Omar Polo, emacs-devel

"Jose E. Marchesi" <jemarch@gnu.org> writes:

>> On 2023/11/30 07:10:20 +0000, Philip Kaludercic <philipk@posteo.net> wrote:
>>> Omar Polo <op@omarpolo.com> writes:
>>> 
>>> > (please Cc: me since I'm not subscribed to this list)
>>> >
>>> > Two years ago I started hacking on Jose E. Marchesi' algol-mode (that
>>> > I've renamed a68-mode) while I was playing with the algol68g compiler.
>>> > Truth to be told, I think I've spent more time hacking on the emacs mode
>>> > that with the language itself, but anyway...
>>> >
>>> > I haven't touched the mode any more for the last two years, and I doubt
>>> > I'll hack again on it in the future.  Although it's almost finished,
>>> > there remains issues with the indentation and font-locking in some
>>> > cases.
>>> >
>>> > My hope would be that some friendly hacker would take interest in
>>> > maintaining it and maybe even distribute it in ELPA / NonGNU Elpa.
>>> 
>>> I think it would be very nice to have this added to GNU ELPA.  If the
>>> code works (and I see it isn't too much), it shouldn't be too much of a
>>> maintenance burden, so I'd be fine with helping out.
>>> 
>>> > On the copyright side, I don't know Jose E. Marchesi and I copied
>>> > initial the code from some random github repository.  Not great, I know,
>>> > but it was the only major mode for algol68.  However, I *do* have an FSF
>>> > copyright assignment and I ended up rewriting almost all of the code in
>>> > the end.  I paied attention to do the 'initial import' with the original
>>> > code as-is and do my changes on top.  It's 53 commits in total.
>>> 
>>> I cannot evaluate this myself, do you a link to the original GitHub
>>> repository?
>>
>> I took the code from
>> https://github.com/lachrymology/me/blob/master/.emacs.d/extras/algol-mode.el
>> but upon a closer look it seems to originate from here:
>> https://www.jemarch.net/algol68.html
>>
>> I'm cc'ing Jose E. Marchesi using the mail found on (presumibly) their
>> website.  Having a @gnu.org account makes me think that there shouldn't
>> be copyright issues :-)
>
> I have papers in place for Emacs, and I am totally willing to transfer
> the copyright for a68-mode.el's original code (whatever of it survives
> in latest algol-mode.el) to the FSF.

OK, in that case everything should be given to add the package to GNU
ELPA.  The only matter left discussing is if you want to continue to
host the repository yourself and have the ELPA server mirror the
repository regularly.

>> I apologize for not searching better initially, I should have contacted
>> Marchesi in the first place.  I somehow have completely missed their
>> website.
>>
>>> > The code is available here for browsing here:
>>> > <https://git.omarpolo.com/?action=summary&path=a68-mode.git>
>>> > and can be cloned with git via anonymous SSH via
>>> > <ssh://anon@omarpolo.com/a68-mode.git> or with HTTPS via
>>> > <https://git.omarpolo.com/a68-mode.git>.
>>> >
>>> >
>>> > Thanks,
>>> >
>>> > Omar Polo



^ permalink raw reply	[relevance 99%]

* Re: a mode for algol 68
  @ 2023-11-30  7:10 99% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-11-30  7:10 UTC (permalink / raw)
  To: Omar Polo; +Cc: emacs-devel

Omar Polo <op@omarpolo.com> writes:

> (please Cc: me since I'm not subscribed to this list)
>
> Two years ago I started hacking on Jose E. Marchesi' algol-mode (that
> I've renamed a68-mode) while I was playing with the algol68g compiler.
> Truth to be told, I think I've spent more time hacking on the emacs mode
> that with the language itself, but anyway...
>
> I haven't touched the mode any more for the last two years, and I doubt
> I'll hack again on it in the future.  Although it's almost finished,
> there remains issues with the indentation and font-locking in some
> cases.
>
> My hope would be that some friendly hacker would take interest in
> maintaining it and maybe even distribute it in ELPA / NonGNU Elpa.

I think it would be very nice to have this added to GNU ELPA.  If the
code works (and I see it isn't too much), it shouldn't be too much of a
maintenance burden, so I'd be fine with helping out.

> On the copyright side, I don't know Jose E. Marchesi and I copied
> initial the code from some random github repository.  Not great, I know,
> but it was the only major mode for algol68.  However, I *do* have an FSF
> copyright assignment and I ended up rewriting almost all of the code in
> the end.  I paied attention to do the 'initial import' with the original
> code as-is and do my changes on top.  It's 53 commits in total.

I cannot evaluate this myself, do you a link to the original GitHub
repository?

> The code is available here for browsing here:
> <https://git.omarpolo.com/?action=summary&path=a68-mode.git>
> and can be cloned with git via anonymous SSH via
> <ssh://anon@omarpolo.com/a68-mode.git> or with HTTPS via
> <https://git.omarpolo.com/a68-mode.git>.
>
>
> Thanks,
>
> Omar Polo



^ permalink raw reply	[relevance 99%]

* Re: [ELPA] New package: SachaC-news
  @ 2023-11-25 22:50 93%         ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-11-25 22:50 UTC (permalink / raw)
  To: Christian; +Cc: emacs-devel

Christian <cnngimenez@disroot.org> writes:

> Hi Philip!
>
> Sorry, I misunderstood your idea. What would you like to
> discuss specifically?
>
> I will try to pinpoint some things you suggested that is nice
> to talk about. The diff has many modifications, and I find it
> difficult to see the exact places you want to discuss. In
> fact, most of them are changes that I think are better in the
> way you wrote.
>
> Below are extracts from the diff and my comments. Tell me if
> this method is a good idea to talk about them.

It is entirely fine; I'll just be responding to the parts of the message
where I have something constructive to add.

> 4)
>>  (defun sachac-news--show-last-new-internal ()
>>    "Show the last news.
>>  This is used after the update sentinel is executed.
>>  See `sachac-news-show-last-new'."
>> -  (let ((str (sachac-news-take-last-new t)))
>> +  (let ((str (sachac-news-take-last-new t))) ;unused!
>>      (with-current-buffer (get-buffer-create "*last-news*")
>>        (org-mode)
>
>> -      (delete-region (point-min) (point-max))
>> -      (insert str)
>> +      (erase-buffer)
>> +      (insert "foo")
>
> The str variable was used to insert the last new string. The
> portion of the Org-mode text with the last title.

No, that was my bad, I must have replaced the variable with a constant
while testing and forgot to change it back.

> But now I changed this function to support diferent formats (txt,
> html, org, etc.). This code changed in the current version.

Would it be worth checking out the code again?

> 5)
>> @@ -313,20 +303,17 @@ These variables can be loaded again with `sachac-news-load-data'."
>>    (with-temp-buffer
>>      (let ((data (list (cons 'last-update sachac-news-last-update)
>>  		      (cons 'last-saved-title sachac-news-last-saved-title))))
>> -    (insert (prin1-to-string data))
>> -    (write-file (sachac-news-dir-datafile))
>> -    data)) )
>> +      (prin1 data (current-buffer))
>> +      (write-region nil nil (sachac-news-dir-datafile) nil 'silent)
>> +      data)))
>
>>  (defun sachac-news-load-data-if-needed ()
>>    "If the data has not been loaded yet, load it."
>
> Mmm... to my eyes it seems that it does the same but it may be
> something I do not know... or maybe I am missing something?
> Can I ask you why did you change it? Is the new code a
> more convenient or accepted way to do what is intended?
>
> I wonder if perhaps is a parameter or something I do not know
> what it does...
> Maybe is efficiency: the data is directly printed to the buffer
> without transforming into a string?

Yes; The point of these two changes is to avoid generating a string,
that is immediately discarded (less GC), and to avoid generating a
message when writing the buffer contents to disk.

> 6)
>> @@ -335,6 +322,7 @@ These variables can be loaded again with `sachac-news-load-data'."
>
>>  (defun sachac-news-update-time-str ()
>>    "Return a string with the last time and the amount of time left."
>> +  ;; Perhaps format this in a temporary buffer, then return the buffer string?
>>    (format "Waiting time: %s hours
>>  -- Update --
>>  Last time updated: %s
> Yes, that could be a good idea... However, it should not be a
> large string, because it will be displayed on the
> minibuffer. Mmm... maybe it is already large...
>
> What do you think? should the string be formatted in a
> temporary buffer?

It just seemed like it would be more readable, than having a multi-line
format-string.

> This string is shown when using M-x
> sachac-news-show-update-time when an update has been executed
> before.

Perhaps `display-message-or-buffer' could be of interest?

-- 
Philip Kaludercic
 



^ permalink raw reply	[relevance 93%]

* Re: Don't see PATCH on bug-gnu-emacs
  @ 2023-11-24 20:57 98% ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-11-24 20:57 UTC (permalink / raw)
  To: Niall Dooley; +Cc: emacs-devel

Niall Dooley <dooleyn@gmail.com> writes:

> I submitted a simple patch email titled as follows over two hours ago.
>
> [PATCH] eglot: Add ruff-lsp as an alternative python server
>
> This is my first patch so likely I did something wrong.
>
> I did not attach a patch file but rather sent it inline in the mail.
> Reading CONTRIBUTE more carefully I now see an attachment is preferred.
> Is this why it does not appear on the list?  Should I send the mail
> again with the attachment or reply to my original mail?

Both should appear on the mailing list, the issue with inline patches
depending on your MUA is that that might be misrendered.  I couldn't
find anything by your name on bug-gnu-emacs@gnu.org, so I guess
something else went wrong.  Try resending your message -- even if you
make a mistake, it is nothing to worry about, it happens all the time
and nobody will get annoyed or anything like that.

> Thanks for your time.



^ permalink raw reply	[relevance 98%]

* Re: [ELPA] Add theme-buffet package
  @ 2023-11-24 18:11 72%     ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-11-24 18:11 UTC (permalink / raw)
  To: Bruno Boal; +Cc: emacs-devel, info

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

Bruno Boal <egomet@bboal.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Bruno Boal <egomet@bboal.com> writes:
>>
>>> Hello everyone,
>>>
>>> I would like you to consider including my package in the GNU ELPA.
>>> I've just filled out the copyright assignment form, and in the meantime
>>> I'm sending the proposed changes below for your consideration.
>>
>> Here are a few comments in form of a diff (this is not a patch that you
>> should apply, but just some suggestions, hints and ideas that can be
>> discussed):
>>
>
> [...]
>
> Hello again Philip,
>
> I took a look at your constructive review, made some changes accordingly
> and now it looks good to me.
> Thanks in advance for any additional feedback.

I have added the package to GNU ELPA.  You can now change the "This file
is NOT part of GNU Emacs." to "This file is part of GNU Emacs.".

I just noticed that there were a few instances of `pcase' that might
seem to be better suited by using `pcase-exhaustive':


[-- Attachment #2: Type: text/plain, Size: 1829 bytes --]

diff --git a/theme-buffet.el b/theme-buffet.el
index 00120d307e..2b88b81c8d 100644
--- a/theme-buffet.el
+++ b/theme-buffet.el
@@ -205,7 +205,7 @@ Prefilled with Emacs default themes as an example to be changed by the user."
 
 (defun theme-buffet--selected-menu ()
   "Return property list based on `theme-buffet-menu' value."
-  (pcase theme-buffet-menu
+  (pcase-exhaustive theme-buffet-menu
     ('built-in theme-buffet--built-in)
     ('modus-ef theme-buffet--modus-ef)
     ('end-user theme-buffet--end-user)))
@@ -387,11 +387,9 @@ UNITS is an unquoted symbol, mins or hours and refers to timer of the same
 naming."
   (let ((fn-name (intern (format "theme-buffet-timer-%s" units)))
         factor max-num)
-    (pcase units
+    (pcase-exhaustive units
       ('mins (setq factor 60 max-num 180))
-      ('hours (setq factor 3600 max-num 12))
-      (_ (user-error
-          "Bad `units' arg on `theme-buffet--define-timer %s'" units)))
+      ('hours (setq factor 3600 max-num 12)))
     `(defun ,fn-name (number)
        ,(format "Set interactively the timer for NUMBER of %s.
 When NUMBER is 0, the timer is cancelled. Maximum value is %s" units max-num)
@@ -425,11 +423,10 @@ Theme-Buffet uses both Modus and Ef themes, mixed and matched for a maximum
 \"Wow!!\" factor of pleasure and professionalism. At least in this developer's
 opinion.")
          (doc-end-user "End user selected themes")
-         (docstring (pcase menu
+         (docstring (pcase-exhaustive menu
                      ('built-in doc-built-in)
                      ('modus-ef doc-modus-ef)
-                     ('end-user doc-end-user)
-                     (_ "This is not correct!"))))
+                     ('end-user doc-end-user))))
     `(defun ,(intern (format "theme-buffet-%s" menu)) ()
        ,docstring
        (interactive)

[-- Attachment #3: Type: text/plain, Size: 177 bytes --]


Depending on how extensible you want to make the package, it might also
be interesting to investigate the usage of generic functions and
methods.

> All the best,
> Bruno Boal

^ permalink raw reply related	[relevance 72%]

* Re: [ELPA] New package: dired-duplicates
  @ 2023-11-23  6:12 99%                         ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-11-23  6:12 UTC (permalink / raw)
  To: Harald Judt; +Cc: emacs-devel

Harald Judt <h.judt@gmx.at> writes:

> Hi,
>
> On 2023-11-10 at 09:37, Philip Kaludercic wrote:
>
> [...]
>
>> Sorry for the late response; It appears that the package can now be
>> built (see https://elpa.gnu.org/packages/dired-duplicates.html), I had
>> the same issue as you describe on my local machine and now it appears to
>> be gone.  Perhaps this was resolved by your recent 0.2 commit?
>
> Thank you. Yes that seems to be so. Everything is fine now.
>
> I am still unable to build it locally using the elpa instructions, but
> I suppose this has something todo with sandboxing and my local
> configuration. It can byte-compile dired-duplicates.el but not create
> the tarball:
>
> make packages/dired-duplicates
> -----------------------------------------------------------------------------
> emacs --batch -Q -l admin/elpa-admin.el \
>          -f elpaa-batch-pkg-spec-make-dependencies .pkg-descs.mk
> Generating description file packages/dired-duplicates/dired-duplicates-pkg.el
> Byte compiling packages/dired-duplicates/dired-duplicates.el
> emacs --batch -l admin/elpa-admin.el                               \
>          -f elpaa-batch-generate-autoloads
>           packages/dired-duplicates/dired-duplicates-autoloads.el
>   INFO     Scraping files for loaddefs...
>   INFO     Scraping files for loaddefs...done
>   GEN      dired-duplicates-autoloads.el
> -----------------------------------------------------------------------------
>
>
> make build/dired-duplicates
> -----------------------------------------------------------------------------
> emacs --batch -l /mnt/scratch/work/elpa/admin/elpa-admin.el     \
>          -f elpaa-batch-make-one-package dired-duplicates
> ======== Building tarball
> archive-devel/dired-duplicates-0.2.0.20231109.135341.tar...
> Build error for
> archive-devel/dired-duplicates-0.2.0.20231109.135341.tar: (error
> "Error-indicating exit code in elpaa--call-sandboxed:
> emacs: error while loading shared libraries: libgccjit.so.0: cannot
> open shared object file: No such file or directory
> ")
> ######## Build of package
>          archive-devel/dired-duplicates-0.2.0.20231109.135341.tar
>         FAILED!!
> ======== Building tarball archive/dired-duplicates-0.2.tar...
> Build error for archive/dired-duplicates-0.2.tar: (error
> "Error-indicating exit code in elpaa--call-sandboxed:
> emacs: error while loading shared libraries: libgccjit.so.0: cannot
> open shared object file: No such file or directory
> ")
> ######## Build of package archive/dired-duplicates-0.2.tar FAILED!!
> -----------------------------------------------------------------------------
>
> The libgccjit.so resides in a directory that is a subdir of /usr which
> is listed in the sandbox ro-binds
> (/usr/lib/gcc/x86_64-pc-linux-gnu/13/libgccjit.so.0), so I wonder
> what's the problem.

I am not sure either... what version of bwrap do you have installed?  If
you manually edit the `elpaa--sandbox' in elpa-admin.el to nil, does
anything change?

> Harald



^ permalink raw reply	[relevance 99%]

* Re: [ELPA] New package: dape
  @ 2023-11-23  6:10 91%                 ` Philip Kaludercic
  2023-12-05  8:41 95%                   ` Philip Kaludercic
  0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-11-23  6:10 UTC (permalink / raw)
  To: Daniel Pettersson
  Cc: João Távora, Dmitry Gutov, John Yates,
	Krister Schuchardt, Adam Porter, emacs-devel

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

Philip Kaludercic <philipk@posteo.net> writes:

> Daniel Pettersson <daniel@dpettersson.net> writes:
>
>> On Wed, Nov 1, 2023 at 7:35 PM Philip Kaludercic <philipk@posteo.net> wrote:
>>> Did we ever come to a conclusion on this point?
>>
>> Sorry I have been putting the naming thing off as this thread sparked
>> a bit of interest in the package which lead to a lot of great input and
>> bugfixing. There have been a lot of good suggestions and no consensus
>> which has made the even task harder.
>
> In the end that is your call, it is just currently a blocking issue
> before we add the package to GNU ELPA.

It seems that the name is here to stay, so I'd go ahead and add the
package to GNU ELPA.  It just seems that you forgot to add a copyright
notice to the package header.  Could you apply a change along these
lines:


[-- Attachment #2: Type: text/plain, Size: 319 bytes --]

diff --git a/dape.el b/dape.el
index f5de1cd..949049d 100644
--- a/dape.el
+++ b/dape.el
@@ -1,5 +1,7 @@
 ;;; dape.el --- Debug Adapter Protocol for Emacs -*- lexical-binding: t -*-
 
+;; Copyright (C) 2023  Free Software Foundation, Inc.
+
 ;; Author: Daniel Pettersson
 ;; Created: 2023
 ;; License: GPL-3.0-or-later

[-- Attachment #3: Type: text/plain, Size: 111 bytes --]


Followed by a  commit (or in the same one) that bumps the "Version"
header, indicating a new package release?

^ permalink raw reply related	[relevance 91%]

* Re: [ELPA] New Package: p4_16-mode
  @ 2023-11-23  5:57 99%               ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-11-23  5:57 UTC (permalink / raw)
  To: Soham Gumaste; +Cc: emacs-devel

Soham Gumaste <sohamg2@gmail.com> writes:

> Hello Philip,
>
> I was wondering if I get some notification that the package has been
> added to NonGNU ELPA. 

You (or whatever address is listed under maintainer) will receive a
message every time a new release is made.  I have just been
unfortunately busy the last few weeks so I got delayed, sorry about
that.

>                       I am new to the "mailing list world" and was
> wondering what the process looks like. I guess I will eventually see a
> commit adding the package on savannah. Anyway, I don't mean to rush.

Basically yes, I just had to add the package specification to
elpa-packages.  There is no magic here in the "mailing list world" :^)

> Thanks



^ permalink raw reply	[relevance 99%]

* Re: [ELPA] Add theme-buffet package
  @ 2023-11-20 19:05 21% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-11-20 19:05 UTC (permalink / raw)
  To: Bruno Boal; +Cc: emacs-devel, info

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

Bruno Boal <egomet@bboal.com> writes:

> Hello everyone,
>
> I would like you to consider including my package in the GNU ELPA.
> I've just filled out the copyright assignment form, and in the meantime
> I'm sending the proposed changes below for your consideration.

Here are a few comments in form of a diff (this is not a patch that you
should apply, but just some suggestions, hints and ideas that can be
discussed):


[-- Attachment #2: Type: text/plain, Size: 17397 bytes --]

diff --git a/theme-buffet.el b/theme-buffet.el
index 08934cd..e65cc0d 100644
--- a/theme-buffet.el
+++ b/theme-buffet.el
@@ -7,7 +7,10 @@
 ;; Maintainer: Theme-Buffet Development <~bboal/general-issues@lists.sr.ht>
 ;; URL: https://git.sr.ht/~bboal/theme-buffet
 ;; Version: 0.0.0
-;; Package-Requires: ((emacs "29.1"))
+;; Package-Requires: ((emacs "26.1"))
+
+;; According to package-lint, the newest function you depend on is
+;; from Emacs 29 is `take', If you want to depend on Compat, you could lower the
 
 ;; This file is NOT part of GNU Emacs.
 
@@ -29,7 +32,7 @@
 ;; Theme-Buffet lets the user specify different time periods of the day and for
 ;; each period, a list of preferred themes to be randomly loaded accordingly.
 ;; To install you just have to clone the repo from the url, add the path to the
-;; 'load-path variable and then require the library. Here's an example, for
+;; 'load-path variable and then require the library.  Here's an example, for
 ;; those who still love the Emacs 28 or earlier way of doing things:
 ;;
 ;;    # In the terminal
@@ -44,7 +47,7 @@
 ;;    (package-vc-install "https://git.sr.ht/~bboal/theme-buffet")
 ;;
 ;;
-;; There are two templates preconfigured available for usage. One enabled by
+;; There are two templates preconfigured available for usage.  One enabled by
 ;; default, with the standard themes that come with vanilla Emacs; the other
 ;; more fancier, can be easily enabled by evaluating the following:
 ;;
@@ -52,39 +55,38 @@
 ;;
 ;; The binding above will set the themes to be either Modus or Ef, authored by
 ;; Protesilaos Stavrou <https://git.sr.ht/~protesilaos>, distributed across six
-;; periods of the day (night, twilight, morning, day, afternoon and evening). The
+;; periods of the day (night, twilight, morning, day, afternoon and evening).  The
 ;; library will require the aforementioned package, installing if
-;; necessary. Finally to start using Theme-Buffet, evaluate:
+;; necessary.  Finally to start using Theme-Buffet, evaluate:
 ;;
 ;;    (theme-buffet-mode 1)
 ;;
 ;;
 ;; Following the appanage way of Emacs, both the names and number of themes and
-;; time periods can be freely changed while mantaining the same structure. There
+;; time periods can be freely changed while mantaining the same structure.  There
 ;; is also a time-offset that can be set by the user to match a specific
-;; time-zone/personal preference. E.g
+;; time-zone/personal preference.  E.g
 ;;
 ;;    (setq theme-buffet-time-offset 2)
 ;;
-;; All this can be achieved by tweaking `theme-buffet-end-user'. For
+;; All this can be achieved by tweaking `theme-buffet-end-user'.  For
 ;; inspiration, take a look at `theme-buffet--modus-ef' which is used when
 ;; setting `theme-buffet-menu' to 'modus-ef like demonstrated above.
 ;;
 ;;
 ;; Disclaimer from Bruno Boal to the reader: This package was produced during
 ;; my learning sessions with Protesilaos "Prot" Stavrou and improved as
-;; homework. Most of the credit goes to him, the mistakes you may find are my
-;; own. Personally, despite the disadvantages and advantages of not being a
+;; homework.  Most of the credit goes to him, the mistakes you may find are my
+;; own.  Personally, despite the disadvantages and advantages of not being a
 ;; professional programmer, it is essential for me to always have fun and
-;; enjoyment during learning and programming. In this respect, mission
-;; accomplished, a big "thank you!" to my mentor. Also, keep in mind at least
+;; enjoyment during learning and programming.  In this respect, mission
+;; accomplished, a big "thank you!" to my mentor.  Also, keep in mind at least
 ;; two things - the fact that this package, like many others before it, has its
 ;; genesis in a collective effort, with didatic purposes and personal use in
 ;; mind, but also that future improvements could and should come from people
 ;; like you, a user of free software.
 ;;
 ;; Happy hacking!
-;;
 
 ;;; Code:
 
@@ -92,22 +94,22 @@
 (defgroup theme-buffet nil
   "Time based theme switcher.
 Assortment of preference based themes available for consumption according to
-the time of the day. A true theme feast for the eyes..."
+the time of the day.  A true theme feast for the eyes..."
   :group 'faces)
 
-
-(defun theme-buffet--get-themes(&optional plist-usage)
+(defun theme-buffet--get-themes (&optional plist-usage)
   "Get themes from default Emacs build directory and `custom-theme-load-path'.
 Return list for usage in `theme-buffet-menu' type options if PLIST-USAGE is
 non-nil."
+  ;; Why not `custom-available-themes'?
   (let* ((default (expand-file-name "themes/" data-directory))
          (custom  (butlast custom-theme-load-path))
          (themes-dirs (cons default custom))
-         (themes (flatten-tree
-                  (mapcar (lambda (f)
-                            (if (symbolp f) (setq f (symbol-value f)))
-                            (directory-files f nil ".*-theme\\.el\\'"))
-                          themes-dirs))))
+         (themes (mapcan (lambda (f)
+                           (directory-files
+			    (if (symbolp f) (symbol-value f) f)
+			    nil ".*-theme\\.el\\'"))
+                         themes-dirs)))
     (mapcar (lambda (theme)
               (let ((symbol-list (intern
                                   (string-trim-right theme "-theme\\.el"))))
@@ -116,8 +118,6 @@ non-nil."
 
 (defvar theme-buffet--const-themes (theme-buffet--get-themes t))
 
-
-
 (defconst theme-buffet--built-in
   '(:night     (wheatgrass manoj-dark modus-vivendi)
     :morning   (adwaita whiteboard leuven modus-operandi tango dichromacy tsdh-light)
@@ -171,20 +171,20 @@ For those who just don't have the time and want the best.")
     :afternoon (leuven-dark tango-dark tsdh-dark misterioso)
     :evening   (deeper-blue wombat))
   "Associate day periods with list of themes.
-Each association is of the form `:KEYWORD (THEMES)' where :KEYWORD is one among
-:dark, :twilight, :dawn, etc, and (THEMES), a list of existent themes. Prefilled
-with Emacs default themes as an example to change by the user."
+Each association is of the form `:KEYWORD (THEMES)' where
+:KEYWORD is one among :dark, :twilight, :dawn, etc, and (THEMES),
+a list of existent themes.  Prefilled with Emacs default themes
+as an example to change by the user."
   :type `(plist
           :options
-              (((const :tag "Darkness of the night" :night)
-                (repeat (choice symbol ,@theme-buffet--const-themes)))
-               ((const :tag "Bright sun is up" :morning)
-                (repeat (choice symbol ,@theme-buffet--const-themes)))
-               ((const :tag "Perhaps a clouded afternoon" :afternoon)
-                (repeat (choice symbol ,@theme-buffet--const-themes)))
-               ((const :tag "Close to the sunset" :evening)
-                (repeat (choice symbol ,@theme-buffet--const-themes))))))
-
+          (((const :tag "Darkness of the night" :night)
+            (repeat (choice symbol ,@theme-buffet--const-themes)))
+           ((const :tag "Bright sun is up" :morning)
+            (repeat (choice symbol ,@theme-buffet--const-themes)))
+           ((const :tag "Perhaps a clouded afternoon" :afternoon)
+            (repeat (choice symbol ,@theme-buffet--const-themes)))
+           ((const :tag "Close to the sunset" :evening)
+            (repeat (choice symbol ,@theme-buffet--const-themes))))))
 
 (defcustom theme-buffet-menu 'built-in
   "Define which property list to use when selecting the theme list."
@@ -192,49 +192,37 @@ with Emacs default themes as an example to change by the user."
                  (const :tag "Modus and Ef themes" modus-ef)
                  (const :tag "User specified themes" end-user)))
 
-
 (defun theme-buffet--selected-menu ()
   "Return property list based on given MENU."
-  (cond
-   ((eq theme-buffet-menu 'built-in)
-    theme-buffet--built-in)
-   ((eq theme-buffet-menu 'modus-ef)
-    theme-buffet--modus-ef)
-   ((eq theme-buffet-menu 'end-user)
-    theme-buffet--end-user)
-   (t
-    nil)))
-
+  (pcase-exhaustive theme-buffet-menu
+    ('built-in theme-buffet--built-in)
+    ('modus-ef theme-buffet--modus-ef)
+    ('end-user theme-buffet--end-user)))
 
-(defun theme-buffet--hours-secs(hours)
+(defun theme-buffet--hours-secs (hours)
   "Number of seconds in HOURS."
   (* hours 60 60))
 
-
 (defconst theme-buffet--secs-in-day
   (theme-buffet--hours-secs 24)
   "Number of seconds in a day.")
 
-
-(defun theme-buffet--keywords()
+(defun theme-buffet--keywords ()
   "Get the name of the keywords defining the day periods."
   (let ((selected-menu (theme-buffet--selected-menu)))
     (if (plistp selected-menu)
         (seq-filter #'keywordp selected-menu)
-      (user-error "The Theme-Buffet Chef cannot work with your supplied themes. Check `theme-buffet-menu'"))))
-
+      (user-error "The Theme-Buffet Chef cannot work with your supplied themes.  Check `theme-buffet-menu'"))))
 
-(defun theme-buffet--periods()
+(defun theme-buffet--periods ()
   "Get the number of keywords that define the day periods."
   (length (theme-buffet--keywords)))
 
-
-(defun theme-buffet--interval()
+(defun theme-buffet--interval ()
   "Get the number of seconds that each given time period should remain active."
   (/ theme-buffet--secs-in-day (theme-buffet--periods)))
 
-
-(defun theme-buffet--get-time()
+(defun theme-buffet--get-time ()
   "Get the `current-time' in seconds."
   (let ((time-smh (take 3 (decode-time)))
         seconds)
@@ -242,8 +230,7 @@ with Emacs default themes as an example to change by the user."
       (setq seconds (cons (pop time-smh) seconds)
             time-smh (mapcar (lambda (n) (* 60 n))
                              time-smh)))
-    (apply #'+ seconds)))
-
+    (seq-reduce #'+ seconds 0)))
 
 (defun theme-buffet--natnum-from-to (start end &optional step)
   "Create a list for applying in defcustom's type choice customization.
@@ -254,14 +241,12 @@ END-STEP) (const END))"
             (list 'const x))
           (number-sequence start end step)))
 
-
 (defcustom theme-buffet-time-offset 0
   "Added time in HOURS (integer number) to shift the day periods.
 Used for compensate winter/summer times or specific weather situations."
   :type `(choice ,@(theme-buffet--natnum-from-to -12 12)))
 
-
-(defun theme-buffet--get-offset()
+(defun theme-buffet--get-offset ()
   "Error checking for `theme-buffet-time-offset' variable.
 Has to be an integer number and no greater than 12h in absolute value"
   (cond
@@ -273,21 +258,18 @@ Has to be an integer number and no greater than 12h in absolute value"
    (t
     (theme-buffet--hours-secs theme-buffet-time-offset))))
 
-
-(defun theme-buffet--current-period()
+(defun theme-buffet--current-period ()
   "Get the current period reference the number of keywords in `theme-buffet'."
   (let ((offset (mod (+ (theme-buffet--get-time)
                         (theme-buffet--get-offset))
                      theme-buffet--secs-in-day)))
     (ceiling offset (theme-buffet--interval))))
 
-
-(defun theme-buffet--get-period-keyword()
+(defun theme-buffet--get-period-keyword ()
   "Get the keyword of the current period as specified in `theme-buffet'."
   (nth (1- (theme-buffet--current-period)) (theme-buffet--keywords)))
 
-
-(defun theme-buffet--reload-theme(chosen-theme &optional added-message)
+(defun theme-buffet--reload-theme (chosen-theme &optional added-message)
   "Load CHOSEN-THEME after disabling the current one.
 An additional ADDED-MESSAGE can be appended to the original string for added
 information."
@@ -298,20 +280,18 @@ information."
     (load-theme chosen-theme :no-confirm)
     (message "%s `%s'" message chosen-theme)))
 
-
-(defun theme-buffet--get-theme-list(period)
+(defun theme-buffet--get-theme-list (period)
   "Get list of themes of PERIOD, excluding the current if more are available."
   (when-let ((selected-menu (theme-buffet--selected-menu))
              (theme-list (plist-get selected-menu period)))
     (or (remq (car custom-enabled-themes) theme-list)
         theme-list)))
 
-
-(defun theme-buffet--load-random(period)
+(defun theme-buffet--load-random (period)
   "Load random theme according to PERIOD.
 
 Omit current theme if it's not the only pertaining to the list of the
-corresponding period. Being this the case, the same theme shall be served.
+corresponding period.  Being this the case, the same theme shall be served.
 
 An error message will appear if the theme is not available to load through
 `load-theme'."
@@ -322,12 +302,10 @@ An error message will appear if the theme is not available to load through
     (user-error "Theme-Buffet Chef says `%s' is not known or installed!"
                 chosen-theme)))
 
-
-
 (defvar theme-buffet-theme-history nil
   "Theme-Buffet period history.")
 
-(defun theme-buffet--theme-prompt()
+(defun theme-buffet--theme-prompt ()
   "Prompt the user the theme to choose for the present period."
   (let ((prompt "From current period choose a theme: ")
         (collection (theme-buffet--get-theme-list
@@ -336,19 +314,17 @@ An error message will appear if the theme is not available to load through
     (completing-read prompt collection nil t nil history-var)))
 
 ;;;###autoload
-(defun theme-buffet-a-la-carte()
+(defun theme-buffet-a-la-carte ()
   "Prompt user for theme according to the current period of the day."
   (declare (interactive-only t))
   (interactive)
   (let ((chosen-theme (intern (theme-buffet--theme-prompt))))
     (theme-buffet--reload-theme chosen-theme "as per your desires. Enjoy..." )))
 
-
-
 (defvar theme-buffet-period-history nil
   "Theme-Buffet period history.")
 
-(defun theme-buffet--period-prompt()
+(defun theme-buffet--period-prompt ()
   "Prompt user for the day period from the list of periods."
   (let ((prompt "Choose a period of the day: ")
         (collection (theme-buffet--keywords))
@@ -356,28 +332,24 @@ An error message will appear if the theme is not available to load through
     (completing-read prompt collection nil t nil history-var)))
 
 ;;;###autoload
-(defun theme-buffet-order-other-period()
+(defun theme-buffet-order-other-period ()
   "Interactively load a random theme from the current day period."
   (declare (interactive-only t))
   (interactive)
   (let ((period (intern (theme-buffet--period-prompt))))
     (theme-buffet--load-random period)))
 
-
 ;;;###autoload
-(defun theme-buffet-anything-goes()
+(defun theme-buffet-anything-goes ()
   "Interactively load an existing random theme."
   (declare (interactive-only t))
   (interactive)
   (theme-buffet--reload-theme (seq-random-elt (theme-buffet--get-themes))
                               "as a suprise"))
 
-
-
 (defvar theme-buffet-user-timers-history nil
   "Theme-Buffet user timers history.")
 
-
 ;;;; Period timer
 (defvar theme-buffet-timer-periods nil
   "Timer that calls Theme-Buffet's Chef into the kitchen.")
@@ -390,14 +362,19 @@ An error message will appear if the theme is not available to load through
 (defvar theme-buffet-timer-mins nil
   "Timer that calls another Theme-Buffet's Sous-Chef into the kitchen.")
 
-
-(defun theme-buffet--free-timer(timer-obj)
+(defun theme-buffet--free-timer (timer-obj)
   "Cancel and set to nil the timer TIMER-OBJ."
   (when-let (((boundp timer-obj))
              (obj (symbol-value timer-obj)))
     (cancel-timer obj)
     (set timer-obj nil)))
 
+;; I am not too thrilled about this section.  It would be nice if
+;; instead of generating a macro you could use construct a lambda
+;; expression that you bind to the intended symbol using `defalias'.
+;; A yet simpler approach would be to define a generic, internal
+;; function that written-out functions would directly invoke, instead
+;; of manually writing autoload cookies.
 
 (defmacro theme-buffet--define-timer(units)
   "Define interactive functions to set timer in UNITS.
@@ -431,14 +408,14 @@ naming."
                                        (theme-buffet--get-period-keyword)))
            (message "Theme-Buffet Sous-Chef is rushing into the kitchen...")))))))
 
+
+
 ;;;###autoload (autoload 'theme-buffet-timer-mins "theme-buffet")
 (theme-buffet--define-timer mins)   ; (theme-buffet-timer-mins n)
 ;;;###autoload (autoload 'theme-buffet-timer-hours "theme-buffet")
 (theme-buffet--define-timer hours)  ; (theme-buffet-timer-hours n)
 
-
-
-(defmacro theme-buffet--define-menu-defuns(menu)
+(defmacro theme-buffet--define-menu-defuns (menu)
   "Define interactive functions to choose property list with themes to use.
 The timer is clean, the chosen MENU is set with it's corresponding keywords."
   (let* ((doc-built-in "Built-in Emacs themes. If you like minimalism and standard suits your needs.")
@@ -470,17 +447,13 @@ opinion.")
 ;;;###autoload (autoload 'theme-buffet-end-user "theme-buffet")
 (theme-buffet--define-menu-defuns end-user)  ; (theme-buffet-end-user)
 
-
-
 ;;;###autoload
 (define-minor-mode theme-buffet-mode
   "Theme-Buffet serves your preferred themes according to the time of day.
-You eyes will thank you. Or not...
+You eyes will thank you.  Or not...
 
 The preference for the themes is specified in the `theme-buffet-menu'"
-  :init-value nil
   :global t
-  :keymap nil
   (if theme-buffet-mode
       ;; 2023-11-20 FIXME => The `unless' below is because `theme-buffet-mode' is
       ;; called every time the timer runs without an explanation.

[-- Attachment #3: Type: text/plain, Size: 908 bytes --]


>
> diff --git a/elpa-packages b/elpa-packages
> index 608d8a353b..de5e15df48 100644
> --- a/elpa-packages
> +++ b/elpa-packages
> @@ -683,6 +683,8 @@
>    :news "CHANGELOG.org"
>    :ignored-files ("LICENSE"))
>   (test-simple         	:url "https://github.com/rocky/emacs-test-simple")
> + (theme-buffet		:url "https://git.sr.ht/~bboal/theme-buffet"
> +  :readme "README.md")

Are you sure you want this, the contents of your README appear to be
identical to your "Commentary" section (something I don't recommend in
general, I see a README as something that interests people who have
checked out your repository, while the Commentary should describe the
intention and the entry-points of your package).

>   (timerfunctions	:url nil)
>   (tiny			:url "https://github.com/abo-abo/tiny")
>   (tmr			:url "https://git.sr.ht/~protesilaos/tmr"
>
>
> Let me know what you think.
>
> Best regards,
> Bruno Boal

^ permalink raw reply related	[relevance 21%]

* Re: [ELPA] New Package: p4_16-mode
  @ 2023-11-18 21:51 99%         ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-11-18 21:51 UTC (permalink / raw)
  To: Soham Gumaste; +Cc: emacs-devel

Soham Gumaste <sohamg2@gmail.com> writes:

>> As mentioned in the last thread, I don't know if "p4_16" is a technical
>> term, but I know that it is an unusual symbol name, so I want to make
>> sure if it would be possible to call it p4-16 or something like that
>> instead.
>>
>
> Apologies for forgetting to reply to that part. So the language itself
> goes by "p4" or "p4lang" (think go/golang). The _14 and _16 refer to
> different diverging versions of the language. P4_14 is officially
> abandoned/deprecated (think python 2.7) and P4_16 is the "current
> revision of the p4 language" [1].
>
> That being said, I think "p4-16-mode" is clear enough to indicate
> which version is being implied and we could/should take the liberty to
> change the _ to a -. I am of the opinion that the "16" bit is
> necessary as the language itself is evolving. I do not see an issue
> with "p4-16-mode".

OK, the only thing which I believe is missing now is a "Version" tag in
the package header (see (info "(elisp) Simple Packages")).  A new
version of every ELPA package is released whenever a commit touches that
line.

> Thanks
>
> [1]: https://p4.org/specs/

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 99%]

* Re: [External] : Turning on savehist-mode by default
  @ 2023-11-18 21:42 70%       ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-11-18 21:42 UTC (permalink / raw)
  To: Drew Adams; +Cc: sbaugh@catern.com, emacs-devel@gnu.org

Drew Adams <drew.adams@oracle.com> writes:

>> > There are a zillion minor modes that many
>> > users find useful to turn on by default.
>> > It doesn't follow that `emacs -Q' should
>> > turn on any of them by default.
>> 
>> If something is done by (practically) everyone,
>
> Is it?

Given that my sentence was a hypothetical, I cannot answer this question
since the term "something" cannot be unambiguously instantiated as to be
answered concretely.

>> especially when it is something that (practically)
>> all beginners would be interested in,
>
> How is that known?

It is not known, otherwise there wouldn't really be a discussion.  Our
knowledge can only approximate reality through experience and talking
with different kinds of Emacs users.

Taking the example of savehist-mode, then my experience, which takes
different kinds of users, of different experience levels, people I have
met online and in-person, appears to indicate that this is a popular and
useful feature.

>> I wouldn't dismiss the proposal to enable it by default.
>
> I don't dismiss it.

So you don't oppose enabling savehist-mode by default?

>> The issue is that beginners neither know how to do it, nor
>> what all the options are that they might be interested in.
>
> And yet it's "done by (practically) everyone"?

Let us say, "(practically) everyone" who manages to stay along, by
finding the right options to create a comfortable and productive
environment for themselves.  There are certainly many beginners that
never change this user option; but I suspect that these are also the
ones that never get to taking a look at any user options, because they
give up too soon.

> ___
>
> Let's enable `delete-selection-mode' by default.
>
> It took decades to get `transient-mark-mode' ON
> by default.  `delete-selection-mode' completes
> that job.  It welcomes new users with the same
> type-to-replace behavior they're used to outside
> Emacs (everywhere).
>
> Persists nothing.  Is easy for anyone not who
> doesn't want it ON to turn OFF.

One has to keep in mind that there are a lot of people who use Emacs,
and are familiar with the "feel" of the default key bindings or at least
some subset of these, without having much of an understanding of how to
do things or what is going on.  These are users that should nevertheless
be respected -- hence my point that enabling a feature has to take the
workflow of people into account, for whom a change would break an
expectation.

Note that I am *not* saying that the goal should be to accommodate
newcomers (following whatever current trends may be) at any cost,
especially when this comes at the expense of long-term users.

To make this argument with savehist-mode, one would have to make the
use-case believable, that someone expects the history of mini-buffer
input to not persist between sessions.  I think that is a claim that it
a lot harder to justify, than that inserting a key while a selection is
active, replaces the selection.

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 70%]

* Re: [ELPA] New Package: p4_16-mode
  @ 2023-11-18 21:12 99%     ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-11-18 21:12 UTC (permalink / raw)
  To: Soham Gumaste; +Cc: emacs-devel

Soham Gumaste <sohamg2@gmail.com> writes:

>> +;;; History:
>> +
>> +;; The headers above have no special meaning, and could also be
>> +;; re-written in prose under a special section.  Also, was the package
>> +;; really created just a few days ago?
>> +
>
> I mean, moved the file into a repo of its own on that day, and began making some
> modifications to better suit ELPA. The original file has a date from 2017.
> Should I use that instead?

I think that would reflect the history better.

>>
>> I suppose you want to add the package to NonGNU ELPA then?
>>
>
> I was not familiar with the distinction between GNU ELPA and NonGNU
> ELPA. But now
> that I have read up a bit, NonGNU ELPA does fit better.

OK.

> I have applied your patch, thanks for taking the time to help me with it.
> Please let me know if any further changes are needed, or if I need to
> create a new thread to submit to NonGNU ELPA.

As mentioned in the last thread, I don't know if "p4_16" is a technical
term, but I know that it is an unusual symbol name, so I want to make
sure if it would be possible to call it p4-16 or something like that
instead.

> Thanks

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 99%]

* Re: [ELPA] New package: SachaC-news
  @ 2023-11-18 21:10 99%     ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-11-18 21:10 UTC (permalink / raw)
  To: Christian; +Cc: emacs-devel

Christian <cnngimenez@disroot.org> writes:

> Thanks Philip!
>
> I applied the diff to this commit:
>
> https://git.sr.ht/~cngimenez/sachac-news/commit/8263dbc7982f543f673172c4a60d4bb68a48c6f6

It appears you applied my comments as well?  I should have made it
clear, that my message just intended to propose some changes,
demonstrate possible alternatives and raise some questions for us to
discuss.

> Cheers!
> Christian.
>
> On Fri, 17 Nov 2023 04:28:35 -0300, Kaludercic wrote:
>>
>> [1  <text/plain (7bit)>]
>> Christian <cnngimenez@disroot.org> writes:
>>
>> > Hi!
>> >
>> > I want to propose SachaC-news (or sachac-news.el if you like)
>> > package to be included in ELPA. Its objective is to check for
>> > Sacha Chua's news repository periodically, and to show the Org
>> > file if there is a new commit with a new post in it. It has
>> > some customizations too, such as folding specific sections
>> > automatically, and desktop notifications via "notify-send". The
>> > requirement is the git program to be installed on your system.
>> > This information and its usage is at the README.org file at the
>> > package repository:
>> >
>> >           https://github.com/cnngimenez/sachac-news
>> >
>> > The code has been checked with byte-compile-file, and
>> > flycheck configured with checkdoc and flycheck-package [1].
>>
>> > They do not display any warnings up to commit d00e629, but tell
>> > me if you find something to fix or any suggestions.
>>
>> I found a few things, here is a diff with some comments and suggestions:
>>
>> [2  <text/plain (7bit)>]
>> diff --git a/sachac-news.el b/sachac-news.el
>> index 8d67911..1f389b2 100644
>> --- a/sachac-news.el
>> +++ b/sachac-news.el
>> @@ -22,7 +22,6 @@
>>  ;; You should have received a copy of the GNU General Public License
>>  ;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
>>
>> -
>>  ;;; Commentary:
>>
>>  ;; Check periodically for new commits on Sacha Chua's news repository.
>> @@ -58,29 +57,29 @@
>>
>>  ;;; Code:
>>
>> -(provide 'sachac-news)
>>  (require 'org-element)
>>  (require 'org-list)
>> -(require 'cl-extra)
>> +(require 'cl-lib)
>>
>>  (defgroup sachac-news nil
>>    "Sacha Chua's Emacs news customizations."
>>    :group 'applications)
>>
>> -(defcustom sachac-news-git-command "git"
>> +(defcustom sachac-news-git-command
>> +  (eval-when-compile
>> +    (require 'vc-git)
>> +    vc-git-program)
>>    "Path or git command name.
>>
>>  Valid values are \"/usr/bin/git\" or \"git\" if it is in the current PATH."
>> -  :type 'string
>> -  :group 'sachac-news) ;; defcustom
>> +  :type 'string) ;; defcustom
>>
>>  (defcustom sachac-news-fold-category-regexp-list '()
>>    "A list of regexp strings of the matching categories that should be folded.
>>
>>  The function `sachac-news-fold-categories' use this variable to find
>>  categories that the user wants to hide."
>> -  :type '(repeat regexp)
>> -  :group 'sachac-news) ;; defcustom
>> +  :type '(repeat regexp)) ;; defcustom
>>
>>  (defcustom sachac-news-alarm-sound-file
>>    "/usr/share/sounds/freedesktop/stereo/bell.oga"
>> @@ -88,8 +87,7 @@ categories that the user wants to hide."
>>  If the value is nil or the file does not exists, the `ding' function is used.
>>
>>  See `sachac-news-default-sound-alarm' function."
>> -  :type 'file
>> -  :group 'sachac-news) ;; defcustom
>> +  :type 'file) ;; defcustom
>>
>>  (defcustom sachac-news-alarm-sound-programs
>>    '(("mpv" . "--really-quiet %s")
>> @@ -100,22 +98,20 @@ programs is founded on the system, the `ding' function will be used.  The
>>  first program founded is used.
>>
>>  This variable is used by `sachac-news-default-sound-alarm' function."
>> -  :type '(alist :key-type string :value-type string)
>> -  :group 'sachac-news ) ;; defcustom
>> +  :type '(alist :key-type string :value-type string)) ;; defcustom
>>
>>  (defcustom sachac-news-alarm-functions-hook
>>    '(sachac-news-default-notify-alarm
>>      sachac-news-default-sound-alarm)
>>    "The alarm functions.
>>  These functions are called when there are new news."
>> -  :type 'hook
>> -  :group 'sachac-news ) ;; defcustom
>> +  :type 'hook) ;; defcustom
>>
>>  (defconst sachac-news-title-regexp
>>    "^\\*\\*[[:space:]]+[[:digit:]]+-[[:digit:]]+-[[:digit:]]+[[:space:]]+Emacs news"
>> -  "Regexp used to find news titles in the index.org file." ) ;; defconst
>> +  "Regexp used to find news titles in the index.org file.") ;; defconst
>>
>> -(defvar sachac-news-timer-setted-time 0
>> +(defvar sachac-news-timer-setted-time 0	;perhaps mark these as internal: sachac-news--...
>>    "At what time the timer has been setted?
>>  See `sachac-news-set-timer'.")
>>
>> @@ -148,66 +144,67 @@ Else, this variable contains nil.")
>>
>>  If USE-INDEX-ORG is t, then load the index.org file.  Else, use the current
>>  buffer as if it is the index.org."
>> -
>>    (if use-index-org
>>        (with-temp-buffer
>>  	(insert-file-contents (sachac-news-git-index-org))
>> -	(sachac-news-take-last-new nil) )
>> +	(sachac-news-take-last-new nil))
>>      (progn
>>        (goto-char (point-min))
>>        (search-forward-regexp sachac-news-title-regexp)
>>        (let ((sachac-news-title (org-element-at-point)))
>>  	(buffer-substring-no-properties
>>  	 (org-element-property :begin sachac-news-title)
>> -	 (org-element-property :end sachac-news-title))))) )
>> +	 (org-element-property :end sachac-news-title))))))
>>
>> -(defcustom sachac-news-data-directory (concat user-emacs-directory
>> -					     "sachac/")
>> +(defcustom sachac-news-data-directory
>> +  (locate-user-emacs-file "sachac")
>>    "Where is the data directory?"
>> -  :type 'directory
>> -  :group 'sachac-news) ;; defcustom
>> +  :type 'directory) ;; defcustom
>>
>> -(defcustom sachac-news-data-file "data.el"
>> +(defcustom sachac-news-data-file "data.eld"
>>    "The configuration and data file.
>>  This is where the last updated date and other data is stored."
>> -  :type 'file
>> -  :group 'sachac-news) ;; defcustom
>> +  :type 'file) ;; defcustom
>>
>>  (defcustom sachac-news-git-dirname "git"
>>    "The directory where the git repository should be cloned."
>> -  :type 'string
>> -  :group 'sachac-news)
>> +  :type 'string)
>>
>> +;; She publishes the news every week around the beginning, why check
>> +;; every day?
>>  (defcustom sachac-news-update-hours-wait 24
>>    "The amount of hours when the git clone/pull must wait before be called.
>>
>>  Default is 24 hours.  Only positive values should be used."
>> -  :type 'integer
>> -  :group 'sachac-news ) ;; defcustom
>> +  :type 'natnum
>> +  :group 'sachac-news) ;; defcustom
>>
>>  (defun sachac-news-dir-git ()
>>    "Return the complete git path."
>> -  (concat sachac-news-data-directory "/" sachac-news-git-dirname) )
>> +  (expand-file-name  sachac-news-git-dirname sachac-news-data-directory))
>>
>>  (defun sachac-news-dir-datafile ()
>>    "Return the complete data file path."
>> -  (concat sachac-news-data-directory "/" sachac-news-data-file) )
>> -
>> +  (expand-file-name sachac-news-data-file sachac-news-data-directory))
>>
>>  (defun sachac-news-git-index-org ()
>>    "Return the index.org path on the git directory."
>> -  (concat (sachac-news-dir-git) "/emacs-news/index.org") )
>> +  (expand-file-name
>> +   "index.org"
>> +   (expand-file-name
>> +    "emacs-news"
>> +    (sachac-news-dir-git))))
>>
>>  (defun sachac-news--show-last-new-internal ()
>>    "Show the last news.
>>  This is used after the update sentinel is executed.
>>  See `sachac-news-show-last-new'."
>> -  (let ((str (sachac-news-take-last-new t)))
>> +  (let ((str (sachac-news-take-last-new t))) ;unused!
>>      (with-current-buffer (get-buffer-create "*last-news*")
>>        (org-mode)
>>
>> -      (delete-region (point-min) (point-max))
>> -      (insert str)
>> +      (erase-buffer)
>> +      (insert "foo")
>>
>>        (goto-char (point-min))
>>
>> @@ -217,7 +214,7 @@ See `sachac-news-show-last-new'."
>>  	(sachac-news-update-last-saved-title)
>>  	(sachac-news-fold-categories))
>>
>> -      (display-buffer (current-buffer)))) )
>> +      (display-buffer (current-buffer)))))
>>
>>  (defun sachac-news-show-last-new-if-new ()
>>    "Show the last new if there is a new title.
>> @@ -241,16 +238,12 @@ see `sachac-news-update-hours-wait' variable."
>>  			  #'sachac-news--show-last-new-internal
>>  			  #'sachac-news--show-last-new-internal))
>>
>> -;;
>> -;; --------------------
>> -;; Last saved title
>> -;;
>> +;;; Last saved title
>>
>>  (defun sachac-news-update-last-saved-title ()
>>    "Save the last title into the data file."
>> -
>>    (setq sachac-news-last-saved-title (sachac-news-get-last-title))
>> -  (sachac-news-save-data) )
>> +  (sachac-news-save-data))
>>
>>  (defun sachac-news-get-last-title (&optional use-current-buffer)
>>    "Get the first title founded in the current buffer.
>> @@ -264,7 +257,7 @@ the last title.  Else, if t, use the current buffer, but remember to call
>>  	nil t)
>>      (with-temp-buffer
>>        (insert (sachac-news-take-last-new t))
>> -      (sachac-news-get-last-title t))) )
>> +      (sachac-news-get-last-title t))))
>>
>>  (defun sachac-news-is-there-new-title-p (&optional use-current-buffer)
>>    "According to the last save, return t when a new post is found.
>> @@ -284,12 +277,9 @@ last news buffer.  Else, open the index.org and retrieve the last news."
>>
>>      (or (null sachac-news-last-saved-title)
>>  	(not (string-equal last-title
>> -			   sachac-news-last-saved-title)))) )
>> +			   sachac-news-last-saved-title)))))
>>
>> -;;
>> -;; --------------------
>> -;; Data or config. load/save
>> -;;
>> +;;; Data or config. load/save
>>
>>  (defun sachac-news-load-data ()
>>    "Update variables which values are in the configuration file.
>> @@ -305,7 +295,7 @@ important variables."
>>  	(setq sachac-news-last-saved-title
>>  	      (alist-get 'last-saved-title expr))
>>  	;; Return the expression loaded
>> -	expr))) )
>> +	expr))))
>>
>>  (defun sachac-news-save-data ()
>>    "Save some important variables into the data file.
>> @@ -313,20 +303,17 @@ These variables can be loaded again with `sachac-news-load-data'."
>>    (with-temp-buffer
>>      (let ((data (list (cons 'last-update sachac-news-last-update)
>>  		      (cons 'last-saved-title sachac-news-last-saved-title))))
>> -    (insert (prin1-to-string data))
>> -    (write-file (sachac-news-dir-datafile))
>> -    data)) )
>> +      (prin1 data (current-buffer))
>> +      (write-region nil nil (sachac-news-dir-datafile) nil 'silent)
>> +      data)))
>>
>>  (defun sachac-news-load-data-if-needed ()
>>    "If the data has not been loaded yet, load it."
>>    (unless sachac-news-data-loaded
>>      (sachac-news-load-data)
>> -    (setq sachac-news-data-loaded t)) )
>> +    (setq sachac-news-data-loaded t)))
>>
>> -;;
>> -;; --------------------
>> -;; Git clone/update
>> -;;
>> +;;; Git clone/update
>>
>>  (defun sachac-news-update-last-update ()
>>    "Update the `sachac-news-last-update' date with the current date."
>> @@ -335,6 +322,7 @@ These variables can be loaded again with `sachac-news-load-data'."
>>
>>  (defun sachac-news-update-time-str ()
>>    "Return a string with the last time and the amount of time left."
>> +  ;; Perhaps format this in a temporary buffer, then return the buffer string?
>>    (format "Waiting time: %s hours
>>  -- Update --
>>  Last time updated: %s
>> @@ -361,19 +349,19 @@ Time left for automatic forced update: %s %s"
>>  					     (* sachac-news-update-hours-wait 60 60)))
>>  	    "No timer setted")
>>  	  (number-to-string (/ (sachac-news-get-update-time-left) 60))
>> -	  "minutes") )
>> +	  "minutes"))
>>
>>  (defun sachac-news-get-update-wait-seconds ()
>>    "Get the `sachac-news-update-hours-wait' in seconds."
>> -  (* sachac-news-update-hours-wait 60 60) )
>> +  (* sachac-news-update-hours-wait 60 60))
>>
>>  (defun sachac-news-show-update-time ()
>>    "Display the time left for the next update."
>>    (interactive)
>>    (sachac-news-load-data-if-needed)
>>    (if sachac-news-last-update
>> -      (message (sachac-news-update-time-str))
>> -    (message "Git has not been called before.")) )
>> +      (message "%s" (sachac-news-update-time-str))
>> +    (message "Git has not been called before.")))
>>
>>  (defun sachac-news-get-update-time-left ()
>>    "Return the seconds left for the next scheduled update.
>> @@ -384,7 +372,7 @@ been setted)."
>>    (if sachac-news-timer-setted-time
>>        (- (+ sachac-news-timer-setted-time (sachac-news-get-update-wait-seconds))
>>  	 (time-convert (current-time) 'integer))
>> -    0) )
>> +    0))
>>
>>  (defun sachac-news-get-update-enable-time-left ()
>>    "Return the seconds left for the next enabled update.
>> @@ -398,7 +386,7 @@ loaded)."
>>    (if sachac-news-last-update
>>        (- (+ sachac-news-last-update (sachac-news-get-update-wait-seconds))
>>  	 (time-convert (current-time) 'integer))
>> -    0) )
>> +    0))
>>
>>  (defun sachac-news-get-update-time-elapsed ()
>>    "Return the seconds elapsed since the last update.
>> @@ -408,19 +396,19 @@ Return the numbre of seconds after the maximum wait + 1 if
>>    (if sachac-news-last-update
>>        (- (time-convert (current-time) 'integer)
>>  	 sachac-news-last-update)
>> -    (+ (sachac-news-get-update-wait-seconds) 1)) )
>> +    (+ (sachac-news-get-update-wait-seconds) 1)))
>>
>>  (defun sachac-news-is-time-for-update-p ()
>>    "Check if a day has passed since the last update."
>>    (if sachac-news-last-update
>>        (>= (sachac-news-get-update-time-elapsed)
>> -	 (sachac-news-get-update-wait-seconds) )
>> -    t) )
>> +	 (sachac-news-get-update-wait-seconds))
>> +    t))
>>
>>  (defun sachac-news-create-dirs ()
>>    "Create the needed directories to save data and the repository."
>>    (make-directory sachac-news-data-directory t)
>> -  (make-directory (sachac-news-dir-git) t) )
>> +  (make-directory (sachac-news-dir-git) t))
>>
>>  (defun sachac-news--git-sentinel (_process event)
>>    "Git sentinel.
>> @@ -454,19 +442,19 @@ FUNC-CALL-AFTER is a function called after the git process endend successfully."
>>      (when func-call-after
>>        (add-hook 'sachac-news--git-hook func-call-after))
>>      (setq sachac-news--git-process
>> -	  (if (file-exists-p (sachac-news-git-index-org))
>> -	      (start-process-shell-command "sachac-news-git-pull"
>> +	  (let ((default-directory (expand-file-name "emacs-news" (sachac-news-dir-git))))
>> +	    ;; I am not sure what the point is there, but I suspect
>> +	    ;; there should be a better way to do this using timers
>> +	    ;; and vc-git.
>> +	    (if (file-exists-p (sachac-news-git-index-org))
>> +		(start-process-shell-command "sachac-news-git-pull"
>> +					     "*sachac-news-git*"
>> +					     (concat "sleep 60 ; " git-program " pull"))
>> +	      (start-process-shell-command "sachac-news-git-clone"
>>  					   "*sachac-news-git*"
>> -					   (concat
>> -					    "cd " (sachac-news-dir-git) "/emacs-news ; sleep 60 ; "
>> -					    git-program
>> -					    " pull"))
>> -	    (start-process-shell-command "sachac-news-git-clone"
>> -					 "*sachac-news-git*"
>> -					 (concat
>> -					"cd " (sachac-news-dir-git) "; sleep 60 ; "
>> -					git-program " clone https://github.com/sachac/emacs-news.git"))))
>> -    (set-process-sentinel sachac-news--git-process #'sachac-news--git-sentinel)) )
>> +					   (concat "sleep 60 ; " git-program " clone \
>> +https://github.com/sachac/emacs-news.git")))))
>> +    (set-process-sentinel sachac-news--git-process #'sachac-news--git-sentinel)))
>>
>>
>>  (defun sachac-news-update-git (&optional force-update
>> @@ -501,11 +489,11 @@ pull/clone."
>>  	    (when callback-if-no-update
>>  	      (funcall callback-if-no-update))))
>>        ;; Git program not founded
>> -      (message "%s %s\n%s\n%s"
>> -	       "The Git program has not been founded!"
>> -	       "SachaC-news cannot download news without it!"
>> -	       "Please install it in our system or customize the variable:"
>> -	       "M-x customize-option sachac-news-git-command"))) )
>> +      (message (substitute-command-keys
>> +		"The Git program has not been founded! \
>> +SachaC-news cannot download news without it!
>> +Please install it in our system or customize the variable: )
>> +\\[customize-option] sachac-news-git-command")))))
>>
>>  (defun sachac-news-open-index-file ()
>>    "Open the index.org file from the local repository.
>> @@ -519,15 +507,10 @@ how the update is done."
>>    (sachac-news-update-git)
>>    (if (file-exists-p (sachac-news-git-index-org))
>>        (find-file (sachac-news-git-index-org))
>> -    (message "%s\n%s"
>> -	     "Index file not found! Did something wrong happen?"
>> -	     "See `sachac-news-update-git'.")) )
>> +    (message "Index file not found! Did something wrong happen?
>> +See `sachac-news-update-git'.")))
>>
>> -
>> -;;
>> -;; --------------------
>> -;; Folding categories
>> -;;
>> +;;; Folding categories
>>
>>  (defun sachac-news-find-all-categories (category-regexps &optional org-element)
>>    "Match paragraph with the CATEGORY-REGEXPS regexp.
>> @@ -554,7 +537,7 @@ Returns a list of org-element of type \\'item found in the index.org."
>>  			  (string-match-p category element))
>>  			category-regexps))
>>
>> -	    parent)))) )
>> +	    parent)))))
>>
>>
>>  (defun sachac-news-fold-all-items (item-list)
>> @@ -582,12 +565,9 @@ This function works on any Org file, even at the Emacs news' index.org."
>>    (let ((category-list (if category-regexp-list category-regexp-list
>>  			 sachac-news-fold-category-regexp-list)))
>>      (sachac-news-fold-all-items
>> -     (sachac-news-find-all-categories category-list))) )
>> +     (sachac-news-find-all-categories category-list))))
>>
>> -;;
>> -;; --------------------
>> -;; Alarm
>> -;;
>> +;;; Alarm
>>
>>  (defun sachac-news-default-notify-alarm ()
>>    "The default alarm.
>> @@ -596,7 +576,7 @@ Use the notify-send to send the alarm."
>>      (when program
>>        (shell-command (concat program
>>  			     " --app-name=\"Emacs: SachaC-news\""
>> -			     " \"Check the News!\"")))) )
>> +			     " \"Check the News!\"")))))
>>
>>  (defun sachac-news-default-sound-alarm ()
>>    "The default sound alarm.
>> @@ -619,17 +599,14 @@ as fallback."
>>  	       (car program-data)
>>  	       (split-string
>>  		(format (cadr program-data) sachac-news-alarm-sound-file)))
>> -      (ding t))) )
>> +      (ding t))))
>>
>>  (defun sachac-news-run-alarm-if-needed ()
>>    "Run the alarm hook functions if there is a new post ."
>>    (when (sachac-news-is-there-new-title-p)
>> -    (run-hooks 'sachac-news-alarm-functions-hook)) )
>> +    (run-hooks 'sachac-news-alarm-functions-hook)))
>>
>> -;;
>> -;; --------------------
>> -;; Timer
>> -;;
>> +;;; Timer
>>
>>  (defun sachac-news-timer-function ()
>>    "The function used by the timer."
>> @@ -638,7 +615,7 @@ as fallback."
>>    (sachac-news-update-git t #'sachac-news-show-last-new-if-new)
>>    (sachac-news-run-alarm-if-needed)
>>
>> -  (sachac-news-activate-timer) )
>> +  (sachac-news-activate-timer))
>>
>>
>>  (defun sachac-news-activate-timer ()
>> @@ -650,9 +627,9 @@ Set the timer for executing on `sachac-news-update-hours-wait' hours."
>>    (setq sachac-news-timer-setted-time (time-convert (current-time) 'integer))
>>    (setq sachac-news-timer
>>  	(run-at-time
>> -	 (concat (number-to-string sachac-news-update-hours-wait) "hours")
>> -		     nil
>> -		     #'sachac-news-timer-function)) )
>> +	 (format "%d hours" sachac-news-update-hours-wait)
>> +	 nil
>> +	 #'sachac-news-timer-function)))
>>
>>  (defun sachac-news-deactivate-timer ()
>>    "Stop and cancel the timer."
>> @@ -660,7 +637,7 @@ Set the timer for executing on `sachac-news-update-hours-wait' hours."
>>    (when (timerp sachac-news-timer)
>>      (cancel-timer sachac-news-timer)
>>      (setq sachac-news-timer nil))
>> -  (setq sachac-news-timer-setted-time nil) )
>> +  (setq sachac-news-timer-setted-time nil))
>>
>>  (defun sachac-news-timer-status ()
>>    "Is the timer setted or not?
>> @@ -668,8 +645,13 @@ Report the user about the timer status."
>>    (interactive)
>>    (if (timerp sachac-news-timer)
>>        (message "Timer is setted and running.")
>> -    (message "Timer is deactivated")) )
>> +    (message "Timer is deactivated")))
>> +
>> +;; Don't activate side effects while loading your package!  Instruct
>> +;; the users to add this to their init.el, so that one knows what is
>> +;; going on.
>>
>> -(sachac-news-activate-timer)
>> +;; (sachac-news-activate-timer)
>>
>> +(provide 'sachac-news)
>>  ;;; sachac-news.el ends here
>> [3  <text/plain (7bit)>]
>>
>> > According to http://elpa.gnu.org/, and the README.org [2] file
>> > linked there, it says to notify to this mail address as
>> > first step. Also, it mentions other steps regarding pushing the
>> > code and adding an entry on elpa-packages file. But, there is a
>> > marker above indicating "OUTDATED" [3].
>>
>> That should be addressed ^^
>>
>> > Please, could you tell me if these steps are needed?
>> > If they are not, how should I proceed?
>>
>> As soon as we sort out the above comments, I can take care of adding the
>> package for you.
>>
>> > Cheers!
>> > Christian Gimenez
>> >
>> > [1] https://github.com/purcell/flycheck-package
>> > [2] https://git.savannah.gnu.org/cgit/emacs/elpa.git/plain/README
>> > [3] The section states: "Text below this marker is OUTDATED and
>> > still needs to be reviewed/rewritten!!"
>
> --
>
> - Mastodon: @cnngimenez@mastodon.social
>
>  ,= ,-_-. =.  Utilice GPG:
> ((_/)o o(\_)) * https://emailselfdefense.fsf.org/
>  `-'(. .)`-'  * Usando la terminal GNU/Linux:
>      \_/        $ gpg2 --search-keys 77A56F0DA5DD9E05
>

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 99%]

* Re: [External] : Turning on savehist-mode by default
  @ 2023-11-18 18:19 81%   ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-11-18 18:19 UTC (permalink / raw)
  To: Drew Adams; +Cc: sbaugh@catern.com, emacs-devel@gnu.org

Drew Adams <drew.adams@oracle.com> writes:

>> savehist-mode is a useful mode which is turned on by many Emacs
>> users. It matches the default behavior of programs like bash and
>> vim, which save command history by default.  I suggest that we
>> should find some way to enable savehist by default.
>
> Why?  It's trivial to turn it on.  As you
> say, many users (moi aussi) do so.
>
> There are a zillion minor modes that many
> users find useful to turn on by default.
> It doesn't follow that `emacs -Q' should
> turn on any of them by default.

If something is done by (practically) everyone, especially when it is
something that (practically) all beginners would be interested in, I
wouldn't dismiss the proposal to enable it by default.  How many
features satisfy this condition shouldn't matter.  After all, there are
already a number of features that are enabled by default, like
show-paren-mode, that individually are easy to enable, if you know how
to do it.  The issue is that beginners neither know how to do it, nor
what all the options are that they might be interested in.

IMO the more important question when considering to enable a feature
OOTB, is if it will inconvenience any existing users.  I don't think
there should be any issues with savehist-mode, but I might not know of
some issue?  Been using it myself as well for a while.

On a related topic, I have been running a configuration generator that
has been mentioned here on the list for a while now
(https://emacs.amodernist.com/), that could provide opt-in participation
in statistics of what features people are interested in.  That might
help ground matters like these in somewhat more empirical data, or least
a different perspective.

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 81%]

* Re: [Reminder]Decommissoned keyservers
  @ 2023-11-18 15:41 99%   ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-11-18 15:41 UTC (permalink / raw)
  To: Jonas Bernoulli; +Cc: CHENG Gao, emacs-devel

Jonas Bernoulli <jonas@bernoul.li> writes:

> This would also be a good time to add keys.openpgp.org.

Unless something has changed, the protocol spoken by keys.openpgp.org is
not the same as what the old keyservers used, and what epa-ks.el
implements.  That being said, there is a `openpgp' package on GNU ELPA.

> See also https://keys.openpgp.org/about/news#2023-04-28-governance
> and https://gitlab.com/keys.openpgp.org/governance/-/blob/main/constitution.md.
>
>      Jonas
>
>

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 99%]

* Re: [ELPA] New package: ert-font-lock
  @ 2023-11-18 14:47 99%         ` Philip Kaludercic
  0 siblings, 0 replies; 200+ results
From: Philip Kaludercic @ 2023-11-18 14:47 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, vekazanov, emacs-devel

Po Lu <luangruo@yahoo.com> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>> Doesn't this library require ert?  if it does, cl-lib is already
>> loaded by ert.
>
> That's a disappointment, but let's not double the problem.

The problem, as in the usage of cl-lib?  You are probably referring to
the other thread about using CL in Elisp, right?

>> But if people like cl-incf so much, we could just add incf to subr.el
>> or something.
>
> Fine by me, thanks.  (Don't we have incf elsewhere in core?  Or was it
> in the old cl.el?)

That is part of cl, and is aliased to cl-incf.

-- 
Philip Kaludercic



^ permalink raw reply	[relevance 99%]

* Re: [ELPA] New package: ert-font-lock
  @ 2023-11-18 11:18 61% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-11-18 11:18 UTC (permalink / raw)
  To: Vladimir Kazanov; +Cc: emacs-devel

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

Vladimir Kazanov <vekazanov@gmail.com> writes:

> Hi all,
>
> I want to propose a new package to be included in ELPA. ert-font-lock
> (ERT Font Lock) is an extension to the standard ERT unit testing tool
> that makes it possible to write font-locking tests using a
> comment-based syntax. The syntax itself is based on the Tree-sitter
> unit testing system
> (https://tree-sitter.github.io/tree-sitter/syntax-highlighting#unit-testing).
>
> Find the package along with a test suite and a README here:
> https://github.com/vkazanov/ert-font-lock

Here are a few comments from reading over the source code:


[-- Attachment #2: Type: text/plain, Size: 3441 bytes --]

diff --git a/ert-font-lock.el b/ert-font-lock.el
index 7b8df01..6a6593f 100644
--- a/ert-font-lock.el
+++ b/ert-font-lock.el
@@ -6,7 +6,7 @@
 ;; Keywords: lisp, test
 ;; URL: https://github.com/vkazanov/ert-font-lock
 ;; Version: 0.1.0
-;; Package-Requires: ((emacs "29.1"))
+;; Package-Requires: ((emacs "28.1"))
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -61,7 +61,7 @@
   "Validate if MODE is a valid major mode."
   (unless (functionp mode)
     (user-error "Invalid major mode: %s. Please specify a valid major mode for
-syntax highlighting tests" mode)))
+ syntax highlighting tests" mode)))
 
 
 (defmacro ert-font-lock-deftest (name mode test-string &optional docstring)
@@ -69,6 +69,7 @@ syntax highlighting tests" mode)))
 TEST-STRING is the string to test, MODE is the major mode, and
 DOCSTRING is a docstring to use for the test."
   (declare (indent 2) (debug t) (doc-string 4))
+  ;; Or would it be possible to define a function that calls `ert-set-test'?
   `(ert-deftest ,name ()
      ,@(when docstring `(,docstring))
      (ert-font-lock--validate-major-mode ',mode)
@@ -79,7 +80,6 @@ DOCSTRING is a docstring to use for the test."
        (let ((tests (ert-font-lock--parse-comments)))
          (ert-font-lock--check-faces tests)))))
 
-
 (defmacro ert-font-lock-deftest-file (name mode file &optional docstring)
   "Define an ERT test NAME for font-lock syntax highlighting.
 FILE is the path to a file in ert resource dir with test cases,
@@ -91,23 +91,24 @@ the test."
      (ert-font-lock--validate-major-mode ',mode)
      (ert-font-lock-test-file (ert-resource-file ,file) ',mode)))
 
-
 (defun ert-font-lock--line-comment-p ()
   "Return t if the current line is a comment-only line."
+  (syntax-ppss)
   (save-excursion
     (beginning-of-line)
     (skip-syntax-forward " ")
-    ;; skip empty lines
-    (unless (eolp)
-      (or
-       ;; try the most convenient approach
-       (looking-at "\\s<")
-       ;; a bit smarter
-       (and comment-start (looking-at (regexp-quote comment-start)))
-       (and comment-start-skip (looking-at comment-start-skip))
-       ;; hardcoded
-       (and (derived-mode-p 'c-mode 'c++-mode 'java-mode)
-            (looking-at-p "//"))))))
+    (or
+     ;; skip empty lines
+     (eolp)
+     ;; try the most convenient approach
+     (looking-at "\\s<")
+     ;; a bit smarter
+     (and comment-start (looking-at (regexp-quote comment-start)))
+     (and comment-start-skip (looking-at comment-start-skip))
+     ;; hardcoded
+     (cond
+      ((derived-mode-p 'c-mode 'c++-mode 'java-mode)
+       (looking-at-p "//"))))))
 
 (defun ert-font-lock--goto-first-char ()
   "Move the point to the first character."
@@ -143,7 +144,7 @@ the test."
                                  (line-end-position) t)
 
           (unless (> linetocheck -1)
-            (user-error "Invalid test comment syntax at line %d. Expected a line to test before the comment line" curline))
+            (user-error "Invalid test comment syntax at line %d. Expected a line to test before the comment line" curline)) ;is this a user error?
 
           ;; construct a test
           (let* (;; either comment start char column (for arrows) or
@@ -243,5 +244,4 @@ The function is meant to be run from within an ERT test."
 
 
 (provide 'ert-font-lock)
-
 ;;; ert-font-lock.el ends here

[-- Attachment #3: Type: text/plain, Size: 971 bytes --]


> I am the sole author of the package, and did sign FSF papers some time
> ago so this should not be an issue.
>
> Comments, suggestions and critique are very welcome as the package is
> very new. I am open to ideas on the best places to publish the package
> if ELPA is not suitable for it.

ELPA shouls be fine.

> Some additional context.
>
> A while ago I created quakec-mode
> (https://github.com/vkazanov/quakec-mode). One of the most painful
> things about the mode is regex-based syntax highlighting. So I turned
> to creating a Tree-sitter grammar
> (https://github.com/vkazanov/tree-sitter-quakec) as well as a TS-based
> mode (https://github.com/vkazanov/quakec-ts-mode).
>
> While doing the syntax highlighting part proved to be much, much
> easier, I couldn't do work without relying on some kind of unit tests.
> Existing font-lock systems didn't feel convenient compared to the way
> Tree-sitter specifies parser tests so I replicated that.
>
> Thank you

^ permalink raw reply related	[relevance 61%]

* Re: [Reminder]Decommissoned keyservers
    @ 2023-11-17 21:15 99% ` Philip Kaludercic
    1 sibling, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-11-17 21:15 UTC (permalink / raw)
  To: CHENG Gao via Emacs development discussions.; +Cc: CHENG Gao

CHENG Gao via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> In lisp/epa-ks.el, several keyservers were decommissioned, and guess
> shoule be removed:
>
> keys.gnupg.net
> pool.sks-keyservers.net
> zimmermann.mayfirst.org

Do you have any links about this for the first two?  zimmermann has a
notice on the front page, so I guess it can be removed.

> ,----
> | (defcustom epa-keyserver "pgp.mit.edu"
> |   "Domain of keyserver.
> | 
> | This is used by `epa-search-keys', for looking up public keys."
> |   :type '(choice :tag "Keyserver"
> |                  (repeat :tag "Random pool"
> |                          (string :tag "Keyserver address"))
> |                  (const "keyring.debian.org")
> |                  (const "keys.gnupg.net")
> |                  (const "keyserver.ubuntu.com")
> |                  (const "pgp.mit.edu")
> |                  (const "pool.sks-keyservers.net")
> |                  (const "zimmermann.mayfirst.org")
> |                  (string :tag "Custom keyserver"))
> |   :version "28.1")
> `----



^ permalink raw reply	[relevance 99%]

* Re: [ELPA] New Package: p4_16-mode
  @ 2023-11-17  7:36 40% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-11-17  7:36 UTC (permalink / raw)
  To: Soham Gumaste; +Cc: emacs-devel

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

Soham Gumaste <sohamg2@gmail.com> writes:

> Hello Emacs Devs,
>
> I am writing to ask that my package "p4_16-mode.el" be added to ELPA.
> The repo is at the following link:
>
> https://github.com/SohamG/p4_16-mode.el

Here are a few quick changes I'd propose:


[-- Attachment #2: Type: text/plain, Size: 8632 bytes --]

diff --git a/p4_16-mode.el b/p4_16-mode.el
index 23c2825..f9d146b 100644
--- a/p4_16-mode.el
+++ b/p4_16-mode.el
@@ -3,26 +3,42 @@
 ;; Author: Soham S Gumaste <sohamg2@gmail.com>
 ;; Maintainer: Soham S Gumaste <sohamg2@gmail.com>
 ;; Created: 11 Nov 2023
-;; Original Source: https://github.com/p4lang/tutorials/blob/master/vm/p4_16-mode.el
-;; Original License: Apache 2.0
-;; Original Author: Vladimir Gurevich <vladimir.gurevich@barefootnetworks.com>
-;; Modifications bylicensed under the same license OR the MIT License.
+;; Modifications bilicensed under the same license OR the MIT License.
 
 ;; Keywords: languages p4_16
 
 ;; This file is not part of GNU Emacs.
 
-;; This file is free software…
-;; …
-;; along with this file.  If not, see <https://www.gnu.org/licenses/>.
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
+
 ;; P4 (Programming Protocol Independent Packet Processors) is a domain
 ;; specific language designed to program network fabric devices.
 ;; This mode has preliminary support for P4_16. It covers the core language,
 ;; but it is not clear yet, how we can highlight the indentifiers, defined
-;; for a particular architecture. Core library definitions are included
+;; for a particular architecture.  Core library definitions are included
 
+;;; History:
+
+;; The headers above have no special meaning, and could also be
+;; re-written in prose under a special section.  Also, was the package
+;; really created just a few days ago?
+
+;; Original Source: https://github.com/p4lang/tutorials/blob/master/vm/p4_16-mode.el
+;; Original License: Apache 2.0
+;; Original Author: Vladimir Gurevich <vladimir.gurevich@barefootnetworks.com>
 
 ;;; Code:
 (defvar p4_16-mode-hook nil)
@@ -30,46 +46,46 @@
 ;; Define the keymap (for now it is pretty much default)
 (defvar p4_16-mode-map
   (let ((map (make-keymap)))
-    (define-key map "\C-j" 'newline-and-indent)
+    (define-key map (kbd "C-j") 'newline-and-indent)
     map)
-  "Keymap for P4_16 major mode")
+  "Keymap for P4_16 major mode.")
 
-;; Syntactic HighLighting
+;;; Syntactic Highlighting
 
-;; Main keywords (declarations and operators)
+;;;; Main keywords (declarations and operators)
 (defconst p4_16-keywords
-      '("action" "apply"
-        "control"
-        "default"
-        "else" "enum" "extern" "exit"
-        "header" "header_union"
-        "if"
-        "match_kind"
-        "package" "parser"
-        "return"
-        "select" "state" "struct" "switch"
-        "table"  "transition" "tuple" "typedef"
-        "verify")
-      "P4_16 Standard Keywords")
+  '("action" "apply"
+    "control"
+    "default"
+    "else" "enum" "extern" "exit"
+    "header" "header_union"
+    "if"
+    "match_kind"
+    "package" "parser"
+    "return"
+    "select" "state" "struct" "switch"
+    "table"  "transition" "tuple" "typedef"
+    "verify")
+  "P4_16 Standard Keywords.")
 
 (defconst p4_16-annotations
   '("@name" "@metadata" "@alias")
-  "P4_16 Standard Annotations")
+  "P4_16 Standard Annotations.")
 
 (defconst p4_16-attributes
-      '("const" "in" "inout" "out"
-        ;; Tables
-        "key" "actions" "default_action" "entries" "implementation"
-        "counters" "meters")
-      "P4_16 Object Attributes and Access Specifiers")
+  '("const" "in" "inout" "out"
+    ;; Tables
+    "key" "actions" "default_action" "entries" "implementation"
+    "counters" "meters")
+  "P4_16 Object Attributes and Access Specifiers.")
 
 (defconst p4_16-variables
   '("packet_in" "packet_out")
-  "P4_16 Packet Types")
+  "P4_16 Packet Types.")
 
 (defconst p4_16-operations
   '("&&&" ".." "++" "?" ":")
-  "P4_16 Operators")
+  "P4_16 Operators.")
 
 (defconst p4_16-constants
   '(;; Don't care
@@ -83,11 +99,11 @@
     "exact" "ternary" "lpm" "range"
     ;; We can add constants for supported architectures here
     )
-  "P4_16 Standard Constants")
+  "P4_16 Standard Constants.")
 
 (defconst p4_16-types
   '("bit" "bool" "int" "varbit" "void" "error")
-  "P4_16 Standard Datatypes")
+  "P4_16 Standard Datatypes.")
 
 (defconst p4_16-primitives
   '(;; Header methods
@@ -102,37 +118,36 @@
     "accept" "reject"
     ;; misc
     "NoAction")
-  "P4_16 Standard Primitives")
+  "P4_16 Standard Primitives.")
 
 (defconst p4_16-cpp
-      '("#include"
-        "#define" "#undef"
-        "#if" "#ifdef" "#ifndef"
-        "#elif" "#else"
-        "#endif"
-        "defined"
-        "#line" "#file"))
+  '("#include"
+    "#define" "#undef"
+    "#if" "#ifdef" "#ifndef"
+    "#elif" "#else"
+    "#endif"
+    "defined"
+    "#line" "#file"))
 
 (defconst p4_16-cppwarn
-      '("#error" "#warning"))
+  '("#error" "#warning"))
 
 ;; Optimize the strings
-(setq p4_16-keywords-regexp    (regexp-opt p4_16-keywords   'words))
-(setq p4_16-annotations-regexp (regexp-opt p4_16-annotations     1))
-(setq p4_16-attributes-regexp  (regexp-opt p4_16-attributes 'words))
-(setq p4_16-variables-regexp   (regexp-opt p4_16-variables  'words))
-(setq p4_16-operations-regexp  (regexp-opt p4_16-operations 'words))
-(setq p4_16-constants-regexp   (regexp-opt p4_16-constants  'words))
-(setq p4_16-types-regexp       (regexp-opt p4_16-types      'words))
-(setq p4_16-primitives-regexp  (regexp-opt p4_16-primitives 'words))
-(setq p4_16-cpp-regexp         (regexp-opt p4_16-cpp        1))
-(setq p4_16-cppwarn-regexp     (regexp-opt p4_16-cppwarn    1))
-
+(defvar p4_16-keywords-regexp    (regexp-opt p4_16-keywords   'words))
+(defvar p4_16-annotations-regexp (regexp-opt p4_16-annotations     1))
+(defvar p4_16-attributes-regexp  (regexp-opt p4_16-attributes 'words))
+(defvar p4_16-variables-regexp   (regexp-opt p4_16-variables  'words))
+(defvar p4_16-operations-regexp  (regexp-opt p4_16-operations 'words))
+(defvar p4_16-constants-regexp   (regexp-opt p4_16-constants  'words))
+(defvar p4_16-types-regexp       (regexp-opt p4_16-types      'words))
+(defvar p4_16-primitives-regexp  (regexp-opt p4_16-primitives 'words))
+(defvar p4_16-cpp-regexp         (regexp-opt p4_16-cpp        1))
+(defvar p4_16-cppwarn-regexp     (regexp-opt p4_16-cppwarn    1))
 
 ;; create the list for font-lock.
 ;; each category of keyword is given a particular face
 (defconst p4_16-font-lock-keywords
-  (list
+  (list					;Perhaps use backquoting?
    (cons p4_16-cpp-regexp         font-lock-preprocessor-face)
    (cons p4_16-cppwarn-regexp     font-lock-warning-face)
    (cons p4_16-types-regexp       font-lock-type-face)
@@ -154,16 +169,16 @@
    (cons "\\([^_A-Za-z][+-]?\\([0-9]+w\\)?[0-9]+\\)"    font-lock-constant-face)
    ;;(cons "\\(\\w*\\)"        font-lock-variable-name-face)
    )
-  "Default Highlighting Expressions for P4_16")
+  "Default Highlighting Expressions for P4_16.")
 
 (defvar p4_16-mode-syntax-table
   (let ((st (make-syntax-table)))
     (modify-syntax-entry  ?_  "w"      st)
     (modify-syntax-entry  ?/  ". 124b" st)
     (modify-syntax-entry  ?*  ". 23"   st)
-    (modify-syntax-entry  ?\n  "> b"   st)
+    (modify-syntax-entry  ?\n "> b"    st)
     st)
-  "Syntax table for p4_16-mode")
+  "Syntax table for p4_16-mode.")
 
 ;;; Indentation
 (defvar p4_16-indent-offset 4
@@ -192,7 +207,7 @@
 
 ;; Put everything together
 (defun p4_16-mode ()
-  "Major mode for editing P4_16 programs"
+  "Major mode for editing P4_16 programs."
   (interactive)
   (kill-all-local-variables)
   (set-syntax-table p4_16-mode-syntax-table)
@@ -201,8 +216,8 @@
   (set (make-local-variable 'indent-line-function) 'p4_16-indent-line)
   (setq major-mode 'p4_16-mode)
   (setq mode-name "P4_16")
-  (with-eval-after-load "xcscope" (cscope-minor-mode))
+  (when (fboundp 'cscope-minor-mode) (cscope-minor-mode))
   (run-hooks 'p4_16-mode-hook))
 
-;; The most important line
 (provide 'p4_16-mode)
+;;; p4_16-mode.el ends here

[-- Attachment #3: Type: text/plain, Size: 742 bytes --]


Also, would it be imaginable to rename it to p4-16-mode?  The mid-symbol
underscore looks unusual in a Lisp context

> Summary:
> P4 (Programming Protocol Independent Packet Processors) is a domain
> specific language used to program network fabric devices like NICs or
> switches. The project can be found at https://p4.org . This package
> adds a major mode for this language. This mode was initially a part of
> the github repo "p4lang/tutorials" (Apache 2.0). I have added some
> polish, and obtained permission from the repo maintainers to submit
> here.

I suppose you want to add the package to NonGNU ELPA then?

> I do not have write access to the ELPA git repo. Please let me know if
> I need to make any modifications.
>
> Thanks

^ permalink raw reply related	[relevance 40%]

* Re: [ELPA] New package: SachaC-news
  @ 2023-11-17  7:28 21% ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-11-17  7:28 UTC (permalink / raw)
  To: Christian; +Cc: emacs-devel

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

Christian <cnngimenez@disroot.org> writes:

> Hi!
>
> I want to propose SachaC-news (or sachac-news.el if you like)
> package to be included in ELPA. Its objective is to check for
> Sacha Chua's news repository periodically, and to show the Org
> file if there is a new commit with a new post in it. It has
> some customizations too, such as folding specific sections
> automatically, and desktop notifications via "notify-send". The
> requirement is the git program to be installed on your system.
> This information and its usage is at the README.org file at the
> package repository:
>
>           https://github.com/cnngimenez/sachac-news
>
> The code has been checked with byte-compile-file, and
> flycheck configured with checkdoc and flycheck-package [1].

> They do not display any warnings up to commit d00e629, but tell
> me if you find something to fix or any suggestions.

I found a few things, here is a diff with some comments and suggestions:


[-- Attachment #2: Type: text/plain, Size: 17723 bytes --]

diff --git a/sachac-news.el b/sachac-news.el
index 8d67911..1f389b2 100644
--- a/sachac-news.el
+++ b/sachac-news.el
@@ -22,7 +22,6 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-
 ;;; Commentary:
 
 ;; Check periodically for new commits on Sacha Chua's news repository.
@@ -58,29 +57,29 @@
 
 ;;; Code:
 
-(provide 'sachac-news)
 (require 'org-element)
 (require 'org-list)
-(require 'cl-extra)
+(require 'cl-lib)
 
 (defgroup sachac-news nil
   "Sacha Chua's Emacs news customizations."
   :group 'applications)
 
-(defcustom sachac-news-git-command "git"
+(defcustom sachac-news-git-command
+  (eval-when-compile
+    (require 'vc-git)
+    vc-git-program)
   "Path or git command name.
 
 Valid values are \"/usr/bin/git\" or \"git\" if it is in the current PATH."
-  :type 'string
-  :group 'sachac-news) ;; defcustom
+  :type 'string) ;; defcustom
 
 (defcustom sachac-news-fold-category-regexp-list '()
   "A list of regexp strings of the matching categories that should be folded.
 
 The function `sachac-news-fold-categories' use this variable to find
 categories that the user wants to hide."
-  :type '(repeat regexp)
-  :group 'sachac-news) ;; defcustom
+  :type '(repeat regexp)) ;; defcustom
 
 (defcustom sachac-news-alarm-sound-file
   "/usr/share/sounds/freedesktop/stereo/bell.oga"
@@ -88,8 +87,7 @@ categories that the user wants to hide."
 If the value is nil or the file does not exists, the `ding' function is used.
 
 See `sachac-news-default-sound-alarm' function."
-  :type 'file
-  :group 'sachac-news) ;; defcustom
+  :type 'file) ;; defcustom
 
 (defcustom sachac-news-alarm-sound-programs
   '(("mpv" . "--really-quiet %s")
@@ -100,22 +98,20 @@ programs is founded on the system, the `ding' function will be used.  The
 first program founded is used.
 
 This variable is used by `sachac-news-default-sound-alarm' function."
-  :type '(alist :key-type string :value-type string)
-  :group 'sachac-news ) ;; defcustom
+  :type '(alist :key-type string :value-type string)) ;; defcustom
 
 (defcustom sachac-news-alarm-functions-hook
   '(sachac-news-default-notify-alarm
     sachac-news-default-sound-alarm)
   "The alarm functions.
 These functions are called when there are new news."
-  :type 'hook
-  :group 'sachac-news ) ;; defcustom
+  :type 'hook) ;; defcustom
 
 (defconst sachac-news-title-regexp
   "^\\*\\*[[:space:]]+[[:digit:]]+-[[:digit:]]+-[[:digit:]]+[[:space:]]+Emacs news"
-  "Regexp used to find news titles in the index.org file." ) ;; defconst
+  "Regexp used to find news titles in the index.org file.") ;; defconst
 
-(defvar sachac-news-timer-setted-time 0
+(defvar sachac-news-timer-setted-time 0	;perhaps mark these as internal: sachac-news--...
   "At what time the timer has been setted?
 See `sachac-news-set-timer'.")
 
@@ -148,66 +144,67 @@ Else, this variable contains nil.")
 
 If USE-INDEX-ORG is t, then load the index.org file.  Else, use the current
 buffer as if it is the index.org."
-
   (if use-index-org
       (with-temp-buffer
 	(insert-file-contents (sachac-news-git-index-org))
-	(sachac-news-take-last-new nil) )
+	(sachac-news-take-last-new nil))
     (progn
       (goto-char (point-min))
       (search-forward-regexp sachac-news-title-regexp)
       (let ((sachac-news-title (org-element-at-point)))
 	(buffer-substring-no-properties
 	 (org-element-property :begin sachac-news-title)
-	 (org-element-property :end sachac-news-title))))) )
+	 (org-element-property :end sachac-news-title))))))
 
-(defcustom sachac-news-data-directory (concat user-emacs-directory
-					     "sachac/")
+(defcustom sachac-news-data-directory
+  (locate-user-emacs-file "sachac")
   "Where is the data directory?"
-  :type 'directory
-  :group 'sachac-news) ;; defcustom
+  :type 'directory) ;; defcustom
 
-(defcustom sachac-news-data-file "data.el"
+(defcustom sachac-news-data-file "data.eld"
   "The configuration and data file.
 This is where the last updated date and other data is stored."
-  :type 'file
-  :group 'sachac-news) ;; defcustom
+  :type 'file) ;; defcustom
 
 (defcustom sachac-news-git-dirname "git"
   "The directory where the git repository should be cloned."
-  :type 'string
-  :group 'sachac-news)
+  :type 'string)
 
+;; She publishes the news every week around the beginning, why check
+;; every day?
 (defcustom sachac-news-update-hours-wait 24
   "The amount of hours when the git clone/pull must wait before be called.
 
 Default is 24 hours.  Only positive values should be used."
-  :type 'integer
-  :group 'sachac-news ) ;; defcustom
+  :type 'natnum
+  :group 'sachac-news) ;; defcustom
 
 (defun sachac-news-dir-git ()
   "Return the complete git path."
-  (concat sachac-news-data-directory "/" sachac-news-git-dirname) )
+  (expand-file-name  sachac-news-git-dirname sachac-news-data-directory))
 
 (defun sachac-news-dir-datafile ()
   "Return the complete data file path."
-  (concat sachac-news-data-directory "/" sachac-news-data-file) )
-
+  (expand-file-name sachac-news-data-file sachac-news-data-directory))
 
 (defun sachac-news-git-index-org ()
   "Return the index.org path on the git directory."
-  (concat (sachac-news-dir-git) "/emacs-news/index.org") )
+  (expand-file-name
+   "index.org"
+   (expand-file-name
+    "emacs-news"
+    (sachac-news-dir-git))))
 
 (defun sachac-news--show-last-new-internal ()
   "Show the last news.
 This is used after the update sentinel is executed.
 See `sachac-news-show-last-new'."
-  (let ((str (sachac-news-take-last-new t)))
+  (let ((str (sachac-news-take-last-new t))) ;unused!
     (with-current-buffer (get-buffer-create "*last-news*")
       (org-mode)
 
-      (delete-region (point-min) (point-max))
-      (insert str)
+      (erase-buffer)
+      (insert "foo")
       
       (goto-char (point-min))
 	
@@ -217,7 +214,7 @@ See `sachac-news-show-last-new'."
 	(sachac-news-update-last-saved-title)
 	(sachac-news-fold-categories))
 	
-      (display-buffer (current-buffer)))) )
+      (display-buffer (current-buffer)))))
 
 (defun sachac-news-show-last-new-if-new ()
   "Show the last new if there is a new title.
@@ -241,16 +238,12 @@ see `sachac-news-update-hours-wait' variable."
 			  #'sachac-news--show-last-new-internal
 			  #'sachac-news--show-last-new-internal))
 
-;;
-;; --------------------
-;; Last saved title
-;;
+;;; Last saved title
 
 (defun sachac-news-update-last-saved-title ()
   "Save the last title into the data file."
-
   (setq sachac-news-last-saved-title (sachac-news-get-last-title))
-  (sachac-news-save-data) )
+  (sachac-news-save-data))
 
 (defun sachac-news-get-last-title (&optional use-current-buffer)
   "Get the first title founded in the current buffer.
@@ -264,7 +257,7 @@ the last title.  Else, if t, use the current buffer, but remember to call
 	nil t)
     (with-temp-buffer
       (insert (sachac-news-take-last-new t))
-      (sachac-news-get-last-title t))) )
+      (sachac-news-get-last-title t))))
  
 (defun sachac-news-is-there-new-title-p (&optional use-current-buffer)
   "According to the last save, return t when a new post is found.
@@ -284,12 +277,9 @@ last news buffer.  Else, open the index.org and retrieve the last news."
 	     
     (or (null sachac-news-last-saved-title)
 	(not (string-equal last-title
-			   sachac-news-last-saved-title)))) )
+			   sachac-news-last-saved-title)))))
 
-;;
-;; --------------------
-;; Data or config. load/save
-;;
+;;; Data or config. load/save
 
 (defun sachac-news-load-data ()
   "Update variables which values are in the configuration file.
@@ -305,7 +295,7 @@ important variables."
 	(setq sachac-news-last-saved-title
 	      (alist-get 'last-saved-title expr))
 	;; Return the expression loaded
-	expr))) )
+	expr))))
 
 (defun sachac-news-save-data ()
   "Save some important variables into the data file.
@@ -313,20 +303,17 @@ These variables can be loaded again with `sachac-news-load-data'."
   (with-temp-buffer
     (let ((data (list (cons 'last-update sachac-news-last-update)
 		      (cons 'last-saved-title sachac-news-last-saved-title))))
-    (insert (prin1-to-string data))
-    (write-file (sachac-news-dir-datafile))
-    data)) )
+      (prin1 data (current-buffer))
+      (write-region nil nil (sachac-news-dir-datafile) nil 'silent)
+      data)))
 
 (defun sachac-news-load-data-if-needed ()
   "If the data has not been loaded yet, load it."
   (unless sachac-news-data-loaded
     (sachac-news-load-data)
-    (setq sachac-news-data-loaded t)) )
+    (setq sachac-news-data-loaded t)))
 
-;;
-;; --------------------
-;; Git clone/update
-;;
+;;; Git clone/update
 
 (defun sachac-news-update-last-update ()
   "Update the `sachac-news-last-update' date with the current date."
@@ -335,6 +322,7 @@ These variables can be loaded again with `sachac-news-load-data'."
 
 (defun sachac-news-update-time-str ()
   "Return a string with the last time and the amount of time left."
+  ;; Perhaps format this in a temporary buffer, then return the buffer string?
   (format "Waiting time: %s hours
 -- Update --
 Last time updated: %s
@@ -361,19 +349,19 @@ Time left for automatic forced update: %s %s"
 					     (* sachac-news-update-hours-wait 60 60)))
 	    "No timer setted")
 	  (number-to-string (/ (sachac-news-get-update-time-left) 60))
-	  "minutes") )
+	  "minutes"))
 
 (defun sachac-news-get-update-wait-seconds ()
   "Get the `sachac-news-update-hours-wait' in seconds."
-  (* sachac-news-update-hours-wait 60 60) )
+  (* sachac-news-update-hours-wait 60 60))
 
 (defun sachac-news-show-update-time ()
   "Display the time left for the next update."
   (interactive)
   (sachac-news-load-data-if-needed)
   (if sachac-news-last-update
-      (message (sachac-news-update-time-str))
-    (message "Git has not been called before.")) )
+      (message "%s" (sachac-news-update-time-str))
+    (message "Git has not been called before.")))
 
 (defun sachac-news-get-update-time-left ()
   "Return the seconds left for the next scheduled update.
@@ -384,7 +372,7 @@ been setted)."
   (if sachac-news-timer-setted-time
       (- (+ sachac-news-timer-setted-time (sachac-news-get-update-wait-seconds))
 	 (time-convert (current-time) 'integer))
-    0) )
+    0))
 
 (defun sachac-news-get-update-enable-time-left ()
   "Return the seconds left for the next enabled update.
@@ -398,7 +386,7 @@ loaded)."
   (if sachac-news-last-update
       (- (+ sachac-news-last-update (sachac-news-get-update-wait-seconds))
 	 (time-convert (current-time) 'integer))
-    0) )
+    0))
 
 (defun sachac-news-get-update-time-elapsed ()
   "Return the seconds elapsed since the last update.
@@ -408,19 +396,19 @@ Return the numbre of seconds after the maximum wait + 1 if
   (if sachac-news-last-update
       (- (time-convert (current-time) 'integer)
 	 sachac-news-last-update)
-    (+ (sachac-news-get-update-wait-seconds) 1)) )
+    (+ (sachac-news-get-update-wait-seconds) 1)))
 
 (defun sachac-news-is-time-for-update-p ()
   "Check if a day has passed since the last update."
   (if sachac-news-last-update
       (>= (sachac-news-get-update-time-elapsed)
-	 (sachac-news-get-update-wait-seconds) )
-    t) )
+	 (sachac-news-get-update-wait-seconds))
+    t))
 
 (defun sachac-news-create-dirs ()
   "Create the needed directories to save data and the repository."
   (make-directory sachac-news-data-directory t)
-  (make-directory (sachac-news-dir-git) t) )
+  (make-directory (sachac-news-dir-git) t))
 
 (defun sachac-news--git-sentinel (_process event)
   "Git sentinel.
@@ -454,19 +442,19 @@ FUNC-CALL-AFTER is a function called after the git process endend successfully."
     (when func-call-after
       (add-hook 'sachac-news--git-hook func-call-after))
     (setq sachac-news--git-process
-	  (if (file-exists-p (sachac-news-git-index-org))
-	      (start-process-shell-command "sachac-news-git-pull"
+	  (let ((default-directory (expand-file-name "emacs-news" (sachac-news-dir-git))))
+	    ;; I am not sure what the point is there, but I suspect
+	    ;; there should be a better way to do this using timers
+	    ;; and vc-git.
+	    (if (file-exists-p (sachac-news-git-index-org))
+		(start-process-shell-command "sachac-news-git-pull"
+					     "*sachac-news-git*"
+					     (concat "sleep 60 ; " git-program " pull"))
+	      (start-process-shell-command "sachac-news-git-clone"
 					   "*sachac-news-git*"
-					   (concat
-					    "cd " (sachac-news-dir-git) "/emacs-news ; sleep 60 ; "
-					    git-program
-					    " pull"))
-	    (start-process-shell-command "sachac-news-git-clone"
-					 "*sachac-news-git*"
-					 (concat
-					"cd " (sachac-news-dir-git) "; sleep 60 ; "
-					git-program " clone https://github.com/sachac/emacs-news.git"))))
-    (set-process-sentinel sachac-news--git-process #'sachac-news--git-sentinel)) )
+					   (concat "sleep 60 ; " git-program " clone \
+https://github.com/sachac/emacs-news.git")))))
+    (set-process-sentinel sachac-news--git-process #'sachac-news--git-sentinel)))
 
 
 (defun sachac-news-update-git (&optional force-update
@@ -501,11 +489,11 @@ pull/clone."
 	    (when callback-if-no-update
 	      (funcall callback-if-no-update))))
       ;; Git program not founded
-      (message "%s %s\n%s\n%s"
-	       "The Git program has not been founded!"
-	       "SachaC-news cannot download news without it!"
-	       "Please install it in our system or customize the variable:"
-	       "M-x customize-option sachac-news-git-command"))) )
+      (message (substitute-command-keys
+		"The Git program has not been founded! \
+SachaC-news cannot download news without it!
+Please install it in our system or customize the variable: )
+\\[customize-option] sachac-news-git-command")))))
 
 (defun sachac-news-open-index-file ()
   "Open the index.org file from the local repository.
@@ -519,15 +507,10 @@ how the update is done."
   (sachac-news-update-git)
   (if (file-exists-p (sachac-news-git-index-org))
       (find-file (sachac-news-git-index-org))
-    (message "%s\n%s"
-	     "Index file not found! Did something wrong happen?"
-	     "See `sachac-news-update-git'.")) )
+    (message "Index file not found! Did something wrong happen?
+See `sachac-news-update-git'.")))
 
-
-;;
-;; --------------------
-;; Folding categories
-;;
+;;; Folding categories
 
 (defun sachac-news-find-all-categories (category-regexps &optional org-element)
   "Match paragraph with the CATEGORY-REGEXPS regexp.
@@ -554,7 +537,7 @@ Returns a list of org-element of type \\'item found in the index.org."
 			  (string-match-p category element))
 			category-regexps))
 
-	    parent)))) )
+	    parent)))))
 
 
 (defun sachac-news-fold-all-items (item-list)
@@ -582,12 +565,9 @@ This function works on any Org file, even at the Emacs news' index.org."
   (let ((category-list (if category-regexp-list category-regexp-list
 			 sachac-news-fold-category-regexp-list)))
     (sachac-news-fold-all-items
-     (sachac-news-find-all-categories category-list))) )
+     (sachac-news-find-all-categories category-list))))
 
-;;
-;; --------------------
-;; Alarm
-;;
+;;; Alarm
 
 (defun sachac-news-default-notify-alarm ()
   "The default alarm.
@@ -596,7 +576,7 @@ Use the notify-send to send the alarm."
     (when program
       (shell-command (concat program
 			     " --app-name=\"Emacs: SachaC-news\""
-			     " \"Check the News!\"")))) )
+			     " \"Check the News!\"")))))
 
 (defun sachac-news-default-sound-alarm ()
   "The default sound alarm.
@@ -619,17 +599,14 @@ as fallback."
 	       (car program-data)
 	       (split-string
 		(format (cadr program-data) sachac-news-alarm-sound-file)))
-      (ding t))) )
+      (ding t))))
 
 (defun sachac-news-run-alarm-if-needed ()
   "Run the alarm hook functions if there is a new post ."
   (when (sachac-news-is-there-new-title-p)
-    (run-hooks 'sachac-news-alarm-functions-hook)) )
+    (run-hooks 'sachac-news-alarm-functions-hook)))
 
-;;
-;; --------------------
-;; Timer
-;;
+;;; Timer
 
 (defun sachac-news-timer-function ()
   "The function used by the timer."
@@ -638,7 +615,7 @@ as fallback."
   (sachac-news-update-git t #'sachac-news-show-last-new-if-new)
   (sachac-news-run-alarm-if-needed)
 
-  (sachac-news-activate-timer) )
+  (sachac-news-activate-timer))
 
 
 (defun sachac-news-activate-timer ()
@@ -650,9 +627,9 @@ Set the timer for executing on `sachac-news-update-hours-wait' hours."
   (setq sachac-news-timer-setted-time (time-convert (current-time) 'integer))
   (setq sachac-news-timer
 	(run-at-time
-	 (concat (number-to-string sachac-news-update-hours-wait) "hours")
-		     nil
-		     #'sachac-news-timer-function)) )
+	 (format "%d hours" sachac-news-update-hours-wait)
+	 nil
+	 #'sachac-news-timer-function)))
 
 (defun sachac-news-deactivate-timer ()
   "Stop and cancel the timer."
@@ -660,7 +637,7 @@ Set the timer for executing on `sachac-news-update-hours-wait' hours."
   (when (timerp sachac-news-timer)
     (cancel-timer sachac-news-timer)
     (setq sachac-news-timer nil))
-  (setq sachac-news-timer-setted-time nil) )
+  (setq sachac-news-timer-setted-time nil))
 
 (defun sachac-news-timer-status ()
   "Is the timer setted or not?
@@ -668,8 +645,13 @@ Report the user about the timer status."
   (interactive)
   (if (timerp sachac-news-timer)
       (message "Timer is setted and running.")
-    (message "Timer is deactivated")) )
+    (message "Timer is deactivated")))
+
+;; Don't activate side effects while loading your package!  Instruct
+;; the users to add this to their init.el, so that one knows what is
+;; going on.
 
-(sachac-news-activate-timer)
+;; (sachac-news-activate-timer)
 
+(provide 'sachac-news)
 ;;; sachac-news.el ends here

[-- Attachment #3: Type: text/plain, Size: 774 bytes --]


> According to http://elpa.gnu.org/, and the README.org [2] file
> linked there, it says to notify to this mail address as
> first step. Also, it mentions other steps regarding pushing the
> code and adding an entry on elpa-packages file. But, there is a
> marker above indicating "OUTDATED" [3].

That should be addressed ^^

> Please, could you tell me if these steps are needed?
> If they are not, how should I proceed?

As soon as we sort out the above comments, I can take care of adding the
package for you.

> Cheers!
> Christian Gimenez
>
> [1] https://github.com/purcell/flycheck-package
> [2] https://git.savannah.gnu.org/cgit/emacs/elpa.git/plain/README
> [3] The section states: "Text below this marker is OUTDATED and
> still needs to be reviewed/rewritten!!"

^ permalink raw reply related	[relevance 21%]

* Re: Making package.el talk over Tor
  @ 2023-11-17  7:03 98%     ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-11-17  7:03 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Akib Azmain Turja, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> Thanks for replying to my question a month ago.
> I got so backlogged I just saw the reply.
>
>   > > Can someone tell me where to find the code that actually
>   > > communicates with the ELPA repos?  Where is the best place
>   > > to make that change?
>
>   > Isearching for 'url-' reveals that the following functions use the URL
>   > package to access the HTTP server: 'package--with-work-buffer',
>   > 'package--archive-file-exists-p' and'package--with-response-buffer-1'.
>
>   > But I think a better/safer solution will be to use torsocks.
>
> I agree, and I plan to use torsocks.  But in order to do thst, I need
> to know where to do that.  That's really what my question was about.
>
> Can you suggest where I should do that?
>
> Does the url package have a variable to specify the command to use?
> I could specify torsocks there.

No, url.el eventually calls `make-network-process', that directly
invokes the respective networking system calls, not making it possible
to interject torsocks.  What I believe Akib meant was to start Emacs
with torsocks, but to my understanding this is not a recommended
practice either, because one will continue to leak fingerprintable
metadata (specially inside of Emacs) that would undermine the point of
using Tor to begin with.



^ permalink raw reply	[relevance 98%]

* Re: Instead of pcase
  @ 2023-11-16 18:47 81%         ` Philip Kaludercic
    0 siblings, 1 reply; 200+ results
From: Philip Kaludercic @ 2023-11-16 18:47 UTC (permalink / raw)
  To: T.V Raman; +Cc: dmitry, rms, emacs-devel

"T.V Raman" <raman@google.com> writes:

> when-let let-alist etc have worked well for me.
>
> What threw me with pcase is there are lots of special chars in that
> particular example whose meaning I dont know, and looking those up and
> understanding their use at the same time was what chased me away

Taking the concrete example you mentioned, 

    (pcase res
      (`(,_ . ,(and (pred functionp) f)) (funcall f))
      (`(,hookfun . (,start ,end ,collection . ,plist))

the unknown or unfamiliar characters are "`" and ",".  The (dynamic)
pcase documentation string is pretty straightforward in explaining what
it does, or can you recall what confused you?:

--8<---------------cut here---------------start------------->8---
-- `QPAT

Backquote-style pcase patterns: `QPAT
QPAT can take the following forms:
  (QPAT1 . QPAT2)       matches if QPAT1 matches the car and QPAT2 the cdr.
  [QPAT1 QPAT2..QPATn]  matches a vector of length n and QPAT1..QPATn match
                           its 0..(n-1)th elements, respectively.
  ,PAT                  matches if the ‘pcase’ pattern PAT matches.
  SYMBOL                matches if EXPVAL is ‘equal’ to SYMBOL.
  KEYWORD               likewise for KEYWORD.
  NUMBER                likewise for NUMBER.
  STRING                likewise for STRING.

The list or vector QPAT is a template.  The predicate formed
by a backquote-style pattern is a combination of those
formed by any sub-patterns, wrapped in a top-level condition:
EXPVAL must be "congruent" with the template.  For example:

  `(technical ,forum)
--8<---------------cut here---------------end--------------->8---

Or if you mean "_", then

--8<---------------cut here---------------start------------->8---
                  PATTERN can take one of the forms:

  _                matches anything.
--8<---------------cut here---------------end--------------->8---

which is familiar to people coming from functional languages, but even
Elisp uses underscores to denote unused variables.



^ permalink raw reply	[relevance 81%]

Results 1-200 of ~1739   | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-10-16  2:04     Making package.el talk over Tor Richard Stallman
2023-10-16  6:54     ` Akib Azmain Turja
2023-11-17  3:53       ` Richard Stallman
2023-11-17  7:03 98%     ` Philip Kaludercic
2023-11-19  3:39           ` Richard Stallman
2023-11-19  6:17             ` Eli Zaretskii
2023-12-09  4:06               ` Richard Stallman
2023-12-09  7:40                 ` Eli Zaretskii
2023-12-13  4:58                   ` Richard Stallman
2023-12-14 12:25 85%                 ` Philip Kaludercic
2023-12-17  3:21                       ` Richard Stallman
2023-12-18  4:12                         ` Richard Stallman
2023-12-18  8:05                           ` Tomas Hlavaty
2023-12-21  4:20                             ` Richard Stallman
2023-12-21  9:52 99%                           ` Philip Kaludercic
2023-12-21  9:55 99%                             ` Philip Kaludercic
2023-12-24  3:57                                   ` Richard Stallman
2023-12-24 13:36                                     ` Tomas Hlavaty
2023-12-24 15:19 99%                                   ` Philip Kaludercic
2023-12-14 12:41 79%         ` Philip Kaludercic
2023-12-17  3:21               ` Richard Stallman
2023-12-17 11:51 73%             ` Philip Kaludercic
2023-10-18 21:54     [ELPA] New package: dape Daniel Pettersson
2023-10-19  2:08     ` Adam Porter
2023-10-19 10:52       ` Krister Schuchardt
2023-10-19 11:06         ` Dmitry Gutov
2023-10-20 14:53           ` John Yates
2023-11-01 19:13             ` Dmitry Gutov
2023-11-02 14:42               ` João Távora
2023-11-04  9:51                 ` Daniel Pettersson
2023-11-04 10:00                   ` Philip Kaludercic
2023-11-23  6:10 91%                 ` Philip Kaludercic
2023-12-05  8:41 95%                   ` Philip Kaludercic
2023-12-05  9:18                         ` João Távora
2023-12-05 10:59 98%                       ` Philip Kaludercic
2023-10-31 10:34     [ELPA] New package: dired-duplicates Harald Judt
2023-10-31 12:21     ` Philip Kaludercic
2023-10-31 21:05       ` Harald Judt
2023-11-01 11:32         ` Philip Kaludercic
2023-11-01 20:04           ` Harald Judt
2023-11-01 21:29             ` Philip Kaludercic
2023-11-02  8:44               ` Harald Judt
2023-11-03  8:19                 ` Philip Kaludercic
2023-11-03 20:19                   ` Harald Judt
2023-11-04 15:27                     ` Philip Kaludercic
2023-11-06  9:33                       ` Harald Judt
2023-11-10  8:37                         ` Philip Kaludercic
2023-11-10 10:02                           ` Harald Judt
2023-11-23  6:12 99%                         ` Philip Kaludercic
2023-11-12 19:32     [ELPA] New package: SachaC-news Christian
2023-11-17  7:28 21% ` Philip Kaludercic
2023-11-18 20:30       ` Christian
2023-11-18 21:10 99%     ` Philip Kaludercic
2023-11-25 22:07           ` Christian
2023-11-25 22:50 93%         ` Philip Kaludercic
2023-11-13 20:31     [ELPA] New Package: p4_16-mode Soham Gumaste
2023-11-17  7:36 40% ` Philip Kaludercic
2023-11-17 20:11       ` Soham Gumaste
2023-11-18 21:12 99%     ` Philip Kaludercic
2023-11-18 21:20           ` Soham Gumaste
2023-11-18 21:51 99%         ` Philip Kaludercic
2023-11-18 22:18               ` Soham Gumaste
2023-11-20 18:09                 ` Soham Gumaste
2023-11-23  5:57 99%               ` Philip Kaludercic
2023-11-16  3:04     Instead of pcase Richard Stallman
2023-11-16  7:37     ` Philip Kaludercic
2023-11-16 17:18       ` T.V Raman
2023-11-16 18:21         ` Dmitry Gutov
2023-11-16 18:39           ` T.V Raman
2023-11-16 18:47 81%         ` Philip Kaludercic
2023-11-18  3:04               ` Richard Stallman
2023-11-19 13:49                 ` Dmitry Gutov
2023-11-21  2:42                   ` Richard Stallman
2023-11-24 17:29                     ` Lynn Winebarger
2023-11-28  2:44                       ` Richard Stallman
2023-11-30 19:14                         ` Lynn Winebarger
2023-12-02  3:20                           ` Richard Stallman
2023-12-02  8:41                             ` Andreas Schwab
2023-12-02  9:02 76%                           ` Philip Kaludercic
2023-11-17 10:11     [Reminder]Decommissoned keyservers CHENG Gao via Emacs development discussions.
2023-11-17 21:02     ` Jonas Bernoulli
2023-11-18 15:41 99%   ` Philip Kaludercic
2023-11-17 21:15 99% ` Philip Kaludercic
2023-11-18  0:54       ` CHENG Gao via Emacs development discussions.
2024-02-11 17:39 88%     ` Philip Kaludercic
2024-02-17 18:13           ` Stefan Kangas
2024-02-17 18:48 99%         ` Philip Kaludercic
2023-11-18 10:43     [ELPA] New package: ert-font-lock Vladimir Kazanov
2023-11-18 11:18 61% ` Philip Kaludercic
2023-11-18 12:07       ` Po Lu
2023-11-18 12:43         ` Eli Zaretskii
2023-11-18 13:14           ` Po Lu
2023-11-18 14:47 99%         ` Philip Kaludercic
2023-11-18 14:54     Turning on savehist-mode by default sbaugh
2023-11-18 16:33     ` [External] : " Drew Adams
2023-11-18 18:19 81%   ` Philip Kaludercic
2023-11-18 21:06         ` Drew Adams
2023-11-18 21:42 70%       ` Philip Kaludercic
2023-11-20 12:08     [ELPA] Add theme-buffet package Bruno Boal
2023-11-20 19:05 21% ` Philip Kaludercic
2023-11-24 11:38       ` Bruno Boal
2023-11-24 18:11 72%     ` Philip Kaludercic
2023-11-24 18:39     Don't see PATCH on bug-gnu-emacs Niall Dooley
2023-11-24 20:57 98% ` Philip Kaludercic
2023-11-29 12:16     a mode for algol 68 Omar Polo
2023-11-30  7:10 99% ` Philip Kaludercic
2023-11-30 10:19       ` Omar Polo
2023-11-30 11:33         ` Jose E. Marchesi
2023-11-30 13:01 99%       ` Philip Kaludercic
2023-12-12  3:43     Instead of pcase Richard Stallman
2023-12-13  1:32     ` Adam Porter
2023-12-16  4:23       ` Richard Stallman
2023-12-18  4:09         ` cond* Richard Stallman
2023-12-19  3:49           ` cond* Richard Stallman
2023-12-19 12:13             ` cond* João Távora
2023-12-22  3:14               ` cond* Richard Stallman
2023-12-22  7:27 99%             ` cond* Philip Kaludercic
2023-12-25  3:41                   ` cond* Richard Stallman
2023-12-25 12:32 95%                 ` cond* Philip Kaludercic
2023-12-27  4:54                       ` cond* Richard Stallman
2023-12-27 14:34 99%                     ` cond* Philip Kaludercic
     [not found]     <87sf5oqu07.fsf@posteo.net>
     [not found]     ` <F7BC15FC-3F0C-48CA-BE77-F0846B61DAB1@gmail.com>
     [not found]       ` <87o7gcqd96.fsf@posteo.net>
     [not found]         ` <6B0DECA2-8E81-495E-99AC-A9F81B43C05E@gmail.com>
2023-12-14 11:18 97%       ` Ellama comments Philip Kaludercic
2023-12-16 17:05             ` Sergey Kostyaev
2023-12-17 12:06 92%           ` Philip Kaludercic
2023-12-17 16:56                 ` Sergey Kostyaev
2023-12-17 21:39 99%               ` Philip Kaludercic
2023-12-16 13:02     [ELPA] Use :release-branch for plz.el Adam Porter
2023-12-17  8:38 99% ` Philip Kaludercic
2023-12-18 19:12     The place for the "ELPA bundling" project Dmitry Gutov
2023-12-19  6:45 96% ` Philip Kaludercic
     [not found]     <170314391115.21254.4894167783688621192@vcs2.savannah.gnu.org>
     [not found]     ` <20231221073151.CF09CC00613@vcs2.savannah.gnu.org>
2023-12-21 10:32 99%   ` [elpa] main 080e09a4c6: * elpa-packages (spacious-padding): Add :doc, :news, and expand :ignored-files Philip Kaludercic
2023-12-21 14:32     [PATCH] New major-mode: bicep-ts-mode Jostein Kjønigsen
2024-01-07 18:04     ` Daniel Mendler via Emacs development discussions.
2024-01-07 20:26       ` Stefan Kangas
2024-01-07 23:25         ` Stefan Monnier
2024-01-08 11:30           ` Jostein Kjønigsen
2024-01-08 19:23             ` Stefan Kangas
2024-01-09  0:33               ` Stefan Monnier
2024-01-09 19:12                 ` Jostein Kjønigsen
2024-01-09 19:16                   ` Stefan Kangas
2024-01-14  4:43                     ` Stefan Monnier
2024-01-15 17:35 98%                   ` Philip Kaludercic
2024-01-09 19:24 95%               ` Philip Kaludercic
2023-12-21 17:47     [ELPA] New package devicetree-ts-mode Aleksandr Vityazev
2023-12-22  7:36 65% ` Philip Kaludercic
2023-12-26 13:44     Manuals for GNU ELPA packages Kjartan Óli Ágústsson
2023-12-26 17:17 89% ` Philip Kaludercic
2023-12-27  8:41       ` Michael Albinus
2023-12-27 13:47 99%     ` Philip Kaludercic
2024-02-26 10:49 84%     ` Philip Kaludercic
2024-02-26 13:04           ` Stefan Monnier
2024-02-26 14:05 73%         ` Philip Kaludercic
2024-02-26 15:03           ` Stefan Monnier
2024-02-26 15:27 99%         ` Philip Kaludercic
     [not found]     <170353786620.20271.13080406788513813678@vcs2.savannah.gnu.org>
     [not found]     ` <20231225205746.E0F24C004EC@vcs2.savannah.gnu.org>
2023-12-26 17:18 99%   ` [elpa] externals/ellama 3b077c0842 4/7: Call ellama-setup-keymap on prefix change Philip Kaludercic
2023-12-27 18:28     man broken? T.V Raman
2023-12-27 18:56     ` Michael Albinus
2023-12-28  9:48 97%   ` Philip Kaludercic
2023-12-28 16:22         ` Michael Albinus
2023-12-29 19:38 99%       ` Philip Kaludercic
2023-12-30  4:55           ` Visuwesh
2023-12-30 11:37             ` Michael Albinus
2024-01-03 15:45 88%           ` Philip Kaludercic
2024-01-03 15:48 99%             ` Philip Kaludercic
2023-12-28 11:21     [ELPA] New package: jami-bot and org-jami-bot Hanno Perrey
2024-01-07 21:01     ` Stefan Kangas
2024-01-09 19:39 90%   ` Philip Kaludercic
2024-01-14 18:46         ` Hanno Perrey
2024-01-15  7:06 66%       ` Philip Kaludercic
2024-01-17  7:59             ` Hanno Perrey
2024-01-17 23:39 97%           ` Philip Kaludercic
2023-12-30  4:22     A new collaborative editing package (maybe tangent) Yuan Fu
2023-12-30  5:28     ` Karl Fogel
2023-12-30 10:56 99%   ` Philip Kaludercic
2024-01-07 12:34 79% Ada-mode to be abandoned? Philip Kaludercic
2024-01-07 15:21     ` Dmitry
2024-01-07 16:26 85%   ` Philip Kaludercic
2024-01-07 17:46       ` Is it better to add treesitter modes to core? Stefan Kangas
2024-01-07 21:27         ` Dmitry Gutov
2024-01-08  6:15 90%       ` Philip Kaludercic
2024-01-08 12:47             ` Eli Zaretskii
2024-01-09 19:27 99%           ` Philip Kaludercic
2024-01-09 19:54                 ` Eli Zaretskii
2024-01-09 20:21 99%               ` Philip Kaludercic
2024-01-07 16:29     ` Ada-mode to be abandoned? Fernando Oleo Blanco
2024-01-07 16:48 96%   ` Philip Kaludercic
2024-01-14 17:28     Possible minibuffer completion enhancements Eshel Yaron
2024-01-15 21:35     ` Stefan Kangas
2024-01-16 13:58       ` Eshel Yaron
2024-01-16 22:44         ` Stefan Kangas
2024-01-17 19:17           ` Eshel Yaron
2024-01-17 21:17             ` Stefan Kangas
2024-01-19 12:31               ` Eshel Yaron
2024-01-21  9:03                 ` Eshel Yaron
2024-01-22 21:11 88%               ` Philip Kaludercic
2024-01-16  0:38     [ELPA] New package devicetree-ts-mode Aleksandr Vityazev
2024-01-16  6:18 99% ` Philip Kaludercic
2024-01-16  6:42       ` Aleksandr Vityazev
2024-01-16  7:30 96%     ` Philip Kaludercic
     [not found]     <170503894510.17915.13706990899423234889@vcs2.savannah.gnu.org>
     [not found]     ` <20240112055545.BD592C00216@vcs2.savannah.gnu.org>
2024-01-16  7:26 99%   ` [elpa] main 630bdd7c45: * elpa-packages: update all Protesilaos repo URLs Philip Kaludercic
2024-01-16  8:14     Package suggestion[nongnu]: Gnosis (γνῶσις) Thanos Apollo
2024-01-18 19:42 19% ` Philip Kaludercic
2024-01-19 14:45       ` Thanos Apollo
2024-01-20 12:20 98%     ` Philip Kaludercic
2024-01-22 13:39           ` Thanos Apollo
2024-01-22 17:59 98%         ` Philip Kaludercic
2024-01-22 22:55               ` Thanos Apollo
2024-01-23  7:53 91%             ` Philip Kaludercic
2024-01-16  8:18 46% Auto-suggesting Packages Philip Kaludercic
2024-01-16  9:01     ` Stephen Berman
2024-01-16  9:26 99%   ` Philip Kaludercic
2024-01-16 12:58     ` Eli Zaretskii
2024-01-16 15:06 96%   ` Philip Kaludercic
2024-01-16 15:13         ` Eli Zaretskii
2024-01-16 16:18 99%       ` Philip Kaludercic
     [not found]     <871qacrubf.fsf@thanosapollo.org>
2024-01-20 14:36 82% ` completing-read & emacsql Philip Kaludercic
2024-01-22  5:55     Patch for ansi-osc.el Brad Howes
2024-01-22  7:21 99% ` Philip Kaludercic
2024-01-23 15:31     [PATCH] dictonary.el documentation No Wayman
2024-01-23 17:14 99% ` Philip Kaludercic
2024-01-26  0:59     [ELPA] New package: activities Adam Porter
2024-01-26  7:33 99% ` Philip Kaludercic
2024-01-26  7:45     ` Eli Zaretskii
2024-01-26 10:42       ` Adam Porter
2024-01-26 12:32         ` Eli Zaretskii
2024-01-26 21:59           ` Adam Porter
2024-01-27  7:08             ` Eli Zaretskii
2024-01-27  8:46               ` Adam Porter
2024-01-27 14:53                 ` Eric S Fraga
2024-01-27 16:14                   ` Sergey Organov
2024-01-28 11:25                     ` Eric S Fraga
2024-01-29 10:45                       ` Sergey Organov
2024-01-29 13:03 99%                     ` Philip Kaludercic
2024-01-26 10:36     Adam Porter
2024-01-29 19:50     ` Adam Porter
2024-01-30  7:16 99%   ` Philip Kaludercic
2024-01-31 23:23     discoverability, better defaults and which-key in Emacs Jeremy Bryant
2024-02-01  2:45     ` Po Lu
2024-02-03 13:40 99%   ` Philip Kaludercic
2024-02-04 22:03         ` Dmitry Gutov
2024-02-05  7:11 99%       ` Philip Kaludercic
2024-02-05 15:38             ` Dmitry Gutov
2024-02-05 18:47 97%           ` Philip Kaludercic
2024-02-02 15:01     Automatically saving package sources sbaugh
2024-02-04 10:22 91% ` Philip Kaludercic
2024-02-03 12:36     Request to include a couple of packages in GNU ELPA Rahguzar
2024-02-04  4:45     ` Richard Stallman
2024-02-04  8:42       ` Rahguzar
2024-02-07  3:11         ` Richard Stallman
2024-02-07  8:29 97%       ` Philip Kaludercic
2024-02-10  3:55             ` Richard Stallman
2024-02-10  9:11               ` Rahguzar
2024-02-10 15:49 99%             ` Philip Kaludercic
2024-02-04  8:56 99%   ` Philip Kaludercic
2024-02-05 14:30     cond* vs pcase Arthur Miller
2024-02-05 16:06     ` Alfred M. Szmidt
2024-02-05 18:39 99%   ` Philip Kaludercic
2024-02-06 16:17         ` Alfred M. Szmidt
2024-02-06 16:50 94%       ` Philip Kaludercic
2024-02-06 17:27             ` Alfred M. Szmidt
2024-02-06 18:57 94%           ` Philip Kaludercic
2024-02-06 19:04                 ` Alfred M. Szmidt
2024-02-06 19:39 85%               ` Philip Kaludercic
2024-02-05 15:35     New package for NonGNU ELPA : totp-auth Vivek Das Mohapatra
2024-02-06 10:04 68% ` Philip Kaludercic
2024-02-06 10:24       ` Po Lu
2024-02-06 10:27 99%     ` Philip Kaludercic
2024-02-07  3:16     ` Richard Stallman
2024-02-07  8:23 99%   ` Philip Kaludercic
2024-02-05 20:12     nongnu ELPA and slime Peter Hull
2024-02-06  8:10 97% ` Philip Kaludercic
2024-02-06  9:38       ` Colin Baxter
2024-02-06 10:07 99%     ` Philip Kaludercic
2024-02-06  7:05     Proposing new function for basic editing Pedro Andres Aranda Gutierrez
2024-02-06  8:14 98% ` Philip Kaludercic
     [not found]     <slime/slime/pull/809@github.com>
     [not found]     ` <slime/slime/pull/809/c1929127567@github.com>
2024-02-06 10:12 86%   ` [slime/slime] Merge changes from ELPA (PR #809) Philip Kaludercic
2024-02-06 15:57     Elpa question: helping with maintainance of a package in Elpa Arthur Miller
2024-02-06 17:00 99% ` Philip Kaludercic
2024-02-06 17:17       ` chad
2024-02-06 17:24 99%     ` Philip Kaludercic
2024-02-06 19:12     [External] : Re: cond* vs pcase Drew Adams
2024-02-06 20:08     ` Adam Porter
2024-02-06 23:32       ` Drew Adams
2024-02-07 13:14         ` Arthur Miller
2024-02-07 13:43           ` Po Lu
2024-02-07 18:00             ` Arthur Miller
2024-02-07 18:22               ` Alfred M. Szmidt
2024-02-08  1:55                 ` Po Lu
2024-02-08  2:49 99%               ` Philip Kaludercic
2024-02-08 19:55     [DISCUSSION] "quick-help" popup for org-columns (column view) Sławomir Grochowski
2024-02-08 22:16     ` Adam Porter
2024-02-08 23:01       ` Stefan Kangas
2024-02-09 23:02         ` Ihor Radchenko
2024-02-10 15:44 93%       ` Philip Kaludercic
2024-03-20 14:08     ` Ihor Radchenko
2024-04-06 20:41       ` Sławomir Grochowski
2024-04-06 22:40 89%     ` Philip Kaludercic
2024-04-07  5:57         ` Eli Zaretskii
2024-04-08  7:38           ` Sławomir Grochowski
2024-04-08  8:24 96%         ` Philip Kaludercic
2024-04-08 19:13               ` Sławomir Grochowski
2024-04-10  8:26 84%             ` Philip Kaludercic
2024-04-10 20:42                   ` Sławomir Grochowski
2024-04-11  6:37 99%                 ` Philip Kaludercic
2024-04-11  6:58 86%                   ` Philip Kaludercic
2024-04-13  8:37 99%                   ` Philip Kaludercic
2024-04-15 12:39                         ` Sławomir Grochowski
2024-04-16  7:24 93%                       ` Philip Kaludercic
     [not found]     <170756342270.29779.1651696549492519525@vcs2.savannah.gnu.org>
     [not found]     ` <20240210111023.1468FC0EFEF@vcs2.savannah.gnu.org>
2024-02-10 16:36 99%   ` master 7e8b1863af8: Add support for deriving major modes in which-func Philip Kaludercic
2024-02-19 14:51     Adding Flycheck to NonGNU ELPA Bozhidar Batsov
2024-02-19 17:44 98% ` Philip Kaludercic
2024-02-19 18:08       ` Bozhidar Batsov
2024-02-19 18:53 58%     ` Philip Kaludercic
2024-02-19 19:17           ` Bozhidar Batsov
2024-02-19 19:41 75%         ` Philip Kaludercic
2024-02-19 19:32           ` Dmitry Gutov
2024-02-19 22:32             ` joakim
2024-02-20 11:48 60%           ` Philip Kaludercic
2024-02-20 20:04                 ` Dmitry Gutov
2024-02-21 14:38                   ` Dmitry Gutov
2024-02-21 15:02                     ` Stefan Monnier
2024-02-22 15:50                       ` Dmitry Gutov
2024-02-22 16:57 94%                     ` Philip Kaludercic
2024-02-22 17:10                           ` Dmitry Gutov
2024-02-22 17:29                             ` Bozhidar Batsov
2024-02-23 16:07                               ` Docs on ELPA (was Re: Adding Flycheck to NonGNU ELPA) Spencer Baugh
2024-02-23 16:13 92%                             ` Philip Kaludercic
2024-02-23 23:37                                   ` Adam Porter
2024-02-24  8:04 91%                                 ` Philip Kaludercic
2024-02-24 23:25                                   ` Stefan Monnier
2024-02-25 10:06 87%                                 ` Philip Kaludercic
2024-02-21 17:01 99%                 ` Adding Flycheck to NonGNU ELPA Philip Kaludercic
2024-02-21 17:38                       ` Dmitry Gutov
2024-02-21 18:05 99%                     ` Philip Kaludercic
2024-02-21 17:00 63%               ` Philip Kaludercic
     [not found]     <170836288097.22729.10027592558614089561@vcs2.savannah.gnu.org>
     [not found]     ` <20240219171441.76EC3C3421F@vcs2.savannah.gnu.org>
2024-02-19 18:59 82%   ` master ddfba511c19 1/3: Check shortdoc keywords and fix one mistake Philip Kaludercic
2024-02-19 19:21         ` Eli Zaretskii
2024-02-19 19:25 99%       ` Philip Kaludercic
2024-02-20  2:15     Adding package "Loopy" to Non-GNU Devel? Okamsn
2024-02-20  8:09 92% ` Philip Kaludercic
2024-02-22  3:20       ` Okamsn
2024-02-25 17:56         ` Okamsn
2024-02-25 20:50 91%       ` Philip Kaludercic
2024-02-28  1:34             ` Okamsn
2024-03-14 18:52 99%           ` Philip Kaludercic
     [not found]     <170844508291.3153.9183498620897065719@vcs2.savannah.gnu.org>
     [not found]     ` <20240220160445.7C360C00227@vcs2.savannah.gnu.org>
2024-02-20 16:43 99%   ` [elpa] externals/auctex f124fe7d28: Release GNU AUCTeX 14.0.3 Philip Kaludercic
2024-02-21 12:06         ` Tassilo Horn
2024-02-21 13:00           ` Stefan Monnier
2024-02-21 14:26             ` Tassilo Horn
2024-02-21 15:01               ` Stefan Monnier
2024-02-21 16:24                 ` Stefan Monnier
2024-02-21 17:07 99%               ` Philip Kaludercic
2024-02-21 17:02 99%             ` Philip Kaludercic
2024-02-25  7:28     [ELPA] New package: listen Adam Porter
2024-02-25 11:43 39% ` Philip Kaludercic
2024-02-25 13:14       ` Adam Porter
2024-02-25 13:45 51%     ` Philip Kaludercic
2024-02-26  4:15           ` Adam Porter
2024-02-26  8:09 78%         ` Philip Kaludercic
2024-02-26  8:50               ` Adam Porter
2024-02-26 10:13 86%             ` Philip Kaludercic
2024-02-26 14:51                   ` Adam Porter
2024-02-26 15:26 99%                 ` Philip Kaludercic
2024-02-26 17:17             ` [External] : " Drew Adams
2024-02-26 17:21 99%           ` Philip Kaludercic
2024-02-25 14:17         ` Andreas Schwab
2024-02-26  3:46           ` Adam Porter
2024-02-26  7:47 99%         ` Philip Kaludercic
2024-02-25 21:07     NonGNU ELPA: Conditions for accepting a potential new package 'rmsbolt' ? Jeremy Bryant
2024-02-26  7:44 99% ` Philip Kaludercic
2024-02-26 22:40       ` Jeremy Bryant
2024-02-27  7:47 16%     ` Philip Kaludercic
2024-02-27 16:13           ` Jay Kamat
2024-02-27 17:10 98%         ` Philip Kaludercic
2024-02-27 17:14               ` Jay Kamat
2024-02-27 17:21 98%             ` Philip Kaludercic
2024-02-27 17:21             ` Stefan Monnier
2024-02-27 17:27 85%           ` Philip Kaludercic
2024-02-27 17:49                 ` Stefan Monnier
2024-02-27 18:42 99%               ` Philip Kaludercic
2024-03-03  6:13     Reliability of melpa Pedro Andres Aranda Gutierrez
2024-03-03  7:19 99% ` Philip Kaludercic
2024-03-08  9:26     [ELPA] new single file package: mpdired.el Manuel Giraud via Emacs development discussions.
2024-03-08 10:25 61% ` Philip Kaludercic
2024-03-08 11:17       ` Manuel Giraud via Emacs development discussions.
2024-03-08 11:26 91%     ` Philip Kaludercic
2024-03-08 12:22           ` Manuel Giraud via Emacs development discussions.
2024-03-08 13:18 94%         ` Philip Kaludercic
2024-03-08 16:25               ` Manuel Giraud via Emacs development discussions.
2024-03-08 16:34 98%             ` Philip Kaludercic
2024-03-08 17:06                   ` Manuel Giraud via Emacs development discussions.
2024-03-08 17:29 91%                 ` Philip Kaludercic
2024-03-09 13:18                       ` Manuel Giraud via Emacs development discussions.
2024-03-09 13:36 99%                     ` Philip Kaludercic
2024-03-10 16:00                           ` Manuel Giraud via Emacs development discussions.
2024-03-10 17:03 99%                         ` Philip Kaludercic
2024-03-10 17:49       ` Manuel Giraud via Emacs development discussions.
2024-03-10 18:03         ` Manuel Giraud via Emacs development discussions.
2024-03-10 18:15 98%       ` Philip Kaludercic
2024-03-08 10:27     I created a faster JSON parser Herman, Géza
2024-03-08 11:41 97% ` Philip Kaludercic
2024-03-09 20:37     ` Christopher Wellons
2024-03-10  6:31       ` Eli Zaretskii
2024-03-10 21:39 99%     ` Philip Kaludercic
     [not found]     <170988163944.32233.2128179311431485478@vcs2.savannah.gnu.org>
     [not found]     ` <20240308070720.AC3ACC1FB4E@vcs2.savannah.gnu.org>
2024-03-08 13:13 96%   ` master bd017175d45 6/6: Simplify type hierarchy operations Philip Kaludercic
2024-03-08 19:04     Work On Todo item: Convert defvar foo-mode-map to defvar-keymap binarydigitz01 via Emacs development discussions.
2024-03-09  9:21 99% ` Philip Kaludercic
     [not found]     <D57DBB96-82DE-4697-A358-032B04190724@gmail.com>
2024-03-09  9:03 99% ` Add elisa to gnu elpa Philip Kaludercic
2024-03-11 23:18     [PATCH] Flymake Support Indicator Errors in Margin Elijah G
2024-03-12  9:24 96% ` Philip Kaludercic
2024-03-15 12:51     builtin completion ? hx
2024-03-15 15:48 97% ` Philip Kaludercic
     [not found]     <87v8j28c2x.fsf@betli.tmit.bme.hu>
     [not found]     ` <874jdipfp5.fsf@posteo.net>
     [not found]       ` <87cys6t734.fsf@betli.tmit.bme.hu>
     [not found]         ` <87r0gmnjq4.fsf@posteo.net>
     [not found]           ` <87o7bprr04.fsf@betli.tmit.bme.hu>
     [not found]             ` <87bk7p57yz.fsf@posteo.net>
2024-03-16 12:16               ` (byte-compile '(append '(1 2) '(3 4))) Felician Nemeth
2024-03-16 12:46 88%             ` Philip Kaludercic
2024-03-16 13:23                   ` Basil L. Contovounesios
2024-03-16 13:55 99%                 ` Philip Kaludercic
2024-03-17  4:07     [ELPA] [PATCH] CSS readability improvements Adam Porter
2024-03-17  4:14     ` Stefan Monnier
2024-03-17  4:19       ` Adam Porter
2024-03-17 14:43 99%     ` Philip Kaludercic
     [not found]     <87zfvl8r4e.fsf@jeremybryant.net>
     [not found]     ` <874jdspsqb.fsf@bernoul.li>
2024-02-28 20:56       ` Incorporate package macrostep into Emacs or NonGNU ELPA? Jeremy Bryant via Emacs development discussions.
2024-02-28 21:16         ` Stefan Monnier
2024-02-28 23:04           ` Jeremy Bryant
2024-02-29 20:44             ` Jeremy Bryant
2024-03-02  6:51               ` Eli Zaretskii
2024-03-02 21:36                 ` Jeremy Bryant
2024-03-17 21:48                   ` Incorporate package macrostep into Emacs core Jeremy Bryant via Emacs development discussions.
2024-03-18  9:09 86%                 ` Philip Kaludercic
2024-03-18 23:03                       ` Jeremy Bryant
2024-03-19  6:36 85%                     ` Philip Kaludercic
2024-03-19  7:11                           ` Gerd Möllmann
2024-03-19  7:26 95%                         ` Philip Kaludercic
2024-03-19  7:30                               ` Gerd Möllmann
2024-03-19  9:33 98%                             ` Philip Kaludercic
2024-03-22 15:25     error when trying to a install a recent (2.24) seq version via the package system Uwe Brauer via Emacs development discussions.
2024-03-22 16:30 96% ` Philip Kaludercic
2024-03-22 22:56     recursion to iteration macro Emanuel Berg
2024-03-23  7:12 99% ` Philip Kaludercic
2024-03-28 13:40     Where should security issues with GNU ELPA packages be reported? Morgan Willcock
2024-03-28 16:07 99% ` Philip Kaludercic
2024-03-28 17:14       ` Morgan Willcock
2024-03-29  5:53 99%     ` Philip Kaludercic
2024-03-31 11:05     Hundreds of ELPA packages updated today? Romain Francoise
2024-03-31 11:49 99% ` Philip Kaludercic
2024-03-31 16:00     GNU ELPA announcements - e.g.: [GNU ELPA] Csv-Mode version 1.23 Drew Adams
2024-03-31 16:40 99% ` Philip Kaludercic
2024-04-18 18:29     seq; Error during initial package install Parker, Ron
2024-04-27  8:36     ` Eli Zaretskii
2024-04-27  9:17 70%   ` Philip Kaludercic
2024-04-27 14:40         ` Stefan Monnier
     [not found]           ` <MW4PR06MB8948E521FC9D0C00DDE24A16E9152@MW4PR06MB8948.namprd06.prod.outlook.com>
2024-04-27 18:24 99%         ` Philip Kaludercic
2024-04-18 22:45     Objed maintenance Amy Grinn
2024-04-22  7:22 89% ` Philip Kaludercic
2024-04-25 12:38       ` Amy Grinn
2024-04-27 10:06 99%     ` Philip Kaludercic
2024-04-27 11:32           ` Amy Grinn
2024-04-27 11:54 95%         ` Philip Kaludercic
2024-04-27 21:51               ` Amy Grinn
2024-05-01 18:06 88%             ` Philip Kaludercic
2024-05-02  1:39                   ` Adam Porter
2024-05-02  6:02 99%                 ` Philip Kaludercic
2024-05-02  9:43                       ` Adam Porter
2024-05-02 17:09 96%                     ` Philip Kaludercic
2024-04-20  1:07     [ELPA] New package: colorful-mode Elijah G
2024-04-22  7:51 51% ` Philip Kaludercic
2024-04-23  2:49       ` Elijah G
2024-04-27 10:12 98%     ` Philip Kaludercic
2024-04-27 16:44           ` Elijah G
2024-04-27 21:12 99%         ` Philip Kaludercic
2024-04-28 23:39               ` Elijah G
2024-04-29  5:47 99%             ` Philip Kaludercic
2024-04-20  3:23     [PATCH] feat: add markdown-ts-mode Rahul Martim Juliato
2024-04-20  6:44     ` Eli Zaretskii
2024-04-20 17:45       ` Jostein Kjønigsen
2024-04-21  5:50         ` Rahul Martim Juliato
2024-04-22  7:02 88%       ` Philip Kaludercic
2024-04-23  1:20             ` Rahul Martim Juliato
2024-04-27 10:18 84%           ` Philip Kaludercic
2024-04-27  9:02     Add plz-media-type and plz-event-source to GNU ELPA when stabilized Roman Scherer
2024-04-27 13:43 89% ` Philip Kaludercic
2024-04-28 12:56       ` Roman Scherer
2024-04-29  6:09 69%     ` Philip Kaludercic
2024-04-29  7:44           ` Roman Scherer
2024-04-29  7:46 99%         ` Philip Kaludercic
2024-04-29  7:48               ` Roman Scherer
2024-04-29 18:24 98%             ` Add plz-media-type and plz-event-source to GNU ELPA when stabilised Philip Kaludercic
2024-05-01 11:25                   ` Roman Scherer
2024-05-01 11:56 99%                 ` Philip Kaludercic
2024-04-28  3:55     [NonGNU ELPA] Add package gptel Karthik Chikmagalur
2024-04-28  8:21 29% ` Philip Kaludercic
2024-04-28 16:50       ` Karthik Chikmagalur
2024-04-29  6:18 88%     ` Philip Kaludercic
2024-04-29  6:52           ` Karthik Chikmagalur
2024-04-29  7:29 79%         ` Philip Kaludercic
2024-04-29 17:21               ` Karthik Chikmagalur
2024-04-29 18:21 93%             ` Philip Kaludercic
2024-04-29 20:11                   ` Karthik Chikmagalur
2024-05-01 12:02 99%                 ` Philip Kaludercic
2024-04-30 23:07     Proposal for a new emacs icon Elijah G
2024-05-02  8:05 99% ` Philip Kaludercic
2024-05-02  9:52       ` Po Lu
2024-05-02 17:01 99%     ` Philip Kaludercic

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).