unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#22594: 25.1.50; mail-extract-address-components doesn't work on single-named people
@ 2016-02-08  2:22 Lars Ingebrigtsen
  2016-02-08  5:46 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-08  2:22 UTC (permalink / raw)
  To: 22594


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

There's the weird

(setq mail-extr-ignore-single-names t)

variable, but there is no difference in the result.



In GNU Emacs 25.1.50.11 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.7)
 of 2016-02-08 built on mouse
Repository revision: eb52f7015a26a5baac36430269ed2725d04ef41d
Windowing system distributor 'The X.Org Foundation', version 11.0.11702000
System Description:	Ubuntu 15.10

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

Important settings:
  value of $LC_MONETARY: nb_NO.UTF-8
  value of $LC_NUMERIC: nb_NO.UTF-8
  value of $LC_TIME: nb_NO.UTF-8
  value of $LANG: C
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  diff-auto-refine-mode: t
  debbugs-gnu-lisp-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent messages:
Result: nil
 [4 times]
Result: 103 (#o147, #x67, ?g)
Back to top level
mail-extract-address-components [2 times]
Entering debugger...
Back to top level
mail-extract-address-components
Saving file /home/larsi/src/emacs/trunk/lisp/mail/mail-extr.el...
Wrote /home/larsi/src/emacs/trunk/lisp/mail/mail-extr.el

Load-path shadows:
~/src/emacs/elpa/packages/debbugs/debbugs-org hides /home/larsi/.emacs.d/elpa/debbugs-0.7/debbugs-org
~/src/emacs/elpa/packages/debbugs/debbugs-browse hides /home/larsi/.emacs.d/elpa/debbugs-0.7/debbugs-browse
~/src/emacs/elpa/packages/debbugs/debbugs-gnu hides /home/larsi/.emacs.d/elpa/debbugs-0.7/debbugs-gnu
~/src/emacs/elpa/packages/debbugs/debbugs hides /home/larsi/.emacs.d/elpa/debbugs-0.7/debbugs

Features:
(shadow emacsbug pulse xref project edebug texinfo smerge-mode compile
comint qp nndoc mm-archive thingatpt mailalias smtpmail sendmail
ecomplete log-edit ring pcvs-util whitespace vc-bzr vc-src vc-sccs
vc-svn vc-cvs vc-rcs vc-dir ewoc bug-reference sort smiley ansi-color
gnus-cite copyright misearch multi-isearch gnus-html url-cache vc
vc-dispatcher vc-git diff-mode map find-func gnus-async gnus-dup gnus-ml
gmane spam-gmane dns mm-url disp-table gnus-fun gnus-mdrtn gnus-topic
nndraft nnmh utf-7 nnfolder network-stream nsm starttls nnir spam-report
spam spam-stat gnus-uu yenc gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig
nntp gnus-cache gnus-sum gnus-group gnus-undo gnus-start gnus-cloud
nnimap nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int
gnus-range message format-spec rfc822 mml mml-sec epg mailabbrev
gmm-utils mailheader gnus-win gnus gnus-ems nnheader mail-utils wid-edit
movie mkv shr browse-url imdb dom pvr debug debbugs-gnu easy-mmode
derived subr-x debbugs soap-client mm-decode mm-bodies mm-encode
url-http tls gnutls url-auth mail-parse rfc2231 rfc2047 rfc2045
ietf-drums url-gw puny url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap warnings rng-xsd
rng-dt rng-util xsd-regexp xml ido seq flyspell ispell dired
dired-loaddefs add-log mail-extr jka-compr cl finder-inf info package
epg-config url-handlers url-parse auth-source cl-seq eieio byte-opt
bytecomp byte-compile cl-extra cconv eieio-core cl-macs gv
eieio-loaddefs gnus-util mm-util help-fns help-mode easymenu cl-loaddefs
pcase cl-lib mail-prsvr password-cache url-vars time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core 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 charscript 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 453196 64594)
 (symbols 48 113234 0)
 (miscs 40 626 1569)
 (strings 32 137774 13165)
 (string-bytes 1 5084264)
 (vectors 16 40249)
 (vector-slots 8 1607002 169977)
 (floats 8 607 785)
 (intervals 56 4130 848)
 (buffers 976 59)
 (heap 1024 199062 53807))

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#22594: 25.1.50; mail-extract-address-components doesn't work on single-named people
  2016-02-08  2:22 bug#22594: 25.1.50; mail-extract-address-components doesn't work on single-named people Lars Ingebrigtsen
