unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* eww
@ 2014-01-12 13:46 Richard Stallman
  2014-01-12 13:50 ` eww Juanma Barranquero
  0 siblings, 1 reply; 61+ messages in thread
From: Richard Stallman @ 2014-01-12 13:46 UTC (permalink / raw)
  To: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Before the first release that contains eww, I think we should set up
natural aliases for the commands, perhaps using the name "browse" or
"www" or "web" instead of "eww".  With natural names, users won't have
to wonder, "What in the world did they call that?"  We can avoid
adding one more difficulty to learning to use Emacs.

I think epa also needs a set of natural aliases, with "crypt" instead
of "epa".

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: eww
  2014-01-12 13:46 eww Richard Stallman
@ 2014-01-12 13:50 ` Juanma Barranquero
  2014-01-13 11:20   ` eww Bastien
  2014-01-13 15:41   ` eww Richard Stallman
  0 siblings, 2 replies; 61+ messages in thread
From: Juanma Barranquero @ 2014-01-12 13:50 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Emacs developers

On Sun, Jan 12, 2014 at 2:46 PM, Richard Stallman <rms@gnu.org> wrote:

> Before the first release that contains eww, I think we should set up
> natural aliases for the commands, perhaps using the name "browse" or
> "www" or "web" instead of "eww".  With natural names, users won't have
> to wonder, "What in the world did they call that?"  We can avoid
> adding one more difficulty to learning to use Emacs.
>
> I think epa also needs a set of natural aliases, with "crypt" instead
> of "epa".

We introduced define-alternatives for exactly that case. It's just
that nobody has used it yet.

     j



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

* Re: eww
  2014-01-12 13:50 ` eww Juanma Barranquero
@ 2014-01-13 11:20   ` Bastien
  2014-01-13 17:44     ` eww Davis Herring
                       ` (3 more replies)
  2014-01-13 15:41   ` eww Richard Stallman
  1 sibling, 4 replies; 61+ messages in thread
From: Bastien @ 2014-01-13 11:20 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Richard Stallman, Emacs developers

[-- Attachment #1: Type: text/plain, Size: 1431 bytes --]

Juanma Barranquero <lekktu@gmail.com> writes:

> On Sun, Jan 12, 2014 at 2:46 PM, Richard Stallman <rms@gnu.org> wrote:
>
>> Before the first release that contains eww, I think we should set up
>> natural aliases for the commands, perhaps using the name "browse" or
>> "www" or "web" instead of "eww".  With natural names, users won't have
>> to wonder, "What in the world did they call that?"  We can avoid
>> adding one more difficulty to learning to use Emacs.
>>
>> I think epa also needs a set of natural aliases, with "crypt" instead
>> of "epa".
>
> We introduced define-alternatives for exactly that case. It's just
> that nobody has used it yet.

Try this:

  (define-alternatives web)
  (setq web-alternatives '(("eww" . eww)))
  M-x web RET TAB RET

Does not work without the attached patch.

I think it's safe to recommend `define-alternatives' for commands
only, not for function, and the docstring suggests this too.  If so,
I'll apply the patch.

Two other problems:

1) when there is only one "alternative", the user is asked which
   one he wants.  I think COMMAND should use the alternative without
   asking, and tell the user how to add other alternatives through
   COMMAND-alternatives for 2 secs the first time the alternative is
   chosen.

2) Once an alternative is chosen, setting COMMAND-alternatives will
   not take any effect, and I don't see a way to cancel the first
   choice.

What do you think?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: simple.el.patch --]
[-- Type: text/x-diff, Size: 857 bytes --]

=== modified file 'lisp/simple.el'
*** lisp/simple.el	2014-01-12 04:00:03 +0000
--- lisp/simple.el	2014-01-13 11:10:41 +0000
***************
*** 7694,7700 ****
                 (customize-save-variable ',varimp-sym
                                          (cdr (assoc-string val ,varalt-sym))))))
           (if ,varimp-sym
!              (funcall ,varimp-sym)
             (message ,(format "No implementation selected for command `%s'"
                               command-name)))))))
  
--- 7694,7700 ----
                 (customize-save-variable ',varimp-sym
                                          (cdr (assoc-string val ,varalt-sym))))))
           (if ,varimp-sym
!              (call-interactively ,varimp-sym)
             (message ,(format "No implementation selected for command `%s'"
                               command-name)))))))
  


[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


-- 
 Bastien

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

* Re: eww
  2014-01-12 13:50 ` eww Juanma Barranquero
  2014-01-13 11:20   ` eww Bastien
@ 2014-01-13 15:41   ` Richard Stallman
  2014-01-13 18:05     ` eww Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 61+ messages in thread
From: Richard Stallman @ 2014-01-13 15:41 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    > I think epa also needs a set of natural aliases, with "crypt" instead
    > of "epa".

    We introduced define-alternatives for exactly that case. It's just
    that nobody has used it yet.

We may be miscommunicating.  I don't see a need for
define-alternatives here, because simple defalias would work: e.g.,

(defalias 'crypt-mail-encrypt 'epa-mail-encrypt)

Why not?  Do you have in mind something else it should mean?

It's easy enough to do this, but then the documentation needs
updating.

For browsing, perhaps define-alternatives should be used.  I never use
those features, so I am not sure what commands should be defined, or
what their alternative meaning should be.

The doc string of define-alternatives is not very clear but I think it
does the wrong thing.  I have think the user should be able to specify
a choice of browsing package just once, and it should affect all such
commands for browsing.

My point is that this really needs to be done before the release.
We should prevent an ugliness from ever getting into a release.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: eww
  2014-01-13 11:20   ` eww Bastien
@ 2014-01-13 17:44     ` Davis Herring
  2014-01-13 22:19       ` eww Bastien
  2014-01-13 19:36     ` eww Richard Stallman
                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 61+ messages in thread
From: Davis Herring @ 2014-01-13 17:44 UTC (permalink / raw)
  To: Bastien; +Cc: Juanma Barranquero, Richard Stallman, Emacs developers

> 2) Once an alternative is chosen, setting COMMAND-alternatives will
>    not take any effect, and I don't see a way to cancel the first
>    choice.

So introduce a function `add-alternative' that extends the appropriate
list and also cancels the user's choice (or rather, makes it the default
for the next prompt).  Of course, there's an issue of timing: you want
the behavior I just described when installing a new package, but not
when loading it in a new Emacs after the choice has been made (again).

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.



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

* Re: eww
  2014-01-13 15:41   ` eww Richard Stallman
@ 2014-01-13 18:05     ` Lars Magne Ingebrigtsen
  2014-01-14 17:05       ` eww Richard Stallman
  0 siblings, 1 reply; 61+ messages in thread
From: Lars Magne Ingebrigtsen @ 2014-01-13 18:05 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Juanma Barranquero, emacs-devel

`browse-web' is the alias for `eww'.

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




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

* Re: eww
  2014-01-13 11:20   ` eww Bastien
  2014-01-13 17:44     ` eww Davis Herring
@ 2014-01-13 19:36     ` Richard Stallman
  2014-01-13 22:29       ` eww Bastien
  2014-01-13 19:36     ` eww Richard Stallman
  2014-01-13 22:18     ` eww Bastien
  3 siblings, 1 reply; 61+ messages in thread
