Code Monkey home page Code Monkey logo

Comments (11)

ejmr avatar ejmr commented on July 17, 2024

Sorry but I cannot replicate this. If I copy-paste the example you give then I do get indentation when I press Tab at that point. What version of Emacs are you using and what are the values of php-mode-version-number and php-mode-modified? That may help me replicate it. Thanks for bringing this up.

from php-mode.

etu avatar etu commented on July 17, 2024

emacs: GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.12) of 2012-11-06 on zarquon

php-mode-version-number: 1.6.6
php-mode-modified: 2012-09-06

from php-mode.

ejmr avatar ejmr commented on July 17, 2024

That will help a lot. Thanks.

from php-mode.

ejmr avatar ejmr commented on July 17, 2024

I switched back to the versions you described above and unfortunately still could not replicate this issue. So for the time being I am at a loss. However I am going to leave this bug open just in case someone runs into the same problem. There is another open issue related to indentation I need to address so I am hoping that I fix this issue too in the cross-fire.

from php-mode.

marcinant avatar marcinant commented on July 17, 2024

I cannot duplicate this issue too.

On my Emacs 24.2.90.1 and php-mode 1.9 indentation is ok.

from php-mode.

ejmr avatar ejmr commented on July 17, 2024

Thanks for the report marcinant.

@etu I have asked a few friends to try out this issue on their machines and could not replicate it as well, so honestly I am at a loss. I am going to close this bug, however I keep a personal project todo-list in the folder and I am keeping this item on there, just so I will remember to keep an eye open for it. I'm sorry I haven't been able to figure out why it does not work for you the way it should. But there is a test case in the repository now so that I (and anyone else) can check to see if any future work done regarding indentation has an effect. Hopefully we'll figure this out soon.

from php-mode.

forthrin avatar forthrin commented on July 17, 2024

@ejmr: I regret to report this DOES still happen, in the worst possible way: Irreproducible. Retelling:

  1. Start with some code (1st example)
  2. Add braces around echo
  3. Press tab on echo line
  4. Incorrect indentation! (2nd example) -- but only when the tide is high in India
  5. Remove shebang line
  6. Repeat 3
  7. Correct indentation!
  8. Add shebang line
  9. Save, kill and re-open file
  10. Repeat 3
  11. Correct indentation! WTF!?

Can the fact the error goes away when you reopen the buffer help fix this pesky varmint?

#!/usr/bin/env php
<?php

$file = file_get_contents("file.txt");
$chunks = str_split($file, 256);
foreach($chunks as $chunk)
  echo base64_encode($chunk) . "\n";

?>
#!/usr/bin/env php
<?php

$file = file_get_contents("file.txt");
$chunks = str_split($file, 256);
foreach($chunks as $chunk) {
echo base64_encode($chunk) . "\n";
}

?>

from php-mode.

ejmr avatar ejmr commented on July 17, 2024

@forthrin I no longer maintain or work on PHP Mode, and nowadays usually do not respond to notifications about it, but I want to make sure @zonuexe is aware of this issue. He is the current maintainer, and more importantly he will do a much better job than me at figuring out a solution to this issue.

For what it's worth, I tried to duplicate the error again, yet again I could not. Some important info from the output of php-mode-debug:

--- PHP-MODE DEBUG BEGIN ---
PHP Mode 1.19.0 of 2018-03-26
versions: GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit)
 of 2018-03-25; PHP Mode 1.19.0 of 2018-03-26
major-mode: php-mode
minor-modes: (ivy-mode tooltip-mode electric-indent-mode
mouse-wheel-mode file-name-shadow-mode font-lock-mode
auto-composition-mode auto-encryption-mode auto-compression-mode
line-number-mode transient-mark-mode abbrev-mode)

[...]

@zonuexe Please let me know if any other info would help you in debugging this.

As an aside, maybe it would be a good idea to re-open this issue and also create a GitHub label like "Cannot Reproduce" or something similar, something to indicate that there is a bug but it is not one everyone can reliably duplicate.

from php-mode.

forthrin avatar forthrin commented on July 17, 2024

@emjr: @zonuexe: I don't have permission to reopen or tag the issue, but I'll help with any testing necessary. My guess is the bug doesn't depend on other .emacs settings. Mine is pretty simple.

from php-mode.

zonuexe avatar zonuexe commented on July 17, 2024

@forthrin @ejmr Thanks for suggestion.
I would like to address this issue under the testimony of @forthrin.
This problem was marked as one of the issues to be addressed for the next stable release to be released.


(By the way, because I am not the owner of this repository, I can not receive notification of all issues from GitHub's features and mails. But since I use NotHub, if I am luckily in front of the computer I can detect all notifications at the same time. )

from php-mode.

zonuexe avatar zonuexe commented on July 17, 2024

I'm closing it because it looks like there is no problem today.

from php-mode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.