all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* c-style (and also projectile)
@ 2022-05-05 14:25 Luca Ferrari
  2022-05-05 14:39 ` Robert Pluim
  0 siblings, 1 reply; 6+ messages in thread
From: Luca Ferrari @ 2022-05-05 14:25 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,
I feel a little dumb here, but is there a way to change on the fly the
c-style for a buffer? At the moment it seems I cannot find it.

Also I would like to know if using projectile (or project.el) there is
a way to set a particular style for a single project.

Thanks,
Luca



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

* Re: c-style (and also projectile)
  2022-05-05 14:25 c-style (and also projectile) Luca Ferrari
@ 2022-05-05 14:39 ` Robert Pluim
  2022-05-05 15:11   ` Luca Ferrari
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Pluim @ 2022-05-05 14:39 UTC (permalink / raw)
  To: Luca Ferrari; +Cc: help-gnu-emacs

>>>>> On Thu, 5 May 2022 16:25:10 +0200, Luca Ferrari <fluca1978@gmail.com> said:

    Luca> Hi all,
    Luca> I feel a little dumb here, but is there a way to change on the fly the
    Luca> c-style for a buffer? At the moment it seems I cannot find it.

`c-set-style'? Bound to "C-c ." here.

    Luca> Also I would like to know if using projectile (or project.el) there is
    Luca> a way to set a particular style for a single project.

I know nothing about projectile or project, but you can put stuff like
this in a .dir-locals.el file, eg

;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")

((c-mode . ((c-file-style . "GNU")
            (indent-tabs-mode . t))))

Robert
-- 



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

* Re: c-style (and also projectile)
  2022-05-05 14:39 ` Robert Pluim
@ 2022-05-05 15:11   ` Luca Ferrari
  2022-05-05 15:17     ` Robert Pluim
  0 siblings, 1 reply; 6+ messages in thread
From: Luca Ferrari @ 2022-05-05 15:11 UTC (permalink / raw)
  To: Robert Pluim; +Cc: help-gnu-emacs

On Thu, May 5, 2022 at 4:39 PM Robert Pluim <rpluim@gmail.com> wrote:
>
> >>>>> On Thu, 5 May 2022 16:25:10 +0200, Luca Ferrari <fluca1978@gmail.com> said:
>
>     Luca> Hi all,
>     Luca> I feel a little dumb here, but is there a way to change on the fly the
>     Luca> c-style for a buffer? At the moment it seems I cannot find it.
>
> `c-set-style'? Bound to "C-c ." here.

That was easy, thank!

> ;;; Directory Local Variables
> ;;; For more information see (info "(emacs) Directory Variables")
>
> ((c-mode . ((c-file-style . "GNU")
>             (indent-tabs-mode . t))))

Great, it works greatly! Any chance it can be loaded even when using tramp?

Luca



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

* Re: c-style (and also projectile)
  2022-05-05 15:11   ` Luca Ferrari
@ 2022-05-05 15:17     ` Robert Pluim
  2022-05-05 15:42       ` Michael Albinus
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Pluim @ 2022-05-05 15:17 UTC (permalink / raw)
  To: Luca Ferrari; +Cc: help-gnu-emacs

>>>>> On Thu, 5 May 2022 17:11:21 +0200, Luca Ferrari <fluca1978@gmail.com> said:

    >> ;;; Directory Local Variables
    >> ;;; For more information see (info "(emacs) Directory Variables")
    >> 
    >> ((c-mode . ((c-file-style . "GNU")
    >> (indent-tabs-mode . t))))

    Luca> Great, it works greatly! Any chance it can be loaded even when using tramp?

I donʼt think that works, but if you send email to
tramp-devel@gnu.org, the developer of Tramp is quite responsive.

Robert
-- 



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

* Re: c-style (and also projectile)
  2022-05-05 15:17     ` Robert Pluim
@ 2022-05-05 15:42       ` Michael Albinus
  2022-05-09 14:14         ` Luca Ferrari
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Albinus @ 2022-05-05 15:42 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Luca Ferrari, help-gnu-emacs

Robert Pluim <rpluim@gmail.com> writes:

Hi,

>     >> ;;; Directory Local Variables
>     >> ;;; For more information see (info "(emacs) Directory Variables")
>     >> 
>     >> ((c-mode . ((c-file-style . "GNU")
>     >> (indent-tabs-mode . t))))
>
>     Luca> Great, it works greatly! Any chance it can be loaded even when using tramp?
>
> I donʼt think that works, but if you send email to
> tramp-devel@gnu.org, the developer of Tramp is quite responsive.

There is enable-remote-dir-locals. When set to non-nil, remote
.dir-locals.el will be read.

> Robert

Best regards, Michael.



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

* Re: c-style (and also projectile)
  2022-05-05 15:42       ` Michael Albinus
@ 2022-05-09 14:14         ` Luca Ferrari
  0 siblings, 0 replies; 6+ messages in thread
From: Luca Ferrari @ 2022-05-09 14:14 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Robert Pluim, help-gnu-emacs

On Thu, May 5, 2022 at 5:42 PM Michael Albinus <michael.albinus@gmx.de> wrote:
> There is enable-remote-dir-locals. When set to non-nil, remote
> .dir-locals.el will be read.

Works!

Thanks,
Luca



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

end of thread, other threads:[~2022-05-09 14:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 14:25 c-style (and also projectile) Luca Ferrari
2022-05-05 14:39 ` Robert Pluim
2022-05-05 15:11   ` Luca Ferrari
2022-05-05 15:17     ` Robert Pluim
2022-05-05 15:42       ` Michael Albinus
2022-05-09 14:14         ` Luca Ferrari

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.