Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix #39 Remove call to edit-indirect--clean-up #40

Merged
merged 3 commits into from
Jan 19, 2024
Merged

Fix #39 Remove call to edit-indirect--clean-up #40

merged 3 commits into from
Jan 19, 2024

Conversation

gongzhitaao
Copy link
Contributor

Now (edit-indirect--abort t) replaces (edit-indirect--clean-up).

According to Fanael/edit-indirect@d0378d9, `(edit-indirect--abort t)` replaces `(edit-indirect--clean-up)`.
@twlz0ne
Copy link
Owner

twlz0ne commented Jan 17, 2024

Thanks. It will be better if you leave your name in commentary like following:

;; Last-Updated: <time-stamp>
;;           by: <your-name>

and specify the minimum required version of edit-indirect:

;; Package-Requires: ((emacs "25.1") (dash "2.18") (edit-indirect "<min-version>"))

@gongzhitaao
Copy link
Contributor Author

Thanks for the info.

I just tested, it seems that the above change breaks separedit-save. I don't have time to debug now. Will investigate further on Friday if this bug is still open by then.

@twlz0ne
Copy link
Owner

twlz0ne commented Jan 18, 2024

I just tested, it seems that the above change breaks separedit-save. I don't have time to debug now. Will investigate further on Friday if this bug is still open by then.

You should revert the changes about separedit-save in 6079b03, then replace edit-indirect--clean-up with edit-indirect--abort:

┌[19:57:39] (pr-40-patch-1|✚1…2) 
└⋊> [~/D/r/emacs-separedit_test-pr] git --no-pager diff -U0 6079b03
diff --git a/separedit.el b/separedit.el
index e27c946..95d50fa 100644
--- a/separedit.el
+++ b/separedit.el
@@ -1700 +1700,5 @@ It will override by the key that `separedit' binding in source buffer.")
-           (clone-buffer (concat (buffer-name) " <clone>"))))
+           (clone-buffer (concat (buffer-name) " <clone>")))
+          (function-backup
+           ;; Temprary disable the ‘edit-indirect--abort’ (but who calls
+           ;; this function after the clone buffer is killed?)
+           (symbol-function 'edit-indirect--abort)))
@@ -1702,0 +1707 @@ It will override by the key that `separedit' binding in source buffer.")
+            (fset 'edit-indirect--abort #'ignore)
@@ -1704,0 +1710 @@ It will override by the key that `separedit' binding in source buffer.")
+        (fset 'edit-indirect--abort function-backup)

@gongzhitaao
Copy link
Contributor Author

  1. I tested the functionality manually and it seems to be working for me.
  2. I ran into problems when trying run--test.example.sh, it seemed to fail when downloading necessary packages for testing.

@twlz0ne twlz0ne merged commit bfd0902 into twlz0ne:master Jan 19, 2024
@twlz0ne
Copy link
Owner

twlz0ne commented Jan 19, 2024

I ran into problems when trying run--test.example.sh, it seemed to fail when downloading necessary packages for testing.

It's ok, I've ran all tests on my computer.

I've also had download failure before:

$ cask install
...
Package refresh done
done
Package operations: 16 installs, 0 removals
  - Installing [ 1/16] edit-indirect (0.1.5)... already present
  - Installing [ 2/16] yaml-mode (latest)... already present
  - Installing [ 3/16] tuareg (latest)... cloning
Command ‘git reset --hard 92b1ca6cacd6e13d2a0d9261511d6d07147853a8’ exited with non-zero exit-code: 128
fatal: Could not parse object '92b1ca6cacd6e13d2a0d9261511d6d07147853a8'.

Debugger entered--Lisp error: (error "Command ‘git reset --hard 92b1ca6cacd6e13d2a0d9261...")
  signal(error ("Command ‘git reset --hard 92b1ca6cacd6e13d2a0d9261..."))
  error("%s" "Command ‘git reset --hard 92b1ca6cacd6e13d2a0d9261...")
  package-build--error(#<package-git-recipe package-git-recipe-1fefbeaae73c> "%s" "Command ‘git reset --hard 92b1ca6cacd6e13d2a0d9261...")
  package-build--call-process(#<package-git-recipe package-git-recipe-1fefbeaae73c> "git" "reset" "--hard" "92b1ca6cacd6e13d2a0d9261511d6d07147853a8")
  #f(compiled-function (rcp) #<bytecode -0x754fed0576bb2c>)(#<package-git-recipe package-git-recipe-1fefbeaae73c>)

Then I executed mv ~/.emacs.d/.cask/<emacs-ver>/bootstrap/{,!}package-build-xxxxxxxx.yyyy and the issue gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants