Bug#773585: php-elisp: Wrong indention of function arguments in subsequent lines

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#773585: php-elisp: Wrong indention of function arguments in subsequent lines

Joey Schulze
Package: php-elisp
Version: 1.13.5-1
Severity: normal

Dear Maintainer,

the current version of php-mode indents function arguments that are
written in subsequent lines in as follows:

$var = array('value 0',
'value 1',
'value 2');

An earlier version of php-mode indented the same code different and
much better:

$var = array('value 0',
             'value 1',
             'value 2');

Please forward this upstream and/or restore the old behaviour

Regards

        Joey

Versions of packages php-elisp depends on:
ii  emacs22 [emacsen]  22.3+1-1.2
ii  emacs23 [emacsen]  23.4+1-4.1+b1

Versions of packages php-elisp recommends:
pn  speedbar  <none>

Versions of packages php-elisp suggests:
ii  php5      5.6.3+dfsg-1
ii  php5-cli  5.6.3+dfsg-1

-- no debconf information


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Bug#773585: php-elisp: Wrong indention of function arguments in subsequent lines

Ola Lundqvist-3

Hi

Please try drupal mode or any other of the variants.

I think the command is enable-(mode name)

/ Ola

Inguza Technology AB
Sent from a phone

Den 20 dec 2014 13:30 skrev "Joey Schulze" <[hidden email]>:
Package: php-elisp
Version: 1.13.5-1
Severity: normal

Dear Maintainer,

the current version of php-mode indents function arguments that are
written in subsequent lines in as follows:

$var = array('value 0',
'value 1',
'value 2');

An earlier version of php-mode indented the same code different and
much better:

$var = array('value 0',
             'value 1',
             'value 2');

Please forward this upstream and/or restore the old behaviour

Regards

        Joey

Versions of packages php-elisp depends on:
ii  emacs22 [emacsen]  22.3+1-1.2
ii  emacs23 [emacsen]  23.4+1-4.1+b1

Versions of packages php-elisp recommends:
pn  speedbar  <none>

Versions of packages php-elisp suggests:
ii  php5      5.6.3+dfsg-1
ii  php5-cli  5.6.3+dfsg-1

-- no debconf information

Reply | Threaded
Open this post in threaded view
|

Bug#773585: php-elisp: Wrong indention of function arguments in subsequent lines

Joey Schulze
Hi Ola!

Ola Lundqvist wrote:
> Hi
>
> Please try drupal mode or any other of the variants.

How?

> I think the command is enable-(mode name)

In interactive mode M-x shows:

Possible completions are:
enable-command
enable-flow-control
enable-theme

Regards

        Joey

--
In the beginning was the word, and the word was content-type: text/plain

Please always Cc to me when replying to me on the lists.


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Bug#773585: php-elisp: Wrong indention of function arguments in subsequent lines

Ola Lundqvist-3

I'll check.

Inguza Technology AB
Sent from a phone

Den 20 dec 2014 14:57 skrev "Martin Schulze" <[hidden email]>:
Hi Ola!

Ola Lundqvist wrote:
> Hi
>
> Please try drupal mode or any other of the variants.

How?

> I think the command is enable-(mode name)

In interactive mode M-x shows:

Possible completions are:
enable-command
enable-flow-control
enable-theme

Regards

        Joey

--
In the beginning was the word, and the word was content-type: text/plain

Please always Cc to me when replying to me on the lists.
Reply | Threaded
Open this post in threaded view
|

Bug#773585: php-elisp: Wrong indention of function arguments in subsequent lines

Ola Lundqvist-3
In reply to this post by Joey Schulze
Hi

Now I have checked. I missed the php- prefix.

The interactive mode M-x commands are:
php-enable-...-coding-style

In at least drupal coding style it works as you expect. I do not know why it does not work that way with the other ones.

// Ola

On Sat, Dec 20, 2014 at 2:53 PM, Martin Schulze <[hidden email]> wrote:
Hi Ola!

Ola Lundqvist wrote:
> Hi
>
> Please try drupal mode or any other of the variants.

How?

> I think the command is enable-(mode name)

In interactive mode M-x shows:

Possible completions are:
enable-command
enable-flow-control
enable-theme

Regards

        Joey

--
In the beginning was the word, and the word was content-type: text/plain

Please always Cc to me when replying to me on the lists.



--
 --- Inguza Technology AB --- MSc in Information Technology ----
/  [hidden email]                    Annebergsslingan 37        \
|  [hidden email]                   654 65 KARLSTAD            |
|  http://inguza.com/                Mobile: +46 (0)70-332 1551 |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9  /
 ---------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Bug#773585: php-elisp: Wrong indention of function arguments in subsequent lines

Ola Lundqvist-3
Hi again

After some more investigation I realize that you are not referring to function calls but rather arrays.
In case you write like this:

array(
     'a',
     'b');

It will indent correctly. It is only, when you have the first item on the same line as the array statement, that you get the wrong indentation.

I do not know how much that helps but maybe it does.

// Ola

On Sat, Dec 20, 2014 at 9:25 PM, Ola Lundqvist <[hidden email]> wrote:
Hi

Now I have checked. I missed the php- prefix.

The interactive mode M-x commands are:
php-enable-...-coding-style

In at least drupal coding style it works as you expect. I do not know why it does not work that way with the other ones.

// Ola

On Sat, Dec 20, 2014 at 2:53 PM, Martin Schulze <[hidden email]> wrote:
Hi Ola!

Ola Lundqvist wrote:
> Hi
>
> Please try drupal mode or any other of the variants.

How?

> I think the command is enable-(mode name)

In interactive mode M-x shows:

