From: Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: [bug?] Tramp tries to open remote file links
Date: Wed, 18 Jun 2014 14:29:28 +0200 [thread overview]
Message-ID: <86tx7iz9hz.fsf@somewhere.org> (raw)
In-Reply-To: 87a99asgao.fsf@geodiff-mac3.ulb.ac.be
Hello Nicolas,
Nicolas Richard wrote:
> Sebastien Vauban writes:
>> When I just open an Org file that has a link to a remote file, Tramp
>> tries to open it, leading to errors and timeouts when offline, at least.
>
> It doesn't happen to me. I tried "emacs -Q path/to/test.org" and the
> file opened normally.
>
> Grepping, I see that tramp-maybe-open-connection is responsible for the
> tramp messages. so you could eval:
> (trace-function-background
> 'tramp-maybe-open-connection
> "*trace*"
> (lambda () (with-output-to-string (backtrace))))
>
> then reproduce and look into the buffer *trace* to see what called
> tramp.
--8<---------------cut here---------------start------------->8---
1 -> (tramp-maybe-open-connection [#("plink" 0 5 (tramp-default t)) "myself" "some.where.org" "papers/last.pdf" nil]) backtrace()
(let ((standard-output standard-output)) (backtrace))
(progn (let ((standard-output standard-output)) (backtrace)) (save-current-buffer (set-buffer standard-output) (buffer-string)))
(unwind-protect (progn (let ((standard-output standard-output)) (backtrace)) (save-current-buffer (set-buffer standard-output) (buffer-string))) (kill-buffer standard-output))
(let ((standard-output (get-buffer-create (generate-new-buffer-name " *string-output*")))) (unwind-protect (progn (let ((standard-output standard-output)) (backtrace)) (save-current-buffer (set-buffer standard-output) (buffer-string))) (kill-buffer standard-output)))
(lambda nil (let ((standard-output (get-buffer-create (generate-new-buffer-name " *string-output*")))) (unwind-protect (progn (let ((standard-output standard-output)) (backtrace)) (save-current-buffer (set-buffer standard-output) (buffer-string))) (kill-buffer standard-output))))()
<... lots of contents...>
org-mode()
set-auto-mode-0(org-mode nil)
set-auto-mode()
normal-mode(t)
after-find-file(nil t)
find-file-noselect-1(#<buffer test.org> "~/test.org" nil nil "~/test.org" ((8960 3 . 4947) (24647 . 36859)))
find-file-noselect("~/test.org" nil nil t)
(with-no-warnings (funcall ad--addoit-function filename wildcards))
(setq ad-return-value (with-no-warnings (funcall ad--addoit-function filename wildcards)))
(let ((filename filename) (find-file-time-start (float-time))) (message "(Info) Finding file %s..." filename) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function filename wildcards))) (message "(Info) Found file %s in %.2f s" filename (- (float-time) find-file-time-start)))
(let (ad-return-value) (let ((filename filename) (find-file-time-start (float-time))) (message "(Info) Finding file %s..." filename) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function filename wildcards))) (message "(Info) Found file %s in %.2f s" filename (- (float-time) find-file-time-start))) ad-return-value)
ad-Advice-find-file(...
find-file("~/test.org" t)
funcall-interactively(find-file "~/test.org" t)
call-interactively(find-file nil nil)
command-execute(find-file)
--8<---------------cut here---------------end--------------->8---
See http://screencast.com/t/pXrFeTR5J9
for a video of the full trace.
And, yes, I do have an advice around find-file:
--8<---------------cut here---------------start------------->8---
(defadvice find-file (around leuven-find-file activate)
"Open the file named FILENAME and report time spent."
(let ((filename (ad-get-arg 0))
(find-file-time-start (float-time)))
(message "(Info) Finding file %s..." filename)
ad-do-it
(message "(Info) Found file %s in %.2f s" filename
(- (float-time) find-file-time-start))))
--8<---------------cut here---------------end--------------->8---
Though, commenting that did not solve the current problem at hand...
Best regards,
Seb
--
Sebastien Vauban
next prev parent reply other threads:[~2014-06-18 12:29 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 9:08 [bug?] Tramp tries to open remote file links Sebastien Vauban
2014-06-18 9:44 ` Nicolas Richard
2014-06-18 12:29 ` Sebastien Vauban [this message]
2014-06-18 13:17 ` Nicolas Richard
2014-06-18 13:25 ` Sebastien Vauban
2014-06-18 13:49 ` Michael Albinus
[not found] ` <8761jy1g5f.fsf-Mmb7MZpHnFY@public.gmane.org>
2014-06-18 13:52 ` Sebastien Vauban
2014-06-18 14:03 ` Michael Albinus
2014-06-18 14:20 ` Sebastien Vauban
2014-06-18 15:11 ` Michael Albinus
2014-06-18 15:53 ` Sebastien Vauban
2014-06-18 16:11 ` Nick Dokos
2014-06-19 8:21 ` Sebastien Vauban
2014-06-19 9:07 ` Michael Albinus
2014-06-19 21:59 ` Andreas Leha
2014-06-20 7:46 ` Sebastien Vauban
2014-06-20 10:52 ` Andreas Leha
2014-06-18 14:28 ` Nicolas Richard
2014-06-18 17:25 ` Nicolas Goaziou
2014-06-18 13:26 ` Michael Albinus
2014-06-18 10:14 ` Michael Albinus
2014-06-18 12:18 ` Sebastien Vauban
2014-06-18 12:49 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86tx7iz9hz.fsf@somewhere.org \
--to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.