[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
User option dnd-open-file-other-window has no effect
From: |
Sven Joachim |
Subject: |
User option dnd-open-file-other-window has no effect |
Date: |
Sun, 02 Oct 2005 10:01:27 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.6 (X11/20050802) |
There is a user option, dnd-open-file-other-window, which should
control the behaviour of drag-n-dropping files onto an Emacs frame.
I customized it to t:
dnd-open-file-other-window is a variable defined in `dnd'.
Its value is t
Documentation:
If non-nil, always use find-file-other-window to open dropped files.
However, that had no effect. :-(
Using debug-on-entry for dnd-open-local-file, I got the following
debugger backtrace when drag-n-dropping a file from konqueror:
Debugger entered--entering a function:
* dnd-open-local-file(#("file:///home/sven/lynx.cfg" 0 26 (foreign-selection
STRING)) private)
byte-code("address@hidden @\" A\f\"ÈÉÊ\"\nA*Æ"
[dnd-protocol-alist bf --cl-dolist-temp-- uri action ret nil string-match throw done t] 4)
dnd-handle-one-url(#<window 48 on dnd-open-file-other-window> private
#("file:///home/sven/lynx.cfg" 0 26 (foreign-selection STRING)))
x-dnd-handle-uri-list(#<window 48 on dnd-open-file-other-window> private
#("file:///home/sven/lynx.cfg
\n" 0 29 (foreign-selection STRING)))
byte-code("Æ \"AÇ\f!ÈH:!É8'Ê `ËÌF)Ì8)
Í!Î!Ï:VÉ8\\Ê `ËÌF)È8zÉ8:address@hidden)b#)ÐÑ\f!#)-"
[type x-dnd-types-alist type-info handler frame state assoc
x-dnd-get-state-for-frame 5 1 selected-window (0 . 0) 0 windowp window-live-p
nil t
select-frame action event position w dnd-open-file-other-window window data] 5)
x-dnd-drop-data((drag-n-drop (#<window 48 on dnd-open-file-other-window> 1035 (61 . 478)
0 nil 1035 (6 . 31) nil (61 . 13) (10 . 15)) ["XdndDrop"
#<frame Emacs: dnd-open-file-other-window 0x85e0d28> 32 [... 0 ... 0 0]]) #<frame
Emacs: dnd-open-file-other-window 0x85e0d28> #<window 48 on
dnd-open-file-other-window> #("file:///home/sven/lynx.cfg
\n" 0 29 (foreign-selection STRING)) "text/uri-list")
byte-code("Ä \nÅ\n!%" [event frame window value x-dnd-drop-data
x-dnd-current-type] 7)
x-dnd-handle-xdnd((drag-n-drop (#<window 48 on dnd-open-file-other-window> 1035 (61 .
478) 0 nil 1035 (6 . 31) nil (61 . 13) (10 . 15)) ["XdndDrop"
#<frame Emacs: dnd-open-file-other-window 0x85e0d28> 32 [... 0 ... 0 0]]) #<frame
Emacs: dnd-open-file-other-window 0x85e0d28> #<window 48 on
dnd-open-file-other-window> "XdndDrop" 32 [(192 . 896) 0 (223 . 30889) 0 0])
x-dnd-handle-drag-n-drop-event((drag-n-drop (#<window 48 on
dnd-open-file-other-window> 1035 (61 . 478) 0 nil 1035 (6 . 31) nil (61 . 13) (10
. 15))
["XdndDrop" #<frame Emacs: dnd-open-file-other-window 0x85e0d28> 32 [... 0 ...
0 0]]))
call-interactively(x-dnd-handle-drag-n-drop-event)
And inside the debugger, dnd-open-file-other-window is nil.
It seems the function x-dnd-drop-data overwrites it temporarily, it
contains the code:
[...]
(if (and (windowp w) (window-live-p w))
;; If dropping in a window, open files in that window rather
;; than in a new widow. [widow, huh! Sven.]
(let ((dnd-open-file-other-window nil))
(goto-char (posn-point (event-start event)))
(funcall handler window action data))
(let ((dnd-open-file-other-window t)) ;; Dropping on non-window.
[...]
Meanwhile, the Emacs manual is also quite funny. It states in section
25.15, Drag and Drop:
Dropping a file normally visits it in the window you drop it on. If
you prefer to visit the file in a new window in such cases, customize
the variable `x-dnd-open-file-other-window'.
But the variable `x-dnd-open-file-other-window' does not exist. :-(
I noticed this misbehaviour in Emacs version
GNU Emacs 22.0.50.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2005-09-30 on debian, modified by Debian
X server distributor `The X.Org Foundation', version 11.0.60802000
- User option dnd-open-file-other-window has no effect,
Sven Joachim <=