Possible completions are:
enable-command
enable-flow-control
enable-theme

Regards

        Joey

--
In the beginning was the word, and the word was content-type: text/plain

Please always Cc to me when replying to me on the lists.



--
 --- Inguza Technology AB --- MSc in Information Technology ----
/  [hidden email]                    Annebergsslingan 37        \
|  [hidden email]                   654 65 KARLSTAD            |
|  http://inguza.com/                Mobile: <a href="tel:%2B46%20%280%2970-332%201551" value="+46703321551" target="_blank">+46 (0)70-332 1551 |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9  /
 ---------------------------------------------------------------




--
 --- Inguza Technology AB --- MSc in Information Technology ----
/  [hidden email]                    Annebergsslingan 37        \
|  [hidden email]                   654 65 KARLSTAD            |
|  http://inguza.com/                Mobile: +46 (0)70-332 1551 |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9  /
 ---------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Bug#773585: php-elisp: Wrong indention of function arguments in subsequent lines

Joey Schulze
Hi!

Ola Lundqvist wrote:
> Hi again
>
> After some more investigation I realize that you are not referring to
> function calls but rather arrays.

The array creation function "array" is a function according to PHP.

Nevertheless php-mode indented the same way for other function calls.

> In case you write like this:
>
> array(
>      'a',
>      'b');
>
> It will indent correctly. It is only, when you have the first item on the
> same line as the array statement, that you get the wrong indentation.

Interesting.

However, I assume not many people will write code like

$obj = new MyClass(
  "long string or function call with several parameters",
  "long string or function call with several parameters",
  "long string or function call with several parameters");

$obj->printSomething(
  "another string to be printed",
  "even more text");

instead of

$obj = new MyClass("long string or function call with several parameters",
                   "long string or function call with several parameters",
                   "long string or function call with several parameters");

$obj->printSomething("another string to be printed",
                     "even more text");


> I do not know how much that helps but maybe it does.

The other hint - still to be tried out - has more potential to be helpful. :)

In the meantime I've secured the .el file from 1.5.0 :)

Regards

        Joey

--
In the beginning was the word, and the word was content-type: text/plain

Please always Cc to me when replying to me on the lists.


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Bug#773585: php-elisp: Wrong indention of function arguments in subsequent lines

Roland Rosenfeld
In reply to this post by Joey Schulze
On Sa, 20 Dez 2014, Joey Schulze wrote:

> Package: php-elisp
> Version: 1.13.5-1
> Severity: normal

> the current version of php-mode indents function arguments that are
> written in subsequent lines in as follows:
>
> $var = array('value 0',
> 'value 1',
> 'value 2');
>
> An earlier version of php-mode indented the same code different and
> much better:
>
> $var = array('value 0',
>     'value 1',
>     'value 2');
>
> Please forward this upstream and/or restore the old behaviour

Just for the records: https://github.com/ejmr/php-mode/issues/128
mentions the same issue since 2013-09-07, but is still open.

Tschoeeee

        Roland

--
Roland Rosenfeld  -  Teamverantwortlicher Content Delivery  -  NED  -  Technik
NETCOLOGNE Gesellschaft für Telekommunikation mbH
Am Coloneum 9   50829 Köln   Tel.: +49 221 2222-373   Fax: +49 221 2222-7373
Geschäftsführung: Timo von Lepel, Mario Wilhelm
Vorsitzender des Aufsichtsrates: Dr. Andreas Cerbe        HRB 25580, AG Köln

Reply | Threaded
Open this post in threaded view
|

Bug#773585: php-elisp: Wrong indention of function arguments in subsequent lines

Roland Rosenfeld-2
On Mi, 07 Feb 2018, Roland Rosenfeld wrote:

> Just for the records: https://github.com/ejmr/php-mode/issues/128
> mentions the same issue since 2013-09-07, but is still open.

I just tried to build 1.18.4 (current github version) as a Debian
package.  This builds without any changes, throws some errors on
installing but seems to work as expected (i.e. this bug seems to be
solved).

Tschoeeee

        Roland

Reply | Threaded
Open this post in threaded view
|

Bug#773585: php-elisp: Wrong indention of function arguments in subsequent lines

Ola Lundqvist-4
Hi

Thank you!

Sent from a phone

Den 7 feb 2018 16:48 skrev "Roland Rosenfeld" <[hidden email]>:
On Mi, 07 Feb 2018, Roland Rosenfeld wrote:

> Just for the records: https://github.com/ejmr/php-mode/issues/128
> mentions the same issue since 2013-09-07, but is still open.

I just tried to build 1.18.4 (current github version) as a Debian
package.  This builds without any changes, throws some errors on
installing but seems to work as expected (i.e. this bug seems to be
solved).

Tschoeeee

        Roland
Reply | Threaded
Open this post in threaded view
|

Bug#773585: Please confirm bug affects 1.21.0-1

Nicholas D Steeves
In reply to this post by Joey Schulze
Hi,

The Debian Emacsen Team just adopted this package.  If you're running
Debian 10 (Stretch) or newer, would you please consider testing an
updated version of php-elisp and confirming whether 1.21.0-1 is still
affected?

Here's how:

# sudo apt install wget
# wget http://ftp.debian.org/debian/pool/main/p/php-elisp/elpa-php-mode_1.21.0-1_all.deb
# wget http://ftp.debian.org/debian/pool/main/p/php-elisp/php-elisp_1.21.0-1_all.deb
# sudo apt purge php-elisp
# sudo dpkg -i elpa-php-mode_1.21.0-1_all.deb php-elisp_1.21.0-1_all.deb

P.S. Please read the NEWS.


Thanks!
Nicholas