Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 22563 - (emacs) emacs has portage temp strings embedded
Summary: (emacs) emacs has portage temp strings embedded
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Emacs project
URL:
Whiteboard:
Keywords: Bug
: 65663 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-06-10 11:05 UTC by Olivier Crete (RETIRED)
Modified: 2007-02-20 22:23 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
rcp.el (rcp.el,71.98 KB, text/plain)
2003-06-11 19:15 UTC, Olivier Crete (RETIRED)
Details
Proposed bugfix: files/emacs-21.4-autosave-tmp.patch (emacs-21.4-autosave-tmp.patch,525 bytes, patch)
2007-02-16 20:56 UTC, Ulrich Müller
Details | Diff
Proposed bugfix: patch for emacs-21.4-r6.ebuild (diff,643 bytes, patch)
2007-02-16 21:00 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Crete (RETIRED) gentoo-dev 2003-06-10 11:05:38 UTC
strings /usr/bin/emacs gives lots of
/var/tmp/portage/emacs-21.3-r1/work/emacs-21.3/...

When I use certain scripts (rcp.el in my case). it tries to write in that directory.

Reproducible: Always
Steps to Reproduce:
Comment 1 Matthew Kennedy (RETIRED) gentoo-dev 2003-06-11 17:16:45 UTC
hi, where can i find the rcp.el you are using?
Comment 2 Olivier Crete (RETIRED) gentoo-dev 2003-06-11 19:15:12 UTC
Created attachment 13132 [details]
rcp.el

Load this (load-file) and open a file over ssh with something like
/r@scp:user@host:/path/file and then wait for emacs to try to auto-save the
file... it will try to auto-save it in the wrong path.
Anyways, the fact that there are multiple strings from the build environment in
the final executable is really wrong.
Comment 3 Morgan Christiansson 2003-07-28 08:21:41 UTC
I also experience this problem.

Auto-saving <filename>: Opening output file: no such file or directory, /var/tmp/portage/emacs-21.3-r1/work/emacs-21.3/src/#<filename>#
Auto-saving...done

In addition to failed autosave emacs freezes for ~1 second per failed auto-save which gets to be quite a long while when editing many files remotely.

I'm using tramp, i installed it manually from http://tramp.sourceforge.net/. the portage version seemed to be outdated and non-working.
Comment 4 YAMAKURA Makoto (RETIRED) gentoo-dev 2003-12-01 05:38:17 UTC
You can put this in your .emacs to work around that:

(setq auto-save-file-name-transforms
    `(("\\`/[^/]*:\\(.+/\\)*\\(.*\\)"
      ,(expand-file-name "\\2" temporary-file-directory))))

or do M-x customize-group RET auto-save RET ,
then change "Auto Save File Name Transforms" -> "Replacement"
to "/tmp/\2" or something as you like.
Comment 5 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-02-17 13:18:05 UTC
As for tramp, I added a workaround in Comment #4 to 50tramp-gentoo.el.
However, I have no idea how to fix the problem :(
Comment 6 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-09-29 02:30:52 UTC
*** Bug 65663 has been marked as a duplicate of this bug. ***
Comment 7 Michael Powe 2005-02-25 11:24:54 UTC
When using emacs to edit files remotely (e.g., via Tramp), this bug has serious consequences.  Emacs will try to auto-save to a non-existent directory:

/var/tmp/portage/emacs-21.3-r3/work/emacs-21.3/src/#auto-save-file-name#

In order to avoid this, it is necessary to turn off auto-save-mode for that buffer.  That's annoying but not as annoying as what happens if you forget to do it.  If you forget, emacs may become unusable for up to several minutes.

If using tramp to access the remote file, there is this workaround:  (setq tramp-auto-save-directory "~") in the .emacs will cause tramp to auto-save the file to the home directory of the user instead.
Comment 8 Ulrich Müller gentoo-dev 2007-02-16 20:54:32 UTC
The bug is still present in emacs-21.4-r6.
Attached patch (backported from Emacs-22) fixes the problem for me.
Comment 9 Ulrich Müller gentoo-dev 2007-02-16 20:56:21 UTC
Created attachment 110421 [details, diff]
Proposed bugfix: files/emacs-21.4-autosave-tmp.patch
Comment 10 Ulrich Müller gentoo-dev 2007-02-16 21:00:16 UTC
Created attachment 110423 [details, diff]
Proposed bugfix: patch for emacs-21.4-r6.ebuild

Since startup.el is patched, we have to recompile it.
And then we simply call make to dump Emacs again.
Comment 11 Ulrich Müller gentoo-dev 2007-02-16 21:04:44 UTC
(In reply to comment #2)
> Anyways, the fact that there are multiple strings from the build environment in
> the final executable is really wrong. 

Why do you consider this to be a bug? It is an artefact of emacs' build procedure, but it should not affect the normal running of the program.
Comment 12 Christian Faulhammer (RETIRED) gentoo-dev 2007-02-20 22:23:20 UTC
fixed in 21.4-r7, thanks Ulrich.