all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Ubiquitous (format-prompt) ?
@ 2021-03-19  4:21 Gabriel
  2021-03-19  7:40 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Gabriel @ 2021-03-19  4:21 UTC (permalink / raw)
  To: emacs-devel

Many places do not use the new 'format-prompt' function introduced by
commit 0985c0e6c6f1da712d3a48fa88af2861bf218d60, relying on a hardcoded
value of "(default %s)". So before opening any patch, I would like to
know if 'format-prompt' should be used everywhere, when applicable, or
if there's some rationale or exception to use a hardcoded value instead?

If we go ahead and replace everything to use 'format-prompt', how can we
deal with 'read_buffer' on 'src/minibuf.c'? That's the only occurrence I
could find on a C file.

By the way, here is the full list of occurences of grepping "default %":

./test/manual/etags/el-src/emacs/lisp/progmodes/etags.el
./lisp/filesets.el
./lisp/mh-e/mh-mime.el
./lisp/mh-e/mh-seq.el
./lisp/mh-e/mh-utils.el
./lisp/mh-e/mh-letter.el
./lisp/mh-e/mh-gnus.el
./lisp/ses.el
./lisp/subr.el
./lisp/minibuffer.el
./lisp/gnus/gnus-sum.el
./lisp/comint.el
./lisp/emulation/viper-cmd.el
./lisp/textmodes/reftex-index.el
./lisp/obsolete/vip.el
./lisp/obsolete/tpu-mapper.el
./lisp/obsolete/rcompile.el
./lisp/obsolete/terminal.el
./lisp/term.el
./lisp/international/mule-cmds.el
./lisp/progmodes/etags.el
./lisp/progmodes/project.el
./lisp/progmodes/cc-styles.el
./lisp/progmodes/xref.el
./lisp/progmodes/verilog-mode.el
./lisp/progmodes/cperl-mode.el
./src/minibuf.c

References:
1. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=12443
2. https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-08/msg02674.html

Regards,
Gabriel



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

* Re: Ubiquitous (format-prompt) ?
  2021-03-19  4:21 Ubiquitous (format-prompt) ? Gabriel
@ 2021-03-19  7:40 ` Lars Ingebrigtsen
  2021-03-20  1:54   ` Gabriel
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-03-19  7:40 UTC (permalink / raw)
  To: Gabriel; +Cc: emacs-devel

Gabriel <gabriel376@hotmail.com> writes:

> So before opening any patch, I would like to know if 'format-prompt'
> should be used everywhere, when applicable, or if there's some
> rationale or exception to use a hardcoded value instead?

It should be used everywhere applicable, and patches are welcome.

> If we go ahead and replace everything to use 'format-prompt', how can we
> deal with 'read_buffer' on 'src/minibuf.c'? That's the only occurrence I
> could find on a C file.

I haven't looked at that call site, but calling Lisp code from C is
usually unproblematic (except in those cases where it's problematic :-)).

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



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

* Re: Ubiquitous (format-prompt) ?
  2021-03-19  7:40 ` Lars Ingebrigtsen
@ 2021-03-20  1:54   ` Gabriel
  2021-03-20  8:04     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Gabriel @ 2021-03-20  1:54 UTC (permalink / raw)
  To: emacs-devel

Hi Lars,

I managed to replace most occurences of "(default %s)" with
'format-prompt'. I created separated commits for each set of changes,
which happened to be a lot (19 commits).

There are some options to send these changes:

1. Open 19 bug reports with one single patch each
2. Open a single bug report with 19 patches
3. Open a single bug report with a single condensed patch of all changes

What's the recommendation in this case? 

Here is a summary of my changes:

 lisp/cmuscheme.el               |  4 ++--
 lisp/comint.el                  |  6 ++----
 lisp/emulation/viper-cmd.el     | 31 ++++++++++++-------------------
 lisp/eshell/esh-mode.el         |  2 +-
 lisp/gnus/gnus-sum.el           | 31 ++++++++++++++-----------------
 lisp/international/mule-cmds.el | 10 +++++-----
 lisp/mh-e/mh-gnus.el            |  2 +-
 lisp/mh-e/mh-letter.el          |  5 +----
 lisp/mh-e/mh-mime.el            | 20 +++++++-------------
 lisp/mh-e/mh-seq.el             | 16 +++++-----------
 lisp/mh-e/mh-utils.el           |  7 +++----
 lisp/progmodes/cc-styles.el     |  2 +-
 lisp/progmodes/etags.el         | 16 ++++++----------
 lisp/progmodes/idlwave.el       |  2 +-
 lisp/progmodes/inf-lisp.el      |  4 ++--
 lisp/progmodes/project.el       |  6 ++----
 lisp/progmodes/tcl.el           |  4 ++--
 lisp/progmodes/verilog-mode.el  |  9 +++++----
 lisp/progmodes/xref.el          | 15 +++++----------
 lisp/ses.el                     | 12 +++++-------
 lisp/subr.el                    |  4 ++--
 lisp/term.el                    |  6 ++----
 src/minibuf.c                   |  4 ++--
 23 files changed, 88 insertions(+), 130 deletions(-)



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

* Re: Ubiquitous (format-prompt) ?
  2021-03-20  1:54   ` Gabriel
@ 2021-03-20  8:04     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-03-20  8:04 UTC (permalink / raw)
  To: Gabriel; +Cc: emacs-devel

Gabriel <gabriel376@hotmail.com> writes:

> 3. Open a single bug report with a single condensed patch of all changes

I think that's the best option.

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



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

end of thread, other threads:[~2021-03-20  8:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-19  4:21 Ubiquitous (format-prompt) ? Gabriel
2021-03-19  7:40 ` Lars Ingebrigtsen
2021-03-20  1:54   ` Gabriel
2021-03-20  8:04     ` Lars Ingebrigtsen

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.