all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Function to parse a "diff" command line to load both files into buffers and ediff them
@ 2018-05-10 17:15 KARR, DAVID
  2018-05-11 17:31 ` Bob Newell
  0 siblings, 1 reply; 7+ messages in thread
From: KARR, DAVID @ 2018-05-10 17:15 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Quite often I find myself in a situation where I have a "diff" command that was run in a shell buffer, and I want to "transfer" that into ediff, by simply loading both of the files specified on the diff command line and then running ediff to compare them.  I could probably do this with a keyboard macro, but this just seems like something that someone must have thought of doing before.  I tried paging through the many functions that begin with "ediff-", but I didn't see anything that sounds like what I describe.  I'm using version "2.81.5".



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Function to parse a "diff" command line to load both files into buffers and ediff them
  2018-05-10 17:15 Function to parse a "diff" command line to load both files into buffers and ediff them KARR, DAVID
@ 2018-05-11 17:31 ` Bob Newell
  2018-05-13 16:12   ` KARR, DAVID
  0 siblings, 1 reply; 7+ messages in thread
From: Bob Newell @ 2018-05-11 17:31 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

On Thu, May 10, 2018 at 7:15 AM, KARR, DAVID <dk068x@att.com> wrote:
> Quite often I find myself in a situation where I have a "diff" command that was run in a shell buffer, and I want to "transfer" that into ediff, by simply loading both of the files specified on the diff command line and then running ediff to compare them.  I could probably do this with a keyboard macro, but this just seems like something that someone must have thought of doing before.  I tried paging through the many functions that begin with "ediff-", but I didn't see anything that sounds like what I describe.  I'm using version "2.81.5".

Just wondering why you wouldn't use ediff in the first place. But if
you really want, you could write a small function that does what you
say.



-- 
Bob Newell
Honolulu, Hawai`i

Sent via Linux Mint 17.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Function to parse a "diff" command line to load both files into buffers and ediff them
  2018-05-11 17:31 ` Bob Newell
@ 2018-05-13 16:12   ` KARR, DAVID
  2018-05-14 12:39     ` Stefan Monnier
  2018-05-16 22:29     ` Bob Newell
  0 siblings, 2 replies; 7+ messages in thread
From: KARR, DAVID @ 2018-05-13 16:12 UTC (permalink / raw)
  To: Bob Newell, help-gnu-emacs@gnu.org

> -----Original Message-----
> From: help-gnu-emacs <help-gnu-emacs-bounces+dk068x=att.com@gnu.org> On
> Behalf Of Bob Newell
> Sent: Friday, May 11, 2018 10:31 AM
> To: help-gnu-emacs@gnu.org
> Subject: Re: Function to parse a "diff" command line to load both files
> into buffers and ediff them
> 
> On Thu, May 10, 2018 at 7:15 AM, KARR, DAVID <dk068x@att.com> wrote:
> > Quite often I find myself in a situation where I have a "diff" command
> that was run in a shell buffer, and I want to "transfer" that into
> ediff, by simply loading both of the files specified on the diff command
> line and then running ediff to compare them.  I could probably do this
> with a keyboard macro, but this just seems like something that someone
> must have thought of doing before.  I tried paging through the many
> functions that begin with "ediff-", but I didn't see anything that
> sounds like what I describe.  I'm using version "2.81.5".
> 
> Just wondering why you wouldn't use ediff in the first place. But if
> you really want, you could write a small function that does what you
> say.

Because the output originated from running "git diff" on the command line.

Yes, I could write that function.  I just didn't want to spend the time on doing something that someone else had already done, which is why I asked this.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Function to parse a "diff" command line to load both files into buffers and ediff them
  2018-05-13 16:12   ` KARR, DAVID
@ 2018-05-14 12:39     ` Stefan Monnier
  2018-05-16 22:29     ` Bob Newell
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2018-05-14 12:39 UTC (permalink / raw)
  To: help-gnu-emacs

> Yes, I could write that function.  I just didn't want to spend the time on
> doing something that someone else had already done, which is why
> I asked this.

`diff-ediff-patch` is a step in this direction, tho I don't think it
really does what you're after.


        Stefan




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Function to parse a "diff" command line to load both files into buffers and ediff them
  2018-05-13 16:12   ` KARR, DAVID
  2018-05-14 12:39     ` Stefan Monnier
@ 2018-05-16 22:29     ` Bob Newell
  1 sibling, 0 replies; 7+ messages in thread
From: Bob Newell @ 2018-05-16 22:29 UTC (permalink / raw)
  Cc: help-gnu-emacs@gnu.org

> Because the output originated from running "git diff" on the command line.

I thought of this a bit late but the magit package supports git
ediffing directly. I don't know if that meets your use case but it
seems magit does just about anything you want that has to do with git.

-- 
Bob Newell
Honolulu, Hawai`i

Sent via Linux Mint 17.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Function to parse a "diff" command line to load both files into buffers and ediff them
       [not found] <mailman.13605.1525973392.27995.help-gnu-emacs@gnu.org>
@ 2018-05-21 17:50 ` unfrostedpoptart
  2018-05-21 20:40 ` unfrostedpoptart
  1 sibling, 0 replies; 7+ messages in thread
From: unfrostedpoptart @ 2018-05-21 17:50 UTC (permalink / raw)
  To: help-gnu-emacs

On Thursday, May 10, 2018 at 10:29:54 AM UTC-7, David Karr wrote:
> Quite often I find myself in a situation where I have a "diff" command that was run in a shell buffer, and I want to "transfer" that into ediff, by simply loading both of the files specified on the diff command line and then running ediff to compare them.  I could probably do this with a keyboard macro, but this just seems like something that someone must have thought of doing before.  I tried paging through the many functions that begin with "ediff-", but I didn't see anything that sounds like what I describe.  I'm using version "2.81.5".

I'd really like this too.  I'm not a great e-lisp coder but I'd guess this wouldn't be too hard using emacs client.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Function to parse a "diff" command line to load both files into buffers and ediff them
       [not found] <mailman.13605.1525973392.27995.help-gnu-emacs@gnu.org>
  2018-05-21 17:50 ` unfrostedpoptart
@ 2018-05-21 20:40 ` unfrostedpoptart
  1 sibling, 0 replies; 7+ messages in thread
From: unfrostedpoptart @ 2018-05-21 20:40 UTC (permalink / raw)
  To: help-gnu-emacs

On Thursday, May 10, 2018 at 10:29:54 AM UTC-7, David Karr wrote:
> Quite often I find myself in a situation where I have a "diff" command that was run in a shell buffer, and I want to "transfer" that into ediff, by simply loading both of the files specified on the diff command line and then running ediff to compare them.  I could probably do this with a keyboard macro, but this just seems like something that someone must have thought of doing before.  I tried paging through the many functions that begin with "ediff-", but I didn't see anything that sounds like what I describe.  I'm using version "2.81.5".

Did a bit of searching and found this script that works great!

https://gist.github.com/ptrv/0b460291e14a4a3c6372


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-05-21 20:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-10 17:15 Function to parse a "diff" command line to load both files into buffers and ediff them KARR, DAVID
2018-05-11 17:31 ` Bob Newell
2018-05-13 16:12   ` KARR, DAVID
2018-05-14 12:39     ` Stefan Monnier
2018-05-16 22:29     ` Bob Newell
     [not found] <mailman.13605.1525973392.27995.help-gnu-emacs@gnu.org>
2018-05-21 17:50 ` unfrostedpoptart
2018-05-21 20:40 ` unfrostedpoptart

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.