Parcourir la source

Change default value for `org-email-link-description-format'

* lisp/org.el (org-email-link-description-format): Change default
  value.  No longer truncate subject by default.  Add `:safe' keyword.
* doc/org-manual.org (Handling Links): Document change.

Reported-by: "Garreau, Alexandre" <galex-713@galex-713.eu>
<http://lists.gnu.org/r/emacs-orgmode/2018-10/msg00344.html>
Nicolas Goaziou il y a 7 ans
Parent
commit
363df82b19
3 fichiers modifiés avec 16 ajouts et 3 suppressions
  1. 1 1
      doc/org-manual.org
  2. 11 0
      etc/ORG-NEWS
  3. 4 2
      lisp/org.el

+ 1 - 1
doc/org-manual.org

@@ -3289,7 +3289,7 @@ current buffer:
      points to the current article, or, in some Gnus buffers, to the
      group.  The description is constructed according to the variable
      ~org-email-link-description-format~.  By default, it refers to
-     the addressee and the subject, possibly truncated.
+     the addressee and the subject.
 
 - /Web browsers: W3, W3M and EWW/ ::
 

+ 11 - 0
etc/ORG-NEWS

@@ -14,6 +14,17 @@ Please send Org bug reports to mailto:emacs-orgmode@gnu.org.
 
 ** Incompatible change
 
+*** Change default value for ~org-email-link-description-format~
+
+When linking from a mail buffer, Org used to truncate the subject of
+the message to 30 characters in order to build the description of the
+link.  This behavior was considered as too surprising.  As
+a consequence, Org no longer truncates subjects.
+
+You can get the old behaviour back with the following:
+
+: (setq org-email-link-description-format "Email %c: %.30s")
+
 *** ~:file~ header argument no longer assume "file" ~:results~
 
 The "file" ~:results~ value is now mandatory for a code block

+ 4 - 2
lisp/org.el

@@ -1867,7 +1867,7 @@ use."
   :version "24.3"
   :group 'org-link-store)
 
-(defcustom org-email-link-description-format "Email %c: %.30s"
+(defcustom org-email-link-description-format "Email %c: %s"
   "Format of the description part of a link to an email or usenet message.
 The following %-escapes will be replaced by corresponding information:
 
@@ -1886,7 +1886,9 @@ This is for example useful to limit the length of the subject.
 
 Examples: \"%f on: %.30s\", \"Email from %f\", \"Email %c\""
   :group 'org-link-store
-  :type 'string)
+  :package-version '(Org . 9.3)
+  :type 'string
+  :safe #'stringp)
 
 (defcustom org-from-is-user-regexp
   (let (r1 r2)