git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Mergetool generating blank files (1.5.3)

From
Theodore Tso <tytso@mit.edu>
Date
Sep 27, 2007, 22:52 UTC
Message-ID
<20070927225218.GD8688@thunk.org>
In-Reply-To
<94ccbe710709271523s7e4c7a1dh53e34bd460c31d1f@mail.gmail.com>
On Thu, Sep 27, 2007 at 03:23:44PM -0700, Kelvie Wong wrote:
> Finally got it to work.  emacs (at least the version I'm using,
> 22.1.1) seems to set the $PWD via its first argument, that is,
> $LOCAL's directory, and when it goes to save, it tries to save $path
> on top of that.

It's not that emacs sets $PWD via its first argument, but the output file is passed from emerge-files*-command to stashed in the per-buffer variable emerge-file-out, which in turn gets passed to the emacs lisp file write-file, which is what gets run when you run C-x C-w --- and write-file interprets a relative pathname based on the containing directory of the existing buffer.

> The updated patch above would be just to use the basename, that is, if
> it is certain that $LOCAL and $path will always reside in the same
> directory -- and I believe, but am not certain, that this is the case.
> Also, I am not sure if this is specific to my version of Emacs, so
> perhaps some further testing is required.

Yep, I've checked both emacs21 and emacs23-snapshot, and they both use write-file, so this seems to be a long-standing bug (and I would call it that) in emerge.el. So a patch like what you suggested is probably going to be needed.

						- Ted
Previous: Kelvie WongNext: Kelvie Wong
Message 24 of 28 in “Mergetool generating blank files (1.5.3)”
  1. Kelvie WongSep 27, 2007
  2. Pierre HabouzitSep 27, 2007
  3. Russ BrownSep 27, 2007
  4. Pierre HabouzitSep 27, 2007
  5. Theodore TsoSep 27, 2007
  6. Pierre HabouzitSep 27, 2007
  7. Peter BaumannSep 28, 2007
  8. Pierre HabouzitSep 28, 2007
  9. Jeff KingSep 27, 2007
  10. Pierre HabouzitSep 27, 2007
  11. Jeff KingSep 27, 2007
  12. Kelvie WongSep 27, 2007
  13. Junio C HamanoSep 27, 2007
  14. Kelvie WongSep 27, 2007
  15. Junio C HamanoSep 27, 2007
  16. Kelvie WongSep 27, 2007
  17. Junio C HamanoSep 27, 2007
  18. Junio C HamanoSep 27, 2007
  19. Kelvie WongSep 27, 2007
  20. Kelvie WongSep 27, 2007
  21. Junio C HamanoSep 27, 2007
  22. Junio C HamanoSep 27, 2007
  23. Kelvie WongSep 27, 2007
  24. Theodore TsoSep 27, 2007
  25. Kelvie WongSep 28, 2007
  26. David KastrupSep 28, 2007
  27. Theodore TsoSep 27, 2007
  28. David KågedalSep 28, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.