all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* hg-histedit, how to pass shell involvement, to the lisp code?
@ 2024-10-09 19:36 Uwe Brauer via Emacs development discussions.
  2024-10-10  6:22 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Brauer via Emacs development discussions. @ 2024-10-09 19:36 UTC (permalink / raw)
  To: emacs-devel


Hi

In mercurial the command histedit, allows, well to rewrite history, (log
messages etc).

The emacs pkg hg-histedit (pkg seems abandoned) now allows one to use
this command entirely within emacs, the relevant code lines are

(defcustom hg-histedit-executable "hg"    


And the crucial lines in the main function


(let ((output-buffer (generate-new-buffer " *hg-histedit*"))
          (commands (if changeset
                        `(,hg-histedit-executable "histedit" "--rev" ,changeset)
                      `(,hg-histedit-executable "histedit"))))

However when run it this way, the editing takes place in /tmp (which is the
default for mercurial) and not in the directory of the repository in
question.

From the command line this can be changed by 

    1. Bash TMP=$(hg root) hg histedit (or  TMP="$(hg root)" hg histedit

    2. Tcsh set TMP=`hg root`; hg histedit $argv

Then histedit runs in the directory of said repository.

Now my question is: how can I modify the lisp code to have this behavior
I just described?

The only kludge I found was to write a trivial shell script say
myhghistedit.sh
and change 
(defcustom hg-histedit-executable "myhghistedit.sh"    

But how can I do this in lisp?

Regards

Uwe Brauer 

-- 
I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the EU and NATO membership of Ukraine. 





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-10  8:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-09 19:36 hg-histedit, how to pass shell involvement, to the lisp code? Uwe Brauer via Emacs development discussions.
2024-10-10  6:22 ` Eli Zaretskii
2024-10-10  8:02   ` Uwe Brauer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.