all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#68685: [BUG] default From: when composing new messages ignores user-mail-address (part1) and uses message-user-fqdn (part2)!
@ 2024-01-24 12:42 rameiko87
  2024-01-24 13:25 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 3+ messages in thread
From: rameiko87 @ 2024-01-24 12:42 UTC (permalink / raw)
  To: 68685

Initial disclaimer: I use Emacs, Rmail, and Message-Mode.


Bug Part 1:

Actual behaviour:

When user-mail-address is not set and therefore defaults (at least in my 
case) to user@hostmachine (in my case user@fedora), then the default 
email address when composing a new message somehow ignores this and 
becomes user@message-user-fqdn, which should instead only be reserved 
for message-id's (as the description of this variable says).

Expected behaviour:

The From: header when composing new messages should default to the value 
of user-mail-address regardless to whether this later variable was 
previously customized by the user or not (in the later case defaults to 
the standard value). Note that when user-mail-address is customized by 
the user, then composing a new message rightfully defaults the From: 
header the the value of user-mail-address.


Bug Part 2:

message-user-fqdn should only used for message-ID's as the description 
of this variable prescribes. It's not the case because it intervenes in 
the From: header (see Bug Part 1 above). Is there other bits where 
message-user-fqdn intervenes except for message-ID's (and shouldn't, 
because as I said its desciption says that its value intervenes in 
message-ID's).





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

* bug#68685: [BUG] default From: when composing new messages ignores user-mail-address (part1) and uses message-user-fqdn (part2)!
  2024-01-24 12:42 bug#68685: [BUG] default From: when composing new messages ignores user-mail-address (part1) and uses message-user-fqdn (part2)! rameiko87
@ 2024-01-24 13:25 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-01-24 14:09   ` rameiko87
  0 siblings, 1 reply; 3+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-01-24 13:25 UTC (permalink / raw)
  To: rameiko87; +Cc: 68685

Hi again,

Ok, so I have a look at it and it seems to me that this behaviour comes
from 'message-user-mail-address' from message.el:

--8<---------------cut here---------------start------------->8---
(defun message-user-mail-address ()
  "Return the pertinent part of `user-mail-address'."
  (when (and user-mail-address
	     (string-match "@.*\\." user-mail-address))
    (if (string-search " " user-mail-address)
	(nth 1 (mail-extract-address-components user-mail-address))
      user-mail-address)))
--8<---------------cut here---------------end--------------->8---

The 'string-match' call checks that there is at least one dot in the
mail host part.  Otherwise, message will build a user mail address using
'message-user-fqdn'.

I think it is more a bug in the documentation of 'message-user-fqdn' or
'user-mail-address' because from the point of view of creating a message
to be *sent* it makes sense to require a FQDN.
-- 
Manuel Giraud





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

* bug#68685: [BUG] default From: when composing new messages ignores user-mail-address (part1) and uses message-user-fqdn (part2)!
  2024-01-24 13:25 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-01-24 14:09   ` rameiko87
  0 siblings, 0 replies; 3+ messages in thread
From: rameiko87 @ 2024-01-24 14:09 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: 68685

> The 'string-match' call checks that there is at least one dot in the 
> mail host part.  Otherwise, message will build a user mail address 
> using 'message-user-fqdn'.

Thanks for looking into this; before I can assess what is the best way 
to solve this unexpected behaviour and how to modify the documentation, 
I would also need to know why instead the procedure which you explained 
and I am quoting as the first line of this email does not intervene when 
the message is sent after having been queued.

As for whether to modify the docs rather than the behaviour, I'm 
inclined to think that it's a possibility to allow for this automatic 
building of valid email address as long as it's documented and it 
doesn't happen while sending, but before the user can review the message 
prior to sending the email.  Which brings us back to the question in the 
paragraph above...





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

end of thread, other threads:[~2024-01-24 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-24 12:42 bug#68685: [BUG] default From: when composing new messages ignores user-mail-address (part1) and uses message-user-fqdn (part2)! rameiko87
2024-01-24 13:25 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-24 14:09   ` rameiko87

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.