* Differences with side-by-side modification
@ 2021-10-21 9:23 tolugboji via Users list for the GNU Emacs text editor
2021-10-21 9:33 ` tomas
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: tolugboji via Users list for the GNU Emacs text editor @ 2021-10-21 9:23 UTC (permalink / raw)
To: help-gnu-emacs
I want to see differences between two files side-by-side (one on a left window, the other on a right window).
The purpose is not simply see the differences side-by-side, but also to make modifications on each window
and be able to show differences again.
Is such a thing possible to do in emacs?
Thank you
Tolu
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Differences with side-by-side modification
2021-10-21 9:23 Differences with side-by-side modification tolugboji via Users list for the GNU Emacs text editor
@ 2021-10-21 9:33 ` tomas
2021-10-21 9:45 ` tolugboji
2021-10-21 9:35 ` Joost Kremers
2021-10-22 2:08 ` pliyanag
2 siblings, 1 reply; 14+ messages in thread
From: tomas @ 2021-10-21 9:33 UTC (permalink / raw)
To: tolugboji; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 814 bytes --]
On Thu, Oct 21, 2021 at 09:23:35AM +0000, tolugboji via Users list for the GNU Emacs text editor wrote:
> I want to see differences between two files side-by-side (one on a left window, the other on a right window).
> The purpose is not simply see the differences side-by-side, but also to make modifications on each window
> and be able to show differences again.
>
> Is such a thing possible to do in emacs?
M-x ediff :)
You can diff two files, a file with a buffer... Side by side, top
to bottom, whatever.
There is documentation for the ediff mode. Try C-h i ediff, perhaps it is
installed on your machine. If not (and if you want to suffer the whims
of your browser ;-) it's on the internets [1] too.
Cheers
[1] https://www.gnu.org/software/emacs/manual/html_mono/ediff.html
- t
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Differences with side-by-side modification
2021-10-21 9:33 ` tomas
@ 2021-10-21 9:45 ` tolugboji
2021-10-21 9:54 ` tomas
2021-10-21 9:57 ` Michael Heerdegen
0 siblings, 2 replies; 14+ messages in thread
From: tolugboji @ 2021-10-21 9:45 UTC (permalink / raw)
To: tomas; +Cc: help-gnu-emacs
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, October 21st, 2021 at 9:33 AM, <tomas@tuxteam.de> wrote:
> On Thu, Oct 21, 2021 at 09:23:35AM +0000, tolugboji via Users list for the GNU Emacs text editor wrote:
>
> > I want to see differences between two files side-by-side (one on a left window, the other on a right window).
> >
> > The purpose is not simply see the differences side-by-side, but also to make modifications on each window
> >
> > and be able to show differences again.
> >
> > Is such a thing possible to do in emacs?
>
> M-x ediff :)
>
> You can diff two files, a file with a buffer... Side by side, top
>
> to bottom, whatever.
>
> There is documentation for the ediff mode. Try C-h i ediff, perhaps it is
>
> installed on your machine. If not (and if you want to suffer the whims
>
> of your browser ;-) it's on the internets [1] too.
>
> Cheers
>
> [1] https://www.gnu.org/software/emacs/manual/html_mono/ediff.html
>
> - t
Have done `M-x ediff-files` and `M-x ediff-buffers`, but the two files
are put one on top of each other, rather than side-by-side. What setting
do I need to do to change to side-by-side?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Differences with side-by-side modification
2021-10-21 9:45 ` tolugboji
@ 2021-10-21 9:54 ` tomas
2021-10-21 9:57 ` Michael Heerdegen
1 sibling, 0 replies; 14+ messages in thread
From: tomas @ 2021-10-21 9:54 UTC (permalink / raw)
To: tolugboji; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
On Thu, Oct 21, 2021 at 09:45:17AM +0000, tolugboji wrote:
[...]
> Have done `M-x ediff-files` and `M-x ediff-buffers`, but the two files
> are put one on top of each other, rather than side-by-side. What setting
> do I need to do to change to side-by-side?
Read the docs [1] ;-)
No, seriously: have you seen this little frame floating around,
showing: "type ? for help"?
If you go there (how ever your window manager/operating system
does that) and type ? you'll get a cheat sheet. Among them, there
is
"| -vert/horiz split"
So try typing "|", (the vertical bar, aka "pipe symbol") to toggle
between vertically and horizontally split display.
Enjoy
[1] I hope you don't take that too seriously. But there are more
things in there that I could tell you, promised!
- t
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Differences with side-by-side modification
2021-10-21 9:45 ` tolugboji
2021-10-21 9:54 ` tomas
@ 2021-10-21 9:57 ` Michael Heerdegen
2021-10-21 10:04 ` tolugboji
1 sibling, 1 reply; 14+ messages in thread
From: Michael Heerdegen @ 2021-10-21 9:57 UTC (permalink / raw)
To: help-gnu-emacs
tolugboji <tolugboji@protonmail.com> writes:
> Have done `M-x ediff-files` and `M-x ediff-buffers`, but the two files
> are put one on top of each other, rather than side-by-side. What setting
> do I need to do to change to side-by-side?
Customize `ediff-split-window-function'. You can also just toggle with
the key | in any Ediff session.
Michael.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Differences with side-by-side modification
2021-10-21 9:57 ` Michael Heerdegen
@ 2021-10-21 10:04 ` tolugboji
2021-10-21 10:12 ` tomas
2021-10-21 10:18 ` Michael Heerdegen
0 siblings, 2 replies; 14+ messages in thread
From: tolugboji @ 2021-10-21 10:04 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: help-gnu-emacs
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, October 21st, 2021 at 9:57 AM, Michael Heerdegen <michael_heerdegen@web.de> wrote:
> tolugboji tolugboji@protonmail.com writes:
>
> > Have done `M-x ediff-files` and `M-x ediff-buffers`, but the two files
> >
> > are put one on top of each other, rather than side-by-side. What setting
> >
> > do I need to do to change to side-by-side?
>
> Customize `ediff-split-window-function'. You can also just toggle with
>
> the key | in any Ediff session.
>
> Michael.
Got confused on what to do because the window seemed to recognise the mouse
over options, but pressing mouse button did nothing. I repeatedly used
| which toggled between vertical and horizontal placement. Takes some
time to got used to this emacs thing. But I think I can do things that
I cannot do on other editors.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Differences with side-by-side modification
2021-10-21 10:04 ` tolugboji
@ 2021-10-21 10:12 ` tomas
2021-10-21 10:18 ` Michael Heerdegen
1 sibling, 0 replies; 14+ messages in thread
From: tomas @ 2021-10-21 10:12 UTC (permalink / raw)
To: tolugboji; +Cc: Michael Heerdegen, help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 661 bytes --]
On Thu, Oct 21, 2021 at 10:04:36AM +0000, tolugboji wrote:
[...]
> Got confused on what to do because the window seemed to recognise the mouse
> over options, but pressing mouse button did nothing. I repeatedly used
> | which toggled between vertical and horizontal placement.
Yes, Emacs user interface is sometimes different :)
> Takes some time to got used to this emacs thing.
That's true, yes. I came from vi(m) and it took me
half a year of whining and swearing (but I knew what
I was going into). For me it was worth every bit of
it and them some.
> But I think I can do things that I cannot do on other editors.
That's true, too :-)
Cheers
- t
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Differences with side-by-side modification
2021-10-21 10:04 ` tolugboji
2021-10-21 10:12 ` tomas
@ 2021-10-21 10:18 ` Michael Heerdegen
2021-10-21 10:54 ` tolugboji
1 sibling, 1 reply; 14+ messages in thread
From: Michael Heerdegen @ 2021-10-21 10:18 UTC (permalink / raw)
To: help-gnu-emacs
tolugboji <tolugboji@protonmail.com> writes:
> Got confused on what to do because the window seemed to recognise the mouse
> over options, but pressing mouse button did nothing.
Note that by default Ediff uses a standalone control frame (which means
"window" in the outside world) and that frame should be selected to
enter the control commands. Dunno if that is related to your
experiences.
Anyway, it's possible to edit the currently Ediffed buffers. You can,
for example, copy regions from one side to the other. The quick help
(key: ?) is your friend. ? typed a second time removes the quick help.
It's also possible to edit the buffers manually while they are Ediffed.
You then hit ! to refresh the diff highlighting. h to toggle the
highlighting if it distracts while editing.
Michael.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Differences with side-by-side modification
2021-10-21 10:18 ` Michael Heerdegen
@ 2021-10-21 10:54 ` tolugboji
2021-10-21 18:32 ` tolugboji
2021-10-21 20:15 ` Joost Kremers
0 siblings, 2 replies; 14+ messages in thread
From: tolugboji @ 2021-10-21 10:54 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: help-gnu-emacs
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, October 21st, 2021 at 10:18 AM, Michael Heerdegen <michael_heerdegen@web.de> wrote:
> tolugboji tolugboji@protonmail.com writes:
>
> > Got confused on what to do because the window seemed to recognise the mouse
> >
> > over options, but pressing mouse button did nothing.
>
> Note that by default Ediff uses a standalone control frame (which means
>
> "window" in the outside world) and that frame should be selected to
>
> enter the control commands. Dunno if that is related to your
>
> experiences.
>
> Anyway, it's possible to edit the currently Ediffed buffers. You can,
>
> for example, copy regions from one side to the other. The quick help
>
> (key: ?) is your friend. ? typed a second time removes the quick help.
>
> It's also possible to edit the buffers manually while they are Ediffed.
>
> You then hit ! to refresh the diff highlighting. h to toggle the
>
> highlighting if it distracts while editing.
>
> Michael.
That helps a lot Michael. Was initially bothered by the small command frame
that pops up and having to use ?. But using ? again to reduce the frame
is good and I like the highlighting.
I have some code that I need to split up into different files, and can get
to do some emacs practice doing so. I come from vscode and similar internal
environments (one big mess when tools are invented internally).
^ permalink raw reply [flat|nested] 14+ messages in thread
* Differences with side-by-side modification
2021-10-21 10:54 ` tolugboji
@ 2021-10-21 18:32 ` tolugboji
2021-10-21 20:15 ` Joost Kremers
1 sibling, 0 replies; 14+ messages in thread
From: tolugboji @ 2021-10-21 18:32 UTC (permalink / raw)
To: tolugboji; +Cc: Michael Heerdegen, help-gnu-emacs
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, October 21st, 2021 at 10:54 AM, tolugboji <tolugboji@protonmail.com> wrote:
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
>
> On Thursday, October 21st, 2021 at 10:18 AM, Michael Heerdegen michael_heerdegen@web.de wrote:
>
> > tolugboji tolugboji@protonmail.com writes:
> >
> > > Got confused on what to do because the window seemed to recognise the mouse
> > > over options, but pressing mouse button did nothing.
> >
> > Note that by default Ediff uses a standalone control frame (which means
> > "window" in the outside world) and that frame should be selected to
> > enter the control commands. Dunno if that is related to your
> > experiences.
> >
> > Anyway, it's possible to edit the currently Ediffed buffers. You can,
> > for example, copy regions from one side to the other. The quick help
> > (key: ?) is your friend. ? typed a second time removes the quick help.
> > It's also possible to edit the buffers manually while they are Ediffed.
> > You then hit ! to refresh the diff highlighting. h to toggle the
> > highlighting if it distracts while editing.
> >
> > Michael.
It would help with changes if I can also show tho parts that are common
between two files rather than the differences. Has anyone needed to do
this?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Differences with side-by-side modification
2021-10-21 10:54 ` tolugboji
2021-10-21 18:32 ` tolugboji
@ 2021-10-21 20:15 ` Joost Kremers
2021-10-21 21:16 ` tolugboji
1 sibling, 1 reply; 14+ messages in thread
From: Joost Kremers @ 2021-10-21 20:15 UTC (permalink / raw)
To: tolugboji; +Cc: help-gnu-emacs
On Thu, Oct 21 2021, tolugboji wrote:
> Was initially bothered by the small command frame
> that pops up and having to use ?.
Note that you can also display the control window in the same frame as the two
buffers you're diffing, by setting `ediff-window-setup-function` to
`ediff-setup-windows-plain`. And you can toggle between the two with `M-x
ediff-toggle-multiframe`.
--
Joost Kremers
Life has its moments
^ permalink raw reply [flat|nested] 14+ messages in thread
* Differences with side-by-side modification
2021-10-21 20:15 ` Joost Kremers
@ 2021-10-21 21:16 ` tolugboji
0 siblings, 0 replies; 14+ messages in thread
From: tolugboji @ 2021-10-21 21:16 UTC (permalink / raw)
To: Joost Kremers; +Cc: help-gnu-emacs
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, October 21st, 2021 at 8:15 PM, Joost Kremers <joostkremers@fastmail.fm> wrote:
> On Thu, Oct 21 2021, tolugboji wrote:
>
> > Was initially bothered by the small command frame
> >
> > that pops up and having to use ?.
>
> Note that you can also display the control window in the same frame as the two
>
> buffers you're diffing, by setting `ediff-window-setup-function` to
>
> `ediff-setup-windows-plain`. And you can toggle between the two with `M-x ediff-toggle-multiframe`.
>
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Joost Kremers
> Life has its moments
I am good with the different frames because of the small screen.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Differences with side-by-side modification
2021-10-21 9:23 Differences with side-by-side modification tolugboji via Users list for the GNU Emacs text editor
2021-10-21 9:33 ` tomas
@ 2021-10-21 9:35 ` Joost Kremers
2021-10-22 2:08 ` pliyanag
2 siblings, 0 replies; 14+ messages in thread
From: Joost Kremers @ 2021-10-21 9:35 UTC (permalink / raw)
To: tolugboji; +Cc: help-gnu-emacs
On Thu, Oct 21 2021, tolugboji via Users list for the GNU Emacs text editor wrote:
> I want to see differences between two files side-by-side (one on a left window,
> the other on a right window).
> The purpose is not simply see the differences side-by-side, but also to make
> modifications on each window
> and be able to show differences again.
>
> Is such a thing possible to do in emacs?
ediff and/or ediff-buffers is your friend.
--
Joost Kremers
Life has its moments
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Differences with side-by-side modification
2021-10-21 9:23 Differences with side-by-side modification tolugboji via Users list for the GNU Emacs text editor
2021-10-21 9:33 ` tomas
2021-10-21 9:35 ` Joost Kremers
@ 2021-10-22 2:08 ` pliyanag
2 siblings, 0 replies; 14+ messages in thread
From: pliyanag @ 2021-10-22 2:08 UTC (permalink / raw)
To: tolugboji, help-gnu-emacs
tolugboji via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> I want to see differences between two files side-by-side (one on a left window, the other on a right window).
> The purpose is not simply see the differences side-by-side, but also to make modifications on each window
> and be able to show differences again.
>
> Is such a thing possible to do in emacs?
>
> Thank you
> Tolu
If you're willing to become a heretic, check out vdiff :)
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2021-10-22 2:08 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-21 9:23 Differences with side-by-side modification tolugboji via Users list for the GNU Emacs text editor
2021-10-21 9:33 ` tomas
2021-10-21 9:45 ` tolugboji
2021-10-21 9:54 ` tomas
2021-10-21 9:57 ` Michael Heerdegen
2021-10-21 10:04 ` tolugboji
2021-10-21 10:12 ` tomas
2021-10-21 10:18 ` Michael Heerdegen
2021-10-21 10:54 ` tolugboji
2021-10-21 18:32 ` tolugboji
2021-10-21 20:15 ` Joost Kremers
2021-10-21 21:16 ` tolugboji
2021-10-21 9:35 ` Joost Kremers
2021-10-22 2:08 ` pliyanag
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).