@ 2016-02-08  5:46 ` Lars Ingebrigtsen
  2016-02-08 20:54   ` Rasmus
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-08  5:46 UTC (permalink / raw)
  To: 22594

Lars Ingebrigtsen <larsi@gnus.org> writes:

> (mail-extract-address-components "Rasmus <rasmus@gmx.us>")
> => (nil "rasmus@gmx.us")
>
> There's the weird
>
> (setq mail-extr-ignore-single-names t)
>
> variable, but there is no difference in the result.

It was because the user name and the full name were the same.  I've now
changed it to return the name, anyway (if mail-extr-ignore-single-names
isn't set).

That's one weird and huge function with a *lot* of functionality...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#22594: 25.1.50; mail-extract-address-components doesn't work on single-named people
  2016-02-08  5:46 ` Lars Ingebrigtsen
@ 2016-02-08 20:54   ` Rasmus
  2016-02-08 22:47     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Rasmus @ 2016-02-08 20:54 UTC (permalink / raw)
  To: 22594

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> (mail-extract-address-components "Rasmus <rasmus@gmx.us>")
>> => (nil "rasmus@gmx.us")
>>
>> There's the weird
>>
>> (setq mail-extr-ignore-single-names t)
>>
>> variable, but there is no difference in the result.
>
> It was because the user name and the full name were the same.  I've now
> changed it to return the name, anyway (if mail-extr-ignore-single-names
> isn't set).
>
> That's one weird and huge function with a *lot* of functionality...

I haven't check your patch, but I noticed the following funny behavior as
well:

(mail-extract-address-components "Rasmu s  <rasmus@gmx.us>")
=> ("Rasmu s." "rasmus@gmx.us")

Why is the period added?  That seems uncalled for...

Rasmus

-- 
Summon the Mothership!






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#22594: 25.1.50; mail-extract-address-components doesn't work on single-named people
  2016-02-08 20:54   ` Rasmus
@ 2016-02-08 22:47     ` Lars Ingebrigtsen
  2016-02-08 23:06       ` Rasmus
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-08 22:47 UTC (permalink / raw)
  To: Rasmus; +Cc: 22594

Rasmus <rasmus@gmx.us> writes:

> (mail-extract-address-components "Rasmu s  <rasmus@gmx.us>")
> => ("Rasmu s." "rasmus@gmx.us")
>
> Why is the period added?  That seems uncalled for...

It's a function with a lot of features.  It "prettifies" the name in
addition to extracting the components.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#22594: 25.1.50; mail-extract-address-components doesn't work on single-named people
  2016-02-08 22:47     ` Lars Ingebrigtsen
@ 2016-02-08 23:06       ` Rasmus
  0 siblings, 0 replies; 5+ messages in thread
From: Rasmus @ 2016-02-08 23:06 UTC (permalink / raw)
  To: 22594

Lars Ingebrigtsen <larsi@gnus.org> writes:

>> (mail-extract-address-components "Rasmu s  <rasmus@gmx.us>")
>> => ("Rasmu s." "rasmus@gmx.us")
>>
>> Why is the period added?  That seems uncalled for...
>
> It's a function with a lot of features.

Wow, you are right.  758 lines.

> It "prettifies" the name in addition to extracting the components.

That's "great".

Feel free to ignore the above comment on the period.

Rasmus

-- 
In theory, practice and theory are the same. In practice they are not






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-08 23:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-08  2:22 bug#22594: 25.1.50; mail-extract-address-components doesn't work on single-named people Lars Ingebrigtsen
2016-02-08  5:46 ` Lars Ingebrigtsen
2016-02-08 20:54   ` Rasmus
2016-02-08 22:47     ` Lars Ingebrigtsen
2016-02-08 23:06       ` Rasmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).