aboutsummaryrefslogtreecommitdiff
path: root/git-email.el
Commit message (Collapse)AuthorAgeFilesLines
* git-email: Fix sorting function for message buffers.Xinglu Chen2021-04-241-1/+13
| | | | | | | | | | ‘string-greaterp’ would mess up the order if the buffer names container more-than-one digit numbers. ‘git-email-message-buffer-greaterp’ just compares the numbers in the buffer names. * git-email.el (git-email-message-buffer-greaterp): New function. (git-email-send-all): Use it.
* Untabify all files.Xinglu Chen2021-04-031-52/+52
| | | | | | | | | Spaces >> tabs. * git-email.el: Untabify. * git-email-gnus.el: Likewise. * git-email-magit.el: Likewise. * git-email-notmuch.el: Likewise.
* git-email: Don't insert 'to' address if already there.Xinglu Chen2021-04-031-12/+19
| | | | | | * git-email.el (git-email--compose-email): Don't insert a 'to' address if one is already found in the patch. This makes it possible to override the result of 'git-email-get-to-address-functions'.
* git-email: Use alists in 'git-email--extract-headers'.Xinglu Chen2021-04-031-5/+5
| | | | | | * git-email.el (git-email--extract-headers): Return an association list. (git-email--compose-email): Adapt to alists.
* Revert "git-email: Remove redundant let binding."Xinglu Chen2021-03-151-3/+4
| | | | This reverts commit 49571ab4c2ddd07db68aac300bdbc9c6bfd31b0b.
* git-email: Remove redundant let binding.Xinglu Chen2021-03-131-4/+3
| | | | | * git-email.el (git-email--compose-email): Remove redundant let binding.
* Make regexp stricter for matching signed messagesXinglu Chen2021-02-161-1/+1
| | | | | | | | | | This should fix the problem seen in <87sg5wxo0q.fsf@protesilaos.com> * git-email.el (git-email--compose-email): Match the beginning and end of line. Reported-by: Protesilaos Stavrou <info@protesilaos.com> Signed-off-by: Xinglu Chen <public@yoctocell.xyz>
* Use mail-header-separator instead of stringXinglu Chen2021-02-161-1/+1
| | | | | | | Applied manually from <https://lists.sr.ht/~yoctocell/git-email-devel/%3Ce281e4b3513b5629de0108176c660aa1714b5604.1613471364.git.info%40protesilaos.com%3E> Signed-off-by: Xinglu Chen <public@yoctocell.xyz>
* Add doc string to helper fontify functionProtesilaos Stavrou2021-02-161-0/+1
|
* Placate the compiler about projectile-project-rootProtesilaos Stavrou2021-02-161-0/+2
|
* Rewrite 'default-directory' as a variableProtesilaos Stavrou2021-02-161-1/+1
|
* Update docs for `git-email-headers`Xinglu Chen2021-02-161-3/+2
| | | | | | | | | | There is now a `git-email-get-to-address-functions` variable that determines the "to" address. * git-email.el (git-email-headers): Refer to users to the relevant variable. Signed-off-by: Xinglu Chen <public@yoctocell.xyz>
* Don't insert extra newline in message bodyXinglu Chen2021-02-161-1/+0
| | | | | | | | | | | | | | | | | | | | | When inserting the diff into the message body a newline is already included. Previously it would insert an additional newline at the beginning of the body. This removes the extra newline Before: --text follows this line-- body starts here After: --text follows this line-- body starts here * git-email.el (git-email--compose-email): Don't go forward a character. Signed-off-by: Xinglu Chen <public@yoctocell.xyz>
* Minor spelling fixXinglu Chen2021-02-091-1/+1
| | | | Signed-off-by: Xinglu Chen <public@yoctocell.xyz>
* Update copyright headerXinglu Chen2021-02-091-2/+2
| | | | | | Use "all contributors" rather than a name. Signed-off-by: Xinglu Chen <public@yoctocell.xyz>
* Add `:package-version` to all defcustomsXinglu Chen2021-02-091-14/+28
| | | | Signed-off-by: Xinglu Chen <public@yoctocell.xyz>
* Handle error if no "to" address is foundXinglu Chen2021-02-071-3/+5
| | | | | | | | | Previously `substring` would give an error if the "to" address from "git config --list" was empty. This meant that no message would be created. This patch fixes this and instead returns an empty string if to "to" address was found. Signed-off-by: Xinglu Chen <public@yoctocell.xyz>
* git-email-headers: Add "cc" fieldXinglu Chen2021-02-061-1/+1
| | | | * git-email.el (git-email-headers):
* Add additional arguments for formatting patchesXinglu Chen2021-02-061-1/+13
| | | | | * git-email.el (git-email-format-patch-extra-args): Add more arguments for conveience.
* git-email-send-all: Sort message buffersXinglu Chen2021-02-061-1/+3
| | | | | * git-email.el (git-email-send-all): Sort the message buffers so they get sent in the correct order.
* Add general function to get project rootXinglu Chen2021-02-051-1/+25
| | | | | | | | | | This will try to get the root of the project using `projectile`, `project.el`, and `vc`, in that order. If all of the above fail, fall back to `default-directory`. * git-email.el (git-email-get-current-project-functions): Add variable. (git-email--get-current-project): Add function. (git-email--minibuffer-get-revision): Utilize the aforementioned functionality.
* Fix typoXinglu Chen2021-02-041-1/+1
| | | | | | | This bug was introduced in 26745cb6454cfe8ab5d94359963383e016dfe2c5. * git-email.el (git-email-format-patch): The arguments should be concatenated with " " as a separator.
* Use `run-hook-with-args-until-success'Xinglu Chen2021-01-291-10/+9
| | | | | Use `run-hook-with-args-until-success' to call hooks instead of doing `seq-some'.
* Use appropriate types for defcustomsXinglu Chen2021-01-291-12/+12
| | | | Use more appropriate types for `defcustom` variables.
* Add `git-email-get-address-function' variableXinglu Chen2021-01-281-3/+17
| | | | | | | | | | This makes it possible for users to use their own function to get the “to” address. This could also be used for integration with piem.el. * doc/git-email.org (Sending email): Add bullet point. * git-email.el (git-email-get-to-address-function): Add variable. (git-email--get-to-address): Add function. (git-email--compose-email): Call the relevant function.
* Small fixXinglu Chen2021-01-261-1/+1
|
* Minor correctionsXinglu Chen2021-01-261-2/+2
| | | | Thank you Protesilaos for this patch.
* git-email.el: Add option for parsing revisionXinglu Chen2021-01-251-1/+12
| | | | | | | | | | Add an option for parsing the output of ‘git-email--minibuffer-get-revision’. This allows users to customize the ‘git log’ to run without breaking the format to use for parsing the result. * git-email.el (git-email-revision-parser): Add variable. (git-email--minibuffer-get-revision): Call ‘git-email--parse-revision’.
* git-email: Don’t assume cwd to be a projectXinglu Chen2021-01-251-2/+1
| | | | | | | | This fixes the problem of trying to send a patch that is not in a version controlled directory. Thank you Protesilaos for pointing this out in id:87wnw2m5zm.fsf@protesilaos.com. * git-email.el (git-email--compose-email): Remove local binding for ‘default-directory’.
* git-email: Add -v to extra argsXinglu Chen2021-01-241-1/+1
| | | | | * git-email.el (git-email-format-patch-extra-args): Add "-v" to the list.
* Use uninterned symbol for local variableProtesilaos Stavrou2021-01-241-1/+2
| | | | | * git-email.el (git-email--fontify-using-faces): Make local variable 'next' an uninterned symbol.
* git-email.el: Fix typoXinglu Chen2021-01-221-1/+1
|
* git-email: Remove unused variableXinglu Chen2021-01-221-3/+0
|
* git-email: Make sure point is at BOFXinglu Chen2021-01-201-0/+1
| | | | | | | Put the point at the beginning of the file before doing a search for the message body. * git-email.el (git-email--compose-email):
* Rework `git-email-format-patch'yoctocell2021-01-181-32/+30
| | | | | | | | | | These changes were made to make git-email work better with Magit (the following commit will cover this). ARGS is a string of arguments passed to "git format-patch", RANGE is the range of commits to create patches from. If prefix argument KEEP is specified, keep the generated patches, be default they will be deleted like with "git send-email".
* Make `git-email-send-email' take files as an argumentyoctocell2021-01-181-8/+7
| | | | `git-email-send-email' will take a list of files as an argument.
* Move cursor to "to" address if emptyyoctocell2021-01-181-5/+8
| | | | | The cursor will be placed at the "to" header if it is empty when composing a message.
* Remove functionality for applying patchesyoctocell2021-01-181-40/+1
| | | | | | This is better handled by the piem[0] package. [0]: https://git.kyleam.com/piem
* Add `git-email--get-project'yoctocell2021-01-151-2/+7
| | | | | | | | Modularize `git-email-apply-patch', this way other functions can also use `git-email--get-project'. * git-email.el (git-email--get-project): (git-email-apply-patch):
* Update versionyoctocell2021-01-151-1/+1
| | | | | | Use 0.2.0 instead of 1.0.0 * git-email.el:
* Bump version numberyoctocell2021-01-101-1/+1
| | | | * git-email.el:
* Ask for version number for git format-patchyoctocell2021-01-101-6/+9
| | | | | | | | Explicitly ask for the version number (-v option) if `git-email-format-patch' has been called the a prefix argument. * git-email.el (git-email--compose-email): (git-email-format-patch):
* Update commentaryyoctocell2021-01-091-5/+3
| | | | * git-email.el:
* Fix package dependenciesyoctocell2021-01-091-1/+1
| | | | * git-email.el:
* Use #' for referencing functionsyoctocell2021-01-091-6/+6
| | | | * git-email.el:
* Delete patches after sending themyoctocell2021-01-091-3/+8
| | | | | * git-email.el (git-email-format-patch): Delete the patches generated by 'git format-patch' after sending the emails.
* Check major mode when getting revisionyoctocell2021-01-081-1/+2
| | | | | | An error will the thrown otherwise. * git-email.el (git-email--log-get-revision):
* Reformat bufferyoctocell2021-01-081-6/+12
| | | | | | | | Keep line width under 80. * git-email.el (git-email--fontify-using-faces): (git-email--compose-email): (git-email-format-patch):
* Fontify diffs in `message-mode'yoctocell2021-01-081-22/+41
| | | | | | | | | * git-email.el (git-email--extract-diff): (git-email--fontify-diff): (git-email--fontify-using-faces): (git-email--compose-email): (git-email--minibuffer-get-revision): (git-email-format-patch):
* Use custom functions to get revisionyoctocell2021-01-071-8/+20
| | | | | | | | | | | | Let the user specify a list of functions to run to get the desirable revision and fallback to the minibuffer. * git-email.el (git-email-revision-command): (git-email-get-revision-functions): (vc-dir-current-file): (git-email--get-revision): (git-email--log-get-revision): (git-email-format-patch):