emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#10424: closed (list-dynamic-libraries: show absolu


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#10424: closed (list-dynamic-libraries: show absolute filename of loaded libraries)
Date: Tue, 10 Apr 2012 14:26:02 +0000

Your message dated Tue, 10 Apr 2012 16:23:44 +0200
with message-id <address@hidden>
and subject line Re: bug#10424: list-dynamic-libraries: show absolute filename 
of loaded libraries
has caused the debbugs.gnu.org bug report #10424,
regarding list-dynamic-libraries: show absolute filename of loaded libraries
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
10424: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10424
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: list-dynamic-libraries: show absolute filename of loaded libraries Date: Tue, 3 Jan 2012 00:56:25 +0100
Package: emacs,w32
Severity: wishlist
Version: 24.2
Tags: patch

A patch to make w32_delayed_load to record the absolute filename of
the library loaded, and list-dynamic-libraries to display it.


2012-01-02  Juanma Barranquero  <address@hidden>

        * misc.el (list-dynamic-libraries): Display absolute filename.
        Suggested by Eli Zaretskii <address@hidden>.
        (list-dynamic-libraries--loaded): New function.
        (list-dynamic-libraries--refresh): Use it.


2012-01-02  Juanma Barranquero  <address@hidden>

        * w32.c (w32_delayed_load): Record also the full path of the
        library being loaded.



=== modified file 'lisp/misc.el'
--- lisp/misc.el        2011-06-21 10:04:28 +0000
+++ lisp/misc.el        2012-01-02 23:02:50 +0000
@@ -138,6 +138,19 @@
 (defvar list-dynamic-libraries--loaded-only-p)
 (make-variable-buffer-local 'list-dynamic-libraries--loaded-only-p)

+(defun list-dynamic-libraries--loaded (from)
+  "Compute the \"Loaded from\" column.
+Internal use only."
+  (if from
+      (let ((name (car from))
+            (path (or (cdr from) "<unknown>")))
+        ;; This is a roundabout way to change the tooltip without
+        ;; having to replace the default printer function
+        (propertize name
+                    'display (propertize name
+                                         'help-echo (concat "Loaded
from: " path))))
+    ""))
+
 (defun list-dynamic-libraries--refresh ()
   "Recompute the list of dynamic libraries.
 Internal use only."
@@ -159,7 +172,7 @@
       (when (or from
                 (not list-dynamic-libraries--loaded-only-p))
         (push (list id (vector (symbol-name id)
-                               (or from "")
+                               (list-dynamic-libraries--loaded from)
                                (mapconcat 'identity (cdr lib) ", ")))
               tabulated-list-entries)))))


=== modified file 'src/w32.c'
--- src/w32.c   2011-12-07 23:14:13 +0000
+++ src/w32.c   2012-01-02 23:02:47 +0000
@@ -5783,7 +5783,15 @@
             CHECK_STRING_CAR (dlls);
             if ((library_dll = LoadLibrary (SDATA (XCAR (dlls)))))
               {
-                found = XCAR (dlls);
+                char name[MAX_PATH];
+                DWORD len;
+
+                len = GetModuleFileNameA (library_dll, name, sizeof (name));
+                found = Fcons (XCAR (dlls),
+                               (len > 0)
+                               /* Possibly truncated */
+                               ? make_specified_string (name, -1, len, 1)
+                               : Qnil);
                 break;
               }
           }



--- End Message ---
--- Begin Message --- Subject: Re: bug#10424: list-dynamic-libraries: show absolute filename of loaded libraries Date: Tue, 10 Apr 2012 16:23:44 +0200
> A patch to make w32_delayed_load to record the absolute filename of
> the library loaded, and list-dynamic-libraries to display it.

Committed as revno:107841.

Still, this

> +        ;; This is a roundabout way to change the tooltip without
> +        ;; having to replace the default printer function
> +        (propertize name
> +                    'display (propertize name
> +                                         'help-echo (concat "Loaded  from: " 
> path))))

suggests that tabulated-list-mode would perhaps benefit from some
additional customization facilities.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]