[elpa] externals/osc 257e602: Fix blob encoding

2021-04-03 Thread Mario Lang
branch: externals/osc
commit 257e602e2d7f0c90662822f5eada2e99285de00d
Author: Mario Lang 
Commit: Mario Lang 

Fix blob encoding
---
 osc.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/osc.el b/osc.el
index e54b99a..3c4ef6e 100644
--- a/osc.el
+++ b/osc.el
@@ -54,7 +54,7 @@
 (defun osc-blob (vector)
   (let ((length (length vector)))
 (concat (osc-int32 length)
-   vector
+   (apply #'unibyte-string (append vector nil))
(make-string (% (- 4 (% length 4)) 4) 0
 
 (defun osc-float32 (value)



[elpa] branch externals/aggressive-completion created (now 4a6065a)

2021-04-03 Thread Tassilo Horn
tsdh pushed a change to branch externals/aggressive-completion.

at  4a6065a   Add new package aggressive-completion.el

This branch includes the following new commits:

   new  4a6065a   Add new package aggressive-completion.el




[elpa] externals/aggressive-completion 4a6065a: Add new package aggressive-completion.el

2021-04-03 Thread Tassilo Horn
branch: externals/aggressive-completion
commit 4a6065a29b190b43894112a0bac0f08af2bb2f32
Author: Tassilo Horn 
Commit: Tassilo Horn 

Add new package aggressive-completion.el
---
 aggressive-completion.el | 181 +++
 1 file changed, 181 insertions(+)

diff --git a/aggressive-completion.el b/aggressive-completion.el
new file mode 100644
index 000..d0f593a
--- /dev/null
+++ b/aggressive-completion.el
@@ -0,0 +1,181 @@
+;;; aggressive-completion.el --- Automatic minibuffer completion -*- 
lexical-binding: t -*-
+
+;; Copyright (C) 2021 Free Software Foundation, Inc.
+
+;; Author: Tassilo Horn 
+;; Maintainer: Tassilo Horn 
+;; Keywords: minibuffer completion
+;; Package-Requires: ((emacs "27.1"))
+;; Version: 1.0
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see .
+
+;;; Commentary:
+;;
+;; Aggressive completion mode (`aggressive-completion-mode') is a minor mode
+;; which automatically completes for you after a short delay
+;; (`aggressive-completion-delay') and always shows all possible completions
+;; using the standard completion help (unless the number of possible
+;; completions exceeds `aggressive-completion-max-shown-completions').
+;;
+;; Automatic completion is temporarily disabled after all commands in
+;; `aggressive-completion-no-complete-commands'.  Basically all deletion/kill
+;; commands are listed here in order not to complete back to the thing you just
+;; deleted.
+;;
+;; Aggressive completion can be toggled using
+;; `aggressive-completion-toggle-auto-complete' (bound to `M-t' by default)
+;; which is especially useful when trying to find a not yet existing file or
+;; switch to a new buffer.
+;;
+;; You can switch from minibuffer to *Completions* buffer and back again using
+;; `aggressive-completion-switch-to-completions' (bound to `M-c' by default).
+;; All keys bound to this command in `aggressive-completion-minibuffer-map'
+;; will be bound to `other-window' in `completion-list-mode-map' so that those
+;; keys act as switch-back-and-forth commands.
+
+;;; Code:
+
+(eval-when-compile
+  ;; For `when-let'.
+  (require 'subr-x))
+
+(defgroup aggressive-completion nil
+  "Aggressive completion completes for you."
+  :group 'completion)
+
+(defcustom aggressive-completion-delay 0.3
+  "Delay in seconds before aggressive completion kicks in."
+  :type 'number)
+
+(defcustom aggressive-completion-auto-complete t
+  "Complete automatically if non-nil.
+If nil, only show the completion help."
+  :type 'boolean)
+
+(defcustom aggressive-completion-max-shown-completions 1000
+  "Maximum number of possible completions for showing completion help."
+  :type 'integer)
+
+(defcustom aggressive-completion-no-complete-commands
+  '( left-char icomplete-fido-backward-updir minibuffer-complete
+ right-char delete-backward-char backward-kill-word
+ backward-kill-paragraph backward-kill-sentence backward-kill-sexp
+ delete-char kill-word kill-line completion-at-point)
+  "Commands after which automatic completion is not performed."
+  :type '(repeat command))
+
+(defvar aggressive-completion--timer nil)
+
+(defun aggressive-completion--do ()
+  "Perform aggressive completion."
+  (when (window-minibuffer-p)
+(let* ((completions (completion-all-sorted-completions))
+   ;; Don't ding if there are no completions, etc.
+   (visible-bell nil)
+   (ring-bell-function #'ignore)
+   ;; Automatic completion should not cycle.
+   (completion-cycle-threshold nil)
+   (completion-cycling nil))
+  (let ((i 0))
+(while (and (<= i aggressive-completion-max-shown-completions)
+(consp completions))
+  (setq completions (cdr completions))
+  (cl-incf i))
+(if (and (> i 0)
+ (< i aggressive-completion-max-shown-completions))
+(if (or (null aggressive-completion-auto-complete)
+(memq last-command
+  aggressive-completion-no-complete-commands))
+;; This ensures we still can repeatedly hit TAB to scroll
+;; through the list of completions.
+(unless (and (= last-command-event ?\t)
+ (window-live-p
+  (get-buffer-window "*Completions*"))
+ 

[elpa] main 1b3d256: Add aggressive-completion to elpa-packages

2021-04-03 Thread Tassilo Horn
branch: main
commit 1b3d2566e3052907e9f4936eb6e6de50bd2e819c
Author: Tassilo Horn 
Commit: Tassilo Horn 

Add aggressive-completion to elpa-packages
---
 elpa-packages | 1 +
 1 file changed, 1 insertion(+)

diff --git a/elpa-packages b/elpa-packages
index 06e06f5..07e8b17 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -38,6 +38,7 @@
  ("adaptive-wrap"  :url nil)
  ("adjust-parens"  :url nil)
  ("advice-patch"   :url nil)
+ ("aggressive-completion" :url nil)
  ("aggressive-indent"  :url 
"https://github.com/Malabarba/aggressive-indent-mode";)
  ("ahungry-theme"  :url "https://github.com/ahungry/color-theme-ahungry";)
  ("all":url nil)



[elpa] externals/aggressive-completion f28ade4: More appropriate parent group & some more no-complete commands

2021-04-03 Thread Tassilo Horn
branch: externals/aggressive-completion
commit f28ade4c1f864677b6146a89b86dad1c962c84cf
Author: Tassilo Horn 
Commit: Tassilo Horn 

More appropriate parent group & some more no-complete commands

Use minibuffer as parent group rather than (dynamic) completion.
---
 aggressive-completion.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/aggressive-completion.el b/aggressive-completion.el
index d0f593a..bc5445c 100644
--- a/aggressive-completion.el
+++ b/aggressive-completion.el
@@ -55,7 +55,7 @@
 
 (defgroup aggressive-completion nil
   "Aggressive completion completes for you."
-  :group 'completion)
+  :group 'minibuffer)
 
 (defcustom aggressive-completion-delay 0.3
   "Delay in seconds before aggressive completion kicks in."
@@ -74,7 +74,8 @@ If nil, only show the completion help."
   '( left-char icomplete-fido-backward-updir minibuffer-complete
  right-char delete-backward-char backward-kill-word
  backward-kill-paragraph backward-kill-sentence backward-kill-sexp
- delete-char kill-word kill-line completion-at-point)
+ delete-char kill-word kill-line completion-at-point
+ move-beginning-of-line left-word)
   "Commands after which automatic completion is not performed."
   :type '(repeat command))
 



[elpa] main b45671d: Talk about elpa's main branch, not master

2021-04-03 Thread Tassilo Horn
branch: main
commit b45671d5acece9003313c1005c3796dd57dd01da
Author: Tassilo Horn 
Commit: Tassilo Horn 

Talk about elpa's main branch, not master
---
 README | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/README b/README
index 9e77d6c..fdf1027 100644
--- a/README
+++ b/README
@@ -214,11 +214,11 @@ correctly in the commit.
 ** External branches
 
 A copy of the code of every package is kept in the =elpa.git= repository
-(not in the =master= branch) and if applicable should be sync'd with the
+(not in the =main= branch) and if applicable should be sync'd with the
 upstream every once in a while.  This copy may include local changes,
 although these should be kept to a minimum.
 
-The copy of the code is not kept in =master= but in the
+The copy of the code is not kept in =main= but in the
 =externals/= branch in the =elpa.git= repository.
 [ Note: The name "externals/" is the result of an accident of history.  ]
 
@@ -247,7 +247,7 @@ Then edit the =elpa-packages= file as mentioned above, add 
the line
("realgud-ipdb" :url "https://github.com/realgud/realgud-ipdb";)
 #+end_src
 
-and push that change to the master branch of =elpa=.  After it's added to
+and push that change to the =main= branch of =elpa=.  After it's added to
 the =elpa-packages= file, the package can be maintained just by
 pushing changes to the =externals/= branch.
 



[elpa] externals/aggressive-completion 9f630e4: Add autoload for mode fn, fix compiler warning, release 1.1

2021-04-03 Thread Tassilo Horn
branch: externals/aggressive-completion
commit 9f630e4b0c46479a2b3f884a312dff9bd3e5a803
Author: Tassilo Horn 
Commit: Tassilo Horn 

Add autoload for mode fn, fix compiler warning, release 1.1
---
 aggressive-completion.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/aggressive-completion.el b/aggressive-completion.el
index bc5445c..cf149ba 100644
--- a/aggressive-completion.el
+++ b/aggressive-completion.el
@@ -6,7 +6,7 @@
 ;; Maintainer: Tassilo Horn 
 ;; Keywords: minibuffer completion
 ;; Package-Requires: ((emacs "27.1"))
-;; Version: 1.0
+;; Version: 1.1
 
 ;; This file is part of GNU Emacs.
 
@@ -142,6 +142,8 @@ If nil, only show the completion help."
 (defalias 'aggressive-completion-switch-to-completions
   #'switch-to-completions)
 
+(declare-function icomplete-fido-backward-updir "icomplete" nil)
+
 (defvar aggressive-completion-minibuffer-map
   (let ((map (make-sparse-keymap)))
 (require 'icomplete)
@@ -169,6 +171,7 @@ If nil, only show the completion help."
 (add-hook 'post-command-hook
   #'aggressive-completion--timer-restart nil t)))
 
+;;;###autoload
 (define-minor-mode aggressive-completion-mode
   "Perform aggressive minibuffer completion."
   :lighter " ACmp"



[elpa] externals/visual-filename-abbrev 9c5289b: Docs, fix byte-compile warnings, release 1.1

2021-04-03 Thread Tassilo Horn
branch: externals/visual-filename-abbrev
commit 9c5289b07fc25e9f2fc8dd7f4e739e5a3b21f0de
Author: Tassilo Horn 
Commit: Tassilo Horn 

Docs, fix byte-compile warnings, release 1.1
---
 visual-filename-abbrev.el | 23 ---
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/visual-filename-abbrev.el b/visual-filename-abbrev.el
index fce19f0..6a34f8e 100644
--- a/visual-filename-abbrev.el
+++ b/visual-filename-abbrev.el
@@ -1,12 +1,12 @@
 ;;; visual-filename-abbrev.el --- Visually abbreviate filenames  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2019-2020 Free Software Foundation, Inc
+;; Copyright (C) 2019-2021 Free Software Foundation, Inc
 
 ;; Author: Tassilo Horn 
 ;; Maintainer: Tassilo Horn 
 ;; Keywords: tools
 ;; Package-Requires: ((emacs "26.1"))
-;; Version: 1.0
+;; Version: 1.1
 
 ;; This file is part of GNU Emacs.
 
@@ -78,6 +78,9 @@ matching `visual-filename-abbrev-regex' will be replaced by
   :type 'boolean)
 
 (defun visual-filename-abbrev--get-abbrev (filename)
+  "Return an abbreviated name for FILENAME.
+Replaces matches of `visual-filename-abbrev-replace-regex' with
+`visual-filename-abbrev-ellipsis'."
   (let ((file (file-name-nondirectory filename))
(dir (file-name-directory filename)))
 (concat
@@ -88,6 +91,7 @@ matching `visual-filename-abbrev-regex' will be replaced by
  file)))
 
 (defsubst visual-filename-abbrev--get-overlay (pos)
+  "Get the `visual-filename-abbrev' overlay at POS."
   (car (seq-filter
(lambda (o) (overlay-get o 'visual-filename-abbrev))
(overlays-at pos
@@ -99,13 +103,14 @@ Shorter means less characters here."
  (string-width filename)))
 
 (defsubst visual-filename-abbrev--get-visual-width (str font)
+  "Get the pixel width of STR with FONT."
   (seq-reduce (lambda (acc g) (+ acc (aref g 4)))
  (font-get-glyphs font 0 (length str) str)
  0))
 
 (defun visual-filename-abbrev--abbrev-visually-shorter-p (_buffer pos filename 
abbrev)
   "Return non-nil if ABBREV's display representation is shorter than FILENAME.
-This takes the font into account."
+This takes the font at POS into account."
   ;; When activated from a hook, this function may run before the current
   ;; buffer is shown in a window.  In that case, `font-at' would error with
   ;; "Specified window is not displaying the current buffer".
@@ -160,9 +165,10 @@ These predicates are available:
   (when-let ((ol (if (eq dir 'entered)
 (visual-filename-abbrev--get-overlay (point))
   (or (visual-filename-abbrev--get-overlay old-pos)
-  (visual-filename-abbrev--get-overlay (if (> (point) 
old-pos)
-   (1- old-pos)
- (1+ old-pos)))
+  (visual-filename-abbrev--get-overlay
+(if (> (point) old-pos)
+   (1- old-pos)
+ (1+ old-pos)))
 (if (eq dir 'entered)
(when-let ((d (overlay-get ol 'display)))
  (overlay-put ol 'visual-filename-abbrev--display-backup d)
@@ -201,7 +207,10 @@ These predicates are available:
 (defvar visual-filename-abbrev--csm-before-activation nil)
 (make-variable-buffer-local 'visual-filename-abbrev--csm-before-activation)
 
-;;###autoload
+(defvar cursor-sensor-mode)
+(declare-function cursor-sensor-mode "cursor-sensor")
+
+;;;###autoload
 (define-minor-mode visual-filename-abbrev-mode
   "Visually abbreviate the directory part of filenames."
   nil " VFAbbr" nil



[elpa] externals/aggressive-completion 68d7b2b: Change blacklist to whitelist approach for auto-completion

2021-04-03 Thread Tassilo Horn
branch: externals/aggressive-completion
commit 68d7b2b367ecc90743328a8795267856fb638b99
Author: Tassilo Horn 
Commit: Tassilo Horn 

Change blacklist to whitelist approach for auto-completion

aggressive-completion-no-complete-commands
  -> aggressive-completion-auto-complete-commands
---
 aggressive-completion.el | 45 +
 1 file changed, 21 insertions(+), 24 deletions(-)

diff --git a/aggressive-completion.el b/aggressive-completion.el
index cf149ba..bf1fe69 100644
--- a/aggressive-completion.el
+++ b/aggressive-completion.el
@@ -31,10 +31,8 @@
 ;; using the standard completion help (unless the number of possible
 ;; completions exceeds `aggressive-completion-max-shown-completions').
 ;;
-;; Automatic completion is temporarily disabled after all commands in
-;; `aggressive-completion-no-complete-commands'.  Basically all deletion/kill
-;; commands are listed here in order not to complete back to the thing you just
-;; deleted.
+;; Automatic completion is done after all commands in
+;; `aggressive-completion-auto-complete-commands'.
 ;;
 ;; Aggressive completion can be toggled using
 ;; `aggressive-completion-toggle-auto-complete' (bound to `M-t' by default)
@@ -70,13 +68,9 @@ If nil, only show the completion help."
   "Maximum number of possible completions for showing completion help."
   :type 'integer)
 
-(defcustom aggressive-completion-no-complete-commands
-  '( left-char icomplete-fido-backward-updir minibuffer-complete
- right-char delete-backward-char backward-kill-word
- backward-kill-paragraph backward-kill-sentence backward-kill-sexp
- delete-char kill-word kill-line completion-at-point
- move-beginning-of-line left-word)
-  "Commands after which automatic completion is not performed."
+(defcustom aggressive-completion-auto-complete-commands
+  '( self-insert-command yank)
+  "Commands after which automatic completion is performed."
   :type '(repeat command))
 
 (defvar aggressive-completion--timer nil)
@@ -98,19 +92,22 @@ If nil, only show the completion help."
   (cl-incf i))
 (if (and (> i 0)
  (< i aggressive-completion-max-shown-completions))
-(if (or (null aggressive-completion-auto-complete)
-(memq last-command
-  aggressive-completion-no-complete-commands))
-;; This ensures we still can repeatedly hit TAB to scroll
-;; through the list of completions.
-(unless (and (= last-command-event ?\t)
- (window-live-p
-  (get-buffer-window "*Completions*"))
- (with-current-buffer "*Completions*"
-   (> (point) (point-min
-  (minibuffer-completion-help))
-  (minibuffer-complete)
-  (unless (window-live-p (get-buffer-window "*Completions*"))
+(if (and aggressive-completion-auto-complete
+ (memq last-command
+   aggressive-completion-auto-complete-commands))
+;; Perform automatic completion.
+(progn
+  (minibuffer-complete)
+  (unless (window-live-p (get-buffer-window "*Completions*"))
+(minibuffer-completion-help)))
+  ;; Only show the completion help.  This slightly awkward
+  ;; condition ensures we still can repeatedly hit TAB to scroll
+  ;; through the list of completions.
+  (unless (and (= last-command-event ?\t)
+   (window-live-p
+(get-buffer-window "*Completions*"))
+   (with-current-buffer "*Completions*"
+ (> (point) (point-min
 (minibuffer-completion-help)))
   ;; Close the *Completions* buffer if there are too many
   ;; or zero completions.



[elpa] externals/aggressive-completion 3b275da: Add .gitignore

2021-04-03 Thread Tassilo Horn
branch: externals/aggressive-completion
commit 3b275da565dacbb0c9aee873e225b858a33dab45
Author: Tassilo Horn 
Commit: Tassilo Horn 

Add .gitignore
---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..557ae34
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/aggressive-completion-pkg.el
+/aggressive-completion-autoloads.el
+*.elc



[elpa] externals/org c881b60: Merge branch 'maint'

2021-04-03 Thread ELPA Syncer
branch: externals/org
commit c881b60593b3beeed7b8c7a2bada64157cd9940a
Merge: 635920c bcfe6f9
Author: Nicolas Goaziou 
Commit: Nicolas Goaziou 

Merge branch 'maint'
---
 lisp/ox-latex.el | 41 -
 1 file changed, 24 insertions(+), 17 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index da3c3f8..f492ebb 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1521,22 +1521,23 @@ INFO is a plist used as a communication channel.  See
 separator
 (replace-regexp-in-string "\n" " " text)
 separator)))
-  ;; Handle the `protectedtexttt' special case: Protect some
-  ;; special chars and use "\texttt{%s}" format string.
-  (protectedtexttt
-   (format "\\texttt{%s}"
-  (replace-regexp-in-string
-   "--\\|[\\{}$%&_#~^]"
-   (lambda (m)
- (cond ((equal m "--") "-{}-")
-   ((equal m "\\") "\\textbackslash{}")
-   ((equal m "~") "\\textasciitilde{}")
-   ((equal m "^") "\\textasciicircum{}")
-   (t (org-latex--protect-text m
-   text nil t)))
+  (protectedtexttt (org-latex--protect-texttt text))
   ;; Else use format string.
   (t (format fmt text)
 
+(defun org-latex--protect-texttt (text)
+  "Protect special chars, then wrap TEXT in \"\\texttt{}\"."
+  (format "\\texttt{%s}"
+  (replace-regexp-in-string
+   "--\\|[\\{}$%&_#~^]"
+   (lambda (m)
+ (cond ((equal m "--") "-{}-")
+   ((equal m "\\") "\\textbackslash{}")
+   ((equal m "~") "\\textasciitilde{}")
+   ((equal m "^") "\\textasciicircum{}")
+   (t (org-latex--protect-text m
+   text nil t)))
+
 (defun org-latex--delayed-footnotes-definitions (element info)
   "Return footnotes definitions in ELEMENT as a string.
 
@@ -1954,10 +1955,16 @@ holding contextual information."
   ;; Create a temporary export back-end that hard-codes
   ;; "\underline" within "\section" and alike.
   (section-back-end
-   (org-export-create-backend
-:parent 'latex
-:transcoders
-'((underline . (lambda (o c i) (format "\\underline{%s}" c))
+(org-export-create-backend
+ :parent 'latex
+ :transcoders
+ '((underline . (lambda (o c i) (format "\\underline{%s}" c)))
+   ;; LaTeX isn't happy when you try to use \verb inside the 
argument of other
+   ;; commands (like \section, etc.), and this causes compilation 
to fail.
+   ;; So, within headings it's a good idea to replace any 
instances of \verb
+   ;; with \texttt.
+   (code . (lambda (_ c _) (org-latex--protect-texttt c)))
+   (verbatim . (lambda (_ c _) (org-latex--protect-texttt c))
   (text
(org-export-data-with-backend
 (org-element-property :title headline) section-back-end info))



[elpa] externals/org updated (635920c -> c881b60)

2021-04-03 Thread ELPA Syncer
elpasync pushed a change to branch externals/org.

  from  635920c   Merge branch 'maint'
   new  bcfe6f9   ox-latex: convert verbatim text in headings to texttt
   new  c881b60   Merge branch 'maint'


Summary of changes:
 lisp/ox-latex.el | 41 -
 1 file changed, 24 insertions(+), 17 deletions(-)



[elpa] externals-release/org bcfe6f9: ox-latex: convert verbatim text in headings to texttt

2021-04-03 Thread ELPA Syncer
branch: externals-release/org
commit bcfe6f985cc791e90638d3adac8cfa81291375ae
Author: TEC 
Commit: Nicolas Goaziou 

ox-latex: convert verbatim text in headings to texttt

* lisp/ox-latex.el (org-latex--protect-texttt): New function.
(org-latex--text-markup): Use new function.
(org-latex-headline): Convert any instances of \verb text with
\texttt.  This is required to work around LaTeX peculiarities that
would otherwise cause compilation to fail (see the code comment for
more information).
---
 lisp/ox-latex.el | 41 -
 1 file changed, 24 insertions(+), 17 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 29663b3..932f385 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1521,22 +1521,23 @@ INFO is a plist used as a communication channel.  See
 separator
 (replace-regexp-in-string "\n" " " text)
 separator)))
-  ;; Handle the `protectedtexttt' special case: Protect some
-  ;; special chars and use "\texttt{%s}" format string.
-  (protectedtexttt
-   (format "\\texttt{%s}"
-  (replace-regexp-in-string
-   "--\\|[\\{}$%&_#~^]"
-   (lambda (m)
- (cond ((equal m "--") "-{}-")
-   ((equal m "\\") "\\textbackslash{}")
-   ((equal m "~") "\\textasciitilde{}")
-   ((equal m "^") "\\textasciicircum{}")
-   (t (org-latex--protect-text m
-   text nil t)))
+  (protectedtexttt (org-latex--protect-texttt text))
   ;; Else use format string.
   (t (format fmt text)
 
+(defun org-latex--protect-texttt (text)
+  "Protect special chars, then wrap TEXT in \"\\texttt{}\"."
+  (format "\\texttt{%s}"
+  (replace-regexp-in-string
+   "--\\|[\\{}$%&_#~^]"
+   (lambda (m)
+ (cond ((equal m "--") "-{}-")
+   ((equal m "\\") "\\textbackslash{}")
+   ((equal m "~") "\\textasciitilde{}")
+   ((equal m "^") "\\textasciicircum{}")
+   (t (org-latex--protect-text m
+   text nil t)))
+
 (defun org-latex--delayed-footnotes-definitions (element info)
   "Return footnotes definitions in ELEMENT as a string.
 
@@ -1952,10 +1953,16 @@ holding contextual information."
   ;; Create a temporary export back-end that hard-codes
   ;; "\underline" within "\section" and alike.
   (section-back-end
-   (org-export-create-backend
-:parent 'latex
-:transcoders
-'((underline . (lambda (o c i) (format "\\underline{%s}" c))
+(org-export-create-backend
+ :parent 'latex
+ :transcoders
+ '((underline . (lambda (o c i) (format "\\underline{%s}" c)))
+   ;; LaTeX isn't happy when you try to use \verb inside the 
argument of other
+   ;; commands (like \section, etc.), and this causes compilation 
to fail.
+   ;; So, within headings it's a good idea to replace any 
instances of \verb
+   ;; with \texttt.
+   (code . (lambda (_ c _) (org-latex--protect-texttt c)))
+   (verbatim . (lambda (_ c _) (org-latex--protect-texttt c))
   (text
(org-export-data-with-backend
 (org-element-property :title headline) section-back-end info))



[elpa] externals/excorporate updated (10c1e95 -> f59702d)

2021-04-03 Thread Thomas Fitzsimmons
fitzsim pushed a change to branch externals/excorporate.

  from  10c1e95   Fix checkdoc typo
   new  3343810   Implement time zone conversion function
   new  f59702d   Specify time zone during item creation


Summary of changes:
 excorporate-time-zones.el | 866 ++
 excorporate.el|  15 +
 excorporate.texi  |   5 +-
 3 files changed, 885 insertions(+), 1 deletion(-)
 create mode 100644 excorporate-time-zones.el



[elpa] externals/excorporate f59702d 2/2: Specify time zone during item creation

2021-04-03 Thread Thomas Fitzsimmons
branch: externals/excorporate
commit f59702d98db1a793bbba74691aeb07e4af660d2d
Author: Thomas Fitzsimmons 
Commit: Thomas Fitzsimmons 

Specify time zone during item creation

* excorporate.el (excorporate-time-zone): Require
excorporate-time-zone.
(excorporate-time-zone): New defcustom.
(exco-calendar-item-meeting-create)
(exco-calendar-item-appointment-create): Specify start time zone.
* excorporate.texi (API Usage): Mention exco-time-zone.
---
 excorporate.el   | 15 +++
 excorporate.texi |  5 -
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/excorporate.el b/excorporate.el
index a1a3320..49ace9c 100644
--- a/excorporate.el
+++ b/excorporate.el
@@ -122,6 +122,7 @@
 (require 'fsm)
 (require 'excorporate-calendar)
 (require 'org)
+(require 'excorporate-time-zone)
 
 (defgroup excorporate nil
   "Exchange support."
@@ -143,6 +144,18 @@ interactive functions, `excorporate-diary-disable' and
 `excorporate-diary-enable'."
   :type 'boolean)
 
+(defcustom excorporate-time-zone nil
+  "The server-style time zone.
+If this variable is nil, Excorporate will compute a time zone
+automatically based on `current-time-zone'.  If that doesn't
+work, or you want to specify the time zone directly, run
+`excorporate-customize-time-zone' to customize this variable from
+a list of valid values."
+  :type '(choice :menu-tag "Server-style time zone"
+:tag "Server-style time zone"
+(const :tag "Compute from Emacs time zone" nil)
+string))
+
 ;; For Office 365, URLs containing autodiscover-s.outlook.com do not
 ;; seem to work properly (the returned XML gives ErrorCode 600).
 (defconst exco--autodiscovery-templates
@@ -753,6 +766,7 @@ creation."
(CalendarItem
(Subject . ,subject)
(Body (BodyType . "Text") ,body)
+   (StartTimeZone (Id . ,(exco-time-zone)))
 (Start . ,(exco-format-date-time start))
 (End . ,(exco-format-date-time end))
 (Location . ,location)
@@ -831,6 +845,7 @@ appointment creation."
(CalendarItem
  (Subject . ,subject)
 (Body (BodyType . "Text") ,body)
+(StartTimeZone (Id . ,(exco-time-zone)))
  (Start . ,(exco-format-date-time start))
  (End . ,(exco-format-date-time end)
  nil nil nil nil)
diff --git a/excorporate.texi b/excorporate.texi
index c9e943e..3390c19 100644
--- a/excorporate.texi
+++ b/excorporate.texi
@@ -435,7 +435,9 @@ the asynchronous calls to avoid blocking Emacs during 
server operations.
 @noindent
 Here is a more complicated example that asynchronously queries the
 server for availability overlap for hacker1@@gnu.org and
-hacker2@@gnu.org, in the Eastern Time time zone.
+hacker2@@gnu.org, in the America/Toronto time zone.  Call
+@code{exco-time-zone} to calculate, from Emacs's internal time zone (see
+@code{current-time-zone}), the equivalent server time zone string.
 
 @example
 @group
@@ -469,6 +471,7 @@ hacker2@@gnu.org, in the Eastern Time time zone.
   (ExcludeConflicts . nil)))
 (FreeBusyViewOptions
  (TimeWindow
+  (StartTimeZone (Id . "Eastern Standard Time"))
   (StartTime . "2020-09-25T00:00:00Z")
   (EndTime . "2020-09-25T23:59:00Z"))
  (MergedFreeBusyIntervalInMinutes . 60)



[elpa] externals/excorporate 3343810 1/2: Implement time zone conversion function

2021-04-03 Thread Thomas Fitzsimmons
branch: externals/excorporate
commit 33438100688ee58db2a0350950338e309dbd3df1
Author: Thomas Fitzsimmons 
Commit: Thomas Fitzsimmons 

Implement time zone conversion function

* excorporate-time-zones.el: New file.
---
 excorporate-time-zones.el | 866 ++
 1 file changed, 866 insertions(+)

diff --git a/excorporate-time-zones.el b/excorporate-time-zones.el
new file mode 100644
index 000..0a2cd80
--- /dev/null
+++ b/excorporate-time-zones.el
@@ -0,0 +1,866 @@
+;;; excorporate-time-zones.el --- time zone conversion *- lexical-binding: t 
-*-
+
+;; Copyright (C) 2021 Free Software Foundation, Inc.
+
+;; Author: Thomas Fitzsimmons 
+;; Keywords: calendar
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see .
+
+;;; Commentary:
+
+;; Hash tables and functions that map (current-time-zone) values to
+;; time zone names recognized by Exchange servers.
+
+;; For example:
+;; (current-time-zone) => (-14400 "EDT")
+;; (exco-time-zone)=> "Eastern Standard Time"
+
+;;; Code:
+
+;; Generated with:
+
+;;(insert
+;; (concat "(defvar exco--time-zone-olson-to-server "
+;;  (with-current-buffer
+;;  (url-retrieve-synchronously
+;;   (concat "https://raw.githubusercontent.com/unicode-org/cldr/";
+;;   "master/common/supplemental/windowsZones.xml"))
+;;(goto-char (point-min))
+;;(search-forward-regexp "^