unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [BUG] Bad quote in help
@ 2022-02-16  6:40 Rudolf Adamkovič
  2022-02-16  9:49 ` Tomi Ollila
  0 siblings, 1 reply; 5+ messages in thread
From: Rudolf Adamkovič @ 2022-02-16  6:40 UTC (permalink / raw)
  To: notmuch

Repro steps:

1. C-h v
2. notmuch-search-result-format
3. RET

See:

For example:
    (setq notmuch-search-result-format
          ’(("authors" . "%-40s")
            ("subject" . "%s")))

The quote ’ needs changed to ', otherwise the example does not work.

Rudy
-- 
"Thinking is a momentary dismissal of irrelevancies."
-- Richard Buckminster Fuller, 1969

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia\r

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

* Re: [BUG] Bad quote in help
  2022-02-16  6:40 [BUG] Bad quote in help Rudolf Adamkovič
@ 2022-02-16  9:49 ` Tomi Ollila
  2022-02-16 11:59   ` [PATCH] emacs: escape quote in notmuch-search-result-format docstring David Bremner
  0 siblings, 1 reply; 5+ messages in thread
From: Tomi Ollila @ 2022-02-16  9:49 UTC (permalink / raw)
  To: Rudolf Adamkovič, notmuch

On Wed, Feb 16 2022, Rudolf Adamkovič wrote:

> Repro steps:
>
> 1. C-h v
> 2. notmuch-search-result-format
> 3. RET
>
> See:
>
> For example:
>     (setq notmuch-search-result-format
>           ’(("authors" . "%-40s")
>             ("subject" . "%s")))
>
> The quote ’ needs changed to ', otherwise the example does not work.

The code in question in notmuch.el is:

    (setq notmuch-search-result-format
          '((\"authors\" . \"%-40s\")
            (\"subject\" . \"%s\")))

In this particular case it is unfortunate emacs modifies the output.

Tried to chage that to  \'((\"autho...

did not help (also renamed the defcustom to make a new definition so
that the content would be evaluated when doing c-x c-e in buffer...)

In rstdoc.el we have (text-quoting-style 'grave) to not do such docstring
modifications for display, but that is not applicable in this context...

Tomi

>
> Rudy
> -- 
> "Thinking is a momentary dismissal of irrelevancies."
> -- Richard Buckminster Fuller, 1969
>
> Rudolf Adamkovič <salutis@me.com> [he/him]
> Studenohorská 25
> 84103 Bratislava
> Slovakia\r

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

* [PATCH] emacs: escape quote in notmuch-search-result-format docstring
  2022-02-16  9:49 ` Tomi Ollila
@ 2022-02-16 11:59   ` David Bremner
  2022-02-16 21:06     ` Tomi Ollila
  0 siblings, 1 reply; 5+ messages in thread
From: David Bremner @ 2022-02-16 11:59 UTC (permalink / raw)
  To: Tomi Ollila, Rudolf Adamkovič, notmuch

Prevent Emacs' mangling of quotes, which breaks the code sample.
---
 emacs/notmuch.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 6abb17ff..c9cf80dc 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -93,7 +93,7 @@
 Supported fields are: date, count, authors, subject, tags.
 For example:
     (setq notmuch-search-result-format
-          '((\"authors\" . \"%-40s\")
+          \\='((\"authors\" . \"%-40s\")
             (\"subject\" . \"%s\")))
 
 Line breaks are permitted in format strings (though this is
-- 
2.34.1

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

* Re: [PATCH] emacs: escape quote in notmuch-search-result-format docstring
  2022-02-16 11:59   ` [PATCH] emacs: escape quote in notmuch-search-result-format docstring David Bremner
@ 2022-02-16 21:06     ` Tomi Ollila
  2022-02-17  0:32       ` David Bremner
  0 siblings, 1 reply; 5+ messages in thread
From: Tomi Ollila @ 2022-02-16 21:06 UTC (permalink / raw)
  To: David Bremner, Rudolf Adamkovič, notmuch

On Wed, Feb 16 2022, David Bremner wrote:

LGTM, now I remeber this syntax...

Tomi

> Prevent Emacs' mangling of quotes, which breaks the code sample.
> ---
>  emacs/notmuch.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/emacs/notmuch.el b/emacs/notmuch.el
> index 6abb17ff..c9cf80dc 100644
> --- a/emacs/notmuch.el
> +++ b/emacs/notmuch.el
> @@ -93,7 +93,7 @@
>  Supported fields are: date, count, authors, subject, tags.
>  For example:
>      (setq notmuch-search-result-format
> -          '((\"authors\" . \"%-40s\")
> +          \\='((\"authors\" . \"%-40s\")
>              (\"subject\" . \"%s\")))
>  
>  Line breaks are permitted in format strings (though this is
> -- 
> 2.34.1

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

* Re: [PATCH] emacs: escape quote in notmuch-search-result-format docstring
  2022-02-16 21:06     ` Tomi Ollila
@ 2022-02-17  0:32       ` David Bremner
  0 siblings, 0 replies; 5+ messages in thread
From: David Bremner @ 2022-02-17  0:32 UTC (permalink / raw)
  To: Tomi Ollila, Rudolf Adamkovič, notmuch

Tomi Ollila <tomi.ollila@iki.fi> writes:

> On Wed, Feb 16 2022, David Bremner wrote:
>
> LGTM, now I remeber this syntax...
>
> Tomi
>

OK, the docstring is fixed in commit 6286b76a, which should be in the
next major release (0.36).

Thanks for the report,

d

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

end of thread, other threads:[~2022-02-17  0:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16  6:40 [BUG] Bad quote in help Rudolf Adamkovič
2022-02-16  9:49 ` Tomi Ollila
2022-02-16 11:59   ` [PATCH] emacs: escape quote in notmuch-search-result-format docstring David Bremner
2022-02-16 21:06     ` Tomi Ollila
2022-02-17  0:32       ` David Bremner

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

	https://yhetil.org/notmuch.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).