all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
Cc: pbreton@cs.umb.edu, tramp-devel@gnu.org, emacs-devel@gnu.org,
	raman@users.sourceforge.net
Subject: Re: Reverting *Locate* buffers.
Date: Sun, 02 Jul 2006 22:52:05 +0200	[thread overview]
Message-ID: <873bdjwwzu.fsf@gmx.de> (raw)
In-Reply-To: <200606290313.k5T3DwTj002620@jane.dms.auburn.edu> (Luc Teirlinck's message of "Wed, 28 Jun 2006 22:13:58 -0500 (CDT)")

[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]

Luc Teirlinck <teirllm@dms.auburn.edu> writes:

> Just as a general question to everybody interested (not just to the
> person in the "To" field):
>
> Where do we stand now in this thread?  Obviously, I can not implement
> David's suggestion as long as there is this error message (assuming it
> would not give other problems, even without that message, which I can
> not test).

I believe I understand what happens when the "Recursive load" message
for Tramp appears. We have the following situation:

- Tramp is not loaded yet.
- default-directory is set to "/su::".
- shell-command is called.

The Tramp handler of shell-command must be applied. Therefore, due to
the autoload definitions, Tramp must be loaded. Loading tramp.el
itself causes new remote file operations (due to default-directory).
And so on.

The solution would be to set temporarily default-directory to "/" or
whatover local during loading of Tramp. But I have no idea how to say
it, I don't know of any before-load-hook where I could apply such a
setting. Does anybody has an idea how to do this?

For your patch, it would work with the small change that you arrange
the loading of Tramp yourself (a working version of the patch is
appended). But I don't like this solution too much, I'ld prefer that
Tramp could handle it itself.

> Sincerely,
>
> Luc.

Best regards, Michael.


[-- Attachment #2: Type: text/plain, Size: 2306 bytes --]

*** /home/albinus/src/emacs/lisp/locate.el	Sun Jul  2 21:46:24 2006
--- /home/albinus/src/emacs/lisp/locate.el.~1.36.~	Sat Mar 18 17:17:04 2006
***************
*** 191,215 ****
    :group 'locate
    :version "22.1")
  
- (defcustom locate-update-when-revert nil
-   "This option affects how the *Locate* buffer gets reverted.
- If non-nil, offer to update the locate database when reverting that buffer.
- \(Normally, you need to have root privileges for this to work.)
- If nil, reverting does not update the locate database."
-   :type 'boolean
-   :group 'locate
-   :version "22.1")
- 
- (defcustom locate-update-path "/su::"
-   "The default directory from where `locate-update-command' is called.
- Usually, root permissions are required running the command.  This
- can be achieved by setting this option to \"/su::\" or \"/sudo::\".
- If your current user permissions are sufficient to run the command,
- you shall set this option to \"/\"."
-   :type 'string
-   :group 'locate
-   :version "22.1")
- 
  (defcustom locate-update-command "updatedb"
    "The executable program used to update the locate database."
    :type 'string
--- 191,196 ----
***************
*** 576,591 ****
  
  ;; From Stephen Eglen <stephen@cns.ed.ac.uk>
  (defun locate-update (ignore1 ignore2)
!   "Revert the *Locate* buffer.
! If `locate-update-when-revert' is non-nil, offer to update the
! locate database using the shell command in `locate-update-command'."
    (let ((str (car locate-history-list)))
!     (and locate-update-when-revert
! 	 (yes-or-no-p "Update locate database (may take a few seconds)? ")
! 	 (require 'tramp)
! 	 (let ((default-directory locate-update-path))
! 	   (shell-command locate-update-command)))
!     (locate str)))
  
  ;;; Modified three functions from `dired.el':
  ;;;   dired-find-directory,
--- 557,568 ----
  
  ;; From Stephen Eglen <stephen@cns.ed.ac.uk>
  (defun locate-update (ignore1 ignore2)
!   "Update the locate database.
! Database is updated using the shell command in `locate-update-command'."
    (let ((str (car locate-history-list)))
!     (cond ((yes-or-no-p "Update locate database (may take a few seconds)? ")
! 	   (shell-command locate-update-command)
! 	   (locate str)))))
  
  ;;; Modified three functions from `dired.el':
  ;;;   dired-find-directory,

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  parent reply	other threads:[~2006-07-02 20:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-26  3:27 Reverting *Locate* buffers Luc Teirlinck
2006-06-26  7:43 ` David Kastrup
2006-06-28  1:58   ` Luc Teirlinck
2006-06-28  3:55     ` T. V. Raman
2006-06-29  3:13       ` Luc Teirlinck
2006-06-29  6:27         ` David Kastrup
2006-06-29 21:52         ` Michael Albinus
2006-06-30  1:55           ` Luc Teirlinck
2006-07-02 20:39             ` Michael Albinus
2006-07-02 20:52         ` Michael Albinus [this message]
2006-07-03  2:51           ` Luc Teirlinck
2006-07-03 13:43             ` Michael Albinus
2006-07-03 23:21               ` Richard Stallman
2006-07-04  0:14               ` Luc Teirlinck
2006-07-03 15:05           ` Richard Stallman
2006-07-03 15:37             ` Michael Albinus
2006-07-03 15:41               ` David Kastrup
2006-07-04 15:42           ` Stefan Monnier
2006-06-29 21:58       ` Michael Albinus
2006-06-26 13:15 ` Peter Breton
2006-06-27  1:55   ` Luc Teirlinck

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=873bdjwwzu.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=pbreton@cs.umb.edu \
    --cc=raman@users.sourceforge.net \
    --cc=tramp-devel@gnu.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.