aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-02-08 22:29:41 -0500
committerGlenn Morris2012-02-08 22:29:41 -0500
commit3f88cd72e9cf0ef3ccde2c0508ec4d9f468d0bca (patch)
tree3f658e885a22a0e82af892b63e999c13dbbbdd39
parentd95b247d1d8fbfae4c739f6a1f47069b7807964c (diff)
downloademacs-3f88cd72e9cf0ef3ccde2c0508ec4d9f468d0bca.tar.gz
emacs-3f88cd72e9cf0ef3ccde2c0508ec4d9f468d0bca.zip
Doc fixes for emacsbug.el
* lisp/mail/emacsbug.el (report-emacs-bug-can-use-osx-open) (report-emacs-bug-can-use-xdg-email): (report-emacs-bug-insert-to-mailer): Doc fixes. (report-emacs-bug): Message fix. * etc/NEWS: Related edit. * lisp/net/browse-url.el: Comment.
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/mail/emacsbug.el16
-rw-r--r--lisp/net/browse-url.el1
4 files changed, 23 insertions, 5 deletions
diff --git a/etc/NEWS b/etc/NEWS
index d6fe38ee446..a60d7c43a95 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -174,6 +174,10 @@ in your ~/.authinfo file instead.
174**** The command `mail-attach-file' was renamed to `mail-insert-file'. 174**** The command `mail-attach-file' was renamed to `mail-insert-file'.
175The old name is now an obsolete alias to the new name. 175The old name is now an obsolete alias to the new name.
176 176
177*** The M-x report-emacs-bug command can optionally pass the text of
178your bug report to your desktop's preferred mail client. This
179uses either the "xdg-email" utility, or OS X's "open" command.
180
177** Emacs server and client changes 181** Emacs server and client changes
178+++ 182+++
179*** New option `server-port' specifies the port on which the Emacs 183*** New option `server-port' specifies the port on which the Emacs
@@ -927,8 +931,6 @@ They are superseded by shift-select-mode, enabled by default since 23.1.
927 931
928** Miscellaneous 932** Miscellaneous
929 933
930*** FIXME: xdg-open for reportbug, 2010/08.
931
932+++ 934+++
933*** The Landmark game is now invoked with `landmark', not `lm'. 935*** The Landmark game is now invoked with `landmark', not `lm'.
934 936
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 891b164a55a..9ee16e10162 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
12012-02-09 Glenn Morris <rgm@gnu.org> 12012-02-09 Glenn Morris <rgm@gnu.org>
2 2
3 * mail/emacsbug.el (report-emacs-bug-can-use-osx-open)
4 (report-emacs-bug-can-use-xdg-email):
5 (report-emacs-bug-insert-to-mailer): Doc fixes.
6 (report-emacs-bug): Message fix.
7
3 * net/browse-url.el (browse-url-can-use-xdg-open) 8 * net/browse-url.el (browse-url-can-use-xdg-open)
4 (browse-url-xdg-open): Doc fixes. 9 (browse-url-xdg-open): Doc fixes.
5 10
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 29ce1881f5d..20b436172ba 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -78,13 +78,16 @@ Used for querying duplicates and linking to existing bugs.")
78(defvar message-strip-special-text-properties) 78(defvar message-strip-special-text-properties)
79 79
80(defun report-emacs-bug-can-use-osx-open () 80(defun report-emacs-bug-can-use-osx-open ()
81 "Check if OSX open can be used to insert bug report into mailer" 81 "Return non-nil if the OS X \"open\" command is available for mailing."
82 (and (featurep 'ns) 82 (and (featurep 'ns)
83 (equal (executable-find "open") "/usr/bin/open") 83 (equal (executable-find "open") "/usr/bin/open")
84 (memq system-type '(darwin)))) 84 (memq system-type '(darwin))))
85 85
86;; FIXME this duplicates much of the logic from browse-url-can-use-xdg-open.
86(defun report-emacs-bug-can-use-xdg-email () 87(defun report-emacs-bug-can-use-xdg-email ()
87 "Check if xdg-email can be used, i.e. we are on Gnome, KDE or xfce4." 88 "Return non-nil if the \"xdg-email\" command can be used.
89xdg-email is a desktop utility that calls your preferred mail client.
90This requires you to be running either Gnome, KDE, or Xfce4."
88 (and (getenv "DISPLAY") 91 (and (getenv "DISPLAY")
89 (executable-find "xdg-email") 92 (executable-find "xdg-email")
90 (or (getenv "GNOME_DESKTOP_SESSION_ID") 93 (or (getenv "GNOME_DESKTOP_SESSION_ID")
@@ -98,16 +101,23 @@ Used for querying duplicates and linking to existing bugs.")
98 "org.gnome.SessionManager.CanShutdown")) 101 "org.gnome.SessionManager.CanShutdown"))
99 (error nil)) 102 (error nil))
100 (equal (getenv "KDE_FULL_SESSION") "true") 103 (equal (getenv "KDE_FULL_SESSION") "true")
104 ;; FIXME? browse-url-can-use-xdg-open also accepts LXDE.
105 ;; Is that no good here, or just overlooked?
101 (condition-case nil 106 (condition-case nil
102 (eq 0 (call-process 107 (eq 0 (call-process
103 "/bin/sh" nil nil nil 108 "/bin/sh" nil nil nil
104 "-c" 109 "-c"
110 ;; FIXME use string-match rather than grep.
105 "xprop -root _DT_SAVE_MODE|grep xfce4")) 111 "xprop -root _DT_SAVE_MODE|grep xfce4"))
106 (error nil))))) 112 (error nil)))))
107 113
108(defun report-emacs-bug-insert-to-mailer () 114(defun report-emacs-bug-insert-to-mailer ()
115 "Send the message to your preferred mail client.
116This requires either the OS X \"open\" command, or the freedesktop
117\"xdg-email\" command to be available."
109 (interactive) 118 (interactive)
110 (save-excursion 119 (save-excursion
120 ;; FIXME? use mail-fetch-field?
111 (let* ((to (progn 121 (let* ((to (progn
112 (goto-char (point-min)) 122 (goto-char (point-min))
113 (forward-line) 123 (forward-line)
@@ -319,7 +329,7 @@ usually do not have translators for other languages.\n\n")))
319 " Type \\[kill-buffer] RET to cancel (don't send it).\n")) 329 " Type \\[kill-buffer] RET to cancel (don't send it).\n"))
320 (if can-insert-mail 330 (if can-insert-mail
321 (princ (substitute-command-keys 331 (princ (substitute-command-keys
322 " Type \\[report-emacs-bug-insert-to-mailer] to insert text to you preferred mail program.\n"))) 332 " Type \\[report-emacs-bug-insert-to-mailer] to copy text to your preferred mail program.\n")))
323 (terpri) 333 (terpri)
324 (princ (substitute-command-keys 334 (princ (substitute-command-keys
325 " Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section 335 " Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 99f3c53f025..50423208e34 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -969,6 +969,7 @@ This requires you to be running either Gnome, KDE, Xfce4 or LXDE."
969 (eq 0 (call-process 969 (eq 0 (call-process
970 "/bin/sh" nil nil nil 970 "/bin/sh" nil nil nil
971 "-c" 971 "-c"
972 ;; FIXME use string-match rather than grep.
972 "xprop -root _DT_SAVE_MODE|grep xfce4")) 973 "xprop -root _DT_SAVE_MODE|grep xfce4"))
973 (error nil)) 974 (error nil))
974 (member (getenv "DESKTOP_SESSION") '("LXDE" "Lubuntu")) 975 (member (getenv "DESKTOP_SESSION") '("LXDE" "Lubuntu"))