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

[Emacspeak] Patch: don't speak the header line twice in an org-table



HI,
Here is a patch that fixes a minor annoyance I’ve had for a while.
The problem is that if you have emacspeak read the column header and field contents in your configuration, and you navigate on the header line, you’d hear each field contents twice. So you’d hear things like, “Quarter Quarter”, “Priority Priority”, etc.
This patch does a check to see if we’re on the first line of the table, and if so, just speaks the cell contents. I didn’t properties it because this line seems to be properties already from my testing:
1 file changed, 7 insertions(+), 5 deletions(-)
lisp/emacspeak-org.el | 12 +++++++-----

modified   lisp/emacspeak-org.el
@@ -607,11 +607,13 @@
 (defun emacspeak-org-table-speak-column-header-and-element ()
   "echoes col header and element"
   (interactive)
-  (dtk-speak-and-echo
-   (concat
-    (propertize (org-table-get  1 nil) 'face 'bold)
-    " "
-    (org-table-get-field))))
+  (if (eq (org-table-current-line) 1) ;; we're on the header line, so don't speak the header
+      (dtk-speak-and-echo (org-table-get-field))
+    (dtk-speak-and-echo
+     (concat
+      (propertize (org-table-get  1 nil) 'face 'bold)
+      " "
+      (org-table-get-field)))))
 
 (cl-loop
  for f in



|Full archive May 1995 - present by Year|Search the archive|


If you have questions about this archive or had problems using it, please contact us.

Contact Info Page