bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#27656: 26.0.50; Fix "Make mail-extract-address-components return the


From: OGAWA Hirofumi
Subject: bug#27656: 26.0.50; Fix "Make mail-extract-address-components return the user name more"
Date: Wed, 12 Jul 2017 04:12:04 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

In bug#22594 (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22594,
commit 8b50ae8b2284b5652c2843a9d0d076f4f657be28), it added "(when
mail-extr-ignore-single-names" line to mail-extract-address-components.
But it became the cases of the bug rather.

Original report is, name is not printed the following case.

(mail-extract-address-components "Rasmus <rasmus <at> gmx.us>")
=> (nil "rasmus <at> gmx.us")

But this is, because of "mail-extr-ignore-realname-equals-mailbox-name",
name and mailbox is same, so name is not printed.

Here is more tests of mail-extract-address-components with before and
after reverting that commit.

(dolist (addr '("Rasmus <address@hidden>" "Rasmus <address@hidden>"))
  (dolist (ignore-single '(t nil))
    (dolist (ignore-same '(t nil))
      (let ((mail-extr-ignore-single-names ignore-single)
            (mail-extr-ignore-realname-equals-mailbox-name ignore-same))
        (message "%s" (mail-extract-address-components addr))))))

[Before reverted]       ;; ignore-single, ignore-same: result: comment
(nil address@hidden)    ;; t, t:     OK: single name is ignored
(nil address@hidden)    ;; t, nil:   OK: single name is ignored
(Rasmus address@hidden) ;; nil, t:   BAD: printed even if same with mailbox
(Rasmus address@hidden) ;; nil, nil: OK:
(nil address@hidden)    ;; t, t:     OK: single name is ignored
(nil address@hidden)    ;; t, nil:   OK: single name is ignored
(Rasmus address@hidden) ;; nil, t:   OK: name is different with mailbox
(Rasmus address@hidden) ;; nil, nil: OK:

[After reverted]
(nil address@hidden)    ;; t, t:     OK: single name is ignored
(nil address@hidden)    ;; t, nil:   OK: single name is ignored
(nil address@hidden)    ;; nil, t:   OK: name is same with mailbox, ignored 
(Rasmus address@hidden) ;; nil, nil: OK:
(nil address@hidden)    ;; t, t:     OK: single name is ignored
(nil address@hidden)    ;; t, nil:   OK: single name is ignored
(Rasmus address@hidden) ;; nil, t:   OK:
(Rasmus address@hidden) ;; nil, nil: OK:

At lest, IMO, reverting commit 8b50ae8b2284b5652c2843a9d0d076f4f657be28
seems to be working as expected rather.



In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.16)
 of 2017-07-12 built on devron
Repository revision: d014a5e15c1110af77e7a96f06ccd0f0cafb099f
Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
System Description:     Debian GNU/Linux testing (buster)

Recent messages:
Saving /home/hirofumi/.newsrc.eld...
Saving file /home/hirofumi/.newsrc.eld...
Wrote /home/hirofumi/.newsrc.eld
Saving /home/hirofumi/.newsrc.eld...done
Mark set
Checking new news...
Reading active file via nnnil...done
nnimap read 0k from server.parknet.ne.jp
Reading active file via nndraft...done
Checking new news...done

Configured using:
 'configure --libexecdir=/usr/local/lib --with-x --with-x-toolkit=gtk3
 --without-xim --with-xpm --with-jpeg --with-tiff --with-gif --with-png
 --with-rsvg --with-dbus --with-wide-int --with-modules'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY ACL
LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES

Important settings:
  value of $LANG: ja_JP.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Group

Minor modes in effect:
  gnus-topic-mode: t
  cursor-sensor-mode: t
  gnus-undo-mode: t
  shell-dirtrack-mode: t
  auto-insert-mode: t
  flycheck-pos-tip-mode: t
  global-flycheck-mode: t
  savehist-mode: t
  icomplete-mode: t
  show-paren-mode: t
  display-time-mode: t
  cl-old-struct-compat-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t

Load-path shadows:
/usr/local/share/emacs/site-lisp/google-translate/features/support/env hides 
/usr/local/share/emacs/26.0.50/lisp/env

Features:
(shadow nnir emacsbug sendmail gnus-notifications gnus-fun notifications
dbus shr svg xml dom browse-url bbdb-gui bbdb-hooks sort gnus-cite
gnus-async gnus-bcklg gnus-ml disp-table gnus-topic cursor-sensor utf-7
rfc2104 network-stream nsm starttls nnfolder bbdb-gnus bbdb-snarf
mail-extr nnnil spam spam-stat bbdb-com warnings bbdb timezone gnus-uu
yenc gnus-demon gnus-delay gnus-draft gnus-agent gnus-srvr gnus-score
score-mode nnvirtual nntp gnus-cache gnus-msg gnus-art mm-uu mml2015
mm-view mml-smime smime dig gnus-sum nndraft nnmh gnus-group gnus-undo
gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc
nnoo gnus-spec gnus-int gnus-range message puny rfc822 mml mml-sec epa
epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils wid-edit
dircolors-faces dired-x dired dired-loaddefs tramp tramp-compat
tramp-loaddefs trampver ucs-normalize shell pcomplete comint ansi-color
ring parse-time format-spec flyspell ispell server generic-x
multi-translate google-translate-smooth-ui google-translate
google-translate-default-ui google-translate-core-ui ido
google-translate-core google-translate-tk url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap magit-autoloads git-modes-autoloads autoinsert flycheck-pos-tip
pos-tip flycheck cl-extra json map find-func help-mode rx subr-x dash
bbdb-autoloads savehist browse-kill-ring derived cl escreen icomplete
paren time mozc-im-indicater mozc-popup popup mozc-im advice mm-util
mail-prsvr finder-inf mozc package easymenu epg-config url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib time-date mule-util japan-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 388018 22918)
 (symbols 48 37800 1)
 (miscs 40 235 475)
 (strings 32 83750 4817)
 (string-bytes 1 2654672)
 (vectors 16 67540)
 (vector-slots 8 1125340 20658)
 (floats 8 293 321)
 (intervals 56 1051 232)
 (buffers 976 32))

-- 
OGAWA Hirofumi <address@hidden>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]