Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8912721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:16:36+00:00 2026-06-15T04:16:36+00:00

I’d like to write a set of elisp functions to manipulate commits identified by

  • 0

I’d like to write a set of elisp functions to manipulate commits identified by the currently selected region when viewing a git log in Git-Log-View mode of vc.el. A common subcomponent of these functions would need to be a function that would obtain the commit metadata for the list of commits selected by the region in the Git-Log-View buffer, but I have no idea how to write such a routine. I was hoping that vc.el provided such a mechanism directly, but from what I can see via apropos it doesn’t.

I’ve poked around in vc.el and vc-git.el to try to get some idea of how vc.el works, but it is a fairly complex bit of elisp and I’m by no means an elisp expert. It seems reasonable to me though that vc.el/vc-git.el has the commit metadata available somewhere, since in Git-Log-View mode you can do things like select a region and ask for a changeset diff over that region, or expand a given commit to see the detailed commit info, and I just want to build some similar functionality.

Any thoughts on how to do this? I suppose I could just directly get the currently selected text and parse the abbreviated log format myself, but that seems like a huge amount of work that I’d like to avoid if vc-mode can help me out.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:16:38+00:00Added an answer on June 15, 2026 at 4:16 am

    vc-git and other backends don’t really keep the whole bulk of metadata anywhere. For most operations, the backend calls the respective command to get the required data.

    For example, Git-Log-View is a prettified output of git log [-- filename]. The summary you see when expanding a commit was already present in the command output, just hidden, so it’s easier for the user to scan. To show the changeset over a region, log-view-diff-changeset looks which commits correspond to the region bounds, and delegates to vc-diff-internal, which eventually calls git diff FROM TO.

    So you’ll get the hashes of each commit in the region, then call some git command (git show?) with vc-git-command, vc-git--call or maybe vc-git--run-command-string for each of them and parse the results. Maybe just call git log for all of them at once if you manage to make it include all the relevant data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I would like to run a str_replace or preg_replace which looks for certain words
I am trying to render a haml file in a javascript response like so:
I want use html5's new tag to play a wav file (currently only supported
I would like to count the length of a string with PHP. The string
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.