summaryrefslogtreecommitdiff
path: root/gnu/packages/emacs.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/emacs.scm')
-rw-r--r--gnu/packages/emacs.scm53
1 files changed, 32 insertions, 21 deletions
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 7f36745ff51..559dd92646d 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -334,19 +334,6 @@
334 (if replacement 334 (if replacement
335 (string-append "\"" replacement "\"") 335 (string-append "\"" replacement "\"")
336 all)))) 336 all))))
337 ;; Make sure Tramp looks for binaries in the right places on
338 ;; remote Guix System machines, where 'getconf PATH' returns
339 ;; something bogus.
340 (substitute* "lisp/net/tramp.el"
341 ;; Patch the line after "(defcustom tramp-remote-path".
342 (("\\(tramp-default-remote-path")
343 (format
344 #f "(tramp-default-remote-path ~s ~s ~s ~s ~s ~s ~s "
345 "/run/privileged/bin"
346 "~/.guix-profile/bin" "~/.guix-profile/sbin"
347 "~/.guix-home/bin" "~/.guix-home/sbin"
348 "/run/current-system/profile/bin"
349 "/run/current-system/profile/sbin")))
350 337
351 ;; Make sure Man and ffap looks for C header files in the right 338 ;; Make sure Man and ffap looks for C header files in the right
352 ;; places. 339 ;; places.
@@ -357,14 +344,38 @@
357 "\"~/.guix-profile/include\"" 344 "\"~/.guix-profile/include\""
358 "\"~/.guix-home/include\"" 345 "\"~/.guix-home/include\""
359 "\"/run/current-system/profile/include\"") 346 "\"/run/current-system/profile/include\"")
360 " "))) 347 " ")))))
361 348 (add-after 'patch-program-file-names 'patch-tramp
362 ;; match ".gvfs-fuse-daemon-real" and ".gvfsd-fuse-real" 349 ;; This phase is duplicated in the emacs-tramp package. Please
363 ;; respectively when looking for GVFS processes. 350 ;; ensure they stay in sync
364 (substitute* "lisp/net/tramp-gvfs.el" 351 (lambda* (#:key inputs #:allow-other-keys)
365 (("\\(tramp-process-running-p \"(.*)\"\\)" all process) 352 (with-directory-excursion "lisp/net"
366 (format #f "(or ~a (tramp-process-running-p ~s))" 353 ;; All but one "/bin/" directory refer to remote
367 all (string-append "." process "-real")))))) 354 ;; environments, which may not be Guix. Do not patch them
355 ;; blindly. However, tramp-encoding-shell has to be patched.
356 (substitute* "tramp.el"
357 (("\"/bin/sh\"")
358 (format #f "~s" (search-input-file inputs "bin/sh")))
359
360 ;; Make sure Tramp looks for binaries in the right places on
361 ;; remote Guix System machines, where 'getconf PATH' returns
362 ;; something bogus.
363 ;; Patch the line after "(defcustom tramp-remote-path".
364 (("\\(tramp-default-remote-path")
365 (format
366 #f "(tramp-default-remote-path ~s ~s ~s ~s ~s ~s ~s "
367 "/run/privileged/bin"
368 "~/.guix-profile/bin" "~/.guix-profile/sbin"
369 "~/.guix-home/bin" "~/.guix-home/sbin"
370 "/run/current-system/profile/bin"
371 "/run/current-system/profile/sbin")))
372
373 ;; match ".gvfs-fuse-daemon-real" and ".gvfsd-fuse-real"
374 ;; respectively when looking for GVFS processes.
375 (substitute* "tramp-gvfs.el"
376 (("\\(tramp-process-running-p \"(.*)\"\\)" all process)
377 (format #f "(or ~a (tramp-process-running-p ~s))"
378 all (string-append "." process "-real")))))))
368 (add-before 'configure 'fix-/bin/pwd 379 (add-before 'configure 'fix-/bin/pwd
369 (lambda _ 380 (lambda _
370 ;; Use `pwd', not `/bin/pwd'. 381 ;; Use `pwd', not `/bin/pwd'.