summaryrefslogtreecommitdiff
path: root/piem-b4.el
AgeCommit message (Collapse)Author
2020-08-17b4: Try to download thread from piem-inboxes URLKyle Meyer
If a call to piem-b4-am-from-mid fails to generate the thread for a message ID via piem-mid-to-thread-functions, b4 is called without a local mbox. In this case, b4 tries to download the thread from the URL specified by b4.midmask in the caller's Git configuration. That works, but it's inconvenient because the user needs to configure the URL in two places. If the current buffer is associated with an inbox in piem-inboxes, try to download the thread from its :url before falling back to b4's midmask. Message-Id: <20200817013343.15615-6-kyle@kyleam.com>
2020-08-17b4: Use a clearer variable nameKyle Meyer
Message-Id: <20200817013343.15615-5-kyle@kyleam.com>
2020-08-10Explicitly specify --patch-format in git-am callsKyle Meyer
The sources of mbox patches fed to git-am are 1) threads downloaded from a public-inbox HTTP instance, 2) mboxes generated via piem-mid-to-thread-functions, and 3) those generated via piem-am-ready-mbox-functions. The first source should always be mboxrd. For the second, piem-notmuch-mid-to-thread is currently the only function suitable for piem-mid-to-thread-functions, and it uses mboxrd. The third source is a mix between mbox and mboxrd. By default, git-am tries to auto-detect the patch format, but let's explicitly specify --patch-format to avoid any incorrect guesses. Message-Id: <20200810020704.30150-1-kyle@kyleam.com>
2020-06-15Add docstrings to all -am commandsKyle Meyer
2020-06-06Add piem-inbox-coderepo-maybe-read functionKyle Meyer
This logic will be used in another spot.
2020-06-06Extract patch information from a buffer rather than filesKyle Meyer
piem-am will become a command that works with mboxes outside of -b4. In this context, it's easier and cleaner to deal with a buffer than temporary files.
2020-06-06Extract reusable git-am logic from -b4Kyle Meyer
The end goal is to turn piem-am into a command that can work with patches extracted from the current buffer. Pull out the logic that can be reused for this.
2020-06-06b4: Drop custom process bufferKyle Meyer
Directing all piem-related output to one buffer should be sufficient, for now at least.
2020-06-06piem: Take in some options from -b4Kyle Meyer
These are things that will be used outside of piem-b4.
2020-05-26Add basic mode for displaying {call,start}-process outputKyle Meyer
2020-05-23b4: Demote comment headings in code sectionKyle Meyer
Conceptually these are under ";;; Code", so add a ";" to reflect that.
2020-05-13b4: Correct file name in autoload of 'am' transientKyle Meyer
2020-05-13b4: Add --cherry-pick to am transientKyle Meyer
This option was added in b4 v0.4.1.
2020-05-10b4: Ask caller about branch and base for amKyle Meyer
The function for generating the default branch name may need to be tweaked to give useful suggestions in practice. Let's see.
2020-05-10b4: Rework handling of output file namingKyle Meyer
When passing a name like "a.mbx" to b4-am's --mbox-name, only the "a" is retained; b4-am unconditionally appends the ".mbx". Avoid passing a name with ".mbx" to make it clearer that the caller does not control the extension. Reduce the base name to "m" to avoid a message ID ending with ".*" being treated as an extension, which would require analyzing the message ID in order to guess what output name b4-am will use. Finally, name the custom thread mbox with "-piem" rather than "-thread" (which was chosen to mimic b4-mbox) so it's more obvious who created the file when later inspecting the directory.
2020-05-10b4: Rework call-process helper to handle git callsKyle Meyer
The subprocess handling needs reworked and polished, so this helper likely won't stay around in its current form for long, but it's still useful to send git through it so that a failure signals an error and shows the output.
2020-05-07Add a barely useful interface to b4-amKyle Meyer
Aside from switching the 'b4 am' process to an asynchronous one, the am-ready commands may not need a lot of work. The more interesting variant, piem-b4-am-from-mid, can find an associated code repository and am the patch, but there's a lot that needs to be fleshed out.