diff --git a/NEWS.org b/NEWS.org index 9e9c1542..caec9db9 100644 --- a/NEWS.org +++ b/NEWS.org @@ -180,6 +180,10 @@ - iCalendar support is a work-in-progress with the new editor. One change is that support is now _automatically_ available. + - 1.12.12: add a =defcustom= ~mu4e-compose-jump-to-a-reasonable-place~ for + customizing whether mu4e jumps to some "reasonable place" when opening the + message composition buffer. Default is ~t~, as the current behavior. + **** other - New command ~mu4e-search-query~ (bound to =c=) which lets you pick a query diff --git a/mu4e/mu4e-draft.el b/mu4e/mu4e-draft.el index 57e0e6c5..ac333831 100644 --- a/mu4e/mu4e-draft.el +++ b/mu4e/mu4e-draft.el @@ -176,6 +176,16 @@ Also see `mu4e-context-policy'." :safe 'symbolp :group 'mu4e-compose) +(defcustom mu4e-compose-jump-to-a-reasonable-place t + "Put point at some reasonable place in the compose buffer? + +After the compose-buffer has been setup, mu4e can jump to some +reasonable place as per `mu4e--jump-to-a-reasonable-place'. If +you don't consider that reasonable, set to nil." + :type 'boolean + :safe 'booleanp + :group 'mu4e-compose) + ;; ;; display the ready-to-go display buffer in the desired way. ;; @@ -636,7 +646,8 @@ COMPOSE-TYPE and PARENT are as in `mu4e--draft'." (add-hook 'message-send-hook #'mu4e--compose-before-send nil t) (setq-local message-fcc-handler-function #'mu4e--fcc-handler) - (mu4e--jump-to-a-reasonable-place) + (when mu4e-compose-jump-to-a-reasonable-place + (mu4e--jump-to-a-reasonable-place)) (set-buffer-modified-p nil) (undo-boundary)) diff --git a/mu4e/mu4e.texi b/mu4e/mu4e.texi index 5ebbd1cf..7dd44ce3 100644 --- a/mu4e/mu4e.texi +++ b/mu4e/mu4e.texi @@ -1939,6 +1939,11 @@ Or to something context-specific: (save-excursion (message-add-header "Bcc: account2@@example.com\n")))))))) @end lisp +By default, @t{mu4e} moves point to some ``reasonable place'' before letting you +edit the message; if you want something else, see +@code{mu4e-compose-jump-to-reasonable-place}. + + @noindent For a more general discussion about extending @t{mu4e}, see @ref{Extending mu4e}.