all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: emacs-devel@gnu.org
Subject: Patch parser
Date: Tue, 09 Dec 2014 20:20:38 +0100	[thread overview]
Message-ID: <m3lhmgzl2x.fsf@stories.gnus.org> (raw)

Does Emacs have a patch parser?  I mean, something that would take a
region of text and return all the pertinent parts of the patch it finds
there?

I've been digging through `diff-mode', and it's very geared towards
interactive use.  But I may well be missing something there.

My use case here is that I want to find out where to apply a patch
automatically for my new Super Maintainer Mode thing.

*** lisp/international/characters.el	2013-01-01 21:37:17.000000000 +0100
--- lisp/international/characters-fixc1.el	2013-02-18 17:58:29.103018508 +0100

should obviously be run from <top>/lisp with -p1 (or in <top> with -p0),
while this is in <top> with -p1:

--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el

It's not rocket surgery to write this myself, but if it already exists...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





             reply	other threads:[~2014-12-09 19:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-09 19:20 Lars Magne Ingebrigtsen [this message]
2014-12-09 22:11 ` Patch parser Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3lhmgzl2x.fsf@stories.gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.