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

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

Re: How to apply (multi file) patches conveniently


From: Michael Heerdegen
Subject: Re: How to apply (multi file) patches conveniently
Date: Wed, 08 Feb 2017 23:34:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Thien-Thi Nguyen <address@hidden> writes:

> () Michael Heerdegen <address@hidden>
> () Tue, 07 Feb 2017 21:22:30 +0100
>
>          (let* ((insert-default-directory nil)
>                 (input (read-directory-name
>                         (format "Dir (default %s): "
>                                 (or source-directory
>                                     default-directory)))))
>
> Should this be moved into the ‘interactive’ form?

Yes, that would be appropriate.  Well... this snipped was quickly
written, I posted it just for reference.  But it would be better indeed.

>
>            (if (string= input "")
>                (expand-file-name (or source-directory
>                                      default-directory))
>              input))
>
> You can probably call ‘read-directory-name’ w/ some combination
> of DIR, DEFAULT-DIRNAME and INITIAL args to have it produce the
> same result.

Hmm, I avoided INITIAL because I prefer to start with an empty
minibuffer.


> Thien-Thi Nguyen -----------------------------------------------
>  (defun responsep (query)
>    (pcase (context query)
>      (`(technical mailing-list) t)
        ^

You can use just a quote here instead of backquote, but it doesn't make
a difference when you run that code ;-)


Regards,

Michael.



reply via email to

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