emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] epm.el: A CLI tool for package.el


From: Max Nikulin
Subject: Re: [PATCH] epm.el: A CLI tool for package.el
Date: Thu, 4 May 2023 23:16:33 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

On 04/05/2023 17:24, Ihor Radchenko wrote:
Max Nikulin writes:
For those who are not familiar with convention any target may be
specified in docs, keeping usual meaning of the default "all" target.

I am mostly concerned about the existing users who are already settled
on running the default "make". Their workflow will be broken with your
suggestion.

I hope, it is possible to achieve helpful error message with a link explaining change.

An I am unsure concerning user prompt.

My main concern is for the users who changed their elpa directory
location. They might run into issues unexpectedly.

My opinion is that an error is better for make than user prompt. Try to load from default `package-user-dir' but install there only if it is explicitly enabled.

#!/bin/sh
":"; # -*- mode: emacs-lisp; lexical-binding: t; -*-
":"; exec emacs --script "$0" "$@"

Let's not lock to bash. AFAIK, our makefiles can currently work on
Windows. Using /bin/sh will lead to regression.

I thought that more portable way is using "env".

Either env would invoke sh anyway (like in org publish scripts) or it is necessary to use env -S feature of relatively recent GNU env. For cmd.exe it is better to provide a .bat file running

    emacs --script epm.el ...(something for POSIX $@)

+(defun epm-nonempty-p (s)
+  (and s (not (string-empty-p s))))

Can just use `seq-empty-p'.

I am neutral in respect to such change. I just decided to minimize dependencies.

+  ;; TODO (load site-run-file 'no-error 'no-message)
+  ;; may be necessary to load elpa-* deb packages when -Q option
+  ;; is used. See Info node "(elisp) Init File".

Given the explanation in the top comment, is this necessary?

Do you have any arguments against switching from emacs -Q to emacs -q? I am still unsure if it is safe enough, but not doing it is not better. I am considering adding -q to this script when it is called directly. Unfortunately Emacs does not have an option to override effect of -q.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]