From: Richard Stallman @ 2014-01-13 19:36 UTC (permalink / raw)
  To: Bastien; +Cc: lekktu, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

      (define-alternatives web)
      (setq web-alternatives '(("eww" . eww)))
      M-x web RET TAB RET

If the only user-level entry point for eww is `eww',
this would do the right thing.

Is that the case?

For epa, there are several such entry points, including
epa-mail-encrypt and epa-insert-keys.  We could do

(define-alternatives crypt-mail-encrypt)
(define-alternatives crypt-insert-keys)
with the suitable variable values, but that won't give
the right result.  The user would be asked to choose an
alternative for crypt-mail-encrypt, and independently
to choose an alternative for crypt-insert-keys.

What we really want is for the two commands to be synced
so that a single choice of alternative applies to both.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: eww
  2014-01-13 11:20   ` eww Bastien
  2014-01-13 17:44     ` eww Davis Herring
  2014-01-13 19:36     ` eww Richard Stallman
@ 2014-01-13 19:36     ` Richard Stallman
  2014-01-13 22:25       ` eww Bastien
  2014-01-13 22:18     ` eww Bastien
  3 siblings, 1 reply; 61+ messages in thread
From: Richard Stallman @ 2014-01-13 19:36 UTC (permalink / raw)
  To: Bastien; +Cc: lekktu, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

      (define-alternatives web)
      (setq web-alternatives '(("eww" . eww)))
      M-x web RET TAB RET

This calling convention has the drawback that (define-alternatives web)
isn't recognized as a definition for the variable web-alternatives.

Should we tell people to write a defvar for web-alternatives
just after the define-alternatives for web?

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: eww
  2014-01-13 11:20   ` eww Bastien
                       ` (2 preceding siblings ...)
  2014-01-13 19:36     ` eww Richard Stallman
@ 2014-01-13 22:18     ` Bastien
  2014-01-14  0:45       ` eww Juanma Barranquero
  3 siblings, 1 reply; 61+ messages in thread
From: Bastien @ 2014-01-13 22:18 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Richard Stallman, Emacs developers

Bastien <bzg@gnu.org> writes:

> Try this:
>
>   (define-alternatives web)
>   (setq web-alternatives '(("eww" . eww)))
>   M-x web RET TAB RET
>
> Does not work without the attached patch.

I fixed the bug about using funcall where call-interactively is
needed.

> I think it's safe to recommend `define-alternatives' for commands
> only, not for function, and the docstring suggests this too.  If so,
> I'll apply the patch.
>
> Two other problems:
>
> 1) when there is only one "alternative", the user is asked which
>    one he wants.  I think COMMAND should use the alternative without
>    asking, and tell the user how to add other alternatives through
>    COMMAND-alternatives for 2 secs the first time the alternative is
>    chosen.

I enhanced the macro like this: when the choice is made for the first
time, the user gets a message telling him about C-u M-x web RET

> 2) Once an alternative is chosen, setting COMMAND-alternatives will
>    not take any effect, and I don't see a way to cancel the first
>    choice.

This is solved by C-u M-x web RET.

Maybe it would be nice to chose an alternative temporarily
(with C-u C-u M-x web RET) but let's wait after the release
and... when this macro will be used for the first time.

-- 
 Bastien



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

* Re: eww
  2014-01-13 17:44     ` eww Davis Herring
@ 2014-01-13 22:19       ` Bastien
  0 siblings, 0 replies; 61+ messages in thread
From: Bastien @ 2014-01-13 22:19 UTC (permalink / raw)
  To: Davis Herring; +Cc: Juanma Barranquero, Richard Stallman, Emacs developers

Davis Herring <herring@lanl.gov> writes:

> So introduce a function `add-alternative' that extends the appropriate
> list and also cancels the user's choice (or rather, makes it the default
> for the next prompt).

Yes, but let's go back to this after the release (and when
`define-alternatives' is used at least once!)

-- 
 Bastien



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

* Re: eww
  2014-01-13 19:36     ` eww Richard Stallman
@ 2014-01-13 22:25       ` Bastien
  2014-01-14  0:00         ` eww Stefan Monnier
  0 siblings, 1 reply; 61+ messages in thread
From: Bastien @ 2014-01-13 22:25 UTC (permalink / raw)
  To: Richard Stallman; +Cc: lekktu, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> This calling convention has the drawback that (define-alternatives web)
> isn't recognized as a definition for the variable web-alternatives.

I'm not sure I understand.

> Should we tell people to write a defvar for web-alternatives
> just after the define-alternatives for web?

I enhanced the docstring a bit---it now reads:

  Define the new command `COMMAND'.
  
  The argument `COMMAND' should be a symbol.
  
  Running `M-x COMMAND RET' for the first time prompts for which
  alternative to use and records the selected command as a custom
  variable.
  
  Running `C-u M-x COMMAND RET' prompts again for an alternative
  and overwrites the previous choice.
  
  The variable `COMMAND-alternatives' contains an alist with
  alternative implementations of COMMAND.  `define-alternatives'
  does not have any effect until this variable is set.
  
  CUSTOMIZATIONS, if non-nil, should be composed of alternating
  `defcustom' keywords and values to add to the declaration of
  `COMMAND-alternatives' (typically :group and :version).

I hope this is clearer.

-- 
 Bastien



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

* Re: eww
  2014-01-13 19:36     ` eww Richard Stallman
@ 2014-01-13 22:29       ` Bastien
  2014-01-14 17:06         ` eww Richard Stallman
  0 siblings, 1 reply; 61+ messages in thread
From: Bastien @ 2014-01-13 22:29 UTC (permalink / raw)
  To: Richard Stallman; +Cc: lekktu, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> For epa, there are several such entry points, including
> epa-mail-encrypt and epa-insert-keys.  We could do
>
> (define-alternatives crypt-mail-encrypt)
> (define-alternatives crypt-insert-keys)
> with the suitable variable values, but that won't give
> the right result.  The user would be asked to choose an
> alternative for crypt-mail-encrypt, and independently
> to choose an alternative for crypt-insert-keys.
>
> What we really want is for the two commands to be synced
> so that a single choice of alternative applies to both.

I guess for epa-* what is really needed is a better prefix,
not a UI level for the users to chose alternatives--but maybe
that's just because I don't know alternatives to epa-*.

-- 
 Bastien



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

* Re: eww
  2014-01-13 22:25       ` eww Bastien
@ 2014-01-14  0:00         ` Stefan Monnier
  2014-01-14  9:43           ` eww Bastien
  2014-01-14 17:06           ` eww Richard Stallman
  0 siblings, 2 replies; 61+ messages in thread
From: Stefan Monnier @ 2014-01-14  0:00 UTC (permalink / raw)
  To: Bastien; +Cc: lekktu, Richard Stallman, emacs-devel

>> This calling convention has the drawback that (define-alternatives web)
>> isn't recognized as a definition for the variable web-alternatives.
> I'm not sure I understand.

If you try to jump to the source from "C-h v web-alternatives", Emacs
won't find the right spot.

You should be able to work around this use by adding to the macro
something like

       (put ',varname 'definition-name ',cmdname)


-- Stefan



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

* Re: eww
  2014-01-13 22:18     ` eww Bastien
@ 2014-01-14  0:45       ` Juanma Barranquero
  0 siblings, 0 replies; 61+ messages in thread
From: Juanma Barranquero @ 2014-01-14  0:45 UTC (permalink / raw)
  To: Bastien; +Cc: Richard Stallman, Emacs developers

On Mon, Jan 13, 2014 at 11:18 PM, Bastien <bzg@gnu.org> wrote:

> I fixed the bug about using funcall where call-interactively is
> needed.

Thanks.



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

* Re: eww
  2014-01-14  0:00         ` eww Stefan Monnier
@ 2014-01-14  9:43           ` Bastien
  2014-01-14 11:09             ` eww Nicolas Richard
  2014-01-14 17:58             ` eww Stefan Monnier
  2014-01-14 17:06           ` eww Richard Stallman
  1 sibling, 2 replies; 61+ messages in thread
From: Bastien @ 2014-01-14  9:43 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: lekktu, Richard Stallman, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> This calling convention has the drawback that (define-alternatives web)
>>> isn't recognized as a definition for the variable web-alternatives.
>> I'm not sure I understand.
>
> If you try to jump to the source from "C-h v web-alternatives", Emacs
> won't find the right spot.

M-: (define-alternatives web) RET
C-h web-alternatives RET

will display a correct docstring for `web-alternatives'.

What am I missing?

-- 
 Bastien



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

* Re: eww
  2014-01-14  9:43           ` eww Bastien
@ 2014-01-14 11:09             ` Nicolas Richard
  2014-01-14 16:39               ` eww Bastien
  2014-01-14 17:58             ` eww Stefan Monnier
  1 sibling, 1 reply; 61+ messages in thread
From: Nicolas Richard @ 2014-01-14 11:09 UTC (permalink / raw)
  To: emacs-devel

Bastien <bzg@gnu.org> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>>> This calling convention has the drawback that (define-alternatives web)
>>>> isn't recognized as a definition for the variable web-alternatives.
>>> I'm not sure I understand.
>>
>> If you try to jump to the source from "C-h v web-alternatives", Emacs
>> won't find the right spot.
>
> M-: (define-alternatives web) RET
> C-h web-alternatives RET
>
> will display a correct docstring for `web-alternatives'.
>
> What am I missing?

The link to the source (when (define-alternatives web) is done in an .el
file) won't work right, and result in "Unable to find location in file".
It's a common problem with macros that define things.

Here's a patch to implement Stefan's solution:

--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -7675,7 +7675,7 @@ ALTFUN  - The function called to implement this alternative."
                   command-name)
          :type '(alist :key-type string :value-type function)
          ,@customizations)
-
+       (put ',varalt-sym 'definition-name ',command)
        (defvar ,varimp-sym nil "Internal use only.")
 
        (defun ,command (&optional arg)


-- 
Nico.




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

* Re: eww
  2014-01-14 11:09             ` eww Nicolas Richard
@ 2014-01-14 16:39               ` Bastien
  2014-01-14 16:57                 ` eww Nicolas Richard
  0 siblings, 1 reply; 61+ messages in thread
From: Bastien @ 2014-01-14 16:39 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: emacs-devel

Hi Nicolas,

"Nicolas Richard" <theonewiththeevillook@yahoo.fr> writes:

> The link to the source (when (define-alternatives web) is done in an .el
> file) won't work right, and result in "Unable to find location in file".
> It's a common problem with macros that define things.

Sorry, I still don't get it.

Put this in ~/web.el

(define-alternatives web)
(setq web-alternatives '(("eww" . eww) ("w3m" . w3m)))

M-x eval-buffer RET

then C-h f web RET and C-h v web-alternatives RET will
display the correct location.

-- 
 Bastien



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

* Re: eww
  2014-01-14 16:39               ` eww Bastien
@ 2014-01-14 16:57                 ` Nicolas Richard
  2014-01-14 18:21                   ` eww Bastien
  0 siblings, 1 reply; 61+ messages in thread
From: Nicolas Richard @ 2014-01-14 16:57 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-devel

Hi Bastien,

Le 14/01/2014 17:39, Bastien a écrit :
> then C-h f web RET and C-h v web-alternatives RET will
> display the correct location.

Put this in web.el :
;; some useful comments
(define-alternatives web)
(setq web-alternatives '(("eww" . eww) ("w3m" . w3m)))
;; End of file.

now load it as emacs -Q -l /path/to/web.el

and do:
C-h v web-alternatives RET
C-x b *Help* RET
TAB

at this point, your echo area should read:
  mouse-2, RET: find variable's definition
now go ahead and hit RET. echo area now displays:
  Unable to find location in file
and point is in a buffer visiting web.el, at beginning of buffer.

With the patch, the last message will not show up, and point will be
left at beginning of the line `(define-alternatives web)'

-- 
Nico.



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

* Re: eww
  2014-01-13 18:05     ` eww Lars Magne Ingebrigtsen
@ 2014-01-14 17:05       ` Richard Stallman
  2014-01-14 19:39         ` eww Bastien
  0 siblings, 1 reply; 61+ messages in thread
From: Richard Stallman @ 2014-01-14 17:05 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: lekktu, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    `browse-web' is the alias for `eww'.

That's a good, natural name.  However, the Emacs manual mentions
`eww', not `browse-web'.  I think that is a bug and needs to be
fixed.

The manual section on EWW says that itcan be one of the browsers used
by `browse-url'.  In effect, `browse-url' is an instance of the sort
of feature that `define-alternative' defines.

Perhaps we should set it up to ask the user, as if it were defined
with `define-alternative'.

Perhaps `eww' should be the default.  (Should it be the default?)

Perhaps the manual should document only `browse-url', not the
internals of the various alternatives.

I am not sure what is best, since I don't use those features.  But I
am sure we should get the user interface maximally simplified before
the release.  What do people think is best?

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: eww
  2014-01-14  0:00         ` eww Stefan Monnier
  2014-01-14  9:43           ` eww Bastien
@ 2014-01-14 17:06           ` Richard Stallman
  1 sibling, 0 replies; 61+ messages in thread
From: Richard Stallman @ 2014-01-14 17:06 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bzg, lekktu, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    If you try to jump to the source from "C-h v web-alternatives", Emacs
    won't find the right spot.

    You should be able to work around this use by adding to the macro
    something like

	   (put ',varname 'definition-name ',cmdname)

That would help with some tools, but etags still won't
recognize it.

Writing a defvar for the variable after the define-alternatives
would provide info to all the tools.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: eww
  2014-01-13 22:29       ` eww Bastien
@ 2014-01-14 17:06         ` Richard Stallman
  2014-01-14 20:22           ` eww Bastien
  0 siblings, 1 reply; 61+ messages in thread
From: Richard Stallman @ 2014-01-14 17:06 UTC (permalink / raw)
  To: Bastien; +Cc: lekktu, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    I guess for epa-* what is really needed is a better prefix,
    not a UI level for the users to chose alternatives--but maybe
    that's just because I don't know alternatives to epa-*.

Are there any alternatives to epa
that we ought to support?
If not, aliases would do fine.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: eww
  2014-01-14  9:43           ` eww Bastien
  2014-01-14 11:09             ` eww Nicolas Richard
@ 2014-01-14 17:58             ` Stefan Monnier
  2014-01-14 18:22               ` eww Bastien
  1 sibling, 1 reply; 61+ messages in thread
From: Stefan Monnier @ 2014-01-14 17:58 UTC (permalink / raw)
  To: Bastien; +Cc: lekktu, Richard Stallman, emacs-devel

>> If you try to jump to the source from "C-h v web-alternatives", Emacs
>> won't find the right spot.
> M-: (define-alternatives web) RET
> C-h web-alternatives RET
> will display a correct docstring for `web-alternatives'.
> What am I missing?

You're missing "you try to jump to the source".


        Stefan



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

* Re: eww
  2014-01-14 16:57                 ` eww Nicolas Richard
@ 2014-01-14 18:21                   ` Bastien
  2014-01-14 21:31                     ` eww Nicolas Richard
  2014-01-15 12:29                     ` eww Richard Stallman
  0 siblings, 2 replies; 61+ messages in thread
From: Bastien @ 2014-01-14 18:21 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: emacs-devel

Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:

> Put this in web.el :
> ;; some useful comments
> (define-alternatives web)
> (setq web-alternatives '(("eww" . eww) ("w3m" . w3m)))
> ;; End of file.
>
> now load it as emacs -Q -l /path/to/web.el
>
> and do:
> C-h v web-alternatives RET
> C-x b *Help* RET
> TAB
>
> at this point, your echo area should read:
>   mouse-2, RET: find variable's definition
> now go ahead and hit RET. echo area now displays:
>   Unable to find location in file
> and point is in a buffer visiting web.el, at beginning of buffer.

I cannot reproduce this, with the recipe above, RET jumps to the
correct location.

See http://bzg.fr/u/emacs-web-alternatives-jump.ogv

define-alternatives uses defcustom and defun internally, the behavior
I observe seems the right one to me.

-- 
 Bastien



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

* Re: eww
  2014-01-14 17:58             ` eww Stefan Monnier
@ 2014-01-14 18:22               ` Bastien
  0 siblings, 0 replies; 61+ messages in thread
From: Bastien @ 2014-01-14 18:22 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: lekktu, Richard Stallman, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> If you try to jump to the source from "C-h v web-alternatives", Emacs
>>> won't find the right spot.
>> M-: (define-alternatives web) RET
>> C-h web-alternatives RET
>> will display a correct docstring for `web-alternatives'.
>> What am I missing?
>
> You're missing "you try to jump to the source".

Well, that's because define-alternatives already lets
me jump to the source -- see my answer to Nicolas (with
video inside :)

-- 
 Bastien



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

* Re: eww
  2014-01-14 17:05       ` eww Richard Stallman
@ 2014-01-14 19:39         ` Bastien
  2014-01-15 12:29           ` eww Richard Stallman
  0 siblings, 1 reply; 61+ messages in thread
From: Bastien @ 2014-01-14 19:39 UTC (permalink / raw)
  To: Richard Stallman; +Cc: lekktu, Lars Magne Ingebrigtsen, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>     `browse-web' is the alias for `eww'.
>
> That's a good, natural name.  However, the Emacs manual mentions
> `eww', not `browse-web'.  I think that is a bug and needs to be
> fixed.

Before we go and fix the manual, I think the way people chose
the program for browsing the web can be made simpler.

Having both `browse-url' and `browse-web' is confusing IMHO.

What about:

1. replace the `browse-web' alias with `emacs-web-browser'.

2. let `browse-url' use `browse-url-graphical' or `browse-url-text'
   depending on whether (display-graphic-p) and on a a user option
   (if the user always want to use a text browser, for example.)

3. set the options `browse-url-graphical-alternatives' and
   `browse-url-text-alternatives' with `define-alternatives'
   which would offer relevant choices depending on what the user
   can use on its system.

When hitting `browse-url' for the first time in a terminal, the user
would have the choice between eww, w3 or w3m, for example.

When hitting `browse-url' for the first time in a window system,
the user would first have the choice to browse with a text browser,
or a window browser, then between (text or window) browsers.

C-u M-x browse-url RET would let him pick up another alternative
by passing the prefix universal argument to browse-url-graphical
or browse-url-text (for now the prefix tells whether to open a
new window/tab in the browser.)

It's probably a lot of work, but it would makes life easier for
users.  For now they rely on `browse-url' and will hardly hear
of `browse-web', wondering why there is a separate interface.

-- 
 Bastien



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

* Re: eww
  2014-01-14 17:06         ` eww Richard Stallman
@ 2014-01-14 20:22           ` Bastien
  2014-01-15 12:29             ` eww Richard Stallman
  0 siblings, 1 reply; 61+ messages in thread
From: Bastien @ 2014-01-14 20:22 UTC (permalink / raw)
  To: Richard Stallman; +Cc: lekktu, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>     I guess for epa-* what is really needed is a better prefix,
>     not a UI level for the users to chose alternatives--but maybe
>     that's just because I don't know alternatives to epa-*.
>
> Are there any alternatives to epa
> that we ought to support?

I don't think there is one, but I just browse this page:
http://www.emacswiki.org/emacs/CategoryCryptography

From what I saw, mailcrypt and pgg used to be widely used,
but mailcrypt is not active since 2002 and pgg is marked as
`obsolete' in Emacs.

> If not, aliases would do fine.

The problem is: what is the set of epa-* command for which
an alias is useful?

PS: I'm not using epa-* enough to decide myself.

-- 
 Bastien



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

* Re: eww
  2014-01-14 18:21                   ` eww Bastien
@ 2014-01-14 21:31                     ` Nicolas Richard
  2014-01-14 22:36                       ` eww Bastien
  2014-01-15 12:29                     ` eww Richard Stallman
  1 sibling, 1 reply; 61+ messages in thread
From: Nicolas Richard @ 2014-01-14 21:31 UTC (permalink / raw)
  To: emacs-devel

Bastien <bzg@gnu.org> writes:

> Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:
>
>> Put this in web.el :
>> ;; some useful comments
>> (define-alternatives web)
>> (setq web-alternatives '(("eww" . eww) ("w3m" . w3m)))
>> ;; End of file.
>>
>> now load it as emacs -Q -l /path/to/web.el
>>
>> and do:
>> C-h v web-alternatives RET
>> C-x b *Help* RET
>> TAB
>>
>> at this point, your echo area should read:
>>   mouse-2, RET: find variable's definition
>> now go ahead and hit RET. echo area now displays:
>>   Unable to find location in file
>> and point is in a buffer visiting web.el, at beginning of buffer.
>
> I cannot reproduce this, with the recipe above, RET jumps to the
> correct location.

Oops, I'm sorry, I made the test with the wrong file and thus gave the
wrong recipe.

Try this as a web.el:
;; some useful comments
(define-alternatives web)
;; End of file.

> See http://bzg.fr/u/emacs-web-alternatives-jump.ogv

Notice that point is moved in front of (setq ...), and not
(define-alternatives ...) although that is where the defcustom happens.
This is because the mechanism searches for the following regexp :
"^([^ ]+\\(?:\\s-\\|
\\|;.*
\\)+['(]?web-alternatives\\_>"

(this happens in find-function-search-for-symbol).

-- 
Nico.




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

* Re: eww
  2014-01-14 21:31                     ` eww Nicolas Richard
@ 2014-01-14 22:36                       ` Bastien
  0 siblings, 0 replies; 61+ messages in thread
From: Bastien @ 2014-01-14 22:36 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: emacs-devel

"Nicolas Richard" <theonewiththeevillook@yahoo.fr> writes:

> Oops, I'm sorry, I made the test with the wrong file and thus gave the
> wrong recipe.
>
> Try this as a web.el:
> ;; some useful comments
> (define-alternatives web)
> ;; End of file.

Ahhh, okay!

(I did not try this use-case because I don't see the point of using
(define-alternatives ...) without defining the set of alternatives.)

I applied the patch, thanks for your patience.

-- 
 Bastien



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

* Re: eww
  2014-01-14 18:21                   ` eww Bastien
  2014-01-14 21:31                     ` eww Nicolas Richard
@ 2014-01-15 12:29                     ` Richard Stallman
  2014-01-15 14:07                       ` eww Andreas Schwab
  1 sibling, 1 reply; 61+ messages in thread
From: Richard Stallman @ 2014-01-15 12:29 UTC (permalink / raw)
  To: Bastien; +Cc: theonewiththeevillook, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

I am pretty sure that etags can't see the definition of the variable
that define-alternatives defines.  It scans textually and can't
recognize macros unless it is specifically taught about them.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: eww
  2014-01-14 19:39         ` eww Bastien
@ 2014-01-15 12:29           ` Richard Stallman
  0 siblings, 0 replies; 61+ messages in thread
From: Richard Stallman @ 2014-01-15 12:29 UTC (permalink / raw)
  To: Bastien; +Cc: lekktu, larsi, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Your proposal seems good to me, but maybe it could be simplified.  I
am not sure we need the complexity of choosing a text browser and
separately a graphical browser.  Most new users only use Emacs in
graphical mode and will want only a graphical browser.

So I suggest this:

browse-url-text uses the preferred text browser.  The first time, it asks
the user to choose the preferred text browser.

browse-url-graphical uses the preferred graphical browser.  The first
time, it asks the user to choose the preferred graphical browser.

browse-url on a text terminal runs browse-url-text.

browse-url on a graphical terminal runs browse-url-graphical.

This way, most users will only need to remember browse-url,
and will only be asked once to choose a preferred browser.

Any comments?

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: eww
  2014-01-14 20:22           ` eww Bastien
@ 2014-01-15 12:29             ` Richard Stallman
  2014-01-17 12:50               ` Creating aliases for epa-* comands => crypt-* commands? (was: eww) Bastien
  0 siblings, 1 reply; 61+ messages in thread
From: Richard Stallman @ 2014-01-15 12:29 UTC (permalink / raw)
  To: Bastien; +Cc: lekktu, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    The problem is: what is the set of epa-* command for which
    an alias is useful?

I propose to make the alias for all the autoloaded functions in epa.el
and epa-mail.el.

Any counterproposals?

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: eww
  2014-01-15 12:29                     ` eww Richard Stallman
@ 2014-01-15 14:07                       ` Andreas Schwab
  2014-01-15 16:10                         ` eww Nicolas Richard
  2014-01-16 17:57                         ` eww Richard Stallman
  0 siblings, 2 replies; 61+ messages in thread
From: Andreas Schwab @ 2014-01-15 14:07 UTC (permalink / raw)
  To: rms; +Cc: Bastien, theonewiththeevillook, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> I am pretty sure that etags can't see the definition of the variable
> that define-alternatives defines.  It scans textually and can't
> recognize macros unless it is specifically taught about them.

etags treats all toplevel forms with a symbol starting with "def" as
defining a word, and registers the next word as a tag.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

* Re: eww
  2014-01-15 14:07                       ` eww Andreas Schwab
@ 2014-01-15 16:10                         ` Nicolas Richard
  2014-01-16 17:56                           ` eww Richard Stallman
  2014-01-16 17:57                         ` eww Richard Stallman
  1 sibling, 1 reply; 61+ messages in thread
From: Nicolas Richard @ 2014-01-15 16:10 UTC (permalink / raw)
  To: Andreas Schwab, rms; +Cc: Bastien, emacs-devel

Le 15/01/2014 15:07, Andreas Schwab a écrit :
> Richard Stallman <rms@gnu.org> writes:
> 
>> I am pretty sure that etags can't see the definition of the variable
>> that define-alternatives defines.  It scans textually and can't
>> recognize macros unless it is specifically taught about them.
> 
> etags treats all toplevel forms with a symbol starting with "def" as
> defining a word, and registers the next word as a tag.

Which means that 'web' will be a tag, but not web-alternatives, right ?
Is that a problem ? (I don't use tags for elisp)

-- 
Nico.




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

* Re: eww
  2014-01-15 16:10                         ` eww Nicolas Richard
@ 2014-01-16 17:56                           ` Richard Stallman
  2014-01-16 18:19                             ` eww Andreas Schwab
  2014-01-17 13:06                             ` eww Bastien
  0 siblings, 2 replies; 61+ messages in thread
From: Richard Stallman @ 2014-01-16 17:56 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: bzg, schwab, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    > etags treats all toplevel forms with a symbol starting with "def" as
    > defining a word, and registers the next word as a tag.

    Which means that 'web' will be a tag, but not web-alternatives, right ?

Right.

    Is that a problem ? (I don't use tags for elisp)

It is a problem for anyone that uses tags for elisp.

So I think we should recommend writing (defvar web-alternatives)
after (define-alternatives 'web).

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: eww
  2014-01-15 14:07                       ` eww Andreas Schwab
  2014-01-15 16:10                         ` eww Nicolas Richard
@ 2014-01-16 17:57                         ` Richard Stallman
  1 sibling, 0 replies; 61+ messages in thread
From: Richard Stallman @ 2014-01-16 17:57 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: bzg, theonewiththeevillook, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    > I am pretty sure that etags can't see the definition of the variable
    > that define-alternatives defines.  It scans textually and can't
    > recognize macros unless it is specifically taught about them.

    etags treats all toplevel forms with a symbol starting with "def" as
    defining a word, and registers the next word as a tag.

Right.  And the tag it registers is the next symbol.

So  (define-alternatives web ...)
will define web as a tag
but won't define web-alternative as a tag.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: eww
  2014-01-16 17:56                           ` eww Richard Stallman
@ 2014-01-16 18:19                             ` Andreas Schwab
  2014-01-17 14:10                               ` eww Richard Stallman
  2014-01-17 13:06                             ` eww Bastien
  1 sibling, 1 reply; 61+ messages in thread
From: Andreas Schwab @ 2014-01-16 18:19 UTC (permalink / raw)
  To: rms; +Cc: bzg, Nicolas Richard, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> So I think we should recommend writing (defvar web-alternatives)
> after (define-alternatives 'web).

That won't help, as etags will specifically ignore a defvar that just
declares a variable.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

* Creating aliases for epa-* comands => crypt-* commands? (was: eww)
  2014-01-15 12:29             ` eww Richard Stallman
@ 2014-01-17 12:50               ` Bastien
  2014-01-17 14:21                 ` Creating aliases for epa-* comands => crypt-* commands? Stefan Monnier
  0 siblings, 1 reply; 61+ messages in thread
From: Bastien @ 2014-01-17 12:50 UTC (permalink / raw)
  To: Richard Stallman; +Cc: lekktu, emacs-devel

(Moving this to a dedicated thread.)

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>     The problem is: what is the set of epa-* command for which
>     an alias is useful?
>
> I propose to make the alias for all the autoloaded functions in epa.el
> and epa-mail.el.
>
> Any counterproposals?

If there is no counterproposals soon, let me know and I will create
the aliases for epa-* autoloaded functions.

-- 
 Bastien



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

* Re: eww
  2014-01-16 17:56                           ` eww Richard Stallman
  2014-01-16 18:19                             ` eww Andreas Schwab
@ 2014-01-17 13:06                             ` Bastien
  2014-01-17 14:22                               ` eww Stefan Monnier
  2014-01-18  6:12                               ` eww Richard Stallman
  1 sibling, 2 replies; 61+ messages in thread
From: Bastien @ 2014-01-17 13:06 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Nicolas Richard, schwab, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> So I think we should recommend writing (defvar web-alternatives)
> after (define-alternatives 'web).

I pushed a docstring fix and here is how the docstring reads now:

  Define the new command `COMMAND'.
  
  The argument `COMMAND' should be a symbol.
  
  Running `M-x COMMAND RET' for the first time prompts for which
  alternative to use and records the selected command as a custom
  variable.
  
  Running `C-u M-x COMMAND RET' prompts again for an alternative
  and overwrites the previous choice.
  
  The variable `COMMAND-alternatives' contains an alist with
  alternative implementations of COMMAND.  Developers should
  use (defvar COMMAND-alternatives) to declare this variable
  after they write (define-alternatives COMMAND), otherwise
  the variable will not be handled by programs like etags.
  
  CUSTOMIZATIONS, if non-nil, should be composed of alternating
  `defcustom' keywords and values to add to the declaration of
  `COMMAND-alternatives' (typically :group and :version).

Let me know if this is clearer and correct.

-- 
 Bastien



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

* Re: eww
  2014-01-16 18:19                             ` eww Andreas Schwab
@ 2014-01-17 14:10                               ` Richard Stallman
  2014-01-17 15:04                                 ` eww Stefan Monnier
                                                   ` (2 more replies)
  0 siblings, 3 replies; 61+ messages in thread
From: Richard Stallman @ 2014-01-17 14:10 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: bzg, theonewiththeevillook, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    > So I think we should recommend writing (defvar web-alternatives)
    > after (define-alternatives 'web).

    That won't help, as etags will specifically ignore a defvar that just
    declares a variable.

I forgot.

What does it need, then?

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: Creating aliases for epa-* comands => crypt-* commands?
  2014-01-17 12:50               ` Creating aliases for epa-* comands => crypt-* commands? (was: eww) Bastien
@ 2014-01-17 14:21                 ` Stefan Monnier
  2014-01-17 14:30                   ` Bastien
  2014-01-18 12:33                   ` Richard Stallman
  0 siblings, 2 replies; 61+ messages in thread
From: Stefan Monnier @ 2014-01-17 14:21 UTC (permalink / raw)
  To: Bastien; +Cc: lekktu, Richard Stallman, emacs-devel

> If there is no counterproposals soon, let me know and I will create
> the aliases for epa-* autoloaded functions.

I think that as long as there is no existing alternative, it makes no
sense to provide aliases.  And we're talking about 30 autoloaded functions.


        Stefan



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

* Re: eww
  2014-01-17 13:06                             ` eww Bastien
@ 2014-01-17 14:22                               ` Stefan Monnier
  2014-01-17 14:59                                 ` eww Bastien
  2014-01-18  6:12                               ` eww Richard Stallman
  1 sibling, 1 reply; 61+ messages in thread
From: Stefan Monnier @ 2014-01-17 14:22 UTC (permalink / raw)
  To: Bastien; +Cc: Nicolas Richard, schwab, Richard Stallman, emacs-devel

> I pushed a docstring fix and here is how the docstring reads now:

Bad idea, since (defvar web-alternatives) won't help etags anyway.


        Stefan



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

* Re: Creating aliases for epa-* comands => crypt-* commands?
  2014-01-17 14:21                 ` Creating aliases for epa-* comands => crypt-* commands? Stefan Monnier
@ 2014-01-17 14:30                   ` Bastien
  2014-01-17 15:12                     ` Stefan Monnier
  2014-01-18 12:33                     ` Richard Stallman
  2014-01-18 12:33                   ` Richard Stallman
  1 sibling, 2 replies; 61+ messages in thread
From: Bastien @ 2014-01-17 14:30 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: lekktu, Richard Stallman, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> If there is no counterproposals soon, let me know and I will create
>> the aliases for epa-* autoloaded functions.
>
> I think that as long as there is no existing alternative, it makes no
> sense to provide aliases.  And we're talking about 30 autoloaded
> functions.

The idea was to make epa-* easier to discover by providing a better
prefix.  But I agree 30 aliases sounds too much.

-- 
 Bastien



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

* Re: eww
  2014-01-17 14:22                               ` eww Stefan Monnier
@ 2014-01-17 14:59                                 ` Bastien
  0 siblings, 0 replies; 61+ messages in thread
From: Bastien @ 2014-01-17 14:59 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Nicolas Richard, schwab, Richard Stallman, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I pushed a docstring fix and here is how the docstring reads now:
>
> Bad idea, since (defvar web-alternatives) won't help etags anyway.

Yes, I reverted the change.

-- 
 Bastien



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

* Re: eww
  2014-01-17 14:10                               ` eww Richard Stallman
@ 2014-01-17 15:04                                 ` Stefan Monnier
  2014-01-17 15:28                                   ` eww Eli Zaretskii
  2014-01-18 12:33                                   ` eww Richard Stallman
  2014-01-17 15:06                                 ` eww Andreas Schwab
  2014-01-17 15:23                                 ` eww Francesco Potortì
  2 siblings, 2 replies; 61+ messages in thread
From: Stefan Monnier @ 2014-01-17 15:04 UTC (permalink / raw)
  To: Richard Stallman; +Cc: bzg, theonewiththeevillook, Andreas Schwab, emacs-devel

> What does it need, then?

Nothing at all.  This problem with etags exists already with many other
macros and noone cares.  That's just life: etags is approximate, it
includes unneeded elements and lacks some elements it should have.
It is still 99% correct for Elisp, so some people use it very happily,
but there's no point uglifying the code just to try and make it work
99.01% instead.


        Stefan



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

* Re: eww
  2014-01-17 14:10                               ` eww Richard Stallman
  2014-01-17 15:04                                 ` eww Stefan Monnier
@ 2014-01-17 15:06                                 ` Andreas Schwab
  2014-01-17 15:23                                 ` eww Francesco Potortì
  2 siblings, 0 replies; 61+ messages in thread
From: Andreas Schwab @ 2014-01-17 15:06 UTC (permalink / raw)
  To: rms; +Cc: bzg, theonewiththeevillook, emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     > So I think we should recommend writing (defvar web-alternatives)
>     > after (define-alternatives 'web).
>
>     That won't help, as etags will specifically ignore a defvar that just
>     declares a variable.
>
> I forgot.
>
> What does it need, then?

This is the only exception, otherwise it will take anything.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

* Re: Creating aliases for epa-* comands => crypt-* commands?
  2014-01-17 14:30                   ` Bastien
@ 2014-01-17 15:12                     ` Stefan Monnier
  2014-01-17 15:18                       ` Vibhav Pant
                                         ` (2 more replies)
  2014-01-18 12:33                     ` Richard Stallman
  1 sibling, 3 replies; 61+ messages in thread
From: Stefan Monnier @ 2014-01-17 15:12 UTC (permalink / raw)
  To: Bastien; +Cc: lekktu, Richard Stallman, emacs-devel

>>> If there is no counterproposals soon, let me know and I will create
>>> the aliases for epa-* autoloaded functions.
>> I think that as long as there is no existing alternative, it makes no
>> sense to provide aliases.  And we're talking about 30 autoloaded
>> functions.
> The idea was to make epa-* easier to discover by providing a better
> prefix.  But I agree 30 aliases sounds too much.

I use EPA but have never needed to call something that has "epa" it
its name.  I just open a foo.gpg file and things "just work".
There's an "Encryption/Decryption" submenu which seems "discoverable".
In what sense does it need to be more "discoverable"?


        Stefan



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

* Re: Creating aliases for epa-* comands => crypt-* commands?
  2014-01-17 15:12                     ` Stefan Monnier
@ 2014-01-17 15:18                       ` Vibhav Pant
  2014-01-17 15:54                       ` Bastien
  2014-01-18 12:33                       ` Richard Stallman
  2 siblings, 0 replies; 61+ messages in thread
From: Vibhav Pant @ 2014-01-17 15:18 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel@gnu.org

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

>I use EPA but have never needed to call something that has "epa" it
>its name.  I just open a foo.gpg file and things "just work".
>There's an "Encryption/Decryption" submenu which seems "discoverable".
>In what sense does it need to be more "discoverable"?
>
>
>        Stefan

I guess an alias for mail-mode commands would help, as Epa is also used to sign emails.
- --
Vibhav Pant
vibhavp@gmail.com

Sent from my Android device with K-9 Mail. Please excuse my brevity.
-----BEGIN PGP SIGNATURE-----
Version: APG v1.0.9

iQI9BAEBCAAnBQJS2UmzIBxWaWJoYXYgUGFudCA8dmliaGF2cEBnbWFpbC5jb20+
AAoJEO86onTybWtcbWoQANbeG6hkfHCovww3qYkrE78jkitqWLhqVCvsPRA2Ab8Y
IAwQuPMg13zjRZ4hk7O0uOXkb2tpvrpB3BwwxePOva7aMo+UZguripk/9x/lGh8k
xio6HD71z/ouTS/MnyxAyRGCbm192RKqVc4BMW6VoLED0UixcgePlI1FODCsnMMO
MbTx7vX46gLg73jsyLGDEr3O2BJkH9lNjHWqWZENRvQ2U4yu/paH/a7sAoZh1Rma
Cx/rSyoheE3ikunwtB3/I0lXnGr/aRV/aTkx5d1xroY5pZRCU6Sgxl/imXYeioj9
WnEndfHOj55VAEJQL0RI69fJosYrSr7d6J6xn0mWYE7P5qOWo5rI4Gk5qh3zD1t4
yWpE4qq8pM13bt+67lPsdw2XbEn87xrS6uYQL+s71SFniC93evlP8GHacOYSlGRW
5xuvIRAmoEbemiwAwzeYjppmEDQr6Q6YVzBSmRg4HPTKyowjgpxgE9HmGgtma5FB
ybMdUWIBPZBReXLAbMkvNxyqXePxlNDKKev2gEx4bnQxJU6kJ3R0iANOJsE11lAH
weNG/qRuhN4FsbNLKrAE7gsi49g2+Ry46jRaGf4U6UlosOSdpWzglRDFIT35vIj8
XHqeO+L7kh0G4INk/NItVOC5uMjdykME+Y8U00UwHSjzOx4MaN4kEhczq3wW2bZW
=8jII
-----END PGP SIGNATURE-----




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

* Re: eww
  2014-01-17 14:10                               ` eww Richard Stallman
  2014-01-17 15:04                                 ` eww Stefan Monnier
  2014-01-17 15:06                                 ` eww Andreas Schwab
@ 2014-01-17 15:23                                 ` Francesco Potortì
  2 siblings, 0 replies; 61+ messages in thread
From: Francesco Potortì @ 2014-01-17 15:23 UTC (permalink / raw)
  To: rms; +Cc: bzg, theonewiththeevillook, Andreas Schwab, emacs-devel

>    > So I think we should recommend writing (defvar web-alternatives)
>    > after (define-alternatives 'web).
>
>    That won't help, as etags will specifically ignore a defvar that just
>    declares a variable.
>
>I forgot.
>
>What does it need, then?

A regexp file where elisp regexps are defined, or just definition of
command-line regexps on the command line in the Makefile:


-r REGEXP, --regex=REGEXP or --regex=@regexfile
        Make a tag for each line matching a regular expression pattern
	in the following files.  {LANGUAGE}REGEXP uses REGEXP for LANGUAGE
	files only.  REGEXFILE is a file containing one REGEXP per line.
	REGEXP takes the form /TAGREGEXP/TAGNAME/MODS, where TAGNAME/ is
	optional.  The TAGREGEXP pattern is anchored (as if preceded by ^).
	If TAGNAME/ is present, the tags created are named.
	For example Tcl named tags can be created with:
	  --regex="/proc[ \t]+\([^ \t]+\)/\1/.".
	MODS are optional one-letter modifiers: `i' means to ignore case,
	`m' means to allow multi-line matches, `s' implies `m' and
	causes dot to match any character, including newline.



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

* Re: eww
  2014-01-17 15:04                                 ` eww Stefan Monnier
@ 2014-01-17 15:28                                   ` Eli Zaretskii
  2014-01-17 16:04                                     ` eww Stefan Monnier
  2014-01-18 12:33                                   ` eww Richard Stallman
  1 sibling, 1 reply; 61+ messages in thread
From: Eli Zaretskii @ 2014-01-17 15:28 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bzg, theonewiththeevillook, schwab, rms, emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Fri, 17 Jan 2014 10:04:57 -0500
> Cc: bzg@gnu.org, theonewiththeevillook@yahoo.fr,
> 	Andreas Schwab <schwab@linux-m68k.org>, emacs-devel@gnu.org
> 
> > What does it need, then?
> 
> Nothing at all.  This problem with etags exists already with many other
> macros and noone cares.  That's just life: etags is approximate, it
> includes unneeded elements and lacks some elements it should have.
> It is still 99% correct for Elisp, so some people use it very happily,
> but there's no point uglifying the code just to try and make it work
> 99.01% instead.

If tagging those is important, we could use the --regex option to
etags.



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

* Re: Creating aliases for epa-* comands => crypt-* commands?
  2014-01-17 15:12                     ` Stefan Monnier
  2014-01-17 15:18                       ` Vibhav Pant
@ 2014-01-17 15:54                       ` Bastien
  2014-01-18 12:33                       ` Richard Stallman
  2 siblings, 0 replies; 61+ messages in thread
From: Bastien @ 2014-01-17 15:54 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: lekktu, Richard Stallman, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>>> If there is no counterproposals soon, let me know and I will create
>>>> the aliases for epa-* autoloaded functions.
>>> I think that as long as there is no existing alternative, it makes no
>>> sense to provide aliases.  And we're talking about 30 autoloaded
>>> functions.
>> The idea was to make epa-* easier to discover by providing a better
>> prefix.  But I agree 30 aliases sounds too much.
>
> I use EPA but have never needed to call something that has "epa" it
> its name.

Outside email encryption, where I don't need to remember the epa-*
prefix, I use epa-list-keys and occasionnally epa-import-keys.

When I forget about the prefix, I use the GUI gpa tool instead.

> I just open a foo.gpg file and things "just work".
> There's an "Encryption/Decryption" submenu which seems "discoverable".
> In what sense does it need to be more "discoverable"?

To help those who don't use the menu bar, I'd say.

Actually, gpg-* would be the best prefix for me.

If I tell a friend "You can list your keys from Emacs", that's what
he will certainly try first.  Not epa-list-keys, which is not even
available from a menu.

-- 
 Bastien



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

* Re: eww
  2014-01-17 15:28                                   ` eww Eli Zaretskii
@ 2014-01-17 16:04                                     ` Stefan Monnier
  0 siblings, 0 replies; 61+ messages in thread
From: Stefan Monnier @ 2014-01-17 16:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: bzg, theonewiththeevillook, schwab, rms, emacs-devel

> If tagging those is important, we could use the --regex option to
> etags.

Since noone ever bothered to create those for define-derived-mode and
other such macros, I can't imagine that it's important to do it for
define-alternative which is used just about nowhere.


        Stefan



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

* Re: eww
  2014-01-17 13:06                             ` eww Bastien
  2014-01-17 14:22                               ` eww Stefan Monnier
@ 2014-01-18  6:12                               ` Richard Stallman
  1 sibling, 0 replies; 61+ messages in thread
From: Richard Stallman @ 2014-01-18  6:12 UTC (permalink / raw)
  To: Bastien; +Cc: theonewiththeevillook, schwab, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    > So I think we should recommend writing (defvar web-alternatives)
    > after (define-alternatives 'web).

    I pushed a docstring fix and here is how the docstring reads now:

Unfortunately, someone pointed out that my recommendation
won't actually do the job.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: Creating aliases for epa-* comands => crypt-* commands?
  2014-01-17 14:21                 ` Creating aliases for epa-* comands => crypt-* commands? Stefan Monnier
  2014-01-17 14:30                   ` Bastien
@ 2014-01-18 12:33                   ` Richard Stallman
  2014-01-19  1:53                     ` Stefan Monnier
  1 sibling, 1 reply; 61+ messages in thread
From: Richard Stallman @ 2014-01-18 12:33 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bzg, lekktu, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    > If there is no counterproposals soon, let me know and I will create
    > the aliases for epa-* autoloaded functions.

    I think that as long as there is no existing alternative, it makes no
    sense to provide aliases.  And we're talking about 30 autoloaded functions.

The purpose of this change is to get rid of one case where users have
to say, "What did they call that?"  If the command to encrypt a file
is called `epa-mail-encrypt, "epa" is a gratuitous memory obstacle.
If it is `crypt-encrypt-message' or `encrypt-message'.

Let's make Emacs easier for people to learn by cleaning up these
unnecessary rough spots.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: Creating aliases for epa-* comands => crypt-* commands?
  2014-01-17 14:30                   ` Bastien
  2014-01-17 15:12                     ` Stefan Monnier
@ 2014-01-18 12:33                     ` Richard Stallman
  1 sibling, 0 replies; 61+ messages in thread
From: Richard Stallman @ 2014-01-18 12:33 UTC (permalink / raw)
  To: Bastien; +Cc: lekktu, monnier, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    The idea was to make epa-* easier to discover by providing a better
    prefix.  But I agree 30 aliases sounds too much.

The aliases cost very little; what's wrong with 30 of them?
Or maybe we need fewer aliases, only for the commands you would
not get at thru the menu in a .gpg file.

The main job will be to change the documentation.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: eww
  2014-01-17 15:04                                 ` eww Stefan Monnier
  2014-01-17 15:28                                   ` eww Eli Zaretskii
@ 2014-01-18 12:33                                   ` Richard Stallman
  2014-01-19  2:12                                     ` eww Stefan Monnier
  1 sibling, 1 reply; 61+ messages in thread
From: Richard Stallman @ 2014-01-18 12:33 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bzg, theonewiththeevillook, schwab, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    Nothing at all.  This problem with etags exists already with many other
    macros and noone cares.

Are you sure no one cares?  When people look for a tag, and it isn't
defined, they will hunt around and find it somehow.

These problems are sloppinesses, and we can avoid them by taking a little
care in defining the macros, or by making etags recognize them specially.

    Since noone ever bothered to create those for define-derived-mode and
    other such macros, I can't imagine that it's important to do it for
    define-alternative which is used just about nowhere.

It's bad in define-derived-mode, too.  It's unfortunate
that there is no tag for `...-mode-map'.  However, at least
the presence of `mode' will suggest to people where they should look.
There is no comparable word in `web-alternatives' to suggest where
to look.

We could make find-tag know about these cases, so it will find
the tags anyway.  That won't even make tag tables do it.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: Creating aliases for epa-* comands => crypt-* commands?
  2014-01-17 15:12                     ` Stefan Monnier
  2014-01-17 15:18                       ` Vibhav Pant
  2014-01-17 15:54                       ` Bastien
@ 2014-01-18 12:33                       ` Richard Stallman
  2 siblings, 0 replies; 61+ messages in thread
From: Richard Stallman @ 2014-01-18 12:33 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bzg, lekktu, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    I use EPA but have never needed to call something that has "epa" it
    its name.  I just open a foo.gpg file and things "just work".
    There's an "Encryption/Decryption" submenu which seems "discoverable".
    In what sense does it need to be more "discoverable"?

I never tried doing encryption by visiting a file named .gpg.
It never occurred to me to try that.  Mostly I do it in emails,
incoming and outgoing.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: Creating aliases for epa-* comands => crypt-* commands?
  2014-01-18 12:33                   ` Richard Stallman
@ 2014-01-19  1:53                     ` Stefan Monnier
  2014-01-19 12:13                       ` Richard Stallman
  0 siblings, 1 reply; 61+ messages in thread
From: Stefan Monnier @ 2014-01-19  1:53 UTC (permalink / raw)
  To: Richard Stallman; +Cc: bzg, lekktu, emacs-devel

> The purpose of this change is to get rid of one case where users have
> to say, "What did they call that?"  If the command to encrypt a file
> is called `epa-mail-encrypt, "epa" is a gratuitous memory obstacle.
> If it is `crypt-encrypt-message' or `encrypt-message'.

I'm not necessarily opposed to such targeted aliases.
This said, this is no bug fix, so it can wait for after 24.4.
In the mean time, you can come up with a list of commands and good
aliases for them.


        Stefan



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

* Re: eww
  2014-01-18 12:33                                   ` eww Richard Stallman
@ 2014-01-19  2:12                                     ` Stefan Monnier
  2014-01-19 11:35                                       ` eww Francesco Potortì
  2014-01-20  9:14                                       ` eww Richard Stallman
  0 siblings, 2 replies; 61+ messages in thread
From: Stefan Monnier @ 2014-01-19  2:12 UTC (permalink / raw)
  To: Richard Stallman; +Cc: bzg, theonewiththeevillook, schwab, emacs-devel

>     Nothing at all.  This problem with etags exists already with many other
>     macros and noone cares.
> Are you sure no one cares?

I guess that's a rhetorical question, since you seem to care, and
obviously I can't be sure anyway.

> When people look for a tag, and it isn't defined, they will hunt
> around and find it somehow.

As stated it's part of etags's problems, and it's true for uses of etags
with any language that provides a macro facility, AFAIK.  etags probably
also suffers from similar problems (missed tags) in various other corner
cases even for language without macros.

People who care enough about these issues probably just use something
else than etags.  Otherwise we'd already have had plenty more bug reports
along these lines.

> These problems are sloppinesses, and we can avoid them by taking a little
> care in defining the macros, or by making etags recognize them specially.

I wouldn't call it "a little care defining the macro" but rather
"disfiguring the macro".

> It's bad in define-derived-mode, too.  It's unfortunate
> that there is no tag for `...-mode-map'.

It's not just ..-mode-map, but also ..-abbrev-table, ..-syntax-table,
and ..-mode-hook.

> However, at least the presence of `mode' will suggest to people where
> they should look.  There is no comparable word in `web-alternatives'
> to suggest where to look.

My guess is that they'll do `C-h v web-alternatives' then click on the
button to jump to the source code, and ... tadaa!!
No problem with etags because they didn't need to use etags for that.

> We could make find-tag know about these cases, so it will find
> the tags anyway.

`find-tag' works for dozens of different languages.  Why should it
suddenly be uglified with special hacks for one of those languages (and
one where etags is particularly less important because this one language
happens to be the one that's only edited from Emacs where things like
`C-h v' and `C-h f' work even more reliably than etags and without
having to build and update any TAGS table)?

> That won't even make tag tables do it.

If we want find-tag to do the right thing, the right way to do it is by
teaching `etags' to recognizes macros like define-derived-mode and add
corresponding entries in the TAGS file.


        Stefan



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

* Re: eww
  2014-01-19  2:12                                     ` eww Stefan Monnier
@ 2014-01-19 11:35                                       ` Francesco Potortì
  2014-01-20  9:14                                       ` eww Richard Stallman
  1 sibling, 0 replies; 61+ messages in thread
From: Francesco Potortì @ 2014-01-19 11:35 UTC (permalink / raw)
  To: Stefan Monnier
  Cc: bzg, theonewiththeevillook, schwab, Richard Stallman, emacs-devel

>If we want find-tag to do the right thing, the right way to do it is by
>teaching `etags' to recognizes macros like define-derived-mode and add
>corresponding entries in the TAGS file.

I agree, and it's very easy.  Just create a file containing regexps to
be distributed allong with the Makefile, or else (uglier but does not
require a separate file) just put the regexps on the Makefile's etags
command line.



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

* Re: Creating aliases for epa-* comands => crypt-* commands?
  2014-01-19  1:53                     ` Stefan Monnier
@ 2014-01-19 12:13                       ` Richard Stallman
  0 siblings, 0 replies; 61+ messages in thread
From: Richard Stallman @ 2014-01-19 12:13 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bzg, lekktu, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    I'm not necessarily opposed to such targeted aliases.
    This said, this is no bug fix, so it can wait for after 24.4.

We should fix it before the next reprinting of the Emacs manual.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: eww
  2014-01-19  2:12                                     ` eww Stefan Monnier
  2014-01-19 11:35                                       ` eww Francesco Potortì
@ 2014-01-20  9:14                                       ` Richard Stallman
  1 sibling, 0 replies; 61+ messages in thread
From: Richard Stallman @ 2014-01-20  9:14 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bzg, theonewiththeevillook, schwab, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    > It's bad in define-derived-mode, too.  It's unfortunate
    > that there is no tag for `...-mode-map'.

    It's not just ..-mode-map, but also ..-abbrev-table, ..-syntax-table,
    and ..-mode-hook.

That's right.  I mentioned just the one that matters most.
The others add a little to the point.

    `find-tag' works for dozens of different languages.  Why should it
    suddenly be uglified with special hacks for one of those languages

The code would be a tiny bit more complex, but the behavior
would be simpler and more regular.  I think that is cleaner
than generating extra tags.  Also it's better to change Lisp code
than change C code.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

end of thread, other threads:[~2014-01-20  9:14 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-12 13:46 eww Richard Stallman
2014-01-12 13:50 ` eww Juanma Barranquero
2014-01-13 11:20   ` eww Bastien
2014-01-13 17:44     ` eww Davis Herring
2014-01-13 22:19       ` eww Bastien
2014-01-13 19:36     ` eww Richard Stallman
2014-01-13 22:29       ` eww Bastien
2014-01-14 17:06         ` eww Richard Stallman
2014-01-14 20:22           ` eww Bastien
2014-01-15 12:29             ` eww Richard Stallman
2014-01-17 12:50               ` Creating aliases for epa-* comands => crypt-* commands? (was: eww) Bastien
2014-01-17 14:21                 ` Creating aliases for epa-* comands => crypt-* commands? Stefan Monnier
2014-01-17 14:30                   ` Bastien
2014-01-17 15:12                     ` Stefan Monnier
2014-01-17 15:18                       ` Vibhav Pant
2014-01-17 15:54                       ` Bastien
2014-01-18 12:33                       ` Richard Stallman
2014-01-18 12:33                     ` Richard Stallman
2014-01-18 12:33                   ` Richard Stallman
2014-01-19  1:53                     ` Stefan Monnier
2014-01-19 12:13                       ` Richard Stallman
2014-01-13 19:36     ` eww Richard Stallman
2014-01-13 22:25       ` eww Bastien
2014-01-14  0:00         ` eww Stefan Monnier
2014-01-14  9:43           ` eww Bastien
2014-01-14 11:09             ` eww Nicolas Richard
2014-01-14 16:39               ` eww Bastien
2014-01-14 16:57                 ` eww Nicolas Richard
2014-01-14 18:21                   ` eww Bastien
2014-01-14 21:31                     ` eww Nicolas Richard
2014-01-14 22:36                       ` eww Bastien
2014-01-15 12:29                     ` eww Richard Stallman
2014-01-15 14:07                       ` eww Andreas Schwab
2014-01-15 16:10                         ` eww Nicolas Richard
2014-01-16 17:56                           ` eww Richard Stallman
2014-01-16 18:19                             ` eww Andreas Schwab
2014-01-17 14:10                               ` eww Richard Stallman
2014-01-17 15:04                                 ` eww Stefan Monnier
2014-01-17 15:28                                   ` eww Eli Zaretskii
2014-01-17 16:04                                     ` eww Stefan Monnier
2014-01-18 12:33                                   ` eww Richard Stallman
2014-01-19  2:12                                     ` eww Stefan Monnier
2014-01-19 11:35                                       ` eww Francesco Potortì
2014-01-20  9:14                                       ` eww Richard Stallman
2014-01-17 15:06                                 ` eww Andreas Schwab
2014-01-17 15:23                                 ` eww Francesco Potortì
2014-01-17 13:06                             ` eww Bastien
2014-01-17 14:22                               ` eww Stefan Monnier
2014-01-17 14:59                                 ` eww Bastien
2014-01-18  6:12                               ` eww Richard Stallman
2014-01-16 17:57                         ` eww Richard Stallman
2014-01-14 17:58             ` eww Stefan Monnier
2014-01-14 18:22               ` eww Bastien
2014-01-14 17:06           ` eww Richard Stallman
2014-01-13 22:18     ` eww Bastien
2014-01-14  0:45       ` eww Juanma Barranquero
2014-01-13 15:41   ` eww Richard Stallman
2014-01-13 18:05     ` eww Lars Magne Ingebrigtsen
2014-01-14 17:05       ` eww Richard Stallman
2014-01-14 19:39         ` eww Bastien
2014-01-15 12:29           ` eww Richard Stallman